Module 07: From EC IPA to Lattice Bulletproofs, LaBRADOR, and Greyhound

1. The Bridge from EC IPA (Bulletproofs)

You already know IPA (Inner Product Argument) inside out! Let's recall the 10-second summary of EC IPA: Given a Pedersen commitment P=⟨a,G⟩+⟨b,H⟩+⟨a,b⟩Q∈GP = \langle \mathbf{a}, \mathbf{G} \rangle + \langle \mathbf{b}, \mathbf{H} \rangle + \langle \mathbf{a}, \mathbf{b} \rangle Q \in \mathbb{G} where a,b∈FpN\mathbf{a}, \mathbf{b} \in \mathbb{F}_p^N:

  • Split a=(aL,aR)\mathbf{a} = (\mathbf{a}_L, \mathbf{a}_R), G=(GL,GR)\mathbf{G} = (\mathbf{G}_L, \mathbf{G}_R), etc.
  • Send cross-terms L,R∈GL, R \in \mathbb{G}.
  • Verifier picks random u←Fp×u \leftarrow \mathbb{F}_p^\times.
  • Prover folds the witness in half: a′=uaL+u−1aR(modp),b′=u−1bL+ubR(modp),\mathbf{a}' = u \mathbf{a}_L + u^{-1} \mathbf{a}_R \pmod p, \qquad \mathbf{b}' = u^{-1} \mathbf{b}_L + u \mathbf{b}_R \pmod p, and folds generators: G′=u−1GL+uGR\mathbf{G}' = u^{-1}\mathbf{G}_L + u\mathbf{G}_R.
  • Repeat log⁡2N\log_2 N times until N=1N = 1! Total proof size: 2log⁡2N2 \log_2 N group elements.

2. Why Naive EC IPA Catastrophically Fails in Lattices

Try running the exact same split-and-fold algorithm with an Ajtai commitment C=Ax mod qC = A \mathbf{x} \bmod q (A∈Rqκ×NA \in R_q^{\kappa \times N}, ∥x∥2≤β\|\mathbf{x}\|_2 \le \beta)!

Failure 1: No Short Inverses (u−1u^{-1} is huge!)

Even if u∈Cu \in \mathcal{C} is a short invertible challenge, u−1 mod qu^{-1} \bmod q is huge (uniform in [−q/2,q/2)d[-q/2, q/2)^d). Okay, fine—use uu and 11 instead of uu and u−1u^{-1}: x′=xL+u⋅xR,A′=uAL+AR(modq).\mathbf{x}' = \mathbf{x}_L + u \cdot \mathbf{x}_R, \qquad A' = u A_L + A_R \pmod q. (Check: A′x′=uALxL+ARxR+u2ALxR+ARxLA' \mathbf{x}' = u A_L \mathbf{x}_L + A_R \mathbf{x}_R + u^2 A_L \mathbf{x}_R + A_R \mathbf{x}_L, so sending L=ARxLL = A_R \mathbf{x}_L and R=ALxRR = A_L \mathbf{x}_R gives uC+L+u2R=A′x′u C + L + u^2 R = A' \mathbf{x}'!)

Failure 2: Exponential Norm Blowup!

Look at the norm of x′\mathbf{x}' after 1 round: ∥x′∥2≤∥xL∥2+∥u∥op∥xR∥2≈(∥u∥op+1)∥x∥2.\|\mathbf{x}'\|_2 \le \|\mathbf{x}_L\|_2 + \|u\|_{\text{op}} \|\mathbf{x}_R\|_2 \approx (\|u\|_{\text{op}} + 1) \|\mathbf{x}\|_2. After k=log⁡2Nk = \log_2 N rounds (say N=220  ⟹  k=20N = 2^{20} \implies k = 20), the final scalar x∗x^* has norm: ∥x∗∥2≈(∥u∥op+1)20⋅β!\|x^*\|_2 \approx (\|u\|_{\text{op}} + 1)^{20} \cdot \beta! Wait—even if ∥u∥op\|u\|_{\text{op}} is tiny (say ∥u∥op=4\|u\|_{\text{op}} = 4, or 1010 in RR), 520≈2465^{20} \approx 2^{46}, and during extraction (rewinding kk levels of a binary tree of transcripts!) each level multiplies the extracted norm by another factor of ≈2∥u∥op\approx 2\|u\|_{\text{op}}! Across 20 rounds, the extracted SIS vector has norm >(factor)20≫q> (\text{factor})^{20} \gg q, destroying M-SIS binding unless qq is astronomically large (q≈2200+q \approx 2^{200+})!

