venillalemon

February 4, 2026 · Notion export

Linear PCP and Recursive SNARKs


Linear PCP-based SNARK

Here is another paradigm for SNARKs: a cryptographic tool and a linear PCP builds a SNARK system. Before IOP and PCS paradigm was put forward, the main paradigm is PCP, e.g. Kilian’92 and Micali’00 is PCP+Merkle tree; IKO’07 is linear PCP; GGPR’13 uses QAP as linear PCP.

Quadratic Arithmetic Program (QAP)

QAP is another method to encode a circuit into a polynomial. Recall that in the first IOP for circuit SAT, we label each gate with a bitstring, and the satisfying value is encoded into a multilinear polynomial on the hypercube (interpolated to Fpn\mathbb{F}_p^n). In PLONK, we label each wire with an integer, and the satisfying value is encoded into a univariate polynomial on the roots of unity.

QAP labels all the input and output of all multiplicative gates. We label each gate with integers in [n][n] and each wire (except output wires of additive gate) with integers in [m][m]. The value of wire ii is cic_i. Then we define li(x)l_i(x) by li(ωj)=1,ωn=1l_i(\omega^j)=1,\omega^n=1, iff cic_i is the left input of the gate jj; and the same as ri(x)r_i(x), oi(x)o_i(x) for the right input and output.

Note that we say ii is the left input of gate jj also if ii passes several additive gates before it is the left input of gate jj. Then we have: the value on the circuit is proper iff

V(x)=i[n](xωi)  |  L(x)R(x)O(x)\left.V(x)=\prod_{i\in[n]}(x-\omega^i)\;\middle|\;L(x)R(x)-O(x)\right.

where

Lc(x)=i[m]cili(x),Rc(x)=i[m]ciri(x),Oc(x)=i[m]cioi(x)L_{\mathbf{c}}(x)=\sum_{i\in[m]}c_il_i(x),R_{\mathbf{c}}(x)=\sum_{i\in[m]}c_ir_i(x),O_{\mathbf{c}}(x)=\sum_{i\in[m]}c_io_i(x)

exactly encodes the left-input, right-input and output of gate jj with Lc(ωj)L_{\mathbf{c}}(\omega^j), Rc(ωj)R_{\mathbf{c}}(\omega^j), and Oc(ωj)O_{\mathbf{c}}(\omega^j).

Thus, the statement that PP knows ww such that C(x,w)=0C(x,w)=0 holds iff PP knows a vector c\mathbf{c} such that Lc(x)Rc(x)Oc(x)=q(x)i[n](xωi)=q(x)V(x)L_{\mathbf{c}}(x)R_{\mathbf{c}}(x)-O_{\mathbf{c}}(x)=q(x)\prod_{i\in[n]}(x-\omega^i)=q(x)V(x).

Constructing SNARK: [PGHR13] and [Groth16]

The global parameter is gp=((gτi)i[n],(gli(τ))i[m],(gri(τ))i[m],(goi(τ))i[m],gq(τ))gp=\left(\left(g^{\tau^i}\right)_{i\in[n]},\left(g^{l_i(\tau)}\right)_{i\in[m]},\left(g^{r_i(\tau)}\right)_{i\in[m]},\left(g^{o_i(\tau)}\right)_{i\in[m]},g^{q(\tau)}\right) where τ\tau is a random element (later deleted) in Fp\mathbb{F}_p.

With KZG in our hands, we reach to a simple protocol: The prover can compute πl=gLc(τ)\pi_l=g^{L_{\mathbf{c}}(\tau)}, πr=gRc(τ)\pi_r=g^{R_{\mathbf{c}}(\tau)}, πo=gOc(τ)\pi_o=g^{O_{\mathbf{c}}(\tau)}, and π=gq(τ)\pi=g^{q(\tau)} by homomorphically combining the global parameters. The verifier checks if e(πl,πr)=e(πo,g)e(π,gV(τ))e(\pi_l,\pi_r)=e(\pi_o,g) e(\pi,g^{V(\tau)}).

However, the protocol is far from the real protocol.

Problem 1: How to make sure that πl\pi_l is computed from gli(τ)g^{l_i(\tau)}?

