Module poly_commitment::commitment
source · Expand description
This module implements Dlog-based polynomial commitment schema. The following functionality is implemented
- Commit to polynomial with its max degree
- Open polynomial commitment batch at the given evaluation point and scaling factor scalar producing the batched opening proof
- Verify batch of batched opening proofs
Modules
Structs
- Contains the batch evaluation
- A commitment to a polynomial with some blinding factors.
- Contains the evaluation of a polynomial commitment at a set of points.
- Represent a polynomial commitment when the type is instantiated with a curve.
Traits
- A useful trait extending AffineRepr for commitments. Unfortunately, we can’t specify that
AffineRepr<BaseField : PrimeField>
, so usage of this traits must manually bindG::BaseField: PrimeField
. - A trait extending CommitmentCurve for endomorphisms. Unfortunately, we can’t specify that
AffineRepr<BaseField : PrimeField>
, so usage of this traits must manually bindG::BaseField: PrimeField
.
Functions
- Returns (1 + chal[-1] x)(1 + chal[-2] x^2)(1 + chal[-3] x^4) … It’s “step 8: Define the univariate polynomial” of appendix A.2 of https://eprint.iacr.org/2020/499
- This function populates the parameters
scalars
andpoints
. It iterates over the evaluations and adds each commitment to the vectorpoints
. The parameterscalars
is populated with the values:rand_base * polyscale^i
for each commitment. For instance, if we have 3 commitments, thescalars
vector will contain the values - Computes the linearization of the evaluations of a (potentially split) polynomial.
- Inside the circuit, we have a specialized scalar multiplication which computes either