A lattice is an infinite, regularly repeating grid of points. Pick n linearly independent basis vectors (directions that cannot be built from each other); the lattice is every point reachable by adding whole-number multiples of them, and nothing else. In two dimensions it is graph paper pulled slightly off square; in three, the atom arrangement of a crystal. Deployed cryptography runs the same construction in hundreds of dimensions.
Dimension is the security dial. The best known algorithms for finding short lattice vectors take exponential time in the dimension, quantum computers included, while a short, near-orthogonal basis makes the grid easy to navigate. Cryptography’s bet is that such a basis is hard to find: ML-KEM and ML-DSA, the NIST standards for key establishment and signatures, rest on it. The bet has two parts, a geometry gap (short bases versus long ones) and noise (equations that almost hold).
Any two independent vectors whose whole-number combinations cover the point set are a basis of the lattice, and one lattice holds many bases. A good basis is short and near-orthogonal (the vectors close to perpendicular); a bad basis is long and skewed. Both generate the same dots, and the difference is what each hands its holder: with the good basis, the lattice’s shortest vectors are the basis vectors themselves; with the bad basis, they are unobvious combinations, in the diagram the difference of the two long arrows.
Two computational problems carry the security, both stated against an arbitrary, possibly bad basis. The shortest vector problem (SVP) asks for the shortest nonzero lattice vector; theclosest vector problem (CVP) asks for the lattice point nearest a target that sits off the grid. Neither has a known polynomial-time algorithm at cryptographic accuracy. The workhorse approximation, the LLL algorithm (Lenstra, Lenstra, Lovász, 1982), runs in polynomial time and returns vectors only within an exponential factor 2^O(n) of the true shortest, and the best exact solvers need 2^O(n) time. That exponential wall is the security margin.
The equations.
Learning with errors (LWE) turns the geometry into algebra. A prover holds a secret vector s and publishes pairs (a, b) where a is a random vector and
b = As + e mod q,
the dot product of a with s (multiply matching coordinates, add, keep the remainder mod q) plus a small error e drawn from a narrow range such as −1 to 1. Each pair is one approximate equation in s; the noise is the only difference from the schoolbook system.
One worked system, small enough to check by hand.
Four samples over one secret, with modulus q = 17 and s = (3, 5). The publishing side knows both; only the pairs (a, b) become public.
| Sample a | True value a·s mod 17 | Error e | Published b = a·s + e mod 17 |
|---|---|---|---|
| (2, 7) | 7 | +1 | 8 |
| (5, 4) | 1 | −1 | 0 |
| (9, 11) | 14 | 0 | 14 |
| (6, 2) | 11 | +1 | 12 |
Row one by hand: 2·3 + 7·5 = 41, and 41 leaves remainder 7 after dividing by 17, so the true value is 7 and the published pair is ((2, 7), 8). Had those two pairs carried no error, Gaussian elimination (the standard procedure of adding multiples of one equation to another to cancel variables) would recover s = (3, 5) from them alone. With the errors in place, every elimination step adds errors together, and the combined error drowns the signal before the last variable cancels.
Why the noise is the security.
The best known recovery algorithms, quantum ones included, take exponential time in the length of s; Regev’s survey records 2^O(n) time and samples for the strongest known method. The hardness also has a worst-case floor: Regev proved that an algorithm solving LWE would yield quantum algorithms approximating the shortest-vector problems of every lattice, the hardest instances included (Peikert later made the reduction classical). Average-looking samples inherit the difficulty of the worst case, which is why a random-looking public key can carry a precise assumption.
Plain LWE keys are heavy. The published vectors must be unpredictable, so a public key carries on the order of n² numbers: n sample vectors of length n. Ring structure cuts that to about n. Replace plain vectors with polynomials of degree n − 1 under a wraparound rule (the quotient ringZ_q[x]/(x^n + 1), where x^n behaves as −1), and one published element generates the whole matrix: every row after the first is that element’s coefficients rotated and negated. Key material drops from order-n² coefficients to order-n, and a Fourier-style fast multiply (the number-theoretic transform) speeds the arithmetic.
The structure was the worry, and the hardness survived it. Ring-LWE’s security proof ties its hardness to worst-case problems on ideal lattices, the subfamily carrying the ring’s wraparound symmetry, rather than all lattices. No known algorithm exploits the symmetry: the best known running times on ideal lattices match the general ones. Small keys and believed-hard problems coexist there.
The deployed standards sit on the structured side. ML-KEM (FIPS 203) fixes two ring constants for every security level, n = 256 (polynomial degree) and q = 3329 (the modulus), with arithmetic in R_q = Z_q[X]/(X^256 + 1). Security rises with the module rank k, a stack of k ring elements: k = 2, 3, 4 in ML-KEM-512, -768, -1024, underlying lattices of 512, 768, and 1024 dimensions. ML-DSA (FIPS 204) signs over module lattices in the same family.
The 2026 quasi-polynomial quantum attack on module-lattice problems pressed exactly on this boundary: the attack’s advantage is asymptotic, it grows as the ring degree n grows, while the standards raise the rank k and hold n = 256 fixed; the same disclosure reported no improved classical attacks on mainstream schemes of either flavor. The standards guide’s size section carries the deployed parameter sets and byte costs.
| Claim | Primary source | Status |
|---|---|---|
| ML-KEM constants in every parameter set: n = 256 and q = 3329; arithmetic in the ring R_q = Z_q[X]/(X^256 + 1); MLWE replaces Z_q^n with the module R_q^k; k = 2, 3, 4 for ML-KEM-512/768/1024 (security categories 1, 3, 5) | NIST FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism, Sections 4.3 and 8, Tables 2-3 | verified (standard text) |
| An efficient algorithm for LWE implies efficient quantum algorithms for worst-case approximate lattice problems (GAPSVP, SIVP) | Regev, "On Lattices, Learning with Errors, Random Linear Codes, and Cryptography", STOC 2005; J. ACM 56(6), 2009 | verified (paper abstract) |
| LWE: recover a secret from approximate random linear equations, correct up to a small additive error; without the error, Gaussian elimination recovers s from about n equations in polynomial time; elimination amplifies the error to unmanageable levels | Regev, "The Learning with Errors Problem", invited survey, CCC 2010 | verified (survey text) |
| The best known algorithms for LWE (Blum-Kalai-Wasserman) take 2^O(n) samples and time; "even quantum algorithms don’t seem to help"; for polynomial moduli, hardness rests on worst-case GAPSVP/SIVP approximations resisting quantum computers | Regev, CCC 2010 survey (Algorithms and Hardness sections) | verified (survey text) |
| Ring structure: n sample vectors collapse to O(n) ring elements (key material from order n^2 to order n); arithmetic interpreted in Z_q[x]/(x^n + 1); ring hardness restricts the worst case to ideal lattices, and no known way exploits the extra structure | Regev, CCC 2010 survey (Ring-LWE section) | verified (survey text) |
| Ring-LWE: the decision version (distinguish noisy equations from uniform) suffices; hardness holds under a quantum reduction, and Peikert (2009) later proved LWE hardness via a classical reduction | Lyubashevsky, Peikert, Regev, "On Ideal Lattices and Learning with Errors Over Rings", EUROCRYPT 2010 | verified (paper text) |
| A lattice is the set of all integer combinations of n linearly independent basis vectors; one lattice, many bases (the two-bases figure); SVP: find the shortest nonzero lattice vector; CVP: find the lattice point closest to a target; LLL (1982) is polynomial time with approximation factor 2^O(n) | Micciancio & Regev, "Lattice-based Cryptography", book chapter in Post-Quantum Cryptography (Springer, 2008) | verified (chapter text) |
| Companion survey: SIS and LWE as the foundational problems, their ring-based variants, and provable hardness from worst-case lattice intractability | Peikert, "A Decade of Lattice Cryptography", Cryptology ePrint Archive 2015/939 | verified (abstract; companion exposition) |
| Quasi-polynomial quantum algorithm for module-lattice problems (some Ring- and Module-LWE versions); the significance is asymptotic, the speedup grows with ring degree n while ML-KEM and ML-DSA raise rank k at fixed n = 256; no improved classical attacks on mainstream lattice schemes of either flavor, and the findings strengthen unstructured lattices | Cryptography Incident Review Group, Statement 1, November 30, 2026 | verified (statement text) |
| Worked example: q = 17, s = (3, 5); true values 7, 1, 14, 11; published b = 8, 0, 14, 12; the exact system rows (2, 7) = 7 and (5, 4) = 1 solve back to s = (3, 5) mod 17 | this page’s arithmetic, checkable by hand | checked (recomputed mechanically at authoring) |
ML-KEM and ML-DSA run this machinery at internet scale: noisy linear equations over a polynomial ring, wrapped in a key-establishment and signature interface. The standards guide carries the deployed algorithms, parameters, and the hybrid TLS story; the quantum threat guide carries why the migration exists at all, and the Shor and Grover concept pages carry the two mechanisms behind it.