Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeCellsAndKZGProofs(blob *Blob) ([CellsPerExtBlob]Cell, [CellsPerExtBlob]KZGProof, error)
- func ComputeKZGProof(blob *Blob, zBytes Bytes32) (KZGProof, Bytes32, error)
- func FreeTrustedSetup()
- func LoadTrustedSetup(g1MonomialBytes, g1LagrangeBytes, g2MonomialBytes []byte, precompute uint) error
- func LoadTrustedSetupFile(trustedSetupFile string, precompute uint) error
- func RecoverCellsAndKZGProofs(cellIndices []uint64, cells []Cell) ([CellsPerExtBlob]Cell, [CellsPerExtBlob]KZGProof, error)
- func VerifyBlobKZGProof(blob *Blob, commitmentBytes, proofBytes Bytes48) (bool, error)
- func VerifyBlobKZGProofBatch(blobs []Blob, commitmentsBytes, proofsBytes []Bytes48) (bool, error)
- func VerifyCellKZGProofBatch(commitmentsBytes []Bytes48, cellIndices []uint64, cells []Cell, ...) (bool, error)
- func VerifyKZGProof(commitmentBytes Bytes48, zBytes, yBytes Bytes32, proofBytes Bytes48) (bool, error)
- type Blob
- type Bytes32
- type Bytes48
- type Cell
- type KZGCommitment
- type KZGProof
Constants ¶
View Source
const ( BytesPerBlob = C.BYTES_PER_BLOB BytesPerCell = C.BYTES_PER_CELL BytesPerCommitment = C.BYTES_PER_COMMITMENT BytesPerFieldElement = C.BYTES_PER_FIELD_ELEMENT BytesPerProof = C.BYTES_PER_PROOF CellsPerExtBlob = C.CELLS_PER_EXT_BLOB FieldElementsPerBlob = C.FIELD_ELEMENTS_PER_BLOB FieldElementsPerCell = C.FIELD_ELEMENTS_PER_CELL )
Variables ¶
Functions ¶
func ComputeCellsAndKZGProofs ¶
func ComputeCellsAndKZGProofs(blob *Blob) ([CellsPerExtBlob]Cell, [CellsPerExtBlob]KZGProof, error)
ComputeCellsAndKZGProofs is the binding for:
C_KZG_RET compute_cells_and_kzg_proofs( Cell *cells, KZGProof *proofs, const Blob *blob, const KZGSettings *s);
func ComputeKZGProof ¶
ComputeKZGProof is the binding for:
C_KZG_RET compute_kzg_proof( KZGProof *proof_out, Bytes32 *y_out, const Blob *blob, const Bytes32 *z_bytes, const KZGSettings *s);
func FreeTrustedSetup ¶
func FreeTrustedSetup()
FreeTrustedSetup is the binding for:
void free_trusted_setup( KZGSettings *s);
func LoadTrustedSetup ¶
func LoadTrustedSetup(g1MonomialBytes, g1LagrangeBytes, g2MonomialBytes []byte, precompute uint) error
LoadTrustedSetup is the binding for:
C_KZG_RET load_trusted_setup( KZGSettings *out, const uint8_t *g1_monomial_bytes, uint64_t num_g1_monomial_bytes, const uint8_t *g1_lagrange_bytes, uint64_t num_g1_lagrange_bytes, const uint8_t *g2_monomial_bytes, uint64_t num_g2_monomial_bytes, uint64_t precompute);
func LoadTrustedSetupFile ¶
LoadTrustedSetupFile is the binding for:
C_KZG_RET load_trusted_setup_file( KZGSettings *out, FILE *in, uint64_t precompute);
func RecoverCellsAndKZGProofs ¶
func RecoverCellsAndKZGProofs(cellIndices []uint64, cells []Cell) ([CellsPerExtBlob]Cell, [CellsPerExtBlob]KZGProof, error)
RecoverCellsAndKZGProofs is the binding for:
C_KZG_RET recover_cells_and_kzg_proofs( Cell *recovered_cells, KZGProof *recovered_proofs, const uint64_t *cell_indices, const Cell *cells, uint64_t num_cells, const KZGSettings *s);
func VerifyBlobKZGProof ¶
VerifyBlobKZGProof is the binding for:
C_KZG_RET verify_blob_kzg_proof( bool *out, const Blob *blob, const Bytes48 *commitment_bytes, const Bytes48 *proof_bytes, const KZGSettings *s);
func VerifyBlobKZGProofBatch ¶
VerifyBlobKZGProofBatch is the binding for:
C_KZG_RET verify_blob_kzg_proof_batch( bool *out, const Blob *blobs, const Bytes48 *commitments_bytes, const Bytes48 *proofs_bytes, const KZGSettings *s);
func VerifyCellKZGProofBatch ¶
func VerifyCellKZGProofBatch(commitmentsBytes []Bytes48, cellIndices []uint64, cells []Cell, proofsBytes []Bytes48) (bool, error)
VerifyCellKZGProofBatch is the binding for:
C_KZG_RET verify_cell_kzg_proof_batch( bool *ok, const Bytes48 *commitments_bytes, const uint64_t *cell_indices, const Cell *cells, const Bytes48 *proofs_bytes, uint64_t num_cells, const KZGSettings *s);
func VerifyKZGProof ¶
func VerifyKZGProof(commitmentBytes Bytes48, zBytes, yBytes Bytes32, proofBytes Bytes48) (bool, error)
VerifyKZGProof is the binding for:
C_KZG_RET verify_kzg_proof( bool *out, const Bytes48 *commitment_bytes, const Bytes32 *z_bytes, const Bytes32 *y_bytes, const Bytes48 *proof_bytes, const KZGSettings *s);
Types ¶
type KZGCommitment ¶
type KZGCommitment Bytes48
func BlobToKZGCommitment ¶
func BlobToKZGCommitment(blob *Blob) (KZGCommitment, error)
BlobToKZGCommitment is the binding for:
C_KZG_RET blob_to_kzg_commitment( KZGCommitment *out, const Blob *blob, const KZGSettings *s);
Click to show internal directories.
Click to hide internal directories.