← Back to section · Post-Quantum Cryptography
What Is a Lattice: From Graph Paper to Point Arrays in Hundreds of Dimensions
A lattice is a regularly arranged discrete set of points in high-dimensional space. This article explains the definition of a lattice, bases and unimodular transformations, the determinant and successive minima, dual lattices and q-ary lattices — the groundwork for understanding all of lattice cryptography.
Picture a sheet of graph paper extending to infinity: grid points arranged in neat rows and columns, and adding or subtracting any two grid points lands on another grid point. Generalize that sheet — allow the grid to skew, and allow the dimension to rise from 2 to several hundred — and the object you get is a lattice. Over the past two decades, the flagship post-quantum schemes have been built almost entirely on lattices: the security of ML-KEM and ML-DSA ultimately reduces to the claim that finding short vectors in a high-dimensional lattice is hard. To understand that hardness, we first have to see the lattice itself clearly.
The definition: a discrete additive group
Formally, given n linearly independent vectors b₁, …, bₙ ∈ Rⁿ, the set of all their integer linear combinations forms a lattice:
L = { x₁b₁ + x₂b₂ + ⋯ + xₙbₙ : xᵢ ∈ Z }
The vectors are called a basis of the lattice. A lattice has two defining properties: it is closed under vector addition and subtraction, making it an additive subgroup of Rⁿ; and it is discrete — there is a small ball around the origin containing no lattice point other than the origin itself. Discreteness rules out degenerate cases where points accumulate, and guarantees that every lattice has a well-defined shortest nonzero vector. The full-rank case (as many basis vectors as the dimension of the space) is what cryptography cares about. In two dimensions, Z² generated by (1,0) and (0,1) is the simplest lattice; another example is the hexagonal lattice generated by (1,0) and (1/2, √3/2), which packs more densely.
One lattice, infinitely many bases
A basis is not unique: recombine the basis vectors with integer coefficients, and as long as the old vectors can be recovered from the new ones by integer combinations, you get another basis of the same lattice. Algebraically, any two bases differ by a unimodular matrix — an integer matrix with determinant ±1 — a transformation that is exactly invertible over the integers. So the same lattice can have “good bases” and “bad bases”: a good basis consists of short vectors that are nearly orthogonal, making it easy to represent lattice points and to round and approximate; a bad basis consists of long, flat, skewed vectors, and the same lattice looks completely different through it.
This asymmetry is the earliest intuition behind lattice cryptography: the private key is a good basis, the public key is the same lattice scrambled into a bad basis. Solving problems is easy with the good basis and hard with only the bad one — although, to be precise, the security of modern schemes (LWE, SIS) is not directly built on this naive picture. Still, the core step of almost every lattice attack is to recover a sufficiently good basis starting from a bad one.
The determinant and successive minima
The parallelepiped spanned by a basis is called the fundamental region, and its volume is the determinant det(L), numerically the absolute value of the determinant of the basis matrix. The key fact is that det(L) does not depend on the choice of basis — a unimodular transformation has determinant ±1 and preserves volume — so it is an invariant of the lattice itself, intuitively measuring how sparse the lattice points are: the smaller the determinant, the denser the points.
Another core quantity is the sequence of successive minima λ₁, …, λₙ: the i-th successive minimum is the radius of the smallest ball containing i linearly independent lattice vectors, and λ₁ is the length of the shortest nonzero vector. Minkowski’s theorem gives an upper bound of order λ₁ ≤ √n · det(L)^(1/n): short vectors must exist. But this is only an existence proof; the theorem offers no method for finding one. In hundreds of dimensions, between “must exist” and “can actually be found” yawns an exponential computational gap — the source of every lattice problem that follows. For random lattices, the Gaussian heuristic further predicts the typical size of λ₁, and both attackers and parameter designers use it to calibrate expectations.
Dual lattices and q-ary lattices
For a lattice L, the set of all vectors whose inner products with every vector of L are integers forms the dual lattice L*. The determinant of the dual is the reciprocal of det(L); many decoding algorithms and dual attacks switch back and forth between the viewpoints of L and L*.
The lattices cryptography actually uses are mostly q-ary lattices: given a random matrix A, a set of the form { x ∈ Z^m : Ax ≡ 0 (mod q) } is a full-rank lattice whose determinant is a power of q. Such a lattice is completely described by the compact matrix A — a public key only needs to store A rather than a whole basis — while naturally embedding average-case problems such as LWE and SIS into the language of lattices. The lattices in ML-KEM and ML-DSA go one step further: they are not arbitrary q-ary lattices but q-ary lattices with module-polynomial structure, hundreds of dimensions, enormous determinants, and shortest-vector problems with no known shortcut on classical or quantum computers.
High-dimensional counterintuition
Low-dimensional intuition fails systematically in high dimensions, which is one reason lattice problems “look easy and are hard.” First, the volume of a high-dimensional ball concentrates almost entirely in a thin shell near its surface, so questions like “how far is a random point from the center” have answers utterly unlike two-dimensional experience. Second, high-dimensional space is astonishingly roomy: it can hold exponentially many pairwise nearly orthogonal directions, so short vectors, though they exist, are drowned in an astronomical number of candidate directions — search has no shortcut. Third, lattice points are counted roughly by the determinant (a region of volume V contains about V / det(L) lattice points), but between “exists on average” and “name a specific one” there is no bridge. Attack algorithms (enumeration, sieving) are essentially fighting this scale effect of high-dimensional geometry: enumeration must traverse exponentially many nodes, and sieving must maintain exponentially large tables of vectors. Put together, these three points explain why dimension is the first parameter of lattice cryptography: each added dimension expands the attacker’s space exponentially, while the legitimate user’s cost grows only polynomially — and that asymmetric growth differential is the dividend all lattice schemes live on.
Summary
A lattice is a discrete array of points: a basis determines it, volume and successive minima characterize it, and the gap between good and bad bases inspired cryptographic design. The next question makes “hard” precise: how hard is it to find the shortest vector in a lattice, or the lattice point closest to a target, and how are these problems related? That is the territory of SVP and CVP.
Tags: latticesmathematical foundationsbasesdual lattices