Exercise Solutions (Modules 00–09)


Module 00: Algebra Prerequisites

  1. Vector Space vs. Module: Over R\mathbb{R}, any real number xx can be written as (x/2)⋅2(x/2) \cdot 2 because 1/2∈R1/2 \in \mathbb{R} (you can divide!). Over Z\mathbb{Z}, 1/2∉Z1/2 \notin \mathbb{Z}, so integer multiples of 22 only give even integers and can never produce 11 or 33.

  2. Projections:

    • ⟨w,u⟩=5(3)+0(4)=15\langle \mathbf{w}, \mathbf{u} \rangle = 5(3) + 0(4) = 15, and ⟨u,u⟩=32+42=25\langle \mathbf{u}, \mathbf{u} \rangle = 3^2 + 4^2 = 25.
    • proju(w)=1525(34)=35(34)=(9/512/5)\text{proj}_{\mathbf{u}}(\mathbf{w}) = \frac{15}{25} \begin{pmatrix} 3 \\ 4 \end{pmatrix} = \frac{3}{5}\begin{pmatrix} 3 \\ 4 \end{pmatrix} = \begin{pmatrix} 9/5 \\ 12/5 \end{pmatrix}.
    • Leftover: w′=(5−9/50−12/5)=(16/5−12/5)\mathbf{w}' = \begin{pmatrix} 5 - 9/5 \\ 0 - 12/5 \end{pmatrix} = \begin{pmatrix} 16/5 \\ -12/5 \end{pmatrix}.
    • Dot product check: ⟨w′,u⟩=165(3)+−125(4)=48−485=0\langle \mathbf{w}', \mathbf{u} \rangle = \frac{16}{5}(3) + \frac{-12}{5}(4) = \frac{48 - 48}{5} = 0 (perpendicular!).
  3. Quotient Rings (F7[X]/(X2+1)\mathbb{F}_7[X]/(X^2 + 1)):

    • (2+3X)(1+4X)=2+11X+12X2(2 + 3X)(1 + 4X) = 2 + 11X + 12X^2. Substitute X2≡−1X^2 \equiv -1: (2−12)+11X=−10+11X≡4+4X(mod7)(2 - 12) + 11X = -10 + 11X \equiv 4 + 4X \pmod 7.
    • Check squares mod 77: 02=00^2=0, (±1)2=1(\pm 1)^2 = 1, (±2)2=4(\pm 2)^2 = 4, (±3)2=9≡2(\pm 3)^2 = 9 \equiv 2. None equals −1≡6(mod7)-1 \equiv 6 \pmod 7, so X2+1X^2 + 1 has no roots and is irreducible over F7\mathbb{F}_7. Therefore S≅F49S \cong \mathbb{F}_{49} is a field!
  4. Zero Divisors via CRT (F5[X]/(X2+1)\mathbb{F}_5[X]/(X^2 + 1)):

    • a(2)=1+2(2)=5≡0(mod5)a(2) = 1 + 2(2) = 5 \equiv 0 \pmod 5.
    • a(−2)=1+2(−2)=−3≡2(mod5)a(-2) = 1 + 2(-2) = -3 \equiv 2 \pmod 5.
    • CRT pair: (0,2)∈F5×F5(0, 2) \in \mathbb{F}_5 \times \mathbb{F}_5. Because the first slot is 00, a(X)=1+2Xa(X) = 1 + 2X is a zero divisor and NOT invertible! (Indeed, (1+2X)(1−2X)=1−4X2≡1+4=5≡0(modX2+1,5)(1 + 2X)(1 - 2X) = 1 - 4X^2 \equiv 1 + 4 = 5 \equiv 0 \pmod{X^2+1, 5}.)
  5. Cyclotomic Wrap-Around (R=Z[X]/(X4+1)R = \mathbb{Z}[X]/(X^4 + 1)):

    • (1+X3)⋅X2=X2+X5=X2+X⋅X4≡X2−X=−X+X2(1 + X^3) \cdot X^2 = X^2 + X^5 = X^2 + X \cdot X^4 \equiv X^2 - X = -X + X^2.
    • σ−1(3+2X−X2+4X3)=3−4X−(−1)X2−2X3=3−4X+X2−2X3\sigma_{-1}(3 + 2X - X^2 + 4X^3) = 3 - 4X - (-1)X^2 - 2X^3 = 3 - 4X + X^2 - 2X^3.

Module 01: Lattice Foundations

  1. Unimodular Check: Compute B2−1=(1−201)B_2^{-1} = \begin{pmatrix} 1 & -2 \\ 0 & 1 \end{pmatrix}. Then: U=B2−1B1=(1−201)(3512)=(1112).U = B_2^{-1} B_1 = \begin{pmatrix} 1 & -2 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}. Since U∈Z2×2U \in \mathbb{Z}^{2 \times 2} and det⁡(U)=1⋅2−1⋅1=1=±1\det(U) = 1 \cdot 2 - 1 \cdot 1 = 1 = \pm 1, U∈GL2(Z)U \in GL_2(\mathbb{Z}) is unimodular. Therefore B1=B2UB_1 = B_2 U and both generate the exact same lattice (Z2\mathbb{Z}^2).

  2. Determinant & Minkowski:

    • det⁡(L(B))=∣det⁡(B)∣=∣17⋅1−5⋅0∣=17\det(\mathcal{L}(B)) = |\det(B)| = |17 \cdot 1 - 5 \cdot 0| = 17.
    • Minkowski's ℓ∞\ell_\infty bound guarantees λ1(∞)(L)≤det⁡(L)1/2=17≈4.12\lambda_1^{(\infty)}(\mathcal{L}) \le \det(\mathcal{L})^{1/2} = \sqrt{17} \approx 4.12, so there is a nonzero lattice vector with ∥v∥∞≤4\|\mathbf{v}\|_\infty \le 4.
    • Taking 3⋅(51)−1⋅(170)=(−23)3 \cdot \begin{pmatrix} 5 \\ 1 \end{pmatrix} - 1 \cdot \begin{pmatrix} 17 \\ 0 \end{pmatrix} = \begin{pmatrix} -2 \\ 3 \end{pmatrix} gives ∥v∥∞=3≤4\|\mathbf{v}\|_\infty = 3 \le 4 (and ∥v∥2=13\|\mathbf{v}\|_2 = \sqrt{13}; in fact 2⋅(5,1)T−(17,0)T=(−7,2)T2 \cdot (5, 1)^T - (17,0)^T = (-7, 2)^T, 4⋅(5,1)T−(17,0)T=(3,4)T4 \cdot (5,1)^T - (17,0)^T = (3, 4)^T, etc. Notice (−2,3)T(-2, 3)^T has ℓ2\ell_2-norm 13≈3.61\sqrt{13} \approx 3.61, and (−4,−1)T(-4, -1)^T? Check: −1⋅(5,1)T+0-1 \cdot (5,1)^T + 0 has x1=−5x_1 = -5. Actually 3⋅5−17=−23 \cdot 5 - 17 = -2, and (−2,3)T(-2, 3)^T is the shortest nonzero vector: check x1≡5x2(mod17)x_1 \equiv 5 x_2 \pmod{17} for x2∈{0,±1,±2,±3,±4}x_2 \in \{0, \pm 1, \pm 2, \pm 3, \pm 4\}!).
  3. Dual Lattice: B∗=B−T=((17501)−1)T=(1/17−5/1701)T=(1/170−5/171).B^* = B^{-T} = \left(\begin{pmatrix} 17 & 5 \\ 0 & 1 \end{pmatrix}^{-1}\right)^T = \begin{pmatrix} 1/17 & -5/17 \\ 0 & 1 \end{pmatrix}^T = \begin{pmatrix} 1/17 & 0 \\ -5/17 & 1 \end{pmatrix}. Checking inner products:

    • ⟨(17,0)T,(1/17,−5/17)T⟩=1∈Z\langle (17, 0)^T, (1/17, -5/17)^T \rangle = 1 \in \mathbb{Z}, ⟨(17,0)T,(0,1)T⟩=0∈Z\langle (17, 0)^T, (0, 1)^T \rangle = 0 \in \mathbb{Z}.
    • ⟨(5,1)T,(1/17,−5/17)T⟩=5/17−5/17=0∈Z\langle (5, 1)^T, (1/17, -5/17)^T \rangle = 5/17 - 5/17 = 0 \in \mathbb{Z}, ⟨(5,1)T,(0,1)T⟩=1∈Z\langle (5, 1)^T, (0, 1)^T \rangle = 1 \in \mathbb{Z}. (Notice 17⋅L∗=Λ17(AT)17 \cdot \mathcal{L}^* = \Lambda_{17}(A^T) for A=(1,−5)(mod17)A = (1, -5) \pmod{17}, which is Module 02's duality!)

Module 02: Hard Problems — SIS and LWE

  1. Pigeonhole SIS: Consider the map f:{0,1}20→Z174f : \{0, 1\}^{20} \to \mathbb{Z}_{17}^4 given by f(y)=Ay mod 17f(\mathbf{y}) = A\mathbf{y} \bmod 17.

    • Domain size: ∣{0,1}20∣=220=1,048,576|\{0, 1\}^{20}| = 2^{20} = 1{,}048{,}576.
    • Codomain size: ∣Z174∣=174=83,521|\mathbb{Z}_{17}^4| = 17^4 = 83{,}521. Since 220>1742^{20} > 17^4, by the Pigeonhole Principle there exist two distinct vectors y1≠y2∈{0,1}20\mathbf{y}_1 \neq \mathbf{y}_2 \in \{0, 1\}^{20} with Ay1≡Ay2(mod17)A\mathbf{y}_1 \equiv A\mathbf{y}_2 \pmod{17}. Then x=y1−y2∈{−1,0,1}20∖{0}\mathbf{x} = \mathbf{y}_1 - \mathbf{y}_2 \in \{-1, 0, 1\}^{20} \setminus \{\mathbf{0}\} satisfies Ax≡0(mod17)A\mathbf{x} \equiv \mathbf{0} \pmod{17}!
  2. Duality Check: A=(1,2,5)∈Z71×3A = (1, 2, 5) \in \mathbb{Z}_7^{1 \times 3}.

    • Two linearly independent short vectors in Λ7⊥(A)\Lambda_7^\perp(A):
      • x1=(−2,1,0)T\mathbf{x}_1 = (-2, 1, 0)^T since 1(−2)+2(1)+5(0)=0≡0(mod7)1(-2) + 2(1) + 5(0) = 0 \equiv 0 \pmod 7.
      • x2=(2,0,1)T\mathbf{x}_2 = (2, 0, 1)^T since 1(2)+2(0)+5(1)=7≡0(mod7)1(2) + 2(0) + 5(1) = 7 \equiv 0 \pmod 7.
    • For s=3s = 3, y=ATs mod 7=(3,6,15)T≡(3,6,1)T(mod7)\mathbf{y} = A^T s \bmod 7 = (3, 6, 15)^T \equiv (3, 6, 1)^T \pmod 7 (or lifted (3,−1,1)T(3, -1, 1)^T).
    • Check ⟨x1,y⟩=(−2)(3)+1(−1)+0=−7≡0(mod7)\langle \mathbf{x}_1, \mathbf{y} \rangle = (-2)(3) + 1(-1) + 0 = -7 \equiv 0 \pmod 7; ⟨x2,y⟩=2(3)+0+1(1)=7≡0(mod7)\langle \mathbf{x}_2, \mathbf{y} \rangle = 2(3) + 0 + 1(1) = 7 \equiv 0 \pmod 7.
  3. Why Unbounded SIS Fails: Since m=2n>nm = 2n > n, the homogeneous system Ax′≡0(modq)A\mathbf{x}' \equiv \mathbf{0} \pmod q has a kernel of dimension ≥m−n=n≥1\ge m - n = n \ge 1 over Zq\mathbb{Z}_q. Using Gaussian elimination over Zq\mathbb{Z}_q in O(m3)O(m^3) time, the adversary finds a nonzero x′∈Zqm\mathbf{x}' \in \mathbb{Z}_q^m with Ax′≡0(modq)A\mathbf{x}' \equiv \mathbf{0} \pmod q and opens C=0C = \mathbf{0} to both 0\mathbf{0} and x′\mathbf{x}'.

  4. HNF LWE Practice: If A1∈Zqn×nA_1 \in \mathbb{Z}_q^{n \times n} is fixed and invertible, and A2∈Zqm×nA_2 \in \mathbb{Z}_q^{m \times n} is uniformly random and independent of A1A_1, then right-multiplying a uniform matrix A2A_2 by an invertible matrix −A1−1-A_1^{-1} is a bijection on Zqm×n\mathbb{Z}_q^{m \times n}, so A′=−A2A1−1 mod qA' = -A_2 A_1^{-1} \bmod q is uniformly distributed and independent of e1,e2\mathbf{e}_1, \mathbf{e}_2. Thus (A′,A′e1+e2 mod q)(A', A'\mathbf{e}_1 + \mathbf{e}_2 \bmod q) is an exact LWEn,m,q,χ\text{LWE}_{n, m, q, \chi} instance with short secret e1←χn\mathbf{e}_1 \leftarrow \chi^n.


Module 03: Algebraic Lattices & NTT

  1. Negacyclic Multiplication:

    • a(X)=1+2X−X3a(X) = 1 + 2X - X^3, b(X)=2−X+X2b(X) = 2 - X + X^2.
    • Expand over Z[X]\mathbb{Z}[X]: a(X)b(X)=2+(−1+4)X+(1−2)X2+(2−2)X3+(1)X4−X5.a(X)b(X) = 2 + (-1 + 4)X + (1 - 2)X^2 + (2 - 2)X^3 + (1)X^4 - X^5. Use X4≡−1X^4 \equiv -1, X5≡−XX^5 \equiv -X: a(X)b(X)≡(2−1)+(3+1)X−X2+0X3=1+4X−X2(modX4+1).a(X)b(X) \equiv (2 - 1) + (3 + 1)X - X^2 + 0X^3 = 1 + 4X - X^2 \pmod{X^4+1}.
    • a=(1,2,0,−1)\mathbf{a} = (1, 2, 0, -1), b=(2,−1,1,0)  ⟹  ⟨a,b⟩=1(2)+2(−1)+0(1)+(−1)(0)=0\mathbf{b} = (2, -1, 1, 0) \implies \langle \mathbf{a}, \mathbf{b} \rangle = 1(2) + 2(-1) + 0(1) + (-1)(0) = 0.
    • σ−1(b)(X)=b0−b3X−b2X2−b1X3=2−0X−X2+X3\sigma_{-1}(b)(X) = b_0 - b_3 X - b_2 X^2 - b_1 X^3 = 2 - 0X - X^2 + X^3. Constant term of (1+2X−X3)(2−X2+X3) mod (X4+1)(1 + 2X - X^3)(2 - X^2 + X^3) \bmod (X^4 + 1):
      • 1⋅2=21 \cdot 2 = 2
      • 2X⋅X3=2X4≡−22X \cdot X^3 = 2X^4 \equiv -2
      • (−X3)⋅(−X2)=X5≡−X(-X^3) \cdot (-X^2) = X^5 \equiv -X (no constant term!) Sum of constant terms: 2−2=0=⟨a,b⟩2 - 2 = 0 = \langle \mathbf{a}, \mathbf{b} \rangle!
  2. NTT Splitting & Zero Divisors (d=4,q=17d=4, q=17):

    • ψ=2\psi = 2: 24=16≡−1(mod17)2^4 = 16 \equiv -1 \pmod{17}. The odd powers are ψ1=2\psi^1 = 2, ψ3=8\psi^3 = 8, ψ5=15≡−2\psi^5 = 15 \equiv -2, ψ7=9≡−8(mod17)\psi^7 = 9 \equiv -8 \pmod{17}. So X4+1≡(X−2)(X−8)(X+2)(X+8)(mod17)X^4 + 1 \equiv (X - 2)(X - 8)(X + 2)(X + 8) \pmod{17}.
    • Take c(X)=1+X2c(X) = 1 + X^2 (coefficients in {0,1}\{0, 1\}): evaluate at X=2X = 2: c(2)=1+4=5≠0c(2) = 1 + 4 = 5 \neq 0, wait—evaluate at X=4X = 4? No, 44 isn't a root! We want a root among {2,8,−2,−8}\{2, 8, -2, -8\}: Try c(X)=1+X+X2+X3c(X) = 1 + X + X^2 + X^3? At X=2X = 2: 1+2+4+8=15≢01 + 2 + 4 + 8 = 15 \not\equiv 0. At X=8X = 8: 1+8+64+512=585=34⋅17+71 + 8 + 64 + 512 = 585 = 34 \cdot 17 + 7. Wait: how about c(X)=1−X−X2c(X) = 1 - X - X^2? At X=2X = 2: 1−2−4=−51 - 2 - 4 = -5. Let's check c(X)=−1−X+X3c(X) = -1 - X + X^3? At X=2X = 2: −1−2+8=5-1 - 2 + 8 = 5. Wait: 23+22+21+20=15≡−22^3 + 2^2 + 2^1 + 2^0 = 15 \equiv -2. What if we subtract X2X^2? 1+X−X2+X31 + X - X^2 + X^3: at X=2X=2, 1+2−4+8=71 + 2 - 4 + 8 = 7. Try X3+X2+XX^3 + X^2 + X? At X=2X = 2: 8+4+2=148+4+2 = 14. Try c(X)=−1+X−X2+X3c(X) = -1 + X - X^2 + X^3 at X=8X = 8: −1+8−64+512=455=26⋅17+13-1 + 8 - 64 + 512 = 455 = 26 \cdot 17 + 13. Wait: for X=2X = 2: we want ±1±2±4±8≡0(mod17)\pm 1 \pm 2 \pm 4 \pm 8 \equiv 0 \pmod{17}? Notice 1+8=91 + 8 = 9, −2−4=−6-2 - 4 = -6 (no). Can ±1±2±4±8=17\pm 1 \pm 2 \pm 4 \pm 8 = 17? Wait: 1+2+4+8=15<171 + 2 + 4 + 8 = 15 < 17! So NO polynomial with coefficients in {−1,0,1}\{-1, 0, 1\} vanishes at X=2X = 2! Aha! What about X=8X = 8?! 80=18^0 = 1, 81=88^1 = 8, 82=64≡−48^2 = 64 \equiv -4, 83≡−32≡2(mod17)8^3 \equiv -32 \equiv 2 \pmod{17}—still {1,8,−4,2}\{1, 8, -4, 2\}, max sum 15<1715 < 17! Wait: what about c(X)c(X) in {−1,0,1}\{-1, 0, 1\} vanishing at X=−2X = -2? Max magnitude is still 1+2+4+8=15<171 + 2 + 4 + 8 = 15 < 17! Aha—that's a great sanity check: for q=17,d=4q = 17, d = 4, NO nonzero {−1,0,1}\{-1, 0, 1\} polynomial vanishes at ANY of {2,8,−2,−8}\{2, 8, -2, -8\} because 1+2+4+8=15<171 + 2 + 4 + 8 = 15 < 17! To get a zero divisor with {0,1,−1}\{0, 1, -1\} coefficients, you need a slightly larger dd (like d=8,q=17d=8, q=17: ψ=3\psi=3 or wait: 1+2+4+8+16=31>171 + 2 + 4 + 8 + 16 = 31 > 17, or for d=4,q=17d=4, q=17 use coefficients in {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\}, e.g., c(X)=1+2X2+X3c(X) = 1 + 2X^2 + X^3 at X=2X=2 gives 1+8+8=17≡0(mod17)1 + 8 + 8 = 17 \equiv 0 \pmod{17}!). Let's state that clearly—the exercise asked for {−1,0,1}\{-1, 0, 1\}, and proving that no {−1,0,1}\{-1, 0, 1\} polynomial works for d=4,q=17d=4, q=17 (while 1+2X2+X31 + 2X^2 + X^3 works in {−2,…,2}\{-2,\dots,2\}) is an awesome insight!
  3. Partial Splitting (d=4,q=5d=4, q=5): (X2−2)(X2+2)=X4−4≡X4+1(mod5).(X^2 - 2)(X^2 + 2) = X^4 - 4 \equiv X^4 + 1 \pmod 5. Are X2−2X^2 - 2 and X2+2X^2 + 2 irreducible mod 55? The squares mod 55 are {0,1,4}\{0, 1, 4\}, so neither 22 nor −2≡3-2 \equiv 3 is a square mod 55—hence both quadratics are irreducible! Why is 1+X1 + X invertible in R5R_5? Because 1+X1 + X has degree 1<21 < 2, so it cannot be divisible by either irreducible degree-2 factor mod 55!


Module 04: Lattice Commitments

  1. BDLOP Arithmetic:

    • t1=A1r=1(1)+3(−1)+5(0)=−2≡15(mod17)\mathbf{t}_1 = A_1 \mathbf{r} = 1(1) + 3(-1) + 5(0) = -2 \equiv 15 \pmod{17}.
    • t2=A2r+m=(2(1)+7(−1)+4(0))+12=−5+12=7(mod17)\mathbf{t}_2 = A_2 \mathbf{r} + m = (2(1) + 7(-1) + 4(0)) + 12 = -5 + 12 = 7 \pmod{17}.
    • 2(t1,t2)≡(30,14)≡(13,14)(mod17)2(\mathbf{t}_1, \mathbf{t}_2) \equiv (30, 14) \equiv (13, 14) \pmod{17}.
    • Commit to 2m≡7(mod17)2m \equiv 7 \pmod{17} with 2r=(2,−2,0)T2\mathbf{r} = (2, -2, 0)^T:
      • A1(2r)=2−6=−4≡13(mod17)A_1(2\mathbf{r}) = 2 - 6 = -4 \equiv 13 \pmod{17}.
      • A2(2r)+7=(4−14)+7=−3≡14(mod17)A_2(2\mathbf{r}) + 7 = (4 - 14) + 7 = -3 \equiv 14 \pmod{17}. Matches!
  2. Breaking Unbounded BDLOP: Given (t1,t2)(\mathbf{t}_1, \mathbf{t}_2) and any target m′\mathbf{m}', solve the linear system over RqR_q: (A1A2)r′≡(t1t2−m′)(modq).\begin{pmatrix} A_1 \\ A_2 \end{pmatrix} \mathbf{r}' \equiv \begin{pmatrix} \mathbf{t}_1 \\ \mathbf{t}_2 - \mathbf{m}' \end{pmatrix} \pmod q. Since m≥κ+ℓm \ge \kappa + \ell, with overwhelming probability (A1A2)\begin{pmatrix} A_1 \\ A_2 \end{pmatrix} has full row rank (in CRT slots) and Gaussian elimination finds an unbounded r′∈Rqm\mathbf{r}' \in R_q^m opening the commitment to m′\mathbf{m}'.

  3. Why m>κ+ℓm > \kappa + \ell:

    • If λ=0\lambda = 0, then m=κ+ℓm = \kappa + \ell and (A1A2)\begin{pmatrix} A_1 \\ A_2 \end{pmatrix} is a square invertible matrix (in HNF, literally Iκ+ℓI_{\kappa + \ell}!). So r\mathbf{r} is uniquely determined by t1=e1\mathbf{t}_1 = \mathbf{e}_1—no M-LWE secret s\mathbf{s} exists, and t1\mathbf{t}_1 exposes r\mathbf{r} directly (no hiding!).
    • If κ=0\kappa = 0, there is no t1=A1r\mathbf{t}_1 = A_1 \mathbf{r} binding equation at all; an adversary can shift r\mathbf{r} arbitrarily and absorb the difference into m′=t2−A2r′\mathbf{m}' = \mathbf{t}_2 - A_2 \mathbf{r}' (no binding!).

Module 05: Sigma Protocols & Fiat-Shamir with Aborts

  1. Leakage Math:

    • E[z∣c=1]=E[y]+1⋅s=0+s=s\mathbb{E}[z \mid c = 1] = \mathbb{E}[y] + 1 \cdot s = 0 + s = s.
    • When s=1s = 1, z=6z = 6 happens iff y=5y = 5, which has probability 1/111/11 (per c=1c=1 transcript), so an adversary expects to wait 11 transcripts with c=1c = 1 (about 22 total transcripts) before seeing z=6z = 6 and proving s=1s = 1 with 100% certainty! (Similarly z=−5z = -5 occurs with prob 1/111/11 when s=0s = 0.)
  2. Uniform Box Acceptance Probability: (1−βshiftγ1)N≈e−Nβshift/γ1≥e−1  ⟹  γ1≥N⋅βshift=1000⋅20=20,000.\left(1 - \frac{\beta_{\text{shift}}}{\gamma_1}\right)^N \approx e^{-N \beta_{\text{shift}} / \gamma_1} \ge e^{-1} \implies \gamma_1 \ge N \cdot \beta_{\text{shift}} = 1000 \cdot 20 = 20{,}000. Resulting ℓ∞\ell_\infty bound on accepted z\mathbf{z}: γ1−βshift=19,980\gamma_1 - \beta_{\text{shift}} = 19{,}980.

  3. Invertibility Bound: For q≈232q \approx 2^{32} with k=2k = 2, q1/2/2≈46,340q^{1/2}/\sqrt{2} \approx 46{,}340. Since c1,c2∈{−1,0,1}c_1, c_2 \in \{-1, 0, 1\}, we have ∥c1−c2∥∞≤2≪46,340\|c_1 - c_2\|_\infty \le 2 \ll 46{,}340, so c1−c2c_1 - c_2 can never fail to be invertible! By contrast, if qq were fully splitting (k=128k = 128), q1/128≈20.25<2q^{1/128} \approx 2^{0.25} < 2, so differences in {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\} could easily vanish in one of the 128 CRT slots and become non-invertible zero divisors.


Module 06: Exact Proofs, Norm Bounds, and Quadratic Relations

  1. Quadratic Trick Algebra:

    • g1=m1ym2+m2ym1−ym3g_1 = m_1 y_{m_2} + m_2 y_{m_1} - y_{m_3}, g0=ym1ym2g_0 = y_{m_1} y_{m_2}.
    • If m1m2−m3≠0m_1 m_2 - m_3 \neq 0, then P(c)=(m1m2−m3)c2+(… )c+(… )P(c) = (m_1 m_2 - m_3)c^2 + (\dots)c + (\dots) is a nonzero degree-2 polynomial over Fq\mathbb{F}_q. By the Fundamental Theorem of Algebra (over a field), a nonzero quadratic has at most 2 roots, so it cannot vanish at 3 distinct challenges c1,c2,c3∈Fqc_1, c_2, c_3 \in \mathbb{F}_q.
  2. Constant-Term Check:

    • ⟨a,b⟩=1(3)+2(−1)+0(5)+(−1)(1)=3−2+0−1=0\langle \mathbf{a}, \mathbf{b} \rangle = 1(3) + 2(-1) + 0(5) + (-1)(1) = 3 - 2 + 0 - 1 = 0.
    • σ−1(b)(X)=3−1X−5X2+1X3\sigma_{-1}(b)(X) = 3 - 1 X - 5 X^2 + 1 X^3.
    • Constant term of (1+2X−X3)(3−X−5X2+X3) mod (X4+1)(1 + 2X - X^3)(3 - X - 5X^2 + X^3) \bmod (X^4 + 1):
      • 1⋅3=31 \cdot 3 = 3
      • 2X⋅X3=2X4≡−22X \cdot X^3 = 2X^4 \equiv -2
      • (−X3)⋅(−X)=X4≡−1(-X^3) \cdot (-X) = X^4 \equiv -1 Sum: 3−2−1=0=⟨a,b⟩3 - 2 - 1 = 0 = \langle \mathbf{a}, \mathbf{b} \rangle.
  3. Why JL Needs a Fallback Bound: Take any s1=ssmall+q⋅k\mathbf{s}_1 = \mathbf{s}_{\text{small}} + q \cdot \mathbf{k} where k∈ZN\mathbf{k} \in \mathbb{Z}^N is huge (say 1000q1000 q in every coordinate!). Since q⋅Πk≡0(modq)q \cdot \Pi \mathbf{k} \equiv \mathbf{0} \pmod q, we still have Πs1≡Πssmall≡p−y3(modq)\Pi \mathbf{s}_1 \equiv \Pi \mathbf{s}_{\text{small}} \equiv \mathbf{p} - \mathbf{y}_3 \pmod q, even though ∥s1∥2≫q\|\mathbf{s}_1\|_2 \gg q!

  4. Lagrange Four-Squares: 100−70=30100 - 70 = 30. One four-square representation of 3030 is 52+22+12+02=25+4+1+0=305^2 + 2^2 + 1^2 + 0^2 = 25 + 4 + 1 + 0 = 30 (or 42+32+22+12=16+9+4+1=304^2 + 3^2 + 2^2 + 1^2 = 16 + 9 + 4 + 1 = 30).


Module 07: Folding, LaBRADOR, and Greyhound

  1. Gadget Math: t=⌈log⁡5101⌉=3t = \lceil \log_5 101 \rceil = 3 (since 53=125>1015^3 = 125 > 101). Balanced base-5 digits of 3737:

    • 37=5⋅7+2  ⟹  x(0)=237 = 5 \cdot 7 + 2 \implies x^{(0)} = 2 (rem 77).
    • 7=5⋅1+2  ⟹  x(1)=27 = 5 \cdot 1 + 2 \implies x^{(1)} = 2 (rem 11).
    • 1=5⋅0+1  ⟹  x(2)=11 = 5 \cdot 0 + 1 \implies x^{(2)} = 1. Check: 2+2⋅5+1⋅25=2+10+25=372 + 2 \cdot 5 + 1 \cdot 25 = 2 + 10 + 25 = 37. All digits in {−2,−1,0,1,2}\{-2, -1, 0, 1, 2\}.
  2. Folding Shrinkage Ratio: Each round replaces rr chunks of size LL with t=4t = 4 decomposed chunks of size LL, so total witness size goes from rLrL to 4L4L. For size to shrink by at least 2×2\times (rL/(4L)≥2rL / (4L) \ge 2), we need r≥8r \ge 8.

  3. Greyhound Tensor Check: f(X)=3+2X+5X2+1X3f(X) = 3 + 2X + 5X^2 + 1X^3, m=n=2m = n = 2: F=(3251),l(2)=(122)=(14),r(2)=(12).F = \begin{pmatrix} 3 & 2 \\ 5 & 1 \end{pmatrix}, \qquad \mathbf{l}(2) = \begin{pmatrix} 1 \\ 2^2 \end{pmatrix} = \begin{pmatrix} 1 \\ 4 \end{pmatrix}, \qquad \mathbf{r}(2) = \begin{pmatrix} 1 \\ 2 \end{pmatrix}. Then Fr(2)=(3+45+2)=(77)F \mathbf{r}(2) = \begin{pmatrix} 3 + 4 \\ 5 + 2 \end{pmatrix} = \begin{pmatrix} 7 \\ 7 \end{pmatrix}, and l(2)TFr(2)=1(7)+4(7)=35\mathbf{l}(2)^T F \mathbf{r}(2) = 1(7) + 4(7) = 35. Direct check: f(2)=3+2(2)+5(4)+1(8)=3+4+20+8=35f(2) = 3 + 2(2) + 5(4) + 1(8) = 3 + 4 + 20 + 8 = 35.


Module 08: Lattice SNARKs & Folding Schemes

  1. IVC Norm Invariant: Decomposing wacc\mathbf{w}_{\text{acc}} (with ∥wacc∥∞≤220\|\mathbf{w}_{\text{acc}}\|_\infty \le 2^{20}) in balanced base b=1024=210b = 1024 = 2^{10} takes k=2k = 2 digits (plus sign/carry headroom: actually [−512,512][-512, 512] for 2 digits covers up to 512⋅1024+512≈5.2×105512 \cdot 1024 + 512 \approx 5.2 \times 10^5, whereas 220≈1.05×1062^{20} \approx 1.05 \times 10^6; so k=3k = 3 digits covers up to ≈5×108\approx 5 \times 10^8, or b=211b = 2^{11} covers 2212^{21} in k=2k=2 digits!). With k=3k = 3 digits of wacc\mathbf{w}_{\text{acc}} and k=3k = 3 digits of wnew\mathbf{w}_{\text{new}} (or 11 new witness if already norm ≤b/2\le b/2), folding 44 chunks of norm ≤512\le 512 with ∥c∥op≤8\|c\|_{\text{op}} \le 8 gives norm ≤4⋅8⋅512=16,384≪220\le 4 \cdot 8 \cdot 512 = 16{,}384 \ll 2^{20}! Even with 66 chunks (3+33 + 3), 6⋅8⋅512=24,576≪2206 \cdot 8 \cdot 512 = 24{,}576 \ll 2^{20}. The invariant holds for infinitely many IVC steps!

  2. Separating Challenges:

    • Short challenges c∈Cc \in \mathcal{C} have small support/size and fail Schwartz-Zippel if RqR_q splits into small fields (or don't give 2−1282^{-128} field soundness in one challenge over Fq\mathbb{F}_q), whereas Sumcheck needs uniform challenges from a large field (≥2128\ge 2^{128}).
    • Uniform challenges r∈Rqr \in R_q have coefficients ≈q/2\approx q/2, so folding Ajtai commitments with rr immediately destroys the shortness bound required for M-SIS binding.
  3. Pay-Per-Bit Intuition: With base b=28b = 2^8, a general 64-bit register requires 64/8=864 / 8 = 8 digit chunks.

    • Naive (decompose everything to 64 bits): 1.0×8=81.0 \times 8 = 8 chunks per wire on average.
    • Neo pay-per-bit: 90%90\% boolean wires take 11 chunk (norm ≤1\le 1) and 10%10\% 64-bit wires take 88 chunks, averaging 0.9(1)+0.1(8)=1.70.9(1) + 0.1(8) = 1.7 chunks per wire—a 4.7×4.7\times reduction in commitment and prover work!

Module 09: Capstone

  1. Security Estimation Practice: With d=64d = 64, ln⁡q=32ln⁡2≈22.18\ln q = 32 \ln 2 \approx 22.18, ln⁡(1.0040)≈0.003992\ln(1.0040) \approx 0.003992:

    • For κ=10\kappa = 10 (κd=640\kappa d = 640): 2640⋅22.18⋅0.003992≈256.66≈15.05  ⟹  e15.05≈3.45×106≈221.7<222.2\sqrt{640 \cdot 22.18 \cdot 0.003992} \approx 2\sqrt{56.66} \approx 15.05 \implies e^{15.05} \approx 3.45 \times 10^6 \approx 2^{21.7} < 2^{22}. Not quite enough! (BKZ finds vectors slightly shorter than 2222^{22}.)
    • For κ=12\kappa = 12 (κd=768\kappa d = 768): 2768⋅22.18⋅0.003992≈267.99≈16.49  ⟹  e16.49≈1.45×107≈223.8>222.2\sqrt{768 \cdot 22.18 \cdot 0.003992} \approx 2\sqrt{67.99} \approx 16.49 \implies e^{16.49} \approx 1.45 \times 10^7 \approx 2^{23.8} > 2^{22}. κ=12\kappa = 12 gives comfortable margin!
  2. Slack Budget Check:

    • Bz≈2.8×105B_z \approx 2.8 \times 10^5 (or with 1.2×1.2\times tail margin, ≈3.4×105\approx 3.4 \times 10^5).
    • One relaxed extraction gives zˉ=z1−z2\bar{\mathbf{z}} = \mathbf{z}_1 - \mathbf{z}_2 with norm ≤2Bz≈5.6×105\le 2 B_z \approx 5.6 \times 10^5.
    • Cross-multiplying two relaxed openings with cˉ\bar{c} (∥cˉ∥op≤16\|\bar{c}\|_{\text{op}} \le 16) gives an M-SIS vector cˉ′zˉ−cˉzˉ′\bar{c}' \bar{\mathbf{z}} - \bar{c} \bar{\mathbf{z}}' of norm at most: βSIS≤2⋅16⋅(2Bz)=64Bz≈64⋅2.8×105≈1.8×107≈224.1.\beta_{\text{SIS}} \le 2 \cdot 16 \cdot (2 B_z) = 64 B_z \approx 64 \cdot 2.8 \times 10^5 \approx 1.8 \times 10^7 \approx 2^{24.1}.
  3. Spot the Bug: Because q≡1(mod2d)q \equiv 1 \pmod{2d}, Rq≅FqdR_q \cong \mathbb{F}_q^d via NTT. Pick ANY vector of bits b^∈{0,1}d\hat{\mathbf{b}} \in \{0, 1\}^d in NTT space (say b^=(1,0,1,0,…,0)\hat{\mathbf{b}} = (1, 0, 1, 0, \dots, 0)) and let b(X)=NTT−1(b^)∈Rqb(X) = \text{NTT}^{-1}(\hat{\mathbf{b}}) \in R_q! In NTT space, b^⊙b^=b^\hat{\mathbf{b}} \odot \hat{\mathbf{b}} = \hat{\mathbf{b}}, so b(X)2−b(X)≡0(modq)b(X)^2 - b(X) \equiv 0 \pmod q in RqR_q holds exactly, even though the coefficients of b(X)=NTT−1(1,0,1,0,… )b(X) = \text{NTT}^{-1}(1, 0, 1, 0, \dots) are spread all across [0,q)[0, q) and are completely non-binary!

results matching ""

    No results matching ""