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\mathbf{m} using BDLOP and prove knowledge of a linear relation As=tA\mathbf{s} = \mathbf{t} with slack.

To build a real proof system (like Plonk or R1CS), you still need three things:

  1. Non-linear (quadratic) constraints: Plonk gates look like qLa+qRb+qM(a⋅b)+qOc+qC=0q_L a + q_R b + q_M (a \cdot b) + q_O c + q_C = 0. How do you prove a product m1⋅m2=m3m_1 \cdot m_2 = m_3 of committed messages inside BDLOP?
  2. Inner products & coefficient-wise checks: How do you prove ⟨a,b⟩=0\langle \mathbf{a}, \mathbf{b} \rangle = 0 (sum of products) or verify individual polynomial coefficients?
  3. Exact shortness / range proofs (eliminating slack!): Suppose your witness is binary (s∈{0,1}n\mathbf{s} \in \{0, 1\}^n), or has exact norm ∥s∥2≤β\|\mathbf{s}\|_2 \le \beta. Module 05's relaxed extraction only gives zˉ\bar{\mathbf{z}} with norm 2Bz≫β2 B_z \gg \beta and factor cˉ=c1−c2\bar{c} = c_1 - c_2! 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∈Rqm_1, m_2, m_3 \in R_q, and you want to prove in zero knowledge that: m1⋅m2−m3≡0(modq).m_1 \cdot m_2 - m_3 \equiv 0 \pmod q.

Look at how a Schnorr-style BDLOP opening works for any committed message mim_i: In the commitment phase, the prover commits to mim_i in tB,i=biTr+mi\mathbf{t}_{B,i} = \mathbf{b}_i^T \mathbf{r} + m_i (using shared randomness r\mathbf{r} across all committed messages!). In the Sigma protocol (Module 05), the prover sends a mask wA=A1y\mathbf{w}_A = A_1 \mathbf{y} and for each message mim_i sends a mask: wB,i=biTy+gi,w_{B, i} = \mathbf{b}_i^T \mathbf{y} + g_i, Wait: even simpler! In BDLOP, because r\mathbf{r} is masked by y\mathbf{y} via z=y+cr\mathbf{z} = \mathbf{y} + c\mathbf{r}, look at what happens when you don't send mim_i in the clear: Define the linear function of the challenge cc for each committed polynomial mim_i: Let ymi∈Rqy_{m_i} \in R_q be a uniformly random masking polynomial for mim_i (committed alongside mim_i, or via wB,i=biTy+ymiw_{B,i} = \mathbf{b}_i^T \mathbf{y} + y_{m_i}), and set: fi=ymi+c⋅mi=biTz+wB,i−c⋅tB,i(modq)!f_i = y_{m_i} + c \cdot m_i = \mathbf{b}_i^T \mathbf{z} + w_{B, i} - c \cdot t_{B, i} \pmod q!

WAIT A SECOND! Read that equation again! In BDLOP, the verifier already has z\mathbf{z}, wB,iw_{B,i}, and tB,it_{B,i}! Wait: if the verifier checks wB,i=biTy+ymiw_{B,i} = \mathbf{b}_i^T \mathbf{y} + y_{m_i} and tB,i=biTr+mit_{B,i} = \mathbf{b}_i^T \mathbf{r} + m_i, then the verifier can compute: fi:=c⋅tB,i+wB,i−biTz=c(biTr+mi)+(biTy+ymi)−biT(y+cr)=ymi+c⋅mi!f_i := c \cdot t_{B,i} + w_{B,i} - \mathbf{b}_i^T \mathbf{z} = c(\mathbf{b}_i^T \mathbf{r} + m_i) + (\mathbf{b}_i^T \mathbf{y} + y_{m_i}) - \mathbf{b}_i^T(\mathbf{y} + c\mathbf{r}) = y_{m_i} + c \cdot m_i!

Why doesn't fif_i need rejection sampling?! Because mim_i is in RqR_q (NOT required to be short!), so ymiy_{m_i} can be sampled uniformly in RqR_q! Just like EC Schnorr, ymi+cmi mod qy_{m_i} + c m_i \bmod q is uniformly random and perfectly hides mim_i with zero aborts! (Rejection sampling is ONLY needed on z=y+cr\mathbf{z} = \mathbf{y} + c\mathbf{r} because r\mathbf{r} must stay short!)

