Skip to content
DAH
Wiki/CryptographyAlgorithmActive

Lattice-based cryptography (LWE)

Public-key encryption, signatures and homomorphic encryption whose security rests on Learning With Errors, the basis of the NIST post-quantum standards ML-KEM and ML-DSA.

On this page17 sections
Why other work relies on it

ML-KEM (FIPS 203) and ML-DSA (FIPS 204) are built on module-LWE and are being deployed to replace RSA and elliptic-curve key exchange and signatures; fully homomorphic encryption schemes rest on the same assumption.

Secret codes built on a puzzle about noisy equations, believed hard even for quantum computers.

  1. 1Quantum computers threaten today's locks
  2. 2Noise hides a secret in equations
  3. 3Breaking it would solve hard lattice puzzles
  4. 4Used to build encryption and signatures
  5. 5Now part of official standards

Lattices. A lattice is the set of all integer combinations of nn linearly independent vectors in Rn\mathbb R^n; picture a regular grid of points, possibly slanted. The same lattice has many different bases, some short and nearly perpendicular (good), some long and skewed (bad). Natural problems: the Shortest Vector Problem (SVP) asks for the shortest nonzero lattice vector; its approximation versions allow a slack factor γ\gamma. For slack factors polynomial in nn, no polynomial-time algorithm is known, classical or quantum. The best known algorithms take exponential time in nn.

Learning With Errors. Regev (2005) introduced LWE. Fix a dimension nn, a modulus qq and a noise distribution (typically a discrete Gaussian). Choose a secret vector ss modulo qq. An instance is a list of pairs (ai,bi)(a_i, b_i) where aia_i is a random vector and bi=⟨ai,s⟩+ei mod qb_i=\langle a_i,s\rangle+e_i \bmod q, with a small random error eie_i. Search-LWE asks for ss. Decision-LWE asks to tell such samples apart from uniformly random ones. With no error, Gaussian elimination recovers ss. With error, no efficient algorithm is known.

Why it is trusted. Regev proved that solving LWE on random instances would give a quantum algorithm for worst-case lattice problems (approximate SVP and a cousin called SIVP). Later work gave classical reductions under extra conditions on parameters. So an attack on LWE would be an algorithmic breakthrough for lattice problems that have been studied for a long time. This worst-case to average-case link is unusual among assumptions used in cryptography.

Structured variants. Plain LWE needs large keys. Variants with extra algebraic structure (Ring-LWE and Module-LWE) shrink keys and speed up operations, at the price of relying on structured lattices that are less studied.

Deployed standards. NIST's August 2024 post-quantum standards include ML-KEM (key exchange, FIPS 203) and ML-DSA (signatures, FIPS 204), both built on module-lattice assumptions. Concrete parameters are chosen from the estimated cost of the best known attacks, which are lattice-reduction and sieving algorithms with exponential running time (roughly 20.29n2^{0.29n} classically; quantum versions shave the exponent slightly).

Beyond encryption. LWE also supports fully homomorphic encryption, which lets a server compute on data it cannot read.

Open questions include whether a polynomial-time quantum algorithm for LWE exists (Chen's April 2024 claim was withdrawn after a bug was found; Simon's August 2026 unrefereed claim for the related dihedral coset problem is disputed), whether the structured variants are weaker than plain LWE, and how safe the concrete parameter choices are.

Go deeper

The full technical text.

Lattices and the LWE problem

A lattice is the set of integer combinations of nn linearly independent vectors in Rn\mathbb R^n. Natural computational problems on lattices include the Shortest Vector Problem (SVP: find a shortest nonzero vector), its approximation version GapSVPγ\mathrm{GapSVP}_\gamma, and the Shortest Independent Vectors Problem (SIVP). For approximation factors that are polynomial in nn none of them has a known polynomial-time algorithm, classical or quantum; the best algorithms take time exponential in nn.

Learning With Errors (LWE), introduced by Regev in 2005, is the average-case problem used in cryptography. Fix a dimension nn, a modulus qq and an error distribution χ\chi (typically a discrete Gaussian of width αq\alpha q). A secret s∈Zqns\in\mathbb Z_q^n is chosen uniformly. An instance is a list of samples (ai, bi=⟨ai,s⟩+ei mod q)(a_i,\ b_i=\langle a_i,s\rangle+e_i \bmod q) with aia_i uniform and ei←χe_i\leftarrow\chi. Search-LWE asks for ss; decision-LWE asks to distinguish the samples from uniform ones. Without the noise eie_i the secret is recovered by Gaussian elimination; with it, no efficient algorithm is known.

Why it is trusted

