Learning with errors

The learning with errors (LWE) assumption is a standard assumption in lattice-based cryptography, especially in post-quantum cryptography. It is a generalization of the LPN assumption.

Assumption

Informally, the LWE problem concerns solving a system of noisy linear equations over . Given random linear equations in variables, the goal is to find a secret vector . Without errors the system can be solved in polynomial time by Gaussian elimination; the LWE assumption states that adding a small additive error drawn from an error distribution makes the problem hard.

The assumption is parameterized by a lattice dimension (which also serves as the security parameter), a modulus , an error distribution over , and a sample count .

Decision LWE

In the decision variant, the adversary must distinguish LWE samples from uniformly random pairs .

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\text{lwe}}_{n,q,\chi,m,\calA}(\secpar)$}
\begin{algorithmic}
\State $\mathbf{A} \getsr \ZZ_q^{m \times n}$ ; $\mathbf{s} \getsr \ZZ_q^n$ ; $\mathbf{e} \getsr \chi^m$
\State $b \getsr \bits$
\State $\mathbf{u}_0 \gets \mathbf{A}\mathbf{s} + \mathbf{e}$ ; $\mathbf{u}_1 \getsr \ZZ_q^m$
\State $\hat{b} \gets \calA(1^\secpar, \mathbf{A}, \mathbf{u}_b)$
\Return $[\hat{b} = b]$
\end{algorithmic}
\end{algorithm}

(Decision) LWE is hard for the tuple if for all efficient

is negligible.

Search LWE

In the search variant, the adversary must recover the secret from LWE samples.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\text{slwe}}_{n,q,\chi,m,\calA}(\secpar)$}
\begin{algorithmic}
\State $\mathbf{A} \getsr \ZZ_q^{m \times n}$ ; $\mathbf{s} \getsr \ZZ_q^n$ ; $\mathbf{e} \getsr \chi^m$
\State $\hat{\mathbf{s}} \gets \calA(1^\secpar, \mathbf{A},\, \mathbf{A}\mathbf{s}+\mathbf{e})$
\Return $[\hat{\mathbf{s}} = \mathbf{s}]$
\end{algorithmic}
\end{algorithm}

Search LWE is hard for the tuple if for all efficient

is negligible.

Known Results

Search–Decision equivalence

The search and decision variants of LWE are equivalent — breaking one suffices to break the other.

Search Decision (easy direction): A search solver gives a decision adversary for free. Given a challenge , run and check whether is small (i.e., looks like a sample from ). If so, guess (LWE world); otherwise guess (uniform world).

Decision Search (hard direction): Recover one coordinate at a time. For each index and each candidate , construct modified samples that effectively zero out the contribution of under the hypothesis , then query the decision oracle to test whether the result is still an LWE instance or has become uniform. The candidate that keeps the distribution looking like LWE reveals the true . Running over all pairs uses samples in total when decision can be broken with samples.

Reduction to lattice problems

  • Reduction to lattice problems (TODO)

Attacks

Variations

LWE with is the LPN problem, where is a Bernoulli distribution.

Ring LWE (RLWE) replaces the random matrix with structured elements from a polynomial ring , yielding more efficient constructions at the cost of additional algebraic structure.

Ring LWE

Module LWE

Hint LWE