Now watch the Quadratic Trick! Compute the product f1⋅f2−c⋅f3f_1 \cdot f_2 - c \cdot f_3 in RqR_q: f1⋅f2−c⋅f3=(ym1+cm1)(ym2+cm2)−c(ym3+cm3)=c2(m1m2−m3)⏟must be 0!+c(m1ym2+m2ym1−ym3)⏟g1 (degree-1 term)+ym1ym2⏟g0 (degree-0 term).\begin{aligned} f_1 \cdot f_2 - c \cdot f_3 &= (y_{m_1} + c m_1)(y_{m_2} + c m_2) - c(y_{m_3} + c m_3) \\ &= c^2 \underbrace{(m_1 m_2 - m_3)}_{\text{must be } 0!} + c \underbrace{(m_1 y_{m_2} + m_2 y_{m_1} - y_{m_3})}_{g_1 \text{ (degree-1 term)}} + \underbrace{y_{m_1} y_{m_2}}_{g_0 \text{ (degree-0 term)}}. \end{aligned}

Look at what happens if m1m2−m3=0m_1 m_2 - m_3 = 0! The c2c^2 term vanishes! What's left is: f1f2−cf3=c⋅g1+g0!f_1 f_2 - c f_3 = c \cdot g_1 + g_0! Notice:

  • g1=m1ym2+m2ym1−ym3g_1 = m_1 y_{m_2} + m_2 y_{m_1} - y_{m_3} does NOT depend on cc—the prover knows g1g_1 before seeing cc!
  • g0=ym1ym2g_0 = y_{m_1} y_{m_2} does NOT depend on cc either—wait: if the prover sends g0g_0 in the clear, wait: ym1ym2y_{m_1} y_{m_2} leaks nothing? Even better: the prover commits to g1g_1 in the first round (as another BDLOP message inside tB\mathbf{t}_B, or sends wquad=bquadTy+g1w_{\text{quad}} = \mathbf{b}_{\text{quad}}^T \mathbf{y} + g_1!), and sends g0g_0 (or verifies the cc-masked equation f1f2−cf3=cg1+g0f_1 f_2 - c f_3 = c g_1 + g_0)! Wait: if g1g_1 is committed in tB,g1=bgTr+g1\mathbf{t}_{B, g_1} = \mathbf{b}_{g}^T \mathbf{r} + g_1? Wait—g1g_1 depends on y\mathbf{y} which is sampled during the Sigma protocol! So you can't commit to g1g_1 using r\mathbf{r} if r\mathbf{r} was fixed before y\mathbf{y}... unless you commit to g1g_1 inside the first message w\mathbf{w} of the Sigma protocol:
  • Put g1g_1 in an extra BDLOP slot of tB\mathbf{t}_B? No, put g1g_1 in wquad=bgTy+g1w_{\text{quad}} = \mathbf{b}_g^T \mathbf{y} + g_1 (no r\mathbf{r} needed, wait: if you put g1g_1 in tg=bgTr+g1\mathbf{t}_g = \mathbf{b}_g^T \mathbf{r} + g_1? Let's trace carefully!).

Let's write out the exact 100% sound & ZK mechanism (this is a classic subtle point—worth getting exact!):

  1. Round 1 (Before challenge cc):
    • Prover already committed to m1,m2,m3m_1, m_2, m_3 via tB\mathbf{t}_B.
    • Prover samples masks y\mathbf{y} (for r\mathbf{r}) and ym1,ym2,ym3←Rqy_{m_1}, y_{m_2}, y_{m_3} \leftarrow R_q, plus a fresh mask yg←Rqy_g \leftarrow R_q? Wait: if g1g_1 is already masked by −ym3-y_{m_3}? No, f3=ym3+cm3f_3 = y_{m_3} + c m_3 uses ym3y_{m_3}, and f1f2−cf3f_1 f_2 - c f_3 has coefficient g1g_1 on c1c^1 and g0g_0 on c0c^0!
    • If the prover simply commits to g1g_1 using a dedicated BDLOP row? Wait: if tg=bgTr+g1t_g = \mathbf{b}_g^T \mathbf{r} + g_1, then changing r\mathbf{r} isn't allowed, AND r\mathbf{r} is fixed! So instead: The prover can output tg=bgTr+g1t_g = \mathbf{b}_g^T \mathbf{r} + g_1 in Round 1 (since bgTr\mathbf{b}_g^T \mathbf{r} hides g1g_1 under M-LWE—wait: r\mathbf{r} was already used in tA,tB\mathbf{t}_A, \mathbf{t}_B, and adding one more fresh public vector bg\mathbf{b}_g just gives one more M-LWE sample with the same r\mathbf{r}!) AND computes wquad=bgTy+g0w_{\text{quad}} = \mathbf{b}_g^T \mathbf{y} + g_0!
    • Check what happens when the verifier computes fg:=c⋅tg+wquad−bgTzf_g := c \cdot t_g + w_{\text{quad}} - \mathbf{b}_g^T \mathbf{z}! fg=c(bgTr+g1)+(bgTy+g0)−bgT(y+cr)=c⋅g1+g0!f_g = c(\mathbf{b}_g^T \mathbf{r} + g_1) + (\mathbf{b}_g^T \mathbf{y} + g_0) - \mathbf{b}_g^T(\mathbf{y} + c\mathbf{r}) = c \cdot g_1 + g_0!
    • Verifier simply checks: f1⋅f2−c⋅f3≡?c⋅tg+wquad−bgTz(modq)!f_1 \cdot f_2 - c \cdot f_3 \stackrel{?}{\equiv} c \cdot t_g + w_{\text{quad}} - \mathbf{b}_g^T \mathbf{z} \pmod q!

Let's verify both Zero-Knowledge and Soundness of that equation!

  • ZK:
    • tg=bgTr+g1t_g = \mathbf{b}_g^T \mathbf{r} + g_1 is masked by the M-LWE term bgTr\mathbf{b}_g^T \mathbf{r} (or in simulator: pick tgt_g uniform, pick f1,f2,f3f_1, f_2, f_3 uniform, and set wquad=f1f2−cf3−ctg+bgTzw_{\text{quad}} = f_1 f_2 - c f_3 - c t_g + \mathbf{b}_g^T \mathbf{z}!).
    • Notice how clean the simulator is: wquad\mathbf{w}_{\text{quad}} is algebraically determined, so ZK is perfect (given M-LWE for the static commitments and rejection sampling for z\mathbf{z})!
  • Soundness (3-special soundness!):
    • Wait: the equation f1f2−cf3=cg1+g0f_1 f_2 - c f_3 = c g_1 + g_0 is a degree-2 polynomial in cc!
    • Let mˉi=c−1(fi−ymi)\bar{m}_i = c^{-1}(f_i - y_{m_i})? Formally, from 2 accepting transcripts (c1,z1),(c2,z2)(c_1, \mathbf{z}_1), (c_2, \mathbf{z}_2) we extract the unique committed messages (mˉ1,mˉ2,mˉ3)(\bar{m}_1, \bar{m}_2, \bar{m}_3) and (gˉ1)(\bar{g}_1) (because tB,it_{B,i} and tgt_g are BDLOP commitments!).
    • Once mˉ1,mˉ2,mˉ3,gˉ1\bar{m}_1, \bar{m}_2, \bar{m}_3, \bar{g}_1 and masks ymi,g0y_{m_i}, g_0 are fixed by Round 1, the check says: (mˉ1mˉ2−mˉ3)c2+(coeff1−gˉ1)c+(coeff0−g0)≡0(modq).(\bar{m}_1 \bar{m}_2 - \bar{m}_3) c^2 + (\text{coeff}_1 - \bar{g}_1) c + (\text{coeff}_0 - g_0) \equiv 0 \pmod q.
    • Since this is a degree-2 polynomial in cc over each CRT slot field Fqd/k\mathbb{F}_{q^{d/k}}, by Schwartz-Zippel (or 3 distinct challenges with invertible pairwise differences!), the coefficient of c2c^2 MUST be zero in every CRT slot, i.e. mˉ1mˉ2−mˉ3≡0(modq)\bar{m}_1 \bar{m}_2 - \bar{m}_3 \equiv 0 \pmod q!
    • (Note: what if qq is small, say q≈232q \approx 2^{32}, and Rq≅FqdR_q \cong \mathbb{F}_q^d splits completely? Then a single challenge cc only gives 1/q1/q soundness per slot! That's why LNP22 either works in a partially-splitting ring Rq≅Fqd/kkR_q \cong \mathbb{F}_{q^{d/k}}^k where Fqd/k\mathbb{F}_{q^{d/k}} is huge (≥2128\ge 2^{128}), OR boosts soundness by batching with λ\lambda independent random linear combinations over Fq\mathbb{F}_q!)

Batching Many Quadratic Equations into ONE!

Suppose you have 10001000 quadratic equations (e.g., 1000 Plonk multiplication gates!). Do you send 1000 tg,wquadt_g, w_{\text{quad}} pairs? No! Just like Plonk batches gate equations using powers of a challenge α\alpha:

  • Verifier sends random α1,…,αM\alpha_1, \dots, \alpha_M (or α,α2,…,αM\alpha, \alpha^2, \dots, \alpha^M over an extension ring/field).
  • Prover computes ONE combined quadratic polynomial ∑j=1Mαj(f1,jf2,j−cf3,j)=cg1+g0\sum_{j=1}^M \alpha_j (f_{1,j} f_{2,j} - c f_{3,j}) = c g_1 + g_0, paying only ONE tgt_g and ONE wquadw_{\text{quad}} for ALL MM gates!

3. The Constant-Term & Automorphism Trick

Wait: in Plonk/R1CS, constraints are often inner products over Zqn\mathbb{Z}_q^n, or coefficient-by-coefficient checks, whereas BDLOP multiplies polynomials in Rq=Zq[X]/(Xd+1)R_q = \mathbb{Z}_q[X]/(X^d + 1). How do you turn BDLOP polynomial multiplication into an inner product or scalar equality?

Recall Module 03's automorphism σ−1\sigma_{-1}: σ−1(a(X))=a(X−1)=a0−ad−1X−⋯−a1Xd−1.\sigma_{-1}(a(X)) = a(X^{-1}) = a_0 - a_{d-1} X - \dots - a_1 X^{d-1}. For any two vectors a,b∈Rqm\mathbf{a}, \mathbf{b} \in R_q^m, write them as mm polynomials a(1),…,a(m)a^{(1)}, \dots, a^{(m)} and b(1),…,b(m)b^{(1)}, \dots, b^{(m)}. Then: coeff0 ⁣(∑j=1ma(j)⋅σ−1(b(j)))=∑j=1m⟨a(j),b(j)⟩=⟨a,b⟩(modq)!\text{coeff}_0\!\left(\sum_{j=1}^m a^{(j)} \cdot \sigma_{-1}(b^{(j)})\right) = \sum_{j=1}^m \langle \mathbf{a}^{(j)}, \mathbf{b}^{(j)} \rangle = \langle \mathbf{a}, \mathbf{b} \rangle \pmod q!

Wait: how do you commit to σ−1(b(j))\sigma_{-1}(b^{(j)}) and prove it actually is σ−1\sigma_{-1} applied to b(j)b^{(j)}? Easy! Since σ−1\sigma_{-1} is an RqR_q-ring automorphism (σ−1(u+v)=σ−1(u)+σ−1(v)\sigma_{-1}(u + v) = \sigma_{-1}(u) + \sigma_{-1}(v) and σ−1(uv)=σ−1(u)σ−1(v)\sigma_{-1}(u v) = \sigma_{-1}(u)\sigma_{-1}(v)), apply σ−1\sigma_{-1} to the mask equation: σ−1(fb)=σ−1(yb+c⋅b)=σ−1(yb)+σ−1(c)⋅σ−1(b).\sigma_{-1}(f_b) = \sigma_{-1}(y_b + c \cdot b) = \sigma_{-1}(y_b) + \sigma_{-1}(c) \cdot \sigma_{-1}(b). Oops—notice cc turned into σ−1(c)\sigma_{-1}(c)! So you just define fb′f'_b using σ−1(c)\sigma_{-1}(c) or require challenges to be invariant under σ−1\sigma_{-1}, OR simply commit to b′=σ−1(b)b' = \sigma_{-1}(b) alongside bb, and check the linear relation σ−1(fb)\sigma_{-1}(f_b) vs fb′f_{b'}? Actually, look at the even simpler trick used in LNP22: If tb=bTr+bt_b = \mathbf{b}^T \mathbf{r} + b, apply σ−1\sigma_{-1} directly to the commitment equation? Wait: σ−1(bTr)=σ−1(b)Tσ−1(r)\sigma_{-1}(\mathbf{b}^T \mathbf{r}) = \sigma_{-1}(\mathbf{b})^T \sigma_{-1}(\mathbf{r}), which changes r\mathbf{r} to σ−1(r)\sigma_{-1}(\mathbf{r})! Instead, LNP22 includes σ−1(r)\sigma_{-1}(\mathbf{r})? No—remember tA=A1r\mathbf{t}_A = A_1 \mathbf{r}! If we also want σ−1(s1)\sigma_{-1}(\mathbf{s}_1), just put s1\mathbf{s}_1 AND σ−1(s1)\sigma_{-1}(\mathbf{s}_1) in the short vector (wait—or prove coeff0(⋅)=0\text{coeff}_0(\cdot) = 0!).

Proving coeff0(h)=0\text{coeff}_0(h) = 0 for a Masked Polynomial hh

Suppose you want to prove that a polynomial h∈Rqh \in R_q has constant term h0=0(modq)h_0 = 0 \pmod q (so ⟨a,b⟩=0\langle \mathbf{a}, \mathbf{b} \rangle = 0!), without revealing the other coefficients h1,…,hd−1h_1, \dots, h_{d-1}! Look how effortless this is:

  1. Sample a uniform polynomial yh←Rqy_h \leftarrow R_q whose constant term is forced to 00 (i.e. yh,0=0y_{h,0} = 0, and yh,1,…,yh,d−1←Zqy_{h,1}, \dots, y_{h,d-1} \leftarrow \mathbb{Z}_q)!
  2. Note that if h0=0h_0 = 0 and yh,0=0y_{h,0} = 0, then for ANY scalar challenge μ∈Zq\mu \in \mathbb{Z}_q (a constant polynomial, NOT an arbitrary c∈Rqc \in R_q!), the masked sum: v=yh+μ⋅h(modq)v = y_h + \mu \cdot h \pmod q has constant term v0=0+μ⋅0=0(modq)v_0 = 0 + \mu \cdot 0 = 0 \pmod q, while all non-constant coefficients v1,…,vd−1v_1, \dots, v_{d-1} are perfectly hidden by yh,1,…,yh,d−1y_{h,1}, \dots, y_{h,d-1}!
  3. And you prove vv matches the committed quadratic expression (e.g., h=∑a(j)σ−1(b(j))h = \sum a^{(j)} \sigma_{-1}(b^{(j)})) using the exact garbage-polynomial trick from Section 2!

(If you want to prove h0=targeth_0 = \text{target}, just subtract target\text{target} first! And if you want to prove m\mathbf{m} has kk different inner-product constraints, you batch them with random scalars μ1,…,μk∈Zq\mu_1, \dots, \mu_k \in \mathbb{Z}_q—scalars commute with coeff0\text{coeff}_0!)


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\mathbf{s}_1 \in R^{m_1} (say, inside ABDLOP) and claims ∥s1∥∞≤B\|\mathbf{s}_1\|_\infty \le B (or even ∥s1∥2≤β\|\mathbf{s}_1\|_2 \le \beta). Remember why Module 05 failed to prove exact shortness:

  • Module 05 proves A1zˉ=cˉtAA_1 \bar{\mathbf{z}} = \bar{c} \mathbf{t}_A, extracting a witness sˉ1=zˉ1\bar{\mathbf{s}}_1 = \bar{\mathbf{z}}_1 that satisfies A1zˉ=cˉtAA_1 \bar{\mathbf{z}} = \bar{c} \mathbf{t}_A with ∥zˉ1∥2≤2Bz\|\bar{\mathbf{z}}_1\|_2 \le 2 B_z.
  • Two problems:
    1. 2Bz2 B_z is way larger than β\beta (slack!).
    2. sˉ1\bar{\mathbf{s}}_1 is multiplied by cˉ=c1−c2\bar{c} = c_1 - c_2! When you divide by cˉ\bar{c} mod qq, cˉ−1zˉ1 mod q\bar{c}^{-1} \bar{\mathbf{z}}_1 \bmod q isn't short at all!

How do we prove exact shortness so that even the extracted message s1\mathbf{s}_1 (after dividing by cˉ\bar{c}!) literally has small coefficients?

Method 1: Binary / Base-bb Decomposition (Exact ℓ∞\ell_\infty Bounds!)

Suppose you want to prove a polynomial x∈Rqx \in R_q has coefficients in {0,1}\{0, 1\} (binary!). Write out the algebraic equation in RqR_q coefficient-wise? Careful! Over Rq=Zq[X]/(Xd+1)R_q = \mathbb{Z}_q[X]/(X^d + 1), the equation x2−x≡0(modq)x^2 - x \equiv 0 \pmod q does NOT mean xx has binary coefficients! (Because multiplication in RqR_q is polynomial multiplication, NOT coefficient-wise multiplication! Remember X2−X≠0X^2 - X \neq 0 even though (X)(X) has {0,1}\{0,1\} coefficients!)

Aha! How do you check xi(xi−1)≡0(modq)x_i(x_i - 1) \equiv 0 \pmod q for EVERY coefficient xix_i (i=0,…,d−1i = 0, \dots, d-1)? Using the constant-term trick with random weights γ0,…,γd−1←Zq\gamma_0, \dots, \gamma_{d-1} \leftarrow \mathbb{Z}_q! Define the random polynomial γ(X)=∑i=0d−1γiXi\gamma(X) = \sum_{i=0}^{d-1} \gamma_i X^i. Look at: coeff0 ⁣(σ−1(γ)⋅(coeffs squared? Wait—we need xi(xi−1)=0!))\text{coeff}_0\!\Big(\sigma_{-1}(\gamma) \cdot (\text{coeffs squared?} \text{ Wait—we need } x_i(x_i - 1) = 0!)\Big) Let's check! How do you compute ∑i=0d−1γi⋅xi(xi−1)\sum_{i=0}^{d-1} \gamma_i \cdot x_i (x_i - 1) using polynomial products in RqR_q? Notice that if you define x~i=γixi\tilde{x}_i = \gamma_i x_i (wait: γ\gamma is a verifier challenge!), how do you multiply xix_i by γi\gamma_i coefficient-wise? Easy! Instead of using coefficient representation for x\mathbf{x}, commit to the NTT representation x^\hat{x}? NO! If x\mathbf{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⟩\langle \boldsymbol{\gamma} \odot \mathbf{x}, \mathbf{x} - \mathbf{1} \rangle:

  • Wait: how do you compute γ⊙x\boldsymbol{\gamma} \odot \mathbf{x} in RqR_q?
  • Notice that x∈Rqx \in R_q has dd coefficients (x0,…,xd−1)(x_0, \dots, x_{d-1}). For each j∈{0,…,d−1}j \in \{0, \dots, d-1\}, multiplying xx by X−jX^{-j} shifts xjx_j into the constant term! Or even better: in NTT / CRT space (when q≡1(mod2d)q \equiv 1 \pmod{2d}), polynomial multiplication in RqR_q IS coordinate-wise multiplication in Fqd\mathbb{F}_q^d!
  • So if you store the bits (b0,…,bd−1)∈{0,1}d(b_0, \dots, b_{d-1}) \in \{0, 1\}^d in the NTT slots of a polynomial b^∈Rq\hat{b} \in R_q (via b^=NTT−1(b0,…,bd−1)\hat{b} = \text{NTT}^{-1}(b_0, \dots, b_{d-1})): Then b^⋅(b^−1)≡0(modq)\hat{b} \cdot (\hat{b} - 1) \equiv 0 \pmod q in RqR_q IF AND ONLY IF bi(bi−1)≡0(modq)b_i(b_i - 1) \equiv 0 \pmod q in every single slot i=0,…,d−1i = 0, \dots, d-1! And b^\hat{b} is a linear function of (b0,…,bd−1)(b_0, \dots, b_{d-1})!
  • Alternatively (in coefficient space, without requiring q≡1(mod2d)q \equiv 1 \pmod{2d}): use exact inner products with a challenge γ\gamma? Even simpler: let x∈Rqx \in R_q be committed, and notice you can pack dd bits directly into NTT slots when RqR_q splits, OR prove ⟨x⊙rchal,x−1⟩=0\langle \mathbf{x} \odot \mathbf{r}_{\text{chal}}, \mathbf{x} - \mathbf{1} \rangle = 0 by committing to x⊙rchal\mathbf{x} \odot \mathbf{r}_{\text{chal}}? Wait: if you commit to y=NTT−1(γ⊙NTT(x))y = \text{NTT}^{-1}(\boldsymbol{\gamma} \odot \text{NTT}(x))? Even better: in LNP22, they prove ∥s1∥2≤β\|\mathbf{s}_1\|_2 \le \beta directly using Johnson-Lindenstrauss projections (no bit decomposition needed for ℓ2\ell_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\ell_2 Norm Proofs via Johnson–Lindenstrauss (LNP22)

Suppose we have an ABDLOP commitment to a vector s1∈ZN\mathbf{s}_1 \in \mathbb{Z}^N (viewing m1m_1 ring elements in RR as N=m1dN = m_1 d integers), and we want to prove ∥s1∥2≤β\|\mathbf{s}_1\|_2 \le \beta with only a tiny constant slack (like 2\sqrt{2} or 22)—NOT O~(N)\tilde{O}(\sqrt{N})!

Wait: why did Module 05 have N\sqrt{N} slack and cˉ\bar{c} multiplication? Because Module 05 proved knowledge of s1\mathbf{s}_1 using z1=y1+cs1\mathbf{z}_1 = \mathbf{y}_1 + c \mathbf{s}_1.

Now watch Gentry–Halevi–Lyubashevsky (2021) / LNP22: Instead of proving shortness via rejection sampling on s1\mathbf{s}_1 directly, project s1\mathbf{s}_1 with a random low-dimensional matrix Π\Pi!

5.1 The Johnson-Lindenstrauss Lemma for Cryptographers

Let Π←{−1,0,1}256×N\Pi \leftarrow \{-1, 0, 1\}^{256 \times N} be a random sparse ternary matrix (say each entry is +1+1 with prob 1/41/4, −1-1 with prob 1/41/4, 00 with prob 1/21/2—or bimodal {−1,+1}\{-1, +1\}). For ANY fixed vector x∈ZN\mathbf{x} \in \mathbb{Z}^N:

  • What is the distribution of each coordinate (Πx)i=∑j=1NΠi,jxj(\Pi \mathbf{x})_i = \sum_{j=1}^N \Pi_{i,j} x_j? It is a sum of independent zero-mean variables with variance 12xj2\frac{1}{2} x_j^2, so E[(Πx)i2]=12∥x∥22\mathbb{E}[(\Pi \mathbf{x})_i^2] = \frac{1}{2} \|\mathbf{x}\|_2^2 (or ∥x∥22\|\mathbf{x}\|_2^2 if Πi,j∈{−1,+1}\Pi_{i,j} \in \{-1, +1\})!
  • By the Johnson–Lindenstrauss / Hanson–Wright tail bound:
    1. Completeness (honest short x\mathbf{x}): With overwhelming probability (>99%> 99\%, and we can re-run or pick Π\Pi): ∥Πx∥2≤256⋅∥x∥2≈16β.\|\Pi \mathbf{x}\|_2 \le \sqrt{256} \cdot \|\mathbf{x}\|_2 \approx 16 \beta.
    2. Soundness (adversarial long x\mathbf{x}): If ∥x∥2>Bbad\|\mathbf{x}\|_2 > B_{\text{bad}} (say Bbad=2βB_{\text{bad}} = 2\beta or 2⋅16β/128\sqrt{2} \cdot 16\beta / \sqrt{128}), the probability over random Π\Pi that ∥Πx∥2\|\Pi \mathbf{x}\|_2 happens to land below the threshold is 2−1282^{-128}!

5.2 Wait—How Do We Keep Πs1\Pi \mathbf{s}_1 Zero-Knowledge?!

If the prover simply sent p=Πs1\mathbf{p} = \Pi \mathbf{s}_1 in the clear, that would leak 256 linear projections of s1\mathbf{s}_1! So add a masking vector y3←Dσ3256\mathbf{y}_3 \leftarrow D_{\sigma_3}^{256}!

  1. Prover commits to s1\mathbf{s}_1 (in tA\mathbf{t}_A) before seeing Π\Pi.
  2. Verifier sends random Π←{−1,0,1}256×N\Pi \leftarrow \{-1, 0, 1\}^{256 \times N}.
  3. Prover computes p=y3+Πs1\mathbf{p} = \mathbf{y}_3 + \Pi \mathbf{s}_1 (over Z\mathbb{Z}, NO mod qq!) and runs rejection sampling so p\mathbf{p} is distributed as Dσ3256D_{\sigma_3}^{256}, independent of Πs1\Pi \mathbf{s}_1!
  4. Prover sends p\mathbf{p} in the clear!
  5. Verifier checks TWO things:
    • Norm check (in the clear!): ∥p∥2≤Bp\|\mathbf{p}\|_2 \le B_p (where Bp≈σ3256B_p \approx \sigma_3 \sqrt{256}).
    • Linear algebraic check (mod qq, via BDLOP!): Prove in ZK (using the exact constant-term / linear BDLOP proof!) that the committed s1\mathbf{s}_1 inside tA\mathbf{t}_A satisfies: Πs1≡p−y3(modq)!\Pi \mathbf{s}_1 \equiv \mathbf{p} - \mathbf{y}_3 \pmod q!

WAIT A SECOND! Look at the dimensions!

  • s1\mathbf{s}_1 might have dimension N=100,000N = 100{,}000!
  • Yet p\mathbf{p} ONLY has dimension 256256 (independent of NN!)!
  • And why does checking Πs1≡p−y3(modq)\Pi \mathbf{s}_1 \equiv \mathbf{p} - \mathbf{y}_3 \pmod q prove ∥s1∥2\|\mathbf{s}_1\|_2 is small (Wait: what if Πs1\Pi \mathbf{s}_1 wrapped around mod qq?!)? Aha! How do you prevent wrap-around mod qq? In LNP22, you ALSO run the standard Module 05 Sigma protocol (with slack!) on s1\mathbf{s}_1, which guarantees ∥s1∥2\|\mathbf{s}_1\|_2 is at most Bslack≪qB_{\text{slack}} \ll q (well below q/16q / 16!). Then:
    • The sloppy Module 05 proof guarantees no wrap-around mod qq (∥s1∥∞≪q\|\mathbf{s}_1\|_\infty \ll q and ∥Πs1∥∞<q/2\|\Pi \mathbf{s}_1\|_\infty < q/2), AND
    • The JL projection p=y3+Πs1\mathbf{p} = \mathbf{y}_3 + \Pi \mathbf{s}_1 (which has constant slack ≈2\approx 2 independent of NN!) tightens the norm bound all the way down to ∥s1∥2≤2β\|\mathbf{s}_1\|_2 \le 2\beta!

5.3 Making Exact Bounds Even Tighter (Exact Range Proof!)

And what if you need an exact ℓ∞\ell_\infty bound ∥s1∥∞≤B\|\mathbf{s}_1\|_\infty \le B (or exact ℓ2\ell_2 bound ∥s1∥22≤β2\|\mathbf{s}_1\|_2^2 \le \beta^2 with ZERO slack, e.g., B=1B = 1 for binary/ternary)?

  1. For exact ℓ2\ell_2 (∥s1∥22≤β2\|\mathbf{s}_1\|_2^2 \le \beta^2): Represent β2−∥s1∥22\beta^2 - \|\mathbf{s}_1\|_2^2 as a sum of 4 squares a2+b2+c2+d2a^2 + b^2 + c^2 + d^2 (Lagrange's Four-Square Theorem! Every non-negative integer is a sum of 4 integer squares!), commit to a,b,c,da, b, c, d, prove they are short via JL (so no wrap-around mod qq!), and prove the single quadratic identity: ⟨s1,s1⟩+a2+b2+c2+d2≡β2(modq)!\langle \mathbf{s}_1, \mathbf{s}_1 \rangle + a^2 + b^2 + c^2 + d^2 \equiv \beta^2 \pmod q! Because every term is non-negative and <q/2< q/2 (guaranteed by the JL check!), modular equality forces exact integer equality ∥s1∥22+a2+b2+c2+d2=β2  ⟹  ∥s1∥22≤β2\|\mathbf{s}_1\|_2^2 + a^2 + b^2 + c^2 + d^2 = \beta^2 \implies \|\mathbf{s}_1\|_2^2 \le \beta^2 with ZERO SLACK!
  2. For exact ℓ∞\ell_\infty (binary/bounded coefficients): Use the exact quadratic check xi(xi−1)=0x_i(x_i - 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):

  1. Encode any arithmetic circuit (Plonk / R1CS) as linear + quadratic equations over RqR_q (using CRT slots or coefficients) plus shortness bounds on witnesses.
  2. Commit to (s1,m)(\mathbf{s}_1, \mathbf{m}) via ABDLOP.
  3. Prove linear + quadratic constraints using masking polynomials fi=ymi+cmif_i = y_{m_i} + c m_i, garbage polynomials (tg,wquad)(t_g, w_{\text{quad}}), and random batching αj\alpha_j.
  4. Prove inner products using σ−1\sigma_{-1} + coeff0(h)=0\text{coeff}_0(h) = 0.
  5. Prove tight norm bounds using JL projection Πs1\Pi \mathbf{s}_1 (and 4-squares if zero slack is needed).
  6. Make it non-interactive via Fiat-Shamir with Aborts!

Wait: what is the proof size of this system? Look at z=y+cr\mathbf{z} = \mathbf{y} + c\mathbf{r} and fif_i: If the witness has length NN, the vector z\mathbf{z} sent to the verifier ALSO has length O(N)O(N)! So LNP22 gives a linear-sized proof O(N)O(N) (great for small/medium statements like ring signatures or verifiable encryption—around 10–30 KB—but NOT succinct for N=220N = 2^{20} Plonk gates!).

To get O(log⁡N)O(\log N) or O(N)O(\sqrt{N}) succinct proofs—just like IPA and Plonk—we must fold! That is Part III (Modules 07–09).


Exercises

  1. Quadratic Trick Algebra: Verify the polynomial expansion in Section 2: (ym1+cm1)(ym2+cm2)−c(ym3+cm3)=c2(m1m2−m3)+cg1+g0.(y_{m_1} + c m_1)(y_{m_2} + c m_2) - c(y_{m_3} + c m_3) = c^2(m_1 m_2 - m_3) + c g_1 + g_0. Write out g1g_1 and g0g_0 explicitly. If m1m2≠m3m_1 m_2 \neq m_3, why can't a cheating prover satisfy the verifier's check for 3 distinct challenges c1,c2,c3c_1, c_2, c_3 in a field Fq\mathbb{F}_q?
  2. Constant-Term Check: Suppose d=4d = 4, a(X)=1+2X+0X2−X3a(X) = 1 + 2X + 0X^2 - X^3, and b(X)=3−X+5X2+X3b(X) = 3 - X + 5X^2 + X^3. Compute ⟨a,b⟩\langle \mathbf{a}, \mathbf{b} \rangle directly, then compute σ−1(b)(X)\sigma_{-1}(b)(X) and verify that the constant term of a(X)σ−1(b)(X) mod (X4+1)a(X)\sigma_{-1}(b)(X) \bmod (X^4 + 1) equals ⟨a,b⟩\langle \mathbf{a}, \mathbf{b} \rangle.
  3. Why JL Needs a Fallback Bound: Suppose a prover did not run any fallback norm check on s1\mathbf{s}_1, and only proved Πs1≡p−y3(modq)\Pi \mathbf{s}_1 \equiv \mathbf{p} - \mathbf{y}_3 \pmod q with ∥p∥2≤Bp\|\mathbf{p}\|_2 \le B_p. Give an example of a huge vector s1\mathbf{s}_1 (not short at all!) that still passes Πs1≡p−y3(modq)\Pi \mathbf{s}_1 \equiv \mathbf{p} - \mathbf{y}_3 \pmod q! (Hint: think mod qq!)
  4. Lagrange Four-Squares: Suppose β=10\beta = 10 and a prover wants to prove ∥s1∥22≤100\|\mathbf{s}_1\|_2^2 \le 100 with zero slack, while their actual witness has ∥s1∥22=70\|\mathbf{s}_1\|_2^2 = 70. Find integers (a,b,c,d)(a, b, c, d) such that 70+a2+b2+c2+d2=10070 + a^2 + b^2 + c^2 + d^2 = 100.

(Solutions in exercise-solutions.md.)

results matching ""

    No results matching ""