Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMinSRSSize = errors.New("minimum srs size is 2")
Functions ¶
func VerifyMultiPointKZGProofBatch ¶
func VerifyMultiPointKZGProofBatch(deduplicatedCommitments []bls12381.G1Affine, commitmentIndices, cosetIndices []uint64, proofs []bls12381.G1Affine, cosetEvals [][]fr.Element, openKey *OpeningKey) error
Verifies Multiple KZGProofs
Note: `cosetEvals` is mutated in-place, ie it should be treated as a mutable reference
Types ¶
type CommitKey ¶
The commit key stays the same between the kzg single opening use case and the multi opening use case
type OpeningKey ¶
type OpeningKey struct { // These are the G1 elements in monomial form from the trusted setup G1 []bls12381.G1Affine // These are the G2 elements in monomial form from the trusted setup // Note: the length of this list is the same as the length of the G1 list G2 []bls12381.G2Affine // Number of points that the prover will open to in a single multi-point proof // // The points that the prover can open to are not arbitrary sets, but are cosets. CosetSize uint64 // A bound on the polynomial length that we can commit, create and // verify proofs about. // // Note: This is not the degree of the polynomial. // One can compute the degree of the polynomial by doing `PolySize-1“ PolySize uint64 // The total number of points that the prover will create proofs for. // // Example, we could have f(x) = x^3 + x^2 + x + 1 // and a protocol may require that this polynomial which has PolySize = 4 // to be opened up at 32 points. The number 32 is the NumPointsToOpen constant. NumPointsToOpen uint64 // CosetShiftsPowCosetSize contains precomputed powers of coset shifts. // For each coset k, it stores (ω_k)^n where ω_k is the k-th coset shift // and n is the coset size. These values are used for verifying multiple // multi-point KZG opening proofs. CosetShiftsPowCosetSize []fr.Element // contains filtered or unexported fields }
func NewOpeningKey ¶
type SRS ¶
type SRS struct { OpeningKey OpeningKey CommitKey CommitKey }
Click to show internal directories.
Click to hide internal directories.