github.com/klaytn/klaytn@v1.12.1/crypto/kzg4844/kzg4844_ckzg_nocgo.go (about)

     1  // Copyright 2023 The go-ethereum Authors
     2  // This file is part of the go-ethereum library.
     3  //
     4  // The go-ethereum library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The go-ethereum library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  //go:build !ckzg || nacl || js || !cgo || gofuzz
    18  
    19  package kzg4844
    20  
    21  import "sync"
    22  
    23  // ckzgAvailable signals whether the library was compiled into Geth.
    24  const ckzgAvailable = false
    25  
    26  // ckzgIniter ensures that we initialize the KZG library once before using it.
    27  var ckzgIniter sync.Once
    28  
    29  // ckzgInit initializes the KZG library with the provided trusted setup.
    30  func ckzgInit() {
    31  	panic("unsupported platform")
    32  }
    33  
    34  // ckzgBlobToCommitment creates a small commitment out of a data blob.
    35  func ckzgBlobToCommitment(blob Blob) (Commitment, error) {
    36  	panic("unsupported platform")
    37  }
    38  
    39  // ckzgComputeProof computes the KZG proof at the given point for the polynomial
    40  // represented by the blob.
    41  func ckzgComputeProof(blob Blob, point Point) (Proof, Claim, error) {
    42  	panic("unsupported platform")
    43  }
    44  
    45  // ckzgVerifyProof verifies the KZG proof that the polynomial represented by the blob
    46  // evaluated at the given point is the claimed value.
    47  func ckzgVerifyProof(commitment Commitment, point Point, claim Claim, proof Proof) error {
    48  	panic("unsupported platform")
    49  }
    50  
    51  // ckzgComputeBlobProof returns the KZG proof that is used to verify the blob against
    52  // the commitment.
    53  //
    54  // This method does not verify that the commitment is correct with respect to blob.
    55  func ckzgComputeBlobProof(blob Blob, commitment Commitment) (Proof, error) {
    56  	panic("unsupported platform")
    57  }
    58  
    59  // ckzgVerifyBlobProof verifies that the blob data corresponds to the provided commitment.
    60  func ckzgVerifyBlobProof(blob Blob, commitment Commitment, proof Proof) error {
    61  	panic("unsupported platform")
    62  }