In your algebra course, you worked extensively with vector spaces over a field (e.g., Rn or Fpn) and modules over a ring. In elliptic-curve cryptography (Plonk, IPA), you work inside a cyclic group G of prime order p, which behaves algebraically like a 1-dimensional Fp-vector space (via the exponent map x↦xG).
A lattice is what happens when you replace the field scalars R in Rn with the integersZ:
Instead of taking arbitrary real linear combinations of basis vectors, you only take integer linear combinations.
In algebra terms: a lattice is a discrete free Z-submodule of Rn.
Why does restricting scalars from R (or Fp) to Z change everything?
Because Z is not a field—almost no nonzero integer has an integer inverse! As a result:
A lattice has infinitely many bases, and most of them are geometrically awful (long, nearly parallel vectors), whereas a few bases are "good" (short, nearly orthogonal).
You have a meaningful notion of distance and norm (Euclidean ℓ2 norm, max ℓ∞ norm), which does not exist in Fp!
Finding a short nonzero vector or the closest lattice vector given a "bad" basis is computationally hard—even for quantum computers.
2. Core Definitions
2.1 Lattice and Basis
Let b1,…,bk∈Rn be k linearly independent vectors over R (k≤n). Put them as columns of a matrix B∈Rn×k.
The lattice generated by B is:
L(B)={i=1∑kzibi:zi∈Z}=BZk={Bz:z∈Zk}.
n is the ambient dimension, and k is the rank of the lattice.
When k=n, we call L a full-rank lattice (almost all lattices in cryptography are full-rank, or integer lattices L⊆Zn).
Concrete 2D Example:
Let B=(1001). Then L(B)=Z2, the standard integer grid.
Now consider B′=(101001) or B′′=(10110010099) (note det(B′′)=101⋅99−1002=−1).
Do B, B′, and B′′ generate the exact same latticeZ2? Yes! Because every column of B′′ is an integer vector, and (B′′)−1=(−99100100−101) is also an integer matrix.
2.2 Equivalent Bases and Unimodular Matrices
When do two full-rank bases B1,B2∈Rn×n generate the same lattice L(B1)=L(B2)?
Theorem:L(B1)=L(B2) if and only if there exists a unimodular matrixU∈GLn(Z) (meaning U∈Zn×n and det(U)=±1) such that
B2=B1U.
Proof sketch:
(⇐) If B2=B1U with U∈Zn×n, then B2Zn⊆B1Zn. Since det(U)=±1, by Cramer's rule U−1∈Zn×n, so B1=B2U−1 gives the reverse inclusion.
(⇒) If L(B1)=L(B2), every column of B2 is in L(B1) so B2=B1U for some U∈Zn×n; symmetrically B1=B2V for V∈Zn×n. Thus B1=B1UV⟹UV=In⟹det(U)det(V)=1⟹det(U)=±1. ■
This theorem is the foundational secret-key / public-key metaphor of lattice crypto:
Public key / Hard instance: A skewed, long basis Bbad=BgoodU.
Trapdoor: A short, nearly orthogonal basis Bgood.
3. Geometry of Numbers: Volume, Norms, and Minkowski
3.1 Fundamental Parallelepiped and Determinant
Given a basis B=[b1,…,bn] of a full-rank lattice L⊆Rn, the fundamental parallelepiped is:
P(B)={i=1∑ntibi:ti∈[0,1)}=B[0,1)n.
Every point x∈Rn can be written uniquely as x=v+p where v∈L and p∈P(B) (just compute B−1x, take the floor of each coordinate for the lattice part, and the fractional part for P(B)). So translates v+P(B) tile Rn without overlap!
The determinant (or covolume) of L is the volume of P(B):
det(L)=∣det(B)∣(or det(BTB) for k<n).
Crucially, det(L) is a lattice invariant—it does not depend on the choice of basis! Because for any B′=BU with U∈GLn(Z):
∣det(B′)∣=∣det(B)⋅det(U)∣=∣det(B)∣⋅1=det(L).
Intuitively, det(L) measures sparsity: the average volume per lattice point is det(L), so the density of lattice points in Rn is 1/det(L).
3.2 Norms and Successive Minima
We primarily use two norms on Rn:
Euclidean (ℓ2) norm:∥x∥2=∑i=1nxi2 (when written ∥x∥ without subscript, we usually mean ℓ2).
Infinity (ℓ∞) norm:∥x∥∞=max1≤i≤n∣xi∣.
ℓ1 norm:∥x∥1=∑i=1n∣xi∣.
Recall the basic equivalence inequalities in Rn:
∥x∥∞≤∥x∥2≤n∥x∥∞,∥x∥2≤∥x∥1≤n∥x∥2.
The minimum distance (or first successive minimum) of L is the length of the shortest nonzero vector in L:
λ1(L)=v∈L∖{0}min∥v∥2.
More generally, the i-th successive minimumλi(L) is the smallest radius r such that L contains i linearly independent vectors of norm ≤r.
3.3 Minkowski's First Theorem
How short must the shortest vector in an n-dimensional lattice be, given its determinant?
Minkowski's Convex Body Theorem: Let L⊂Rn be a full-rank lattice, and let S⊂Rn be a convex, centrally symmetric (x∈S⟹−x∈S) set with vol(S)>2ndet(L). Then S contains at least one nonzero lattice point v∈L∖{0}.
Proof (Blichfeldt's Pigeonhole Principle):
Scale S down by 1/2: consider S/2. Its volume is vol(S/2)=2−nvol(S)>det(L).
Chop S/2 into pieces according to which fundamental parallelepiped v+P(B) each point falls into, and translate all those pieces back into P(B).
Since the total volume exceeds vol(P(B))=det(L), two distinct points x,y∈S/2 must map to the same offset in P(B), meaning x−y=v∈L∖{0}.
Since S is centrally symmetric and convex, 2x∈S and −2y∈S, so their midpoint 21(2x+(−2y))=x−y=v lies in S! ■
Applying Minkowski's theorem to the cube S=[−r,r]n (volume (2r)n) gives the clean ℓ∞ bound:
λ1(∞)(L)≤det(L)1/n.
Applying it to the ℓ2 ball of radius r (whose volume is roughly (n2πe)n/2rn by Stirling's approximation) yields Minkowski's First Theorem:
λ1(L)≤n⋅det(L)1/n(and asymptotically ≤πe2ndet(L)1/n).
Gaussian Heuristic: For a "typical" random lattice of rank n, Minkowski gives an upper bound, and the Gaussian Heuristic predicts that λ1(L) is actually very close to:
GH(L)≈2πen⋅det(L)1/n.
This heuristic is used constantly in lattice cryptanalysis to estimate how short a vector exists (and whether a planted secret vector is abnormally short compared to random lattice vectors!).
4. Dual Lattices
Remember inner product spaces from linear algebra? For a full-rank lattice L⊂Rn, its dual latticeL∗ is:
L∗={w∈Rn:⟨w,v⟩∈Z for all v∈L}.
If B is a basis of L, then B∗=(B−1)T=B−T is a basis of L∗, because (B−T)TB=B−1B=In.
Immediately: (L∗)∗=L, and det(L∗)=det(L)1.
Transference Theorem (Banaszczyk): Short vectors in L correspond to "sparse directions" in L∗, specifically:
1≤λ1(L)⋅λn(L∗)≤n.
In cryptography, SIS and LWE are dual to each other via this exact dual-lattice relation! (More in Module 02.)
5. Gram-Schmidt Orthogonalization, Babai, and LLL
How do we actually measure how "good" a basis B=[b1,…,bn] is, and how do we improve a bad basis?
5.1 Gram-Schmidt Orthogonalization (GSO)
Recall GSO from linear algebra (without normalizing vectors to unit length!):
b~1=b1,b~i=bi−j=1∑i−1μi,jb~j,where μi,j=⟨b~j,b~j⟩⟨bi,b~j⟩.
Notice two critical facts:
The GSO vectors b~i are not usually in the lattice L (because μi,j∈R are not integers!).
However, the product of their lengths gives the exact determinant:
det(L)=i=1∏n∥b~i∥2.
If a basis has big ∥bi∥ while det(L) is fixed, the GSO norms ∥b~i∥ must decay rapidly—that's the signature of a skewed "bad" basis.
5.2 Babai's Nearest Plane Algorithm (Solving Approximate CVP with a Good Basis)
Suppose someone gives you a target vector t∈Rn and asks for a lattice vector v∈L(B) close to t (the Closest Vector Problem, CVP).
Babai's Nearest Plane Algorithm walks backwards from i=n down to 1:
Set w=t.
For i=n,n−1,…,1:
Compute the projection coefficient along b~i: ci=⌊⟨b~i,b~i⟩⟨w,b~i⟩⌉ (round to nearest integer).
Update w←w−cibi.
Return v=t−w=∑i=1ncibi∈L(B).
How close is v to t? At each step i, the residual along b~i is at most 21∥b~i∥, and since the b~i are pairwise orthogonal, Pythagoras gives:
∥t−v∥22≤41i=1∑n∥b~i∥22.
If you have a good basis (short b~i and small ∥bi∥), Babai's algorithm recovers nearby lattice points accurately! With a bad basis, ∥b~n∥ can be tiny and ∥b~1∥ huge, making Babai fail completely.
Can we turn any bad basis B into a reasonably good basis in polynomial time?
Yes—in low dimensions! The LLL algorithm finds an LLL-reduced basis in polynomial time in n.
A basis B=[b1,…,bn] is δ-LLL-reduced (typically δ=3/4) if:
Size-reduced:∣μi,j∣≤21 for all 1≤j<i≤n (no vector has a large component along an earlier GSO vector; enforced by subtracting ⌊μi,j⌉bj).
Lovász condition: For all 1≤i<n:
δ∥b~i∥22≤∥b~i+1+μi+1,ib~i∥22=∥b~i+1∥22+μi+1,i2∥b~i∥22.
If this fails, swap bi and bi+1 and repeat!
What does LLL guarantee? For δ=3/4:
∥b1∥2≤2(n−1)/2λ1(L),∥b1∥2≤2(n−1)/4det(L)1/n.
Notice the punchline:
In small dimensions (n=2,10,50), 2(n−1)/2 is manageable (in fact LLL works even better in practice, roughly ≈1.02ndet(L)1/n).
In cryptographic dimensions (n=512,1024,2048), an exponential approximation factor like 1.02n (or BKZ block-reduction's δ0n) is far too weak to find vectors of norm ≈poly(n)! That exponential gap between polynomial-time basis reduction and Minkowski's bound is the exact reason lattice cryptography is secure.
6. Why This Matters for Proof Systems
Keep these takeaways from Module 01 in your toolkit:
Unlike Fp, vectors in lattice schemes live in Zn (or Zqn lifted to [−q/2,q/2)) and carry size (norm).
A commitment or trapdoor is fundamentally about short vectors in a lattice.
Attacks on lattice proof systems (like finding a commitment collision) reduce to running lattice basis reduction (LLL / BKZ) to find a short vector in some lattice. Security parameters are chosen precisely so that BKZ's best achievable root Hermite factor δ0n stays strictly larger than the norm bound β enforced by the proof system!
Exercises
Unimodular Check: Let B1=(3152) and B2=(1021). Do B1 and B2 generate the same lattice in Z2? Prove it by computing U=B2−1B1.
Determinant & Minkowski: Consider the 2D lattice generated by B=(17051) (note: this is the q-ary lattice of solutions to x1≡5x2(mod17), foreshadowing Module 02!).
Compute det(L(B)).
What does Minkowski's ℓ∞ bound guarantee for λ1(∞)(L)?
Find a shorter nonzero vector in L(B) by eye (hint: subtract a multiple of (17,0)T from a multiple of (5,1)T).
Dual Lattice: Compute a basis for the dual lattice L∗ of L(B) from Exercise 2, and verify ⟨v,w⟩∈Z for your basis vectors.
Hands-on Lab (Rust + Arkworks): Run cargo run --bin lab01_lll_and_babai inside labs/ (lab01_lll_and_babai.rs) to see how LLL transforms a horrible skewed basis into a nearly orthogonal one, rescues Babai's algorithm, and breaks a toy q-ary SIS instance over Arkworks F97.