Path: blob/main/frontier/08-lattices-post-quantum/break/lwe-no-noise-recovery.ipynb
483 views
Break: LWE Secret Recovery Without Noise
Module 08 | Breaking Weak Parameters
Remove the noise from LWE and Gaussian elimination eats your secret for breakfast.
Why This Matters
The Learning With Errors problem (notebook 08d) is:
The security of LWE --- and by extension ML-KEM (Kyber), ML-DSA (Dilithium), and every lattice-based scheme built on it --- comes entirely from the error term .
Without noise, is just a system of linear equations over . Gaussian elimination solves it in .
In this notebook, we demonstrate this concretely: first we break noiseless "LWE" instantly, then we gradually add noise and watch the attack degrade from perfect recovery to total failure.
The Scenario: "LWE" Without Noise
An implementer decides that the error distribution is "just overhead" and sets . After all, the random matrix should provide enough "mixing" to hide , right?
Let's find out.
Step 4: Gradually Add Noise
Now we add increasing amounts of noise and observe the transition:
Zero noise: Gaussian elimination recovers perfectly.
Tiny noise: Rounding tricks might still recover .
Moderate noise: Gaussian elimination produces garbage.
Proper noise (): No known efficient attack.
The key quantity is the ratio . When is negligible, the noise barely perturbs the linear system. When is significant, the noise completely masks the algebraic structure.
Why Does Even Tiny Noise Kill Gaussian Elimination?
Gaussian elimination is an exact procedure. It solves by row-reducing the augmented matrix . When the true system is , Gaussian elimination "sees" the system and finds some satisfying the first equations exactly.
But because the noise corrupts the right-hand side. The key insight: in modular arithmetic, there is no notion of "approximately correct." A solution is either exactly right or completely wrong. Even a single unit of error in one equation propagates through back-substitution and corrupts the entire solution.
This is fundamentally different from floating-point linear algebra, where small perturbations cause small changes in the solution. Over , small perturbations cause random changes in the solution.
The Fix: Use Proper Noise
The noise parameter must satisfy two constraints:
Security: (Regev's reduction requires this for worst-case lattice hardness). Larger gives stronger security.
Correctness: must be small enough that decryption works. The decryption error probability depends on . This ratio must be kept below a threshold (roughly ).
For Kyber (ML-KEM), the error uses a centered binomial distribution with parameter , giving integer noise in with standard deviation . Combined with and , this gives a decryption failure probability below .
The moral: Noise is not overhead --- noise IS the security. Without it, you have a system of linear equations, and linear equations are easy.
Summary
| Noise level | Attack | Outcome |
|---|---|---|
| Gaussian elimination | Instant break | |
| tiny () | Gaussian elimination | Occasional success, mostly fails |
| moderate () | Gaussian elimination | Complete failure |
| All known algorithms | Conjectured hard |
Key takeaways:
Without noise, LWE is just a system of linear equations --- solvable in polynomial time by Gaussian elimination.
The error term is the sole source of hardness in LWE. It transforms the problem from to (conjectured) exponential.
Over , even a single unit of error per equation is enough to destroy Gaussian elimination, because modular arithmetic amplifies errors catastrophically during back-substitution.
Proper noise parameters (, centered binomial for Kyber) are not optional --- they are the security mechanism itself.
Noise is the only thing standing between your secret and Gaussian elimination.