Regev showed (STOC 2005; J. ACM 2009) that for suitable parameters, solving LWE on random instances would give a quantum algorithm for worst-case GapSVPγ\mathrm{GapSVP}_\gamma and SIVP with γ=O~(n/α)\gamma=\tilde O(n/\alpha). Classical reductions exist under further restrictions on parameters (Peikert 2009; Brakerski, Langlois, Peikert, Regev and Stehlé 2013). So an efficient attack on LWE would be an algorithmic breakthrough for lattice problems that have been studied for decades. This worst-case-to-average-case link is unusual among cryptographic assumptions.

Structured variants and deployed schemes

Plain LWE needs public keys of size quadratic in nn. Ring-LWE (Lyubashevsky, Peikert and Regev) and module-LWE add algebraic structure over polynomial rings, shrinking keys and speeding up arithmetic, at the price of a hardness argument that now refers to ideal or module lattices. The NIST standards published on 13 August 2024 use module-LWE: ML-KEM (FIPS 203, from CRYSTALS-Kyber) has parameter sets ML-KEM-512, ML-KEM-768 and ML-KEM-1024, and ML-DSA (FIPS 204, from CRYSTALS-Dilithium) is the signature standard. A third lattice standard, FN-DSA (FIPS 206, based on Falcon), had been announced but was not listed among NIST's final FIPS as of October 2026. In March 2025 NIST also selected HQC, a code-based key-encapsulation mechanism, as a non-lattice backup to ML-KEM; NIST presented its planned standard (FIPS 207, HQC-KEM) in September 2025, and no final version had been published as of October 2026. LWE also underlies fully homomorphic encryption, which computes on encrypted data.

How security is estimated

Concrete parameters are chosen from the cost of the best known attacks: lattice basis reduction (BKZ) with a sieving or enumeration subroutine, hybrid and dual attacks, and combinatorial algorithms such as BKW and Arora–Ge for special parameter ranges. Estimates of these costs are refined every few years, and the security margins of the standardised parameter sets rest on them. Heuristic sieving solves SVP in dimension nn in time about 20.292n2^{0.292n} classically (Becker, Ducas, Gama and Laarhoven, 2016) and about 20.257n2^{0.257n} with quantum random walks (Chailloux and Loyer, 2021), so known quantum speedups only shrink the constant in the exponent.

Quantum attacks: what has and has not happened

The central open question is whether quantum computers can do much better. The natural route is through the dihedral coset problem (DCP): Regev showed in 2002 that an efficient quantum algorithm for DCP (tolerating some failure probability) would solve the unique shortest vector problem for polynomial factors, and Kuperberg's algorithm solves DCP in subexponential time 2O(log⁡N)2^{O(\sqrt{\log N})}, where NN is the order of the cyclic group. In April 2024 Yilei Chen posted a claimed polynomial-time quantum algorithm for LWE with polynomial modulus-to-noise ratio; within days the author reported a bug in the analysis that he could not repair, and withdrew the main claim. In June 2025 Bai, Jangir, Kirshanova, Ngo and Youmans (CRYPTO 2025) gave a quasi-polynomial quantum algorithm for an extrapolated variant of DCP over power-of-two moduli; it needs quasi-polynomially many samples, and the authors state that it therefore does not affect LWE with standard parameters. In August 2026 Daniel Simon posted an unrefereed preprint claiming a polynomial-time quantum algorithm for DCP; a preprint arguing that the algorithm cannot work followed twelve days later, and the dispute is unresolved (see the problem entry).

What to take away

LWE is the best-studied assumption among the post-quantum options, but it is an assumption: there is no proof that lattice problems are hard, and the standards were chosen with the explicit expectation that cryptanalysis will continue.

Words on this page (12)
Words on this page
lattice
A regular, repeating grid of points in space, made by adding whole-number multiples of a few basic arrows.
Learning With Errors (LWE)
The puzzle of recovering a secret from many linear equations that each carry a small random error.
shortest vector problem
Finding the shortest nonzero arrow pointing from the origin to a point of a lattice.
post-quantum cryptography
Codes designed to stay secure even against attackers with large quantum computers.
public-key cryptography
Encryption where anyone can lock a message with a public key but only the holder of a secret key can unlock it.
homomorphic encryption
Encryption that lets someone compute on data while it stays encrypted.
Gaussian elimination
The school method of solving systems of linear equations by combining and subtracting equations.
worst-case to average-case reduction
A proof that being able to break typical random instances would let you solve the hardest instances too.
quantum algorithm
A step-by-step method designed to run on a quantum computer.
basis (of a lattice)
A set of arrows whose whole-number combinations produce every point of the lattice; short, nearly perpendicular bases make lattice problems easy.
Module-LWE
A version of LWE with extra algebraic structure that makes keys smaller; it is the basis of the ML-KEM and ML-DSA standards.
lattice sieving
The fastest known way to find short lattice vectors: generate many vectors and repeatedly combine pairs into shorter ones; it takes exponential time.
New to this? Read first (3)
New to this? Read first