KoE Assumption. We use gp=(gli(τ),gαli(τ))i[m]gp=(g^{l_i(\tau)},g^{\alpha l_i(\tau)})^{i\in[m]}. If the prover can compute π1=gicili(τ)\pi_1=g^{\sum_ic_il_i(\tau)} and π2=gαicili(τ)\pi_2=g^{\alpha \sum_ic_il_i(\tau)} without knowing α\alpha, then there is an extractor that can extract cic_i’s from the prover. The Pinocchio [PGHR13] uses KoE assumption.

GGM Assumption. Any prover can only compute linear combinations of gli(τ)g^{l_i(\tau)}’s, i.e., if the prover can compute π=gicili(τ)\pi=g^{\sum_ic_il_i(\tau)}, then it must know every cic_i. [Groth16] uses GGM assumption.

Problem 2: How to make sure every π\pi share the same cic_i’s?

We use another random β\beta for setup (also deleted after setup). We add gβ(li(τ)+ri(τ)+oi(τ))g^{\beta(l_i(\tau)+r_i(\tau)+o_i(\tau))} and gβg^{\beta} to the global parameters.

Problem 3: How to handle the public input and the expected output?

Recall that all the wires except the output of add gates are labelled. So the input wire and output wire (if not labelled, add a multiply 11 gate) are labelled with IioI_{io} . The idea is to split LcL_{\mathbf{c}} apart, and let verifier compute iIiocili(x)\sum_{i\in I_{io}}c_il_i(x).

Analysis

  • Setup: O(n)O(n) group exps, since there is a unique jj that makes li(ωj)=1l_i(\omega^j)=1 , if we label different wires with a same output gate with different labels.
  • Prover: O(nlogn)O(n\log n) for NTT. The prover computes the values of polynomial qq on the unity set ω\langle\omega\rangle and uses NTT to get its coefficients. Only with coefficients can the prover compute gq(τ)g^{q(\tau)} . Also, O(n)O(n) group exps.
  • Proof size: O(1)O(1)
  • Verifier: O(1)O(1) for pairing, O(Iio)O(|I_{io}|) group exps.

Recursive SNARKs

Recall if the circuit size is nn:

  • Pinocchio and Groth16: prover time O(nlogn)O(n\log n) and proof size O(1)O(1)
  • PLONK-KZG: prover time O(nlogn)O(n\log n) (every gadgets the prover should compute NTT) and proof size O(1)O(1)
  • FRI-based: prover time and proof size O(log2n)O(\log^2 n)

How can we achieve the better one in both prover time and proof size? The recursive proof provides a “proof of proof”. Let the inner system be (S,P,V)(S,P,V) , which proves that the prover knows the ww such that C(x,w)=1C(x,w)=1 . Suppose that the prover and verifier PP and VV is fast but the proof π\pi is long, the idea is to construct another proof system (S,P,V)(S^\prime,P^\prime,V^\prime) proving that the prover knows the π\pi such that V(vp,x,π)=1V(vp,x,\pi)=1 . This outer system has slower prover, but since the verifier VV is fast, the circuit of VV is much smaller than that of the original CC . So the outer prover PP^\prime is not so slow, as we expected.

A simple argument shows that if (S,P,V)(S,P,V) and (S,P,V)(S^\prime,P^\prime,V^\prime) are both knowledge sound, then the integrated proof system is also knowledge sound. The idea of proof is to regard the extractor EE^\prime as a malicious prover of (S,P,V)(S,P,V) . The probability gap is the sum of those of the original prove systems, thus negligible.

Application 1: incrementally verifiable computation

Suppose that a computation FF is applied to initial state s0s_0 recursively, each round takes an input wiw_i . The prover wants to prove that it knows the wiw_i ’s such that each computation step is correct. The verifier wants to verify that after nn steps, the state s0s_0 eventually becomes sns_n . (TODO)

Application 2: streaming proof generation

Suppose there is a bunch of transactions to be proved. We need not wait the transactions all to take place; rather, we generate proofs on every arrival of batches. For example if the batch size is 11 , first π1\pi_1 proves the prover knows w1w_1 that C(x1,w1)=0C(x_1,w_1)=0 ; then π2\pi_2 proves that the prover knows w2w_2 such that C(x2,w2)=0C(x_2,w_2)=0 . Then a proof is generated to prove that the prover knows π1,π2,\pi_1,\pi_2,\dots such that the verifier accepts them all.

Construction: alternating groups

