The KZG Polynomial Commitment Scheme #
This file defines the KZG polynomial commitment scheme and instantiates it as a functional commitment scheme. Correctness and security proofs live in sibling files.
Notation #
Groups.PowerSrs.generatebuilds the prover and verifier structured reference strings.commit,generateOpening, andverifyOpeningare the concrete KZG operations.
References #
- [Kate, A., Zaverucha, G. M., and Goldberg, I., Constant-Size Commitments to Polynomials and Their Applications][KZG10]
To commit to an n + 1-tuple of coefficients coeffs (corresponding to a polynomial of
maximum degree n), we compute: ∏ i : Fin (n + 1), srs[i] ^ (p.coeff i).
Instances For
To generate an opening proving that a polynomial poly has a certain evaluation at z,
we return the commitment to the polynomial q(X) = (poly(X) - poly.eval z) / (X - z)
Instances For
To verify a KZG opening opening for a commitment commitment at point z with claimed
evaluation v, we use the pairing to check "in the exponent" that p(a) - p(z) = q(a) * (a - z),
where p is the polynomial and q is the quotient of p at z
Instances For
The commitment to a mathlib polynomial poly of maximum degree n is equal to
g₁ ^ (poly.1.eval a).val
The commitment to a computable polynomial (CPolynomial) poly of
maximum degree n is equal to g₁ ^ (poly.eval a).val.
Linearity of the pairing in the first argument, written multiplicatively.
Linearity of the pairing in the second argument, written multiplicatively.
Extract the exponent equation enforced by a successful KZG opening verification.
Solve the exponent equation from verify_opening_equation for the proof exponent.
The KZG instantiated as a (functional) commitment scheme.
The scheme takes a pregenerated structured reference string (srs) for the
committer and the verifier (generated by Groups.PowerSrs.generate).
commit: a function that commits to ann + 1-tuple of coefficientscoeffs(corresponding to a polynomial of maximum degreen)opening: a non-interactive reduction (i.e. solely the committer sends a single message) to prove the evaluation of the committed polynomial at a pointz. The message from the prover is the witness for the evaluation.