In the halo2 protocol, we commit a polynomial and then evaluate, and later check whether the committed polynomial is the same as the evaluated one. To do this, the original halo2 by ZCash uses inner product argument. The main reference is [BCMS20] and [4.2] in halo2 book.
Assume that we have a polynomial of degree , and is a power of 2. Let be an additive group of prime order with DLP security. We randomly sampled nonzero for . We also choose a random nonzero hiding factor . For convenience, every vector notation denotes its vector form, for example, and if . And, and function make a vector into a half-lengthed vector which output the left half and right half respectively.
Commitment
To commit the polynomial , let be a -th coefficient of . The prover chooses a random , and commits
Note that this commitment is linear in and .
Open and Check
In this stage, the prover evaluates for some and makes an evaluation proof so that the verifier can check the evaluation is valid.
Let . The prover samples a random polynomial of degree with zero at . This can be done by choosing a random polynomial of degree and multiplying . Now, for a random , commit .
The verifier makes a random challenge . Then, the prover sets
and commits by without hiding factor. Now, we want to recursively reduce the size of the proof as in [BCCGP16]. Let . I'd like to emphasize that the prover wants to prove and . For the first round, let , , and . The prover sends
with random and . The verifier makes a random challenge . To make a half-lengthed proof, let
and the prover calculates new witness
Since and , direct computation yields
and
By applying this process for rounds, the last , , and is just length-one vectors. By accumulating calculations,
The prover sent each and for each round, and lastly send witness and blinding factors and . Then, the verifier accepts only if the above equation holds.
Multipoint opening argument
We explained how to check evaluation for one polynomial . However, in the halo2 protocol, we use multiple polynomials corresponding to each column and multiple evaluations corresponding to each rotation. To check several evaluations work well with commitments efficiently, halo2 uses a multipoint opening argument.
Let's explain this using an example. What the prover committed is a set of polynomials and rotated polynomials. Say for , for , and for are committed. We can group by which rotations are used. That is, non-rotated are group one, are group two, and are group three. For each group, let
where is a random challenge given by the verifier. Now, calculate an interpolation polynomial for each group. Recall that is a random challenge. interpolates . interpolates and , and interpolates .
Next, the prover computes
and for random given by the verifier, the prover computes
The verifier makes a random challenge , then the prover sends evaluations . After receiving, the verifier sends a challenge again. Then, we use the inner product argument with
You can find the full process of halo2 using IPA here. I tried to use consistent notation from there.
댓글
댓글 쓰기