Recall in KZG, the public parameter is a tuple (p,G,q,g,e)(p,G,q,g,e) , where GG is a group of order pp with gg its generator. And in this section, we regard the verifier algorithm as a circuit, so we had better embed GG into some vector space over Fq\mathbb{F}_q .

Definition (Algebraic Groups). Group GFqG\leq\mathbb{F}_q^\ell is an algebraic group if and only if
  • there are polynomials f1,,fFq[X]f_1,\dots,f_\ell\in\mathbb{F}_q[X^\ell] such that for all a,bGa,b\in G , a+b=(f1(a,b),,f(a,b))a+b=\left(f_1(a,b),\dots,f_\ell(a,b)\right) ;
  • there is an efficient algorithm testing if a=ba=b .

Can we make G=p|G|=p a subgroup of Fp\mathbb{F}_p^\ell ? No, because the discrete log is trivial in such groups. Take Smart Attack in the anomalous curve for an example.

The idea is to construct a group chain that: G1=p|G_1|=p , G1<FqG_1<\mathbb{F}_q^\ell ; G2=q|G_2|=q , G2<FrG_2<\mathbb{F}_r^\ell . The original circuit CC is over Fp\mathbb{F}_p . The KZG PCS will help us understand this recursive SNARK, because in that scheme, an exponentiation embeds every elements in Fp\mathbb{F}_p into G1<FqG_1<\mathbb{F}_q^\ell . Now that VV is a circuit over Fq\mathbb{F}_q , the proof that the prover PP^\prime knows a proof π1\pi_1 involves group arithmetic on Fq\mathbb{F}_q . Since G2G_2 has order qq , then PP^\prime sends a proof in G2G_2 .

However it is inefficient to have two pairing groups. For one pairing group and another non-pairing group, we can use KZG for one and bulletproofs for the other. The Halo is based on two non-pairing groups, i.e. elliptic group E(Fp)E(\mathbb{F}_p) and E(Fq)E(\mathbb{F}_q) of the elliptic curve y2=x3+5y^2=x^3+5 . Details https://eprint.iacr.org/2019/1021.pdf

Construction: folding

Another idea is homomorphic commitment, which we can compute a commitment of an addition simply by adding the commitments. We use this to prove two circuits at once (generate one proof for the two circuits) . More precisely, all circuits can be written in R1CS form (Az)(Bz)=Dz(Az)\circ(Bz)=Dz . An idea to prove two instance z1=(x1,w1),z2=(x2,w2)z_1 = (x_1, w_1),z_2 = (x_2, w_2) of the same R1CS at one time is to randomly choose an rr and prove for some R1CS, the combination z1+rz2z_1+rz_2 is feasible. However, we cannot have (Az1+rAz2)(Bz1+rBz2)=D(z1+rz2)(Az_1+rAz_2)\circ(Bz_1+rBz_2)=D(z_1+rz_2) if z1,z2z_1,z_2 are feasible inputs. Thus we turn to modify the definition and put forward Relaxed R1CS.

HW

  • ❎ Knowledge soundness is a meaningful notion when a prover claims that there are no satisfying assignments to a system of constraints
  • ❎ Knowledge soundness is a meaningful notion for the sumcheck protocol
  • ✅ Knowledge soundness (as defined in lecture 2) implies soundness
  • ❎ Non-interactive implies publicly verifiable
  • ❎ Vector commitments are as expressive as polynomial commitments
  • ✅ Polynomial extensions are distance amplifying encodings
  • ✅ Multivariate polynomial encoding reduces the total degree by an exponential factor compared to univariate polynomial encoding
  • ✅ The verifier in the sum-check protocol is oblivious to the polynomial g whose evaluations are being summed until the last step
  • ❎ The uniqueness of multilinear extensions is crucial for the soundness of the sumcheck protocol
  • ❎ The claim f(x) = g(x) for all k-bit inputs, where f and g are low degree polynomials over a large field, can be reduced to the following sumcheck claim: _{x ^k} (f(x)-g(x)) = 0
  • ❎ The polynomial IOP for SAT (from lecture 4) can be transformed into a SNARK with verifier complexity independent of circuit size
  • ✅ The polynomial IOP for SAT (from lecture 4) has optimal prover complexity
  • ✅ Extending the polynomial IOP for SAT in the natural way to support gates with n inputs will result in a sumcheck protocol over (n+1) * logS variables

verkle trees