Understanding map

map of the whole wiki →

What to read before Lattice-based cryptography (LWE) (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.

  1. Start with
  2. Step 2
  3. Step 3
  4. Step 4
  5. Step 5
  6. Then

Open problems & questions

Progress timeline

  1. Aug 15, 2026
    No-go note against Simon's algorithm
    Related to: Learning With Errors: a polynomial-time quantum algorithm at polynomial modulus-to-noise ratio?

    Gupte, Ragavan and Zhandry argued that the algorithm cannot extract the least-significant bit of the DCP secret and proved a broader no-go result for algorithms following Regev's template, with Lean 4 code; Simon revised his preprint on 7 October in response. Unresolved.

    source
  2. Aug 3, 2026
    Simon's DCP preprint
    Related to: Learning With Errors: a polynomial-time quantum algorithm at polynomial modulus-to-noise ratio?

    Simon (AWS) claimed a polynomial-time quantum algorithm for the dihedral coset problem, which via known reductions would give quantum approximate SVP within about √n·polylog n and attacks on LWE in a corresponding regime; unrefereed and contested.

    source
  3. Apr 1, 2026
    Conditional deterministic hardness including ℓ2
    Related to: Unconditional deterministic NP-hardness of Euclidean (ℓ₂) shortest vector problem, and at polynomial factors

    Hair and Sahai obtained deterministic hardness within 2^((log n)^(1−o(1))) for all finite ℓp, including ℓ2, under the assumption NP ⊄ ∩_δ DTIME(exp(n^δ)) (preprint, unrefereed).

    source
  4. Nov 6, 2025
    Deterministic NP-hardness of SVP_p for p > 2
    Related to: Unconditional deterministic NP-hardness of Euclidean (ℓ₂) shortest vector problem, and at polynomial factors

    Hair and Sahai gave the first deterministic NP-hardness proof for finite ℓp norms, p > 2 (STOC 2026).

    source
  5. Jun 4, 2025
    Quasi-polynomial quantum algorithm for EDCP over power-of-two moduli
    Related to: Learning With Errors: a polynomial-time quantum algorithm at polynomial modulus-to-noise ratio?

    Bai et al. solved the extrapolated dihedral coset problem for power-of-two moduli in quasi-polynomial time; the authors state it does not affect standard LWE.

    source
  6. Mar 11, 2025
    NIST selects HQC as a code-based backup KEM

    After a fourth evaluation round NIST selected HQC for standardisation; it would be the second KEM standard after ML-KEM and does not depend on lattices.

    source
  7. Aug 13, 2024
    NIST publishes FIPS 203 and FIPS 204

    The module-LWE based key-encapsulation standard ML-KEM and the signature standard ML-DSA became final standards.

    source
  8. Apr 10, 2024
    Claimed quantum LWE algorithm, withdrawn within days

    Chen's ePrint 2024/555 claimed a polynomial-time quantum algorithm for LWE with polynomial modulus-to-noise ratio. On 18 April the author reported a bug in Step 9 (found by Hongxun Wu and, independently, Thomas Vidick) and withdrew the main claim.

    source
  9. Apr 10, 2024
    Chen's quantum LWE claim and its withdrawal
    Related to: Learning With Errors: a polynomial-time quantum algorithm at polynomial modulus-to-noise ratio?

    ePrint 2024/555 claimed polynomial-time quantum LWE algorithms; on 18 April the author reported an unrepairable bug in Step 9 and withdrew the claim.

    source
  10. Jan 1, 2012
    One-sided-error reduction and derandomisation route
    Related to: Unconditional deterministic NP-hardness of Euclidean (ℓ₂) shortest vector problem, and at polynomial factors

    Micciancio proved hardness within any constant by reductions with one-sided error and suggested derandomisation as a route to deterministic hardness.

    source
  11. May 22, 2005
    Regev introduces LWE

    Regev's STOC 2005 paper defined Learning With Errors and gave the quantum reduction from worst-case lattice problems; the journal version appeared in J. ACM in 2009.

    source
  12. May 23, 1998
    SVP is NP-hard under randomised reductions
    Related to: Unconditional deterministic NP-hardness of Euclidean (ℓ₂) shortest vector problem, and at polynomial factors

    Ajtai proved the Euclidean SVP NP-hard for randomised reductions (STOC 1998).

    source