A More Efficient Approach to Zero Knowledge for PLONK
In PLONK (considered as an interactive oracle proof), the prover sends the
verifier several polynomials. They are evaluated at some k points during the
course of the protocol. Of course, if we want zero-knowledge, we would require
that those evaluations do not reveal anything about the proof's underlying
witness.
PLONK as described
here
achieves
zero
knowledge by multiplying the polynomials with a small degree polynomial of
random coefficients. When PLONK is instantiated with a discrete-log base
Bootle
et al type polynomial commitment scheme, the polynomial degrees must be
padded to the nearest power of two. As a result, since several of the
polynomials in PLONK already have degree equal to a power of two before the
zero-knowledge masking, the multiplication with a random polynomial pushes the
degree to the next power of two, which hurts efficiency. In order to avoid it,
we propose an alternative method of achieving zero knowledge.
Zero Knowledge for the Column Polynomials
Let w be the number of rows in a PLONK constraint system. For a typical
real-world circuit, w will not be equal to a power of two.
Let the witness elements from one column be s1,s2,…,sw. Let n be
the closest power of two to w such that n≥w. Let F be the
field that witness elements belong to.
Now, in vanilla PLONK, we pad the si with n−w elements, interpolate the
polynomial over a domain of size n, scale it by a low degree random
polynomial, and commit to the resulting polynomial. We want to avoid increasing
the degree with the scaling by a low degree polynomial, so consider the
following procedure.
Procedure. Sample k elements uniformly from F:
rw+1,…,rw+k. Append them to the tuple of witness elements and
then pad the remaining n−(w+k) places as zeroes. The resulting tuple is
interpolated as the witness polynomial. This approach ensures zero knowledge for
the witness polynomials as established by Lemma 1.
Lemma 1. Let H⊂F be a domain of size n. Let
s1,s2,…,sw∈F. Let rw+1,…,rw+k be k
uniformly and independently random elements in F. Let v be
the n-tuple
v=(s1,s2,…,sw,rw+1,…,rw+k,0,…n - (w+k) times).
Let f(X) be an interpolation polynomial of degree n−1 such that
f(hi)=vi, where hi∈H. Let c1,…,ck be any elements in
F such that ci=vj for every i,j. Then,
(f(c1),…,f(ck)) is distributed uniformly at random in Fk.
Proof sketch. Recall that the interpolation polynomial is
f(X)=j=1∑nk=j∏(hj−hk)(X−hk)vj
With Vw+1,…,Vw+k as random variables, we have,
f(X)=aw+1Vw+1+aw+2Vw+2+…+aw+kVw+k+a for
some constant field elements a,aw+1,…,aw+k. Therefore, assigning
random values to Vw+1,…,Vw+k will give k degrees of freedom
that will let (f(c1),…,f(ck)) to be distributed uniformly at random
in Fk.
Zero Knowledge for the Permutation Polynomial
The other polynomial in PLONK for which we need zero-knowledge is the
"permutation polynomial" z. The idea here is to set the last k evaluations
to be uniformly random elements t1,…,tk in F. Then, we'll
modify the verification equation to not check for those values to satisfy the
permutation property.
Modified permutation polynomial. Specifically, set z(X) as follows.
z(X)=L1(X)+i=1∑n−k−2(Li+1j=1∏ifraci,j)+t1Ln−k(X)+…+tkLn(X)
From Lemma 1, the above z(X) has the desired zero knowledge property when k
evaluations are revealed. However, we need to modify the other parts of the
protocol so that the last k elements are not subject to the permutation
evaluation, since they will no longer satisfy the permutation check.
Specifically, we will need to modify the permutation polynomial to disregard
those random elements, as follows.
t(X)=(a(X)b(X)qM(X)+a(X)qL(X)+b(X)qR(X)+c(X)qO(X)+PI(X)+qC(X))zH(X)1+((a(X)+βX+γ)(b(X)+βk1X+γ)(c(X)+βk2X+γ)z(X)×(X−hn−k)…(X−hn−1)(X−hn))zH(X)α−((a(X)+βSσ1(X)+γ)(b(X)+βSσ2(X)+γ)(c(X)+βSσ3(X)+γ)z(Xω)×(X−hn−k)…(X−hn−1)(X−hn))zH(X)α+(z(X)−1)⋅L1(X)zH(X)α2+(z(X)−1)⋅Ln−k(X)zH(X)α3
Modified permutation checks. To recall, the permutation check was originally
as follows. For all h∈H,
- L1(h)(Z(h)−1)=0
-
Z(h)[(a(h)+βh+γ)(b(h)+βk1h+γ)(c(h)+βk2h+γ)]=Z(ωh)[(a(h)+βSσ1(h)+γ)(b(h)+βSσ2(h)+γ)(c(h)+βSσ3(h)+γ)]
The modified permutation checks that ensures that the check is performed only on
all the values except the last k elements in the witness polynomials are as
follows.
-
For all h∈H, L1(h)(Z(h)−1)=0
-
For all h∈H∖{hn−k,…,hn},
Z(h)[(a(h)+βh+γ)(b(h)+βk1h+γ)(c(h)+βk2h+γ)]=Z(ωh)[(a(h)+βSσ1(h)+γ)(b(h)+βSσ2(h)+γ)(c(h)+βSσ3(h)+γ)]
-
For all h∈H, Ln−k(h)(Z(h)−1)=0
In the modified permutation polynomial above, the multiple
(X−hn−k)…(X−hn−1)(X−hn) ensures that the permutation check is
performed only on all the values except the last k elements in the witness
polynomials.