Module 09: Capstone — Designing a Full Lattice Proof System
In Modules 01–08, we built every gear in the machine. Now let's assemble the entire machine from scratch, pick real concrete parameters, and check all the subtle failure modes that can silently break a lattice proof system.
1. End-to-End Architecture: A Complete Post-Quantum Plonk / R1CS SNARK
Suppose you want to build a transparent, post-quantum, succinct ZK-SNARK for arithmetic gates over .
Here is a clean, modern blueprint (combining Plonk/CCS arithmetization + Gadget-decomposed Ajtai/BDLOP commitments + Sumcheck/LaBRADOR folding + JL norm checks + Fiat-Shamir with aborts):
Layer 1: Ring & Modulus Setup
- Cyclotomic ring: with .
- Why ? Small enough that keeps norm expansion tiny, yet big enough for fast NTTs and compact vectors.
- Modulus : Choose a 32-bit or 64-bit prime, e.g. with (so splits into irreducible factors of degree : ).
- Why ? Every slot is a 1024-bit field (), giving Schwartz-Zippel error for single-challenge checks, AND Lyubashevsky–Seiler guarantees every nonzero difference with is invertible in !
- (Alternative if you want Plonk natively over with : pick with or , or embed wires into coefficients of as in Neo.)
Layer 2: Arithmetization & Witness Decomposition
- Represent your gate wires as a vector .
- Base- decomposition: Choose (balanced digits in ), so digits per element.
- Pack the digits into polynomials in (here ring elements, each with ).
- Reshape into chunks where !
- Notice: each chunk has Euclidean norm .
- Plonk / R1CS gates become quadratic + linear equations over the digits (plus gadget relations and range checks if needed), all expressed in LaBRADOR's Principal Relation!
Layer 3: Commitments (Ajtai / ABDLOP + Zero-Knowledge Masking)
- Want Zero-Knowledge? Add a random short blinding vector (masked via M-LWE/BDLOP) so linear combinations revealed during folding or JL projections are masked!
- Inner Commitments: ().
- Outer Commitment ("Commit to the Commitments"): Decompose via and commit with . Send ONLY to the verifier (size: ring elements KB)!
Layer 4: Constraint Batching, JL Norm Proof, and Folding Recursion
For each recursive round (reducing vectors of length down until is small):
- Quadratic Batching (Fiat-Shamir): Hash transcript to derive random batching weights (large, for Schwartz-Zippel in !). Collapse all quadratic constraints into one aggregate inner-product relation.
- JL Norm Projection (Fiat-Shamir): Derive . Compute (masked by + Gaussian noise with rejection sampling if ZK!). Verifier checks . Checking becomes 256 linear constraints folded into Step 1!
- Cross-Term Commitment: Compute cross-terms (and linear terms ). Commit to in .
- Folding: Derive short challenges (e.g. ternary with weight 16, ). Compute folded witness:
- Norm Reset & Recurse: Form the new smaller witness , reshape into vectors of length , and repeat! (In practice, after 3–5 rounds, the witness shrinks from gates down to ring elements, which are sent in the clear at the final round with a norm check !)
Layer 5: Fiat-Shamir with Aborts
If any ZK rejection-sampling check fails (either on JL mask or final masked response ), rewind to the start of the corresponding round, sample fresh masking randomness, and retry!
2. How Parameters Are Actually Chosen (Security Estimation)
How do cryptographers pick for 128-bit post-quantum security?
2.1 M-SIS Hardness: The Root Hermite Factor
Suppose an attacker tries to solve by running the BKZ lattice reduction algorithm (with blocksize ) on .
- Recall from Module 01: has rank and determinant .
- Actually, the attacker doesn't even have to use all columns of ! They can drop columns and choose an optimal sub-dimension to balance two competing forces:
- Smaller easier BKZ, but larger Minkowski bound .
- Larger smaller , but higher lattice dimension!
- What is the shortest nonzero vector BKZ produces in dimension ? Empirically (Gama–Nguyen, Chen–Nguyen), BKZ with root Hermite factor finds a vector of -norm:
- Differentiating with respect to to minimize gives the classic optimal attacker sub-dimension:
Check the Rule of Thumb for 128-bit PQ Security:
- Core-SVP cost of BKZ with blocksize :
- Classical sieving: .
- Quantum sieving: (so 128-bit PQ security needs , or conservatively –).
- At , the root Hermite factor is:
- Plug that into our bound! We need the extracted SIS norm to be strictly smaller than BKZ's best vector:
Let's plug in real numbers! Say , (), ():
- Try (underlying lattice rank ): So if your extracted slack norm is around (e.g., ), is insecure (too close)!
- Bump (): Now ANY extracted SIS vector with norm is solidly 128-bit post-quantum secure! And how big is a single commitment ? ! (Notice that if is smaller, say , you only need –, i.e. KB!)
2.2 M-LWE Hardness: The Hiding Rank
For M-LWE (hiding in BDLOP), the standard "primal uSVP" / "dual" BKZ attacks depend on the ratio and the secret dimension :
- With and ternary secrets/errors , you typically need – (so – for ) for 128-bit PQ security!
- Remember: only affects the prover's randomness length, NOT the commitment size or proof size (in recursive folding)!
3. Seven Classic Pitfalls That Break Lattice Proof Systems
If you ever design or audit a lattice proof system, check these seven traps first:
- Forgetting the Norm Check on Verification: Checking without checking lets anyone forge proofs using Gaussian elimination!
- Wrapping Around Modulo : Proving an integer inequality via equations (e.g., JL check or 4-squares) ONLY implies the integer bound if you also prove a coarse fallback bound ensuring terms stay in !
- Non-Invertible Differences in : If splits completely () and your challenge space allows to have a zero NTT slot, special soundness fails (or extraction probability drops by !).
- Underestimating Extraction Slack across Recursive Rounds: In -round extraction, if each rewinding step multiplies the extracted norm by , the extractor extracts a vector of norm . You MUST verify that , OR use round-by-round norm checking (JL!) so the extracted witness at every round is freshly bounded!
- Uniform vs. Discrete Gaussian Rejection Mistake: Using a fixed without bounding honestly—or forgetting to abort BEFORE sending in Fiat-Shamir—leaks the secret witness!
- Non-Uniform Fiat-Shamir Transcript: Forgetting to hash public parameters, statement, AND all intermediate commitments into the challenge lets a prover grind challenges or adaptively change the statement.
- Confusing Coefficient Multiplication with Slot Multiplication: Writing in checks bitness of NTT slots, NOT of polynomial coefficients! Always be crystal clear about which embedding your witness lives in!
4. Where to Go Next (Reading Map of Landmark Papers)
Now that you have the entire conceptual toolkit, you can read the actual primary literature without getting lost in notation:
- Lyubashevsky (2012): Lattice Signatures without Trapdoors — The origin of Fiat-Shamir with Aborts & discrete Gaussian rejection sampling.
- BDLOP (Baum et al., SCN 2018): More Efficient Commitments from Structured Lattice Assumptions — The BDLOP commitment scheme.
- LNP22 (Lyubashevsky, Nguyen, Plançon, CRYPTO 2022): Lattice-Based Zero-Knowledge Proofs and Applications: Shorter, Simpler, and More General — Quadratic BDLOP + automorphisms + JL norm proofs.
- LaBRADOR (Beullens & Seiler, CRYPTO 2023): LaBRADOR: Compact Proofs for R1CS from Module-SIS — Recursive Principal Relation folding + commitment-to-commitments.
- Greyhound (Nguyen & Seiler, CRYPTO 2024): Greyhound: Fast Polynomial Commitments from Lattices — Square-root matrix PCS + LaBRADOR opening.
- LatticeFold (Boneh & Chen, 2024) & LatticeFold+ / Neo (2025): LatticeFold: A Lattice-based Folding Scheme and its Applications to Succinct Proof Systems — Decomposition-before-folding IVC + Sumcheck over rings/small fields.
Exercises
- Security Estimation Practice: Using the BKZ formula with , , and : If your protocol has an extracted M-SIS norm bound , is enough? What about ?
- Slack Budget Check: Suppose a 1-round Sigma protocol has honest randomness , challenge operator norm , Gaussian , and vector dimension (so accepted ). In BDLOP binding with relaxed extraction, we get (norm ) and cross-multiplying two relaxed openings multiplies by (operator norm ). Compute the resulting bound required for binding!
- Spot the Bug: A developer implements a binary check on coefficients of by proving via Module 06's quadratic trick, with . Give an explicit polynomial with non-binary coefficients (not in !) that passes !
(Solutions in exercise-solutions.md.)