Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    Lattice-based cryptography explained: learning with errors

    Lattice-based cryptography builds encryption and signatures on maths problems about lattices, grids of points in many dimensions. Its workhorse is learning with errors (LWE): recover a secret from linear equations that are each slightly wrong.[1] A quantum reduction ties LWE to worst-case lattice problems, and in 2010 its best known algorithms took exponential time.[2][3] A structured variant, Module-LWE, underpins NIST's ML-KEM and ML-DSA standards, published in August 2024.[4][5][6]

    Editor reviewedUpdated Explainer15 claims · 100% primaryPost-quantum cryptography and security, Quantum computing
    Reading level: 5 passages differ; the rest is the same for everyone.

    This page is part of the cryptography crash course. Read how post-quantum cryptography works first, then come back here. Afterwards, the nist-post-quantum-cryptography-project, ml-kem and ml-dsa pages show where these ideas ended up. Choose a reading level in each section.

    What a lattice is

    Picture the corners of the squares on a sheet of graph paper. That regular grid of points is a lattice. Cryptographers work with lattices in hundreds of dimensions, which are built the same way: start with a few direction arrows, called a basis, and take every whole-number combination of them.[7]

    Some questions about these grids are easy. Others, such as finding the shortest arrow in the grid, are believed to be very hard once there are many dimensions. Lattice-based cryptography builds locks out of those hard questions.[2]

    A lattice in R^n is the set of all integer combinations of n linearly independent basis vectors; the basis is not unique.[7] The hard problems behind LWE include GapSVP (the decision version of the shortest vector problem) and SIVP (the shortest independent vectors problem), assumed hard to approximate. Regev’s reduction connects these worst-case problems to LWE.[2]

    The learning with errors problem

    Learning with errors (LWE) is a puzzle about a hidden list of numbers, the secret. You are given many equations of the form “this mix of the secret numbers is about this much”. Each equation is off by a small random error, such as plus or minus one.[1]

    Without the errors this would be school algebra: with enough equations, Gaussian elimination recovers the secret quickly. But Gaussian elimination works by combining equations, and the small errors pile up until the result carries essentially no information. That is what makes the puzzle hard.[8]

    Oded Regev introduced LWE in 2005. In the same work he built a public-key encryption scheme on it, so anyone could encrypt to a key holder whose secret is an LWE solution.[9][10]

    LWE asks for a secret vector s modulo q, given random linear equations in s that each carry a small error; NIST describes the family as solving certain systems of noisy linear equations.[1] With e = 0, Gaussian elimination solves it from about n samples; FIPS 204 notes that for appropriate parameters LWE and SIS resist the best known techniques, including Gaussian elimination.[8] Regev introduced LWE in 2005 and gave a public-key cryptosystem based on it.[9][10]

    Why it is believed hard

    Most cryptography rests on problems that nobody has solved quickly, but with no proof that they can’t be. LWE has an unusually strong argument behind it. Regev showed that a fast way to solve typical LWE instances would give a quantum computer a fast way to solve the hardest instances of well-studied lattice problems.[2]

    In 2010 Regev also noted that the best known algorithms for LWE take exponential time, which means the work explodes as the problem grows.[3] That matters because quantum computers threaten today’s RSA and elliptic-curve methods (see how quantum computers break encryption). NIST says its lattice-based ML-KEM is, at present, believed secure even against an attacker with a quantum computer.[11]

    Regev’s main theorem reduces worst-case GapSVP and SIVP to average-case LWE. The reduction is quantum, so an efficient LWE algorithm would yield a quantum algorithm for those problems; in 2009 Regev called making it classical a main open question.[2] His 2010 survey cites exponential-time best known algorithms as one reason to believe LWE is hard.[3] NIST’s position is hedged: ML-KEM is “at present” believed secure against quantum adversaries.[11]

    From LWE to the NIST standards

    Plain LWE schemes tend to need large keys. Structured versions such as ring-LWE give smaller keys and faster code.[12] Module-LWE is a related structured version built from several copies of a polynomial ring.[4]

    NIST’s ML-KEM standard, used to agree a shared key, rests on module-LWE.[4] Its ML-DSA signature standard rests on module-LWE plus a related problem about finding small solutions to equations, called SIS.[5] Both standards were published on 13 August 2024.[6] The same family of problems also underpins homomorphic encryption.

    Ring-LWE and ring-SIS replace Z_q^n with a polynomial ring such as Z_q[x]/(x^n + 1), which gives smaller keys and faster schemes.[12] MLWE, used by ML-KEM, works over a module built as a k-fold product of a polynomial ring; FIPS 203 bases ML-KEM’s security on MLWE and, through it, on problems in module lattices.[4] ML-DSA’s security rests on MLWE and SelfTargetMSIS, a nonstandard MSIS variant.[5] It signs by Fiat-Shamir with aborts: a rejection-sampling loop discards candidate signatures that would leak the key.[13]

    What is still open

    Lattice schemes are not proven unbreakable. Their security rests on the presumed hardness of lattice problems.[4] Structure that makes keys small could also, in principle, help an attacker. In 2010 Regev wrote that the hardness of ring-LWE and of “ideal” lattices was still not well understood.[14]

    That concentration is one reason NIST is looking for more variety. Of the four algorithms it first picked, all but one rest on structured lattices.[15] Its search for signatures built on other kinds of maths is covered on the nist-additional-post-quantum-signatures page.

    Open questions Regev listed in 2010 include whether ideal-lattice problems might be easier than general-lattice ones.[14] That bears on ring and module variants, the basis of ML-KEM and ML-DSA, whose security NIST describes as resting on presumed hardness.[4] NIST notes that every scheme in its first selection except SPHINCS+ relies on structured lattices.[15] For how organisations plan for a switch if one family weakens, see crypto-agility.

    Next in the crash course

    More in Post-quantum crypto

    Developing in AI & Computing

    Questions readers ask

    What is learning with errors in simple terms?

    It is a puzzle in which you are given many linear equations about a secret, but each equation is off by a small random error, and you must recover the secret. Without the errors, ordinary Gaussian elimination would solve it quickly; the errors are what make it hard.[1][8]

    Why is lattice cryptography thought to resist quantum computers?

    Regev showed that an efficient algorithm for LWE would give a quantum algorithm for worst-case lattice problems, and in 2010 he noted that the best known algorithms for LWE take exponential time. NIST says ML-KEM, which is built on a lattice problem, is at present believed secure even against an adversary with a quantum computer.[2][3][11]

    What is the difference between LWE, ring-LWE and module-LWE?

    Plain LWE tends to need large keys. Ring-LWE adds algebraic structure by working over a polynomial ring, which gives smaller keys and faster schemes. Module-LWE, used by NIST's ML-KEM and ML-DSA, works over a module built from several copies of a polynomial ring.[12][4]

    Which standards use lattice cryptography?

    NIST's FIPS 203 (ML-KEM, for agreeing keys) and FIPS 204 (ML-DSA, for signatures), both published on 13 August 2024. NIST says that of the four algorithms it first selected, all but SPHINCS+ rest on structured lattices.[6][15]

    Is lattice cryptography proven secure?

    No. Its security rests on the presumed hardness of lattice problems. Researchers have long flagged open questions, such as whether structured (ideal) lattices might be easier to attack than general ones.[4][14]

    Sources

    · 15 claims from 3 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      LWE asks someone to recover a secret from a list of random linear equations that are each correct only up to a small error; NIST describes it as solving certain systems of noisy linear equations. confirmedas of 2024-08-13

    2. [2]

      Regev's main result was a reduction from worst-case lattice problems (GapSVP, the decision version of the shortest vector problem, and SIVP, the shortest independent vectors problem) to LWE, which his survey calls LWE's main claim to fame; the reduction is quantum, so an efficient LWE algorithm would imply a quantum algorithm for those problems, and in 2009 Regev called making it classical a main open question. confirmedas of 2009-09-01

    3. [3]

      In his 2010 survey, Regev gave as one reason to believe LWE is hard that the best known algorithms for it run in exponential time. confirmedas of 2010-06-01

    4. [4]

      NIST's FIPS 203 says the security of ML-KEM rests on the presumed hardness of the Module Learning with Errors (MLWE) problem, which in turn rests on the presumed hardness of problems in module lattices; MLWE is similar to LWE but works over a module built from a polynomial ring. confirmedas of 2024-08-13

    5. [5]

      NIST's FIPS 204 says lattice-based signature security is typically related to LWE and the short integer solution (SIS) problem; ML-DSA is based on Module LWE and a nonstandard variant of Module SIS called SelfTargetMSIS, and is believed secure against large-scale quantum computers. confirmedas of 2024-08-13

    6. [6]

      NIST published FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) on 13 August 2024. confirmedas of 2024-08-13

    7. [7]

      In Regev's survey, a lattice is defined as the set of all integer combinations of n linearly independent vectors, which are called a basis of the lattice. confirmedas of 2010-06-01

    8. [8]

      Without the errors, the problem would be easy, because about n equations can be solved in polynomial time with Gaussian elimination; Regev notes that Gaussian elimination combines equations and so amplifies the errors to unmanageable levels, and NIST says that for appropriate parameters the noisy versions resist the best known techniques, including Gaussian elimination. confirmedas of 2024-08-13

    9. [9]

      NIST's ML-KEM standard describes the Learning With Errors (LWE) problem as introduced by Regev in 2005. confirmedas of 2024-08-13

    10. [10]

      The same paper presented a classical public-key encryption scheme whose security rests on the hardness of LWE. confirmedas of 2009-09-01

    11. [11]

      NIST says that, at present, ML-KEM is believed to be secure even against adversaries who possess a quantum computer. confirmedas of 2024-08-13

    12. [12]

      Regev's survey notes that schemes based on plain LWE and SIS tend to need rather large keys, and that structured variants called ring-SIS and ring-LWE give smaller keys and faster schemes. confirmedas of 2010-06-01

    13. [13]

      ML-DSA uses the "Fiat-Shamir with aborts" construction, in which a rejection-sampling loop discards candidate signatures whose release would leak information about the private key. confirmedas of 2024-08-13

    14. [14]

      In 2010 Regev listed as open questions how hard ring-LWE and problems on ideal lattices really are, including whether problems on ideal lattices might be easier than those on general lattices. confirmedas of 2010-06-01

    15. [15]

      NIST notes that of the four algorithms it first selected for standardization (ML-KEM, ML-DSA, FN-DSA and SLH-DSA), all except SPHINCS+ (SLH-DSA) are based on hard problems involving structured lattices. confirmedas of 2026-05-14

    Revision history (1)
    1. Page created.

    Created Nov 22, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: Aug 10, 2027.

    Cite this page

    "Lattice-based cryptography explained: learning with errors." ContentLora, updated Nov 22, 2026. https://contentlora.com/explain/lattice-cryptography-explained

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.