Module 06: Exact Proofs, Norm Bounds, and Quadratic Relations (LNP22)
1. The Bridge from Plonk & IPA
With Modules 04 and 05, you can commit to a message m using BDLOP and prove knowledge of a linear relation As=t with slack.
To build a real proof system (like Plonk or R1CS), you still need three things:
Non-linear (quadratic) constraints: Plonk gates look like qLa+qRb+qM(a⋅b)+qOc+qC=0. How do you prove a product m1⋅m2=m3 of committed messages inside BDLOP?
Inner products & coefficient-wise checks: How do you prove ⟨a,b⟩=0 (sum of products) or verify individual polynomial coefficients?
Exact shortness / range proofs (eliminating slack!): Suppose your witness is binary (s∈{0,1}n), or has exact norm ∥s∥2≤β. Module 05's relaxed extraction only gives zˉ with norm 2Bz≫β and factor cˉ=c1−c2! How do we prove exact shortness without slack leaking into the witness?
This module covers the breakthrough techniques from ALS20 / LNP22 (Lyubashevsky–Nguyen–Plançon, CRYPTO 2022)—the modern standard for lattice NIZKs.
2. Proving Quadratic Relations in BDLOP ("Garbage Polynomials")
Suppose you have BDLOP commitments to messages m1,m2,m3∈Rq, and you want to prove in zero knowledge that:
m1⋅m2−m3≡0(modq).
Look at how a Schnorr-style BDLOP opening works for any committed message mi:
In the commitment phase, the prover commits to mi in tB,i=biTr+mi (using shared randomness r across all committed messages!).
In the Sigma protocol (Module 05), the prover sends a mask wA=A1y and for each message mi sends a mask:
wB,i=biTy+gi,
Wait: even simpler! In BDLOP, because r is masked by y via z=y+cr, look at what happens when you don't send mi in the clear:
Define the linear function of the challenge c for each committed polynomial mi:
Let ymi∈Rq be a uniformly random masking polynomial for mi (committed alongside mi, or via wB,i=biTy+ymi), and set:
fi=ymi+c⋅mi=biTz+wB,i−c⋅tB,i(modq)!
WAIT A SECOND! Read that equation again!
In BDLOP, the verifier already hasz, wB,i, and tB,i!
Wait: if the verifier checks wB,i=biTy+ymi and tB,i=biTr+mi, then the verifier can compute:
fi:=c⋅tB,i+wB,i−biTz=c(biTr+mi)+(biTy+ymi)−biT(y+cr)=ymi+c⋅mi!
Why doesn't fi need rejection sampling?!
Because mi is in Rq (NOT required to be short!), so ymi can be sampled uniformly in Rq! Just like EC Schnorr, ymi+cmimodq is uniformly random and perfectly hides mi with zero aborts!
(Rejection sampling is ONLY needed on z=y+cr because r must stay short!)
Now watch the Quadratic Trick!
Compute the product f1⋅f2−c⋅f3 in Rq:
f1⋅f2−c⋅f3=(ym1+cm1)(ym2+cm2)−c(ym3+cm3)=c2must be 0!(m1m2−m3)+cg1 (degree-1 term)(m1ym2+m2ym1−ym3)+g0 (degree-0 term)ym1ym2.
Look at what happens if m1m2−m3=0!
The c2 term vanishes! What's left is:
f1f2−cf3=c⋅g1+g0!
Notice:
g1=m1ym2+m2ym1−ym3does NOT depend on c—the prover knows g1before seeing c!
g0=ym1ym2does NOT depend on c either—wait: if the prover sends g0 in the clear, wait: ym1ym2 leaks nothing? Even better: the prover commits to g1 in the first round (as another BDLOP message inside tB, or sends wquad=bquadTy+g1!), and sends g0 (or verifies the c-masked equation f1f2−cf3=cg1+g0)!
Wait: if g1 is committed in tB,g1=bgTr+g1? Wait—g1 depends on y which is sampled during the Sigma protocol! So you can't commit to g1 using r if r was fixed before y... unless you commit to g1 inside the first messagew of the Sigma protocol:
Put g1 in an extra BDLOP slot of tB? No, put g1 in wquad=bgTy+g1 (no r needed, wait: if you put g1 in tg=bgTr+g1? Let's trace carefully!).
Let's write out the exact 100% sound & ZK mechanism (this is a classic subtle point—worth getting exact!):
Round 1 (Before challenge c):
Prover already committed to m1,m2,m3 via tB.
Prover samples masks y (for r) and ym1,ym2,ym3←Rq, plus a fresh mask yg←Rq? Wait: if g1 is already masked by −ym3? No, f3=ym3+cm3 uses ym3, and f1f2−cf3 has coefficient g1 on c1 and g0 on c0!
If the prover simply commits to g1 using a dedicated BDLOP row? Wait: if tg=bgTr+g1, then changing r isn't allowed, AND r is fixed! So instead:
The prover can outputtg=bgTr+g1 in Round 1 (since bgTr hides g1 under M-LWE—wait: r was already used in tA,tB, and adding one more fresh public vector bg just gives one more M-LWE sample with the same r!) AND computes wquad=bgTy+g0!
Check what happens when the verifier computes fg:=c⋅tg+wquad−bgTz!
fg=c(bgTr+g1)+(bgTy+g0)−bgT(y+cr)=c⋅g1+g0!
Let's verify both Zero-Knowledge and Soundness of that equation!
ZK:
tg=bgTr+g1 is masked by the M-LWE term bgTr (or in simulator: pick tg uniform, pick f1,f2,f3 uniform, and setwquad=f1f2−cf3−ctg+bgTz!).
Notice how clean the simulator is: wquad is algebraically determined, so ZK is perfect (given M-LWE for the static commitments and rejection sampling for z)!
Soundness (3-special soundness!):
Wait: the equation f1f2−cf3=cg1+g0 is a degree-2 polynomial in c!
Let mˉi=c−1(fi−ymi)? Formally, from 2 accepting transcripts (c1,z1),(c2,z2) we extract the unique committed messages (mˉ1,mˉ2,mˉ3) and (gˉ1) (because tB,i and tg are BDLOP commitments!).
Once mˉ1,mˉ2,mˉ3,gˉ1 and masks ymi,g0 are fixed by Round 1, the check says:
(mˉ1mˉ2−mˉ3)c2+(coeff1−gˉ1)c+(coeff0−g0)≡0(modq).
Since this is a degree-2 polynomial in c over each CRT slot field Fqd/k, by Schwartz-Zippel (or 3 distinct challenges with invertible pairwise differences!), the coefficient of c2MUST be zero in every CRT slot, i.e. mˉ1mˉ2−mˉ3≡0(modq)!
(Note: what if q is small, say q≈232, and Rq≅Fqd splits completely? Then a single challenge c only gives 1/q soundness per slot! That's why LNP22 either works in a partially-splitting ring Rq≅Fqd/kk where Fqd/k is huge (≥2128), OR boosts soundness by batching with λ independent random linear combinations over Fq!)
Batching Many Quadratic Equations into ONE!
Suppose you have 1000 quadratic equations (e.g., 1000 Plonk multiplication gates!). Do you send 1000 tg,wquad pairs?
No! Just like Plonk batches gate equations using powers of a challenge α:
Verifier sends random α1,…,αM (or α,α2,…,αM over an extension ring/field).
Prover computes ONE combined quadratic polynomial ∑j=1Mαj(f1,jf2,j−cf3,j)=cg1+g0, paying only ONE tg and ONE wquad for ALL M gates!
3. The Constant-Term & Automorphism Trick
Wait: in Plonk/R1CS, constraints are often inner products over Zqn, or coefficient-by-coefficient checks, whereas BDLOP multiplies polynomials in Rq=Zq[X]/(Xd+1).
How do you turn BDLOP polynomial multiplication into an inner product or scalar equality?
Recall Module 03's automorphism σ−1:
σ−1(a(X))=a(X−1)=a0−ad−1X−⋯−a1Xd−1.
For any two vectors a,b∈Rqm, write them as m polynomials a(1),…,a(m) and b(1),…,b(m).
Then:
coeff0(j=1∑ma(j)⋅σ−1(b(j)))=j=1∑m⟨a(j),b(j)⟩=⟨a,b⟩(modq)!
Wait: how do you commit to σ−1(b(j)) and prove it actually isσ−1 applied to b(j)?
Easy! Since σ−1 is an Rq-ring automorphism (σ−1(u+v)=σ−1(u)+σ−1(v) and σ−1(uv)=σ−1(u)σ−1(v)), apply σ−1 to the mask equation:
σ−1(fb)=σ−1(yb+c⋅b)=σ−1(yb)+σ−1(c)⋅σ−1(b).
Oops—notice c turned into σ−1(c)!
So you just define fb′ using σ−1(c) or require challenges to be invariant under σ−1, OR simply commit to b′=σ−1(b) alongside b, and check the linear relation σ−1(fb) vs fb′? Actually, look at the even simpler trick used in LNP22:
If tb=bTr+b, apply σ−1 directly to the commitment equation? Wait: σ−1(bTr)=σ−1(b)Tσ−1(r), which changes r to σ−1(r)!
Instead, LNP22 includes σ−1(r)? No—remember tA=A1r! If we also want σ−1(s1), just put s1 AND σ−1(s1) in the short vector (wait—or prove coeff0(⋅)=0!).
Proving coeff0(h)=0 for a Masked Polynomial h
Suppose you want to prove that a polynomial h∈Rq has constant term h0=0(modq) (so ⟨a,b⟩=0!), without revealing the other coefficients h1,…,hd−1!
Look how effortless this is:
Sample a uniform polynomial yh←Rqwhose constant term is forced to 0 (i.e. yh,0=0, and yh,1,…,yh,d−1←Zq)!
Note that if h0=0 and yh,0=0, then for ANY scalar challenge μ∈Zq (a constant polynomial, NOT an arbitrary c∈Rq!), the masked sum:
v=yh+μ⋅h(modq)
has constant term v0=0+μ⋅0=0(modq), while all non-constant coefficients v1,…,vd−1 are perfectly hidden by yh,1,…,yh,d−1!
And you prove v matches the committed quadratic expression (e.g., h=∑a(j)σ−1(b(j))) using the exact garbage-polynomial trick from Section 2!
(If you want to prove h0=target, just subtract target first! And if you want to prove m has k different inner-product constraints, you batch them with random scalars μ1,…,μk∈Zq—scalars commute with coeff0!)
4. Exact Shortness / Range Proofs (Eliminating Slack!)
Now let's tackle the most important gap from Module 05:
Suppose a prover commits to a vector s1∈Rm1 (say, inside ABDLOP) and claims ∥s1∥∞≤B (or even ∥s1∥2≤β).
Remember why Module 05 failed to prove exact shortness:
Module 05 proves A1zˉ=cˉtA, extracting a witness sˉ1=zˉ1 that satisfies A1zˉ=cˉtA with ∥zˉ1∥2≤2Bz.
Two problems:
2Bz is way larger than β (slack!).
sˉ1 is multiplied by cˉ=c1−c2! When you divide by cˉ mod q, cˉ−1zˉ1modq isn't short at all!
How do we prove exact shortness so that even the extracted message s1 (after dividing by cˉ!) literally has small coefficients?
Suppose you want to prove a polynomial x∈Rq has coefficients in {0,1} (binary!).
Write out the algebraic equation in Rqcoefficient-wise?
Careful! Over Rq=Zq[X]/(Xd+1), the equation x2−x≡0(modq) does NOT mean x has binary coefficients! (Because multiplication in Rq is polynomial multiplication, NOT coefficient-wise multiplication! Remember X2−X=0 even though (X) has {0,1} coefficients!)
Aha! How do you check xi(xi−1)≡0(modq) for EVERY coefficient xi (i=0,…,d−1)?
Using the constant-term trick with random weights γ0,…,γd−1←Zq!
Define the random polynomial γ(X)=∑i=0d−1γiXi.
Look at:
coeff0(σ−1(γ)⋅(coeffs squared? Wait—we need xi(xi−1)=0!))
Let's check! How do you compute ∑i=0d−1γi⋅xi(xi−1) using polynomial products in Rq?
Notice that if you define x~i=γixi (wait: γ is a verifier challenge!), how do you multiply xi by γi coefficient-wise?
Easy! Instead of using coefficient representation for x, commit to the NTT representation x^? NO! If x is committed in coefficient form, there is an even cleaner trick using roots of unity / NTT, OR matrix-vector inner products⟨γ⊙x,x−1⟩:
Wait: how do you compute γ⊙x in Rq?
Notice that x∈Rq has d coefficients (x0,…,xd−1). For each j∈{0,…,d−1}, multiplying x by X−j shifts xj into the constant term! Or even better: in NTT / CRT space (when q≡1(mod2d)), polynomial multiplication in RqIS coordinate-wise multiplication in Fqd!
So if you store the bits (b0,…,bd−1)∈{0,1}d in the NTT slots of a polynomial b^∈Rq (via b^=NTT−1(b0,…,bd−1)):
Then b^⋅(b^−1)≡0(modq) in RqIF AND ONLY IFbi(bi−1)≡0(modq) in every single slot i=0,…,d−1!
And b^ is a linear function of (b0,…,bd−1)!
Alternatively (in coefficient space, without requiring q≡1(mod2d)): use exact inner products with a challenge γ? Even simpler: let x∈Rq be committed, and notice you can pack d bits directly into NTT slots when Rq splits, OR prove ⟨x⊙rchal,x−1⟩=0 by committing to x⊙rchal? Wait: if you commit to y=NTT−1(γ⊙NTT(x))? Even better: in LNP22, they prove ∥s1∥2≤β directly using Johnson-Lindenstrauss projections (no bit decomposition needed for ℓ2 bounds!), and only use binary/ternary checks when exact small integers (like bits) are needed!
Let's see how LNP22's Johnson-Lindenstrauss (JL) Norm Proof works—it is one of the coolest ideas in modern cryptography!
5. Approximate ℓ2 Norm Proofs via Johnson–Lindenstrauss (LNP22)
Suppose we have an ABDLOP commitment to a vector s1∈ZN (viewing m1 ring elements in R as N=m1d integers), and we want to prove ∥s1∥2≤βwith only a tiny constant slack (like 2 or 2)—NOT O~(N)!
Wait: why did Module 05 have N slack and cˉ multiplication?
Because Module 05 proved knowledge of s1 using z1=y1+cs1.
Now watch Gentry–Halevi–Lyubashevsky (2021) / LNP22:
Instead of proving shortness via rejection sampling on s1 directly, project s1 with a random low-dimensional matrix Π!
5.1 The Johnson-Lindenstrauss Lemma for Cryptographers
Let Π←{−1,0,1}256×N be a random sparse ternary matrix (say each entry is +1 with prob 1/4, −1 with prob 1/4, 0 with prob 1/2—or bimodal {−1,+1}).
For ANY fixed vector x∈ZN:
What is the distribution of each coordinate (Πx)i=∑j=1NΠi,jxj?
It is a sum of independent zero-mean variables with variance 21xj2, so E[(Πx)i2]=21∥x∥22 (or ∥x∥22 if Πi,j∈{−1,+1})!
By the Johnson–Lindenstrauss / Hanson–Wright tail bound:
Completeness (honest short x): With overwhelming probability (>99%, and we can re-run or pick Π):
∥Πx∥2≤256⋅∥x∥2≈16β.
Soundness (adversarial long x): If ∥x∥2>Bbad (say Bbad=2β or 2⋅16β/128), the probability over random Π that ∥Πx∥2 happens to land below the threshold is 2−128!
5.2 Wait—How Do We Keep Πs1 Zero-Knowledge?!
If the prover simply sent p=Πs1 in the clear, that would leak 256 linear projections of s1!
So add a masking vector y3←Dσ3256!
Prover commits to s1 (in tA) before seeing Π.
Verifier sends random Π←{−1,0,1}256×N.
Prover computes p=y3+Πs1 (over Z, NO mod q!) and runs rejection sampling so p is distributed as Dσ3256, independent of Πs1!
Prover sends p in the clear!
Verifier checks TWO things:
Norm check (in the clear!):∥p∥2≤Bp (where Bp≈σ3256).
Linear algebraic check (mod q, via BDLOP!): Prove in ZK (using the exact constant-term / linear BDLOP proof!) that the committeds1 inside tA satisfies:
Πs1≡p−y3(modq)!
WAIT A SECOND! Look at the dimensions!
s1 might have dimension N=100,000!
Yet p ONLY has dimension 256 (independent of N!)!
And why does checking Πs1≡p−y3(modq) prove ∥s1∥2 is small (Wait: what if Πs1 wrapped around mod q?!)?
Aha! How do you prevent wrap-around mod q?
In LNP22, you ALSO run the standard Module 05 Sigma protocol (with slack!) on s1, which guarantees ∥s1∥2 is at mostBslack≪q (well below q/16!).
Then:
The sloppy Module 05 proof guarantees no wrap-around mod q (∥s1∥∞≪q and ∥Πs1∥∞<q/2), AND
The JL projection p=y3+Πs1 (which has constant slack ≈2 independent of N!) tightens the norm bound all the way down to ∥s1∥2≤2β!
5.3 Making Exact Bounds Even Tighter (Exact Range Proof!)
And what if you need an exactℓ∞ bound ∥s1∥∞≤B (or exact ℓ2 bound ∥s1∥22≤β2 with ZERO slack, e.g., B=1 for binary/ternary)?
For exact ℓ2 (∥s1∥22≤β2): Represent β2−∥s1∥22 as a sum of 4 squares a2+b2+c2+d2 (Lagrange's Four-Square Theorem! Every non-negative integer is a sum of 4 integer squares!), commit to a,b,c,d, prove they are short via JL (so no wrap-around mod q!), and prove the single quadratic identity:
⟨s1,s1⟩+a2+b2+c2+d2≡β2(modq)!
Because every term is non-negative and <q/2 (guaranteed by the JL check!), modular equality forces exact integer equality∥s1∥22+a2+b2+c2+d2=β2⟹∥s1∥22≤β2 with ZERO SLACK!
For exact ℓ∞ (binary/bounded coefficients): Use the exact quadratic check xi(xi−1)=0 (packed into CRT slots or checked via automorphism + JL to avoid wrap-around)!
6. Putting Part II Together: You Can Now Build a Complete Linear-Sized NIZK!
Pause and look at what you already know how to build using Modules 01–06 (this is literally the LNP22 framework):
Encode any arithmetic circuit (Plonk / R1CS) as linear + quadratic equations over Rq (using CRT slots or coefficients) plus shortness bounds on witnesses.
Commit to (s1,m) via ABDLOP.
Prove linear + quadratic constraints using masking polynomials fi=ymi+cmi, garbage polynomials (tg,wquad), and random batching αj.
Prove inner products using σ−1 + coeff0(h)=0.
Prove tight norm bounds using JL projection Πs1 (and 4-squares if zero slack is needed).
Make it non-interactive via Fiat-Shamir with Aborts!
Wait: what is the proof size of this system?
Look at z=y+cr and fi:
If the witness has length N, the vector z sent to the verifier ALSO has length O(N)!
So LNP22 gives a linear-sized proof O(N) (great for small/medium statements like ring signatures or verifiable encryption—around 10–30 KB—but NOT succinct for N=220 Plonk gates!).
To get O(logN) or O(N) succinct proofs—just like IPA and Plonk—we must fold! That is Part III (Modules 07–09).
Exercises
Quadratic Trick Algebra: Verify the polynomial expansion in Section 2:
(ym1+cm1)(ym2+cm2)−c(ym3+cm3)=c2(m1m2−m3)+cg1+g0.
Write out g1 and g0 explicitly. If m1m2=m3, why can't a cheating prover satisfy the verifier's check for 3 distinct challenges c1,c2,c3 in a field Fq?
Constant-Term Check: Suppose d=4, a(X)=1+2X+0X2−X3, and b(X)=3−X+5X2+X3. Compute ⟨a,b⟩ directly, then compute σ−1(b)(X) and verify that the constant term of a(X)σ−1(b)(X)mod(X4+1) equals ⟨a,b⟩.
Why JL Needs a Fallback Bound: Suppose a prover did not run any fallback norm check on s1, and only proved Πs1≡p−y3(modq) with ∥p∥2≤Bp. Give an example of a huge vector s1 (not short at all!) that still passes Πs1≡p−y3(modq)! (Hint: think mod q!)
Lagrange Four-Squares: Suppose β=10 and a prover wants to prove ∥s1∥22≤100 with zero slack, while their actual witness has ∥s1∥22=70. Find integers (a,b,c,d) such that 70+a2+b2+c2+d2=100.