Multilinear KZG Polynomial commitment scheme
exploring KZG polynomial commitment scheme on Multilinear polynomial
Last updated
exploring KZG polynomial commitment scheme on Multilinear polynomial
Last updated
Similar to the Univariate KZG Polynomial commitment scheme, this interface of this commitment scheme entails;
Generate SRS
Commit function
Opening
Verification
Because we would be dealing with multiple variables, finding a way to efficiently find tone these functions to meet the demands placed my these multiple variables in terms of security and succinctness.
KZG PCS on multilinear polynomials is quite different compare to that of the Univariate polynomial, first this multilinear polynomial is expressed as an evaluation of the polynomial of the Boolean hypercube where the size of the Boolean hypercube n
is directly proportional to the number of variables n_var
of the multilinear polynomial.
Example; Given this multilinear polynomial,
it evaluation form can be expressed in this manner;
The structured reference string (SRS) now consists of encodings in $G$ of all powers of all Lagrange basis polynomials evaluated at a randomly chosen input . That is, if denotes an enumeration of the Lagrange basis polynomials, the SRS equals . Once again, the toxic waste that must be discarded because it can be used to destroy binding is the value having in mind that is the number of variable of the multilinear polynomial.
This is the interface of MultilinearSRS
, ww have already obtained g1_power_of_taus
, getting `` g2_power_of_taus
is relatively easier, we just need to perform the group operation on the vector of tau using the generator from G2
;
This function simply commits to the polynomial return a Group element representing the commitment to this polynomial and can be used for verification in the future. This is how the function interface looks like;
Function takes in the srs
, poly
to commit to and returns the commitment to the polynomial.
This commit function is quite simple, it involves performing the group operation on the element in the srs
and the evaluation element in the poly
. Representing this mathematically;
This is also known as making an evaluation and creating a proof for this evaluation;
This is how the interface of the open_fn
would look like;
This function would take in the srs
, poly
, the points at which the polynomial would be evaluated at points
returning the evaluation of this polynomial and commitment to this polynomial Vec<GroupElements>
where is element is a commitment associated with one variable of the polynomial.
Mathematically
and so forth until we have written;
The verification stage is less trouble than the opening fn, this major operations that would be done here are creation of some elliptic curve pairings, summation of some pairings and a pairing assertion.
Mathematically, this can be represented by;
This look complete, yes! it is, but still confusing...
given a polynomial;
This is it representation in evaluation form over the boolean hypercube;
Trusted Setup
Generate a vector of tau where the length of this vector is the number of variables in the polynomial.
Perform the SRS generation step;
Commitment
Opening
evaluating => 2(2*3) + 4(2) + 3 = 12 + 8 + 3 = 23
Verification
Special credit to;
Proofs, Arguments, and Zero-Knowledge by Justin Thaler
Rust Implementation:
g2_power_of_taus =
if , then
which can be computed given the values for all even without knowing .
To open the commitment at input to some value , i.e., to prove that , the committer computes a series of “witness polynomials” , defined in the following fact. For any fixed and any multilinear polynomial , if and only if there is a unique set of multilinear polynomials such that;
If can be expressed as the right part of the equation above then clearly , and hence .
On the other hand, suppose that q(z) = v. Then by dividing the polynomial by the polynomial , we can identify multilinear polynomials and such that;
where is the remainder term, and does not depend on variable . Iterating this process, we can divide by the polynomial to write;
where depends on no variables, i.e., is simply an element in . Since , it must hold that , completing the proof.
To open the commitment at input to value , the prover computes and sends to the verifier values claimed to equal for . Again, since each is multilinear, can be computed from the SRS
despite the fact that the prover does not know .
open at , ;
factors = and
rem