Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed

Zero Knowledge Proofs · Lecture 10 of 14 · 1:21:27

Lecture 10: Recursive SNARKs

ZKP MOOC Lecture 10: Recursive SNARKs on YouTube

Study guide

What this lecture covers

The lecture answers how a SNARK can prove knowledge of another proof rather than a witness, and why that idea is useful. It builds on the SNARK definitions and constructions from earlier lectures (including Groth16, Plonk, and FRI-based schemes) and on the R1CS format introduced previously.

You come away understanding what two-level and n-level proof recursion mean, why recursion needs careful bookkeeping to stay knowledge sound, why recursive proving requires special elliptic curves, and how modern folding schemes such as Nova replace expensive recursive verification with a handful of cheap operations, enabling systems used in rollups and incrementally verifiable computation.

Key ideas

  • Recursive SNARK: instead of proving knowledge of a witness w for a statement x, the outer proof system proves knowledge of a valid proof pi for x, where the circuit being proved is the inner system's verifier.
  • Proof compression: chaining a fast-prover/large-proof inner system with a slower-prover/short-proof outer system, applied only to the small verification circuit, yields both a fast overall prover and a short final proof.
  • Knowledge soundness of recursion: extraction works by composing extractors layer by layer, but each layer multiplies the extractor's running time, so recursion depth must stay logarithmic in the security parameter to remain polynomial time.
  • Random oracle instantiation: before recursing, the Fiat-Shamir random oracle in the inner verifier must be replaced with a concrete hash function (e.g., Poseidon), since a prover circuit cannot compute an actual random oracle.
  • Incrementally verifiable computation (IVC): proving a long iterated computation s_i = f(s_{i-1}, w_i) step by step, where each step's proof also certifies the previous step's proof, so memory stays bounded regardless of total computation length.
  • Algebraic groups and curve mismatch: a prover supporting circuits over a field F_p produces commitments in a group defined over a different field F_q, forcing the verifier to do arithmetic in F_q; matching curves (chains or cycles of curves, like the Pasta curves) avoids expensive field emulation.
  • Folding scheme: a protocol that compresses two valid R1CS-style instances into one folded instance, such that a valid witness for the folded instance implies (via an extractor) valid witnesses for both originals.
  • Relaxed and committed R1CS: R1CS is relaxed with a scalar and an error vector to make folding work algebraically, and the error vector is replaced by a homomorphic commitment so the folded instance stays small.

Walkthrough

Two-level recursion and proof compression (0:00)

The lecture reviews the setup/prove/verify structure of a SNARK, then defines recursion: an outer proof system takes the inner system's proof pi as its witness and proves that the inner verifier would accept it. Because the outer prover only has to process the inner verifier's circuit (not the original large circuit), pairing a fast-prover inner system with a slow-prover, short-proof outer system yields a fast overall prover with a short final proof.

Knowledge soundness and recursion depth (7:07)

The lecture walks through building an extractor for the two-level construction by composing the outer system's extractor with the inner system's extractor, and shows the combined knowledge error stays negligible. It then flags that extractor running time roughly multiplies at each level, so unbounded recursion depth breaks polynomial-time extraction; practical constructions keep the depth logarithmic and instantiate the Fiat-Shamir random oracle with a concrete hash function before recursing.

Streaming proofs and incrementally verifiable computation (16:11)

The lecture shows how recursion enables streaming proof generation for batches of transactions as they arrive, rather than waiting for the whole batch. It then introduces IVC: a long computation built by repeatedly applying a function f, where each step outputs both the new state and a proof that the state and the previous proof are both valid, so the final proof certifies the entire computation trace via iterated extraction. Applications covered include compressing an entire blockchain's validity into one proof, verifiable delay functions, and markets for distributing proving work across GPUs.

The curve-matching problem in recursion (31:22)

The lecture explains why a prover for circuits over F_p using polynomial commitments in a group of order p (defined over F_q) forces the verifier to do arithmetic in F_q, mismatching what the next level's prover supports. It covers field emulation (correct but slow), the impossibility of a group of order p defined over F_p itself, and the better solutions: chains of groups and, more efficiently, cycles of groups such as the Pasta curves used in Halo 2, which let recursion "ping-pong" between two matched curves.

Folding schemes (46:35)

The lecture introduces folding as a faster alternative to full recursive verification. It defines a folding scheme for R1CS, shows that a naive random linear combination of two valid witnesses does not itself satisfy R1CS, and motivates relaxed R1CS, which adds a scalar c and error vector E to absorb the leftover cross terms. It then works through the algebra showing that folding two relaxed R1CS instances (using a prover-sent cross-term commitment and a verifier-chosen random challenge) produces a new relaxed instance with a valid witness, provided the error term is replaced by an additively homomorphic commitment to keep instances small.

Nova, Supernova, and Sangria (1:09:54)

The lecture applies folding to build IVC without running a verifier circuit inside the prover: each step's instance is folded into a running accumulator, and an augmented R1CS program checks the step computation plus just two group multiplications to certify the folding itself was done correctly. It closes by noting Supernova's extension to multiple step functions and Sangria's generalization of folding to Plonk-style arithmetization.

Before you watch

  • Review the R1CS definition and Groth16 construction from the previous lecture, since recursion is expressed in R1CS terms here.
  • Recall the KZG polynomial commitment and Fiat-Shamir transform from earlier lectures, both of which reappear in the discussion of curve matching and non-interactive folding.
  • Familiarity with elliptic curve groups is assumed for the section on chains and cycles of curves.

Check your understanding

  1. What does it mean for an outer proof system to "prove knowledge of a proof" rather than knowledge of a witness, and why does this help when the inner proof is large?
  2. Why must recursion depth be kept logarithmic in the security parameter for the knowledge-soundness extractor to remain valid?
  3. Why does a prover supporting circuits over F_p end up needing a verifier that does arithmetic over a different field F_q, and how do cycles of curves solve this?
  4. Why doesn't a plain random linear combination of two R1CS witnesses satisfy R1CS, and what does relaxed R1CS add to fix this?
  5. In the Nova-based IVC construction, what does the augmented R1CS program check at each step, and why is that cheaper than running a full SNARK verifier circuit?

Vocabulary

recursive (adjective)
Referring to something that refers to or builds on itself.
A recursive SNARK proves knowledge of another proof.
proof compression (noun)
Making a large or slow proof shorter and faster to verify.
Proof compression chains a fast prover with a system that gives short proofs.
random oracle (noun)
An idealized hash function assumed to behave completely randomly.
The Fiat-Shamir random oracle must be replaced with a real hash function.
incrementally verifiable computation (noun)
A method of proving a long computation step by step, keeping memory use small.
Incrementally verifiable computation proves each step certifies the last.
elliptic curve (noun)
A type of mathematical curve used to build secure cryptographic groups.
SNARK commitments are often built from elliptic curve points.
field emulation (noun)
Simulating arithmetic in one number system using another, at extra cost.
Field emulation is correct but slow for matching curves.
cycle of curves (noun)
A pair of elliptic curves designed so each one's field matches the other's group order.
A cycle of curves lets recursion switch back and forth efficiently.
folding scheme (noun)
A protocol that merges two instances of a problem into one smaller instance.
A folding scheme combines two R1CS instances into a single one.
relaxed R1CS (noun)
A modified version of R1CS with extra terms that make folding possible.
Relaxed R1CS adds a scalar and error vector to absorb leftover terms.
accumulator (noun)
A running, growing structure that keeps track of combined information over time.
Each step's instance is folded into a running accumulator.
extractor (noun)
A program that pulls a valid witness out of a prover's behavior.
Composing extractors layer by layer verifies recursive knowledge soundness.
streaming (adjective)
Processing data continuously as it arrives, rather than waiting for it all at once.
Streaming proof generation processes transactions as they come in.
verifiable delay function (noun)
A function that takes a fixed, unavoidable amount of time to compute, but is fast to check.
Verifiable delay functions are one application of recursive proofs.
ping-pong (verb)
To go back and forth repeatedly between two things.
Recursion can ping-pong between two matched curves.
bookkeeping (noun)
The careful tracking of small details needed to keep a system correct.
Recursion needs careful bookkeeping to stay knowledge sound.
compose (verb)
To combine several parts or functions into a single one.
The extractor is built by composing the outer and inner extractors.
step function (noun)
The repeated computation applied at each stage of an iterated process.
IVC repeatedly applies the same step function to update the state.
chain (of curves) (noun)
A sequence of matched cryptographic groups linked together.
A chain of curves is one solution to the field-mismatch problem.
cross terms (phrase)
Extra mixed terms that appear when combining two mathematical expressions.
Relaxed R1CS absorbs the cross terms left over from folding.
distribute (proving work) (verb)
To spread a large task across multiple machines or workers.
Markets let proving work be distributed across many GPUs.

Chapters

From the YouTube description

Dan Boneh, Zero Knowledge Proofs MOOC

← Lecture 9: SNARKs from Linear PCPs and QAPs · Lecture 11: From Practice to Theory →