Encode
#
Relation
#
Intuition
#
The prover () holds two arrays and of integers from : . It wishes to map the pairs of elements, into a single element, without collisions. It will produce a succinct (independent of ) proof that contains the encoding of and according to this mapping.
For the mapping scheme, we use random linear combinations, since it is both collision resistant and it can be proven in zero knowledge. To do so, the prover defines for . Then, the the prover calculates for a random field element . Assuming is committed to before is know, this scheme is collision resistant by the Schwartz-Zippel lemma; if two polynomials are equal at then with overwhelming probability they are the same polynomial. However, to ensure negligible probability of collisions, may need to be smaller relative to the field size than initially thought. This is due to the birthday paradox. We are not evaluating the probability that a single one of the polynomials collides with one of the other polynomials, but rather the probability than any one polynomial out of collides with any other of the polynomials. The value of the latter is significantly larger, since it compares every possible pair of the polynomials, instead of just comparing one of the polynomials with the other polynomials. The probability of collisions can, however, still be made sufficiently small by bounding how large can be relative to the field size.
In order to prove the relation, the prover will encode the three arrays into three polynomials: , , and (using evaluation points on the domain ). It will commit to each polynomial: , , and . The verifier () cannot check any of the or values directly (they may contain secret information, and even if they do not, they are too long to check) so the verifier only sees ,, and . It will use these commitments to verified the constraint .
Protocol Details
#
Array Level
#
- holds an array
- holds an array
- generates the random challenge , then computes as follows:
Polynomial Level
#
We assume that , , and are encoded as the y-coordinates into a univariant polynomial where the x-coordinates (called the domain ) are chosen as the multiplicative group of order with generator (see Background for more). In short, is the first element and is the last element of . If is larger than the length of the arrays, the arrays can be padded with zeros.
Recall the constraint we want to prove:
We write the constraint in polynomial form:
- For all from to :
We adjust the constraint to show an equality with 0 and label it:
This equation is true for every value of (but not necessarily true outside of these values). To show this, we divide the polynomial by , which is a minimal vanishing polynomial for that does not require interpolation to create. If the quotient is polynomial (and not a rational function), then must be vanishing on too. Specifically, the prover computes:
By rearranging, we can get as a true zero polynomial (zero at every value both in and outside of it):
Ultimately the rotate argument will satisfy the following constraints at the Commitment Level:
- Show exists (as a polynomial that evenly divides the divisor)
- Show is correctly constructed from , , and
- Show is the zero polynomial
Commitment Level
#
The verifier will never see the arrays or polynomials themselves. They are undisclosed because they either (i) contain private data or (ii) they are too large to examine and maintain a succinct proof system. Instead the prover will use commitments.
The prover will write the following commitments to the transcript:
The prover will generate a random challenge evaluation point (using strong Fiat-Shamir) on the polynomials that is outside of . Call this point . We note that since and were committed to before was know, is committed to before is known. This is important for the collision resistance of our encoding scheme. Now, using , the prover can compute and commit to the following polynomials:
The prover will generate a random challenge evaluation point (using strong Fiat-Shamir) on the polynomials that is outside of . Call this point . The prover will write the point and opening proofs to the transcript:
To check the proof, the verifier uses the transcript to construct the value as follows:
Finally, if the constraint system is true, the following constraint will be true (and will be false otherwise with overwhelming probability, due to the Schwartz-Zippel lemma on ) :
Implementations
#
Security Proof
#
Completeness
#
If is zero, then will accept. Therefore, to show completeness, we show that any prover who holds that is a random linear combination of and using , can follow the steps outlined in the above protocol and the resulting will be equal to zero. To see this, observed that
Where the third equality relies on the fact that is divisible by . This is true if is vanishing on , i.e. if . This is true if if , since . But this is precisely the condition we assumed held for our prover, so the it creates by following the protocol is zero, and the transcript will be accepted.
Soundness
#
We prove knowledge soundness in the Algebraic Group Model (AGM). To do so, we must prove that there exists an efficient extractor such that for any algebraic adversary , the probability of winning the following game is .
Given outputs commitments to , , ,
, given access to ’s outputs from the previous step, outputs , , ,
plays the part of the prover in showing that is zero at a random challenge
wins if:
i) accepts at the end of the protocol
ii) for some
Our proof is as follows:
For the second win condition to be fulfilled, there must be some such that . But then is not vanishing on , so is not a polynomial (it is a rational function). This means that cannot calculated the correct commitment value without solving the t-SDH. Thus, chooses an arbitrary value for and writes to the transcript. Before this, it also writes commitments to , , and . All commitments has written are linear combinations of the elements in . is given these coefficients (since is an algebraic adversary) so can output the original polynomials.
then obtains the random challenge (using strong Fiat-Shamir). By the binding property of KZG commitments, , , and can each only feasibly be opened to one value. For to have the verifier accept, it must produce a proof that opens to . This means being able to produce where and . Since and are known, this implies knowing . Thus would have found , which is the t-SDH problem. We have shown that creating an accepting proof reduces to the t-SDH, so ’s probability of success is negligible.
Zero-Knowledge
#
We prove that the above protocol is zero-knowledge when (from the KZG paper) is used for the polynomial commitments. We do so by constructing a probabilistic polynomial time simulator that knows the trapdoor , which, for every (possibly malicious) verifier , can output a view of the execution of the protocol that is indistinguishable from the view produced by the real execution of the program.
The simulator chooses arbitrary values for , , and , then computes , , and to write as the commitments , and . computes using the values it chose for , , and . writes the commitment .
Now, generates the random challenge point (which we assume is not in ; if it is in , simply restarts and runs from the beginning). This is by strong Fiat-Shamir. then create fake opening proofs for , , and , to arbitrary values. This is done using the knowledge of , calculating the respective witness for each of the polynomials.
Finally, creates a fake opening proof for . This is done using knowledge of to calculate an accepting witness , as above. This means that will be zero, and the transcript will be accepted by the verifier. It is indistinguishable from a transcript generates from a real execution, since has the property of Indistinguishability of Commitments due to the randomization by .