Module 03: Algebraic Lattices — Cyclotomic Rings, Modules, and NTT
1. The Efficiency Problem with Plain Z-Lattices
If you built a commitment scheme directly from standard SIS/LWE over Zq, look at the key sizes:
For 128-bit security, you need lattice dimension n≈512–1024.
A public matrix A∈Zqn×m with m≈2nlogq has ≈107 entries, and every matrix-vector multiply Ax takes O(n2logq) operations!
Compare this with Elliptic Curves, where a group element is 32 bytes and Plonk uses FFTs over Fp in O(NlogN) time.
How do lattices get fast O(dlogd) arithmetic and compact keys?
Replace Z with a polynomial ring R! Just as Plonk works over polynomials mod XN−1, modern lattice proof systems work over cyclotomic ringsR=Z[X]/(Xd+1) (where d is a power of 2, typically d=64,128,256, or 1024).
2. The Power-of-2 Cyclotomic Ring R and Rq
Let d=2k be a power of 2. The polynomial Φ2d(X)=Xd+1 is the (2d)-th cyclotomic polynomial, which is irreducible over Q (and Z). Define:
R=(Xd+1)Z[X],Rq=(Xd+1)Zq[X]=R/qR.
Every element a∈R has a unique representative of degree <d:
a(X)=a0+a1X+⋯+ad−1Xd−1,ai∈Z.
2.1 Multiplication in R: Negacyclic Convolution
When you multiply two polynomials in R and reduce modulo Xd+1, you replace Xd≡−1.
For instance, X⋅a(X)=−ad−1+a0X+a1X2+⋯+ad−2Xd−1.
In matrix form, multiplying by a(X) on the left is multiplication by the negacyclic Toeplitz matrixrot(a)∈Zd×d:
rot(a)=⎝⎛a0a1a2⋮ad−1−ad−1a0a1⋮ad−2−ad−2−ad−1a0⋮ad−3⋯⋯⋯⋱⋯−a1−a2−a3⋮a0⎠⎞.
Look at what just happened:
One ring element a∈Rq stores d scalars, yet acts like a d×d matrix!
That cuts public matrix sizes by a factor of d and turns d×d matrix-vector products into a single polynomial multiplication in Rq!
2.2 Norms on R and the Expansion Factor γ
How do we measure the size of a polynomial a∈R (or a vector a∈Rm)?
Using its coefficient vectorvec(a)=(a0,…,ad−1)T∈Zd:
∥a∥∞=maxi∣ai∣,
∥a∥2=∑i=0d−1ai2 (for a∈Rq, we always lift coefficients to the centered interval [−q/2,q/2) before measuring norms!).
For a vector a=(a(1),…,a(m))T∈Rm, ∥a∥2=∑j∥a(j)∥22 and ∥a∥∞=maxj∥a(j)∥∞.
Crucial Pitfall — Norm Multiplication:
Unlike real numbers where ∣ab∣=∣a∣⋅∣b∣, in R=Z[X]/(Xd+1) multiplication mixes coefficients!
For any a,b∈R:
∥a⋅b∥∞≤∥a∥1⋅∥b∥∞≤d⋅∥a∥∞∥b∥∞,∥a⋅b∥2≤∥a∥1⋅∥b∥2≤d⋅∥a∥2∥b∥2.
Wait: for random or independent short a,b, the coefficients mostly cancel like a random walk, so typically ∥a⋅b∥2≈∥a∥2∥b∥2 (only growing by ≈d in the worst case, or even wt(a) if a is sparse!).
We also define the operator norm (often written ∥c∥op or via the canonical embedding below) to bound ∥c⋅s∥2≤∥c∥op∥s∥2.
3. Canonical Embedding & Galois Automorphisms
In algebra, K=Q[X]/(Xd+1) is the (2d)-th cyclotomic number field. Let ζ=eiπ/d be a primitive (2d)-th complex root of unity. The d roots of Xd+1 in C are the odd powers:
ζj=ζ2j+1,j=0,1,…,d−1.
3.1 Canonical Embedding σ
Evaluating a polynomial a(X)∈R at all d roots gives the canonical embedding:
σ:R↪Cd,σ(a)=(a(ζ0),a(ζ1),…,a(ζd−1)).
Why do lattice cryptographers love σ? Because σ turns polynomial multiplication into coordinate-wise multiplication!σ(a⋅b)=σ(a)⊙σ(b)⟹∥σ(a⋅b)∥∞≤∥σ(a)∥∞⋅∥σ(b)∥∞.
Moreover, the matrix sending (a0,…,ad−1) to (a(ζ0),…,a(ζd−1)) is a scaled unitary (DFT) matrix! By Parseval's identity:
∥σ(a)∥2=d⋅∥a∥2!
Look how clean that is:
∥a⋅b∥2=d1∥σ(a⋅b)∥2≤d1∥σ(a)∥∞∥σ(b)∥2=∥σ(a)∥∞⋅∥b∥2.
So the operator norm ∥a∥op of multiplying by a∈R is bounded by ∥σ(a)∥∞=maxj∣a(ζj)∣!
3.2 Galois Automorphisms σk
Notice that the field K=Q(ζ) has a Galois group Gal(K/Q)≅Z2d× of order d. For every odd integer k∈Z2d×, there is an automorphism σk:R→R (and Rq→Rq) defined by:
σk(X)=Xk(modXd+1).
Because Xd=−1, for k=−1 (i.e., 2d−1), we have σ−1(X)=X−1=−Xd−1!
Let's check what σ−1(a) looks like for a(X)=∑i=0d−1aiXi:
σ−1(a)(X)=a0−ad−1X−ad−2X2−⋯−a1Xd−1.
Magic Trick (Foreshadowing Module 06):
Compute the constant term (coefficient of X0) of a(X)⋅σ−1(b)(X) in R:
coeff0(a⋅σ−1(b))=i=0∑d−1aibi=⟨a,b⟩!
Verify this yourself for d=2: (a0+a1X)(b0−b1X)=(a0b0+a1b1)+(a1b0−a0b1)X since X2=−1!
This single identity—conjugation σ−1 turns polynomial multiplication into an inner product in the constant term—is used in almost every modern lattice ZKP (LNP22, LaBRADOR, LatticeFold)!
4. Module-SIS and Module-LWE
Wait: why do modern proof systems use Module-SIS and Module-LWE rather than Ring-SIS / Ring-LWE (m=1 or n=1)?
Pure Ring-LWE (n=1): You work over a single huge ring of degree d=1024 or 2048. To change security level, you must jump d by powers of 2 (512→1024→2048), and ring-level algebraic attacks could conceivably exploit n=1 ideal lattice structure.
Module-LWE / Module-SIS: Keep the ring degree small and fixed (e.g., d=64 or d=128 or d=256), and take small matrices over Rq, e.g. A∈Rqκ×m where rank κ∈{2,4,8,…}!
The total underlying Z-lattice dimension is N=κ⋅d:
Module-SIS (M-SISκ,m,q,β): Given uniform A←Rqκ×m, find nonzero x∈Rm∖{0} with ∥x∥2≤β such that Ax≡0(modq).
Module-LWE (M-LWEκ,m,q,χ): Distinguish (A,As+emodq) from (A,u), where A←Rqm×κ, s←χκ, e←χm (using HNF short secrets!).
Why Module lattices are the sweet spot for ZKPs:
Tune security smoothly by varying κ (just add/remove a row of A) while keeping ring degree d constant (e.g. d=64 in LaBRADOR / LNP22!).
Keep the expansion factor d small (d=64⟹d=8)!
Still enjoy fast NTT multiplication!
5. CRT Splitting & Negacyclic NTT (Connecting Back to Plonk!)
In Plonk, you evaluate polynomials over a multiplicative subgroup H={1,ω,ω2,…,ωN−1}⊂Fp× using the FFT/NTT so that polynomial multiplication becomes pointwise multiplication in evaluation form.
The exact same algebraic phenomenon happens in Rq=Zq[X]/(Xd+1)!
Suppose q is a prime. By the Chinese Remainder Theorem (CRT), Rq splits according to how Xd+1 factors modulo q:
Case A: Fully Splitting Prime (q≡1(mod2d))
If q≡1(mod2d), then Fq× contains a primitive (2d)-th root of unity ψ (with ψd≡−1(modq), and ω=ψ2 a primitive d-th root of unity).
Then Xd+1 splits completely into d distinct linear factors modulo q:
Xd+1≡j=0∏d−1(X−ψ2j+1)(modq).
By the Chinese Remainder Theorem:
Rq=(Xd+1)Fq[X]NTTj=0∏d−1(X−ψ2j+1)Fq[X]≅Fqd!
Look at what this gives you:
Fast Multiplication: Compute NTT(a),NTT(b)∈Fqd in O(dlogd), multiply coordinate-wise, and apply NTT−1.
SIMD / Batching (CRT Slots): A single ring element a∈Rq encodes d independent field elements (a(ψ1),a(ψ3),…,a(ψ2d−1))∈Fqd! Adding or multiplying two ring elements in Rq performs d parallel additions/multiplications in Fq!
CRITICAL WARNING (The CRT Trap!):
In Rq≅Fqd, NOT every nonzero element is invertible!
An element a∈Rq is invertible mod q if and only if all d of its NTT slots are nonzero (a(ψ2j+1)≡0(modq) for all j).
If even one slot is 0(modq), then a is a zero divisor in Rq!
This breaks naive Schwartz-Zippel and Schnorr extraction ((z1 - z2) / (c1 - c2)), because c1−c2 might not be invertible!
Case B: Partially Splitting Prime (q≡1+2d/k(mod4d/k), e.g. q≡5(mod8))
What if we pick q so that Xd+1 does not split into linear factors, e.g., it splits into k irreducible factors of degree d/k?
Xd+1≡j=0∏k−1fj(X)(modq),deg(fj)=d/k.
Then by CRT:
Rq≅j=0∏k−1Fqd/k!
Why would anyone want Rq to split into larger extension fields Fqd/k instead of Fq?
Two huge reasons for proof systems:
Invertibility of short differences (Lyubashevsky–Seiler Theorem): If Xd+1 only factors into k large factors of degree d/k (say k=2 or k=4), then any nonzero short polynomial c∈R with ∥c∥∞ small enough cannot vanish modulo an irreducible factor fj(X)! Why? Because the norm of a polynomial modulo fj bounds its minimum coefficient size (we'll see the exact bound in Module 05!). That guarantees every nonzero difference c1−c2 in a challenge set is invertible in Rq!
Large Challenge / Soundness Field: If q is small (like q≈232 or q=261−1, or even q=Goldilocks), a single slot Fq might be big enough, or for tiny q (e.g., q≈216), an extension field Fqd/k gives a 2128 Schwartz-Zippel soundness error inside each CRT slot!
6. Why This Matters for Proof Systems
Here is the dual view of Rq that you will use constantly from Module 04 onward:
Geometry View (Coefficients):a∈Rq is a short vector (a0,…,ad−1) in [−q/2,q/2)d. Security (M-SIS / M-LWE) and binding live here.
Algebraic View (NTT / CRT Slots):a∈Rq is a vector of k field elements in Fqd/kk. Arithmetic checks, Plonk gates, batching, and Schwartz-Zippel live here!
Every modern lattice proof system dances between these two representations: prove algebraic identities in CRT/evaluation slots while guaranteeing smallness in coefficient space.
Exercises
Negacyclic Multiplication: Let d=4, R=Z[X]/(X4+1), a(X)=1+2X−X3, and b(X)=2−X+X2.
Compute a(X)⋅b(X) in R.
Verify that coeff0(a⋅σ−1(b))=⟨a,b⟩ for these two polynomials!
NTT Splitting & Zero Divisors: Let d=4 and q=17. Check that ψ=2 is a primitive 8-th root of unity mod 17 (so 24≡−1(mod17)).
Factor X4+1(mod17) into 4 linear factors (X−ψ2j+1).
Find a nonzero polynomial c(X)∈R17 with coefficients in {−1,0,1} that is NOT invertible in R17 (i.e., c(ψ2j+1)≡0(mod17) for some j). (Hint: try 1−2X? Wait, coefficients in {−1,0,1}: try 1+X+X2+X3 or 1+X2!)
Partial Splitting: Let d=4 and q=5. Notice 5≡1(mod4) but 5≡1(mod8). Factor X4+1(mod5) into two irreducible quadratics! (Hint: X4+1=(X2−2)(X2+2)(mod5)? Check!) Why is 1+X invertible in R5?
Hands-on Lab (Rust + Arkworks): Run cargo run --bin lab02_ajtai_and_ntt inside labs/ (lab02_ajtai_and_ntt.rs) to test Negacyclic NTT via Arkworks' Radix2EvaluationDomain, inspect CRT zero divisors, and see how short vs. non-short openings behave in a ring-based Ajtai commitment.