Early lattice bulletproof papers (like Bootle–Lyubashevsky–Seiler 2019, Attema–Cramer–Kohl 2021) actually paid this exponential blowup or stopped after k=2k = 2–44 rounds, which meant either huge qq or O(N1/3)O(N^{1/3}) proofs.

How did modern schemes (LaBRADOR 2023, Greyhound 2024, LatticeFold 2024) break the exponential barrier and get O(log⁡N)O(\log N) or sublinear proofs with a tiny modulus q≈232q \approx 2^{32}–2642^{64}?

One superpower tool: Gadget Decomposition!


3. The Superpower: Gadget Matrices GG and Decomposition G−1G^{-1}

This trick originally came from Fully Homomorphic Encryption (GSW / bootstrapping) and is now the beating heart of succinct lattice proofs.

3.1 Base-bb Gadget Decomposition

Fix a small integer base b≥2b \ge 2 (say b=4b = 4, b=16b = 16, or b=256b = 256) and let t=⌈log⁡bq⌉t = \lceil \log_b q \rceil. Any integer x∈[−q/2,q/2)x \in [-q/2, q/2) (and hence any polynomial in RqR_q) can be written uniquely in balanced base-bb as: x≡∑j=0t−1bj⋅x(j)(modq),where ∥x(j)∥∞≤b2!x \equiv \sum_{j=0}^{t-1} b^j \cdot x^{(j)} \pmod q, \qquad \text{where } \|x^{(j)}\|_\infty \le \frac{b}{2}!

In matrix notation, define the gadget vector gT=(1,b,b2,…,bt−1)∈Rq1×t\mathbf{g}^T = (1, b, b^2, \dots, b^{t-1}) \in R_q^{1 \times t}, and for a vector of mm elements, the gadget matrix: G=Im⊗gT=(gT⋱gT)∈Rqm×mt.G = I_m \otimes \mathbf{g}^T = \begin{pmatrix} \mathbf{g}^T & & \\ & \ddots & \\ & & \mathbf{g}^T \end{pmatrix} \in R_q^{m \times mt}.

Look at the "inverse" operation G−1:Rqm→RmtG^{-1} : R_q^m \to R^{mt} (which is NOT a linear map—it's digit decomposition!): Given ANY vector v∈Rqm\mathbf{v} \in R_q^m (even with huge coefficients near q/2q/2!): v~=G−1(v)∈Rmtsatisfies:G⋅v~≡v(modq)AND∥v~∥∞≤b2!\tilde{\mathbf{v}} = G^{-1}(\mathbf{v}) \in R^{mt} \quad \text{satisfies:} \quad G \cdot \tilde{\mathbf{v}} \equiv \mathbf{v} \pmod q \quad \text{AND} \quad \|\tilde{\mathbf{v}}\|_\infty \le \frac{b}{2}!

PAUSE AND STARE AT WHAT G−1G^{-1} JUST DID:

Gadget decomposition takes a vector v\mathbf{v} whose norm blew up near qq, and replaces it with tt tiny vectors v~\tilde{\mathbf{v}} of norm ≤b/2\le b/2—RESETTING the norm back to O(b)O(b)!

Let's see how this immediately kills exponential norm blowup in folding!

3.2 Folding + Decomposition (The Core Trick)

Suppose after folding rr vectors x1,…,xr\mathbf{x}_1, \dots, \mathbf{x}_r with challenges c1,…,crc_1, \dots, c_r, you get a folded vector whose norm grew: z=∑i=1rcixi(norm grew by r⋅∥c∥op).\mathbf{z} = \sum_{i=1}^r c_i \mathbf{x}_i \quad (\text{norm grew by } r \cdot \|c\|_{\text{op}}). Instead of keeping z\mathbf{z} as a single vector of growing norm and folding again:

  1. Decompose z\mathbf{z} into tt small slices: z≡∑j=0t−1bjz(j)(modq)\mathbf{z} \equiv \sum_{j=0}^{t-1} b^j \mathbf{z}^{(j)} \pmod q, where each ∥z(j)∥∞≤b/2\|\mathbf{z}^{(j)}\|_\infty \le b/2.
  2. Notice: tt slices of length n′n' is just tt new short vectors, or if you split one long vector of length NN into rr chunks of length N/rN/r and fold with challenges c1,…,crc_1, \dots, c_r, you go from length NN to length t⋅(N/r)t \cdot (N/r)! As long as r>tr > t (for example, fold r=16r = 16 chunks when t=4t = 4, shrinking dimension by 4×4\times per round!), the witness both shrinks in length AND resets its norm to ≤b/2\le b/2 every single round!

Let's verify that!

  • Suppose log⁡2q=32\log_2 q = 32 and base b=256b = 256 (88 bits per digit), so t=4t = 4 slices!
  • Split a witness of NN elements into r=16r = 16 chunks of size N/16N/16.
  • Fold the 16 chunks with random short challenges c1,…,c16c_1, \dots, c_{16} into one chunk z\mathbf{z} of size N/16N/16.
  • Apply G−1(z)G^{-1}(\mathbf{z}) to split z\mathbf{z} into t=4t = 4 short chunks of size N/16N/16 (total size 4⋅N/16=N/44 \cdot N/16 = N/4)!
  • Net effect after 1 round: Witness length shrank by 4×4\times, and witness norm stayed constant (≤b/2\le b/2)! No exponential blowup!

(Run cargo run --bin lab04_gadget_folding inside labs/ to watch naive IPA explode past qq while gadget-decomposed folding stays tiny over arbitrary rounds!)


4. LaBRADOR (Beullens & Seiler, CRYPTO 2023)

LaBRADOR ("Lattice-Based Recursive Arguments of Knowledge") is currently the gold standard for compact, post-quantum, transparent lattice proofs (~40–60 KB for millions of R1CS constraints!).

Let's understand LaBRADOR's architecture cleanly—you already know every single ingredient!

4.1 The Principal Relation

LaBRADOR proves knowledge of rr short vectors s1,…,sr∈Rn\mathbf{s}_1, \dots, \mathbf{s}_r \in R^n (with total ℓ2\ell_2-norm ∑i=1r∥si∥22≤β2\sum_{i=1}^r \|\mathbf{s}_i\|_2^2 \le \beta^2) satisfying:

  1. Quadratic constraints (dot products over RqR_q): ∑i,j=1rai,j(k)⟨si,sj⟩+∑i=1r⟨φi(k),si⟩+b(k)≡0(modq),\sum_{i,j=1}^r a_{i,j}^{(k)} \langle \mathbf{s}_i, \mathbf{s}_j \rangle + \sum_{i=1}^r \langle \boldsymbol{\varphi}_i^{(k)}, \mathbf{s}_i \rangle + b^{(k)} \equiv 0 \pmod q,
  2. Constant-term constraints (using Module 06's coeff0\text{coeff}_0 trick, so we can handle integer inner products ⟨si,σ−1(sj)⟩\langle \mathbf{s}_i, \sigma_{-1}(\mathbf{s}_j) \rangle and exact Zq\mathbb{Z}_q constraints!).

(Think of (s1,…,sr)(\mathbf{s}_1, \dots, \mathbf{s}_r) as a r×nr \times n matrix of witnesses, where r≈Nr \approx \sqrt{N} or rr shrinks recursively!)

4.2 One Round of LaBRADOR Folding (How rr Vectors Collapse to 1!)

Instead of sending s1,…,sr\mathbf{s}_1, \dots, \mathbf{s}_r (size r⋅nr \cdot n), how does LaBRADOR fold them into a single vector z\mathbf{z} of size nn?

  1. Commit to each witness si\mathbf{s}_i using an Ajtai commitment ti=Asi mod q\mathbf{t}_i = A \mathbf{s}_i \bmod q (i=1,…,ri = 1, \dots, r).
    • Wait: sending rr commitments t1,…,tr\mathbf{t}_1, \dots, \mathbf{t}_r would itself be O(r)O(r)!
    • LaBRADOR's key trick ("Commit to the Commitments"!): Don't send t1,…,tr\mathbf{t}_1, \dots, \mathbf{t}_r in the clear! Take an outer Ajtai commitment u1=B⋅G−1(t1,…,tr)\mathbf{u}_1 = B \cdot G^{-1}(\mathbf{t}_1, \dots, \mathbf{t}_r)! Wait—the prover will prove they know the short decomposed vector G−1(t1,…,tr)G^{-1}(\mathbf{t}_1, \dots, \mathbf{t}_r) in the next recursive round!
  2. Norm Check via JL Projection (Module 06!):
    • Verifier sends JL matrix Π←{−1,0,1}256×rn\Pi \leftarrow \{-1, 0, 1\}^{256 \times rn} (actually per-vector Πi\Pi_i).
    • Prover computes masked projection p=∑i=1rΠisi\mathbf{p} = \sum_{i=1}^r \Pi_i \mathbf{s}_i (wait: in LaBRADOR's non-ZK core or ZK variant, p\mathbf{p} is sent and checked ∥p∥2≤Bp\|\mathbf{p}\|_2 \le B_p; to get ZK, mask p\mathbf{p} or add a blinding vector s0\mathbf{s}_0!).
    • Checking p=∑Πisi\mathbf{p} = \sum \Pi_i \mathbf{s}_i is just 256 extra linear inner-product constraints on si\mathbf{s}_i!
  3. Fold the rr vectors into ONE vector z\mathbf{z}:
    • Verifier sends short challenges c1,…,cr←Cc_1, \dots, c_r \leftarrow \mathcal{C}.
    • Prover computes the folded vector: z=∑i=1rcisi∈Rn.\mathbf{z} = \sum_{i=1}^r c_i \mathbf{s}_i \in R^n.
    • Notice: if the prover simply sent z\mathbf{z} in the clear right now, proof size would be O(n)O(n) (so choosing r=n=Nr = n = \sqrt{N} already gives O(N)O(\sqrt{N})!).
    • To go from O(N)O(\sqrt{N}) to O(log⁡N)O(\log N): Wait—what does the verifier actually need to check about z\mathbf{z} and the outer commitment?
      1. Az≡∑i=1rciti(modq)A \mathbf{z} \equiv \sum_{i=1}^r c_i \mathbf{t}_i \pmod q.
      2. For the quadratic constraints, the prover commits to the cross-terms gi,j=⟨si,sj⟩g_{i,j} = \langle \mathbf{s}_i, \mathbf{s}_j \rangle (which is r×rr \times r scalars—small if rr is small, AND also committed inside an outer Ajtai commitment u2=C⋅G−1(gi,j)\mathbf{u}_2 = C \cdot G^{-1}(g_{i,j})!) and verifies that ⟨z,z⟩≡∑i,jcicjgi,j(modq)\langle \mathbf{z}, \mathbf{z} \rangle \equiv \sum_{i,j} c_i c_j g_{i,j} \pmod q!
      3. Look at what the remaining claim is: the prover now holds a new, much smaller witness consisting of:
        • z\mathbf{z} (length nn),
        • G−1(t1,…,tr)G^{-1}(\mathbf{t}_1, \dots, \mathbf{t}_r) (the decomposed commitments!),
        • G−1(gi,j)G^{-1}(g_{i,j}) (the decomposed cross-terms!), ALL of which are short and satisfy linear + quadratic constraints (the exact same Principal Relation!)!
  4. Recurse! Reshape that new smaller witness into r′r' vectors of length n′n', commit to them, and fold again! After O(log⁡log⁡N)O(\log \log N) or O(log⁡N)O(\log N) rounds, the final witness is tiny (≈\approx a few hundred elements) and sent in the clear!

Result: A proof size of ~40–60 KB even for millions of constraints, using tiny modulus q≈232q \approx 2^{32}!


5. Greyhound: A Lattice Polynomial Commitment Scheme (PCS) for Plonk!

Wait: in Plonk, you don't necessarily want to rewrite your whole arithmetization as LaBRADOR's Principal Relation. What if you just want a drop-in post-quantum replacement for KZG or EC IPA—a Polynomial Commitment Scheme (PCS) that commits to f(X)∈Fq[X]f(X) \in \mathbb{F}_q[X] of degree <N< N and opens f(z)=yf(z) = y?

That is Greyhound (Nguyen–Seiler, CRYPTO 2024)!

5.1 How Greyhound Works (Tensor / Square-Root Matrix View)

Suppose f(X)=∑k=0N−1fkXk∈Zq[X]f(X) = \sum_{k=0}^{N-1} f_k X^k \in \mathbb{Z}_q[X] (or Rq[X]R_q[X]), with N=m⋅nN = m \cdot n (think m=n=Nm = n = \sqrt{N}). Arrange the NN coefficients into an m×nm \times n matrix F∈Zqm×nF \in \mathbb{Z}_q^{m \times n} (or base-bb decomposed into small digits so FF is short, ∥F∥∞≤b/2\|F\|_\infty \le b/2!).

Evaluating f(z)=yf(z) = y is simply a bilinear vector-matrix-vector product: f(z)=l(z)T⋅F⋅r(z)(modq),f(z) = \mathbf{l}(z)^T \cdot F \cdot \mathbf{r}(z) \pmod q, where:

  • r(z)=(1,z,z2,…,zn−1)T\mathbf{r}(z) = (1, z, z^2, \dots, z^{n-1})^T,
  • l(z)=(1,zn,z2n,…,z(m−1)n)T\mathbf{l}(z) = (1, z^n, z^{2n}, \dots, z^{(m-1)n})^T!

(Check: (Fr(z))i=∑j=0n−1Fi,jzj(F \mathbf{r}(z))_i = \sum_{j=0}^{n-1} F_{i,j} z^j, and dotting with l(z)\mathbf{l}(z) multiplies row ii by zinz^{in}, giving ∑i,jFi,jzin+j=f(z)\sum_{i,j} F_{i,j} z^{in + j} = f(z)!)

Now watch Greyhound commit and open:

  1. Commit (Offline):
    • Base-bb decompose FF so every column fj\mathbf{f}_j is short.
    • Compute an Ajtai commitment to each column: tj=Afj∈Rqκ\mathbf{t}_j = A \mathbf{f}_j \in R_q^\kappa (j=0,…,n−1j = 0, \dots, n-1).
    • Compress all nn commitments into one single short commitment C=B⋅G−1(t0,…,tn−1)∈RqκC = B \cdot G^{-1}(\mathbf{t}_0, \dots, \mathbf{t}_{n-1}) \in R_q^\kappa! (Look at that: commitment size is O(1)O(1)—just κ\kappa ring elements, ~2 KB, independent of NN!)
  2. Open f(z)=yf(z) = y:
    • Prover computes the row-compressed vector wT=l(z)TF∈Zqn\mathbf{w}^T = \mathbf{l}(z)^T F \in \mathbb{Z}_q^n (wait: l(z)TF\mathbf{l}(z)^T F isn't short! So decompose w\mathbf{w} into base-bb: w=Gw~\mathbf{w} = G \tilde{\mathbf{w}}!) AND the intermediate column commitments tj\mathbf{t}_j!
    • Wait: wTr(z)=y\mathbf{w}^T \mathbf{r}(z) = y is easy to check, and to prove wT=l(z)TF\mathbf{w}^T = \mathbf{l}(z)^T F and C=BG−1(t0,…,tn−1)C = B G^{-1}(\mathbf{t}_0, \dots, \mathbf{t}_{n-1}) without sending FF or all nn commitments tj\mathbf{t}_j:
    • Prover commits to w~\tilde{\mathbf{w}} in D=Aoutw~D = A_{\text{out}} \tilde{\mathbf{w}}, and runs LaBRADOR on the short witness (F,G−1(t0,…,tn−1),w~)(F, G^{-1}(\mathbf{t}_0, \dots, \mathbf{t}_{n-1}), \tilde{\mathbf{w}}) to prove: AF=[t0,…,tn−1],BG−1(t)=C,l(z)TF=Gw~!A F = [\mathbf{t}_0, \dots, \mathbf{t}_{n-1}], \qquad B G^{-1}(\mathbf{t}) = C, \qquad \mathbf{l}(z)^T F = G \tilde{\mathbf{w}}!
    • Because LaBRADOR proves this in O(log⁡N)O(\log N) size, Greyhound gives an O(1)O(1) commitment (~2 KB) and an O(log⁡N)O(\log N) evaluation proof (~50 KB) for polynomials of degree up to 2242^{24}+, with fast verification (O(N)O(\sqrt{N}) or sublinear with structured zz)!

6. Summary: The Norm-Reset Paradigm

Every succinct lattice proof system follows the same two-step rhythm:

  1. Fold linearly with short challenges ci∈Cc_i \in \mathcal{C} to reduce witness size (r→1r \to 1, or N→N/rN \to N/r).
  2. Decompose via G−1G^{-1} to break the resulting vector into short base-bb digits before the next round, resetting the norm to b/2b/2!

Exercises

  1. Gadget Math: Let q=101q = 101 and base b=5b = 5. What is t=⌈log⁡5101⌉t = \lceil \log_5 101 \rceil? Write x=37x = 37 in balanced base-55 (digits in {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\}) and verify ∑j=0t−15jx(j)≡37(mod101)\sum_{j=0}^{t-1} 5^j x^{(j)} \equiv 37 \pmod{101}.
  2. Folding Shrinkage Ratio: Suppose q≈248q \approx 2^{48} and we decompose with base b=212=4096b = 2^{12} = 4096 (t=4t = 4 slices). If one round of folding takes rr chunks and combines them into 1 chunk before applying G−1G^{-1}, what is the minimum rr needed so the total witness size decreases by at least a factor of 22 per round?
  3. Greyhound Tensor Check: Let N=4N = 4, m=n=2m = n = 2, and f(X)=3+2X+5X2+X3f(X) = 3 + 2X + 5X^2 + X^3. Write out the 2×22 \times 2 matrix FF and the vectors l(z),r(z)\mathbf{l}(z), \mathbf{r}(z), and verify l(2)TFr(2)=f(2)\mathbf{l}(2)^T F \mathbf{r}(2) = f(2).
  4. Hands-on Lab (Rust + Arkworks): Run cargo run --bin lab04_gadget_folding inside labs/ (lab04_gadget_folding.rs) to compare naive IPA folding (norm explodes exponentially) vs. gadget-decomposed folding over Arkworks FBabyBear!

(Solutions in exercise-solutions.md.)

results matching ""

    No results matching ""