The idea in plain English: Imagine you're trying to solve a system of equations like the ones you learned in school — but each equation has a small mistake (error) added to it. You know the answers (the right side of each equation) are slightly wrong, but the error is small. Given enough equations, statistics can average out the errors and recover the true solution. LWE does this with modular arithmetic — wrapping around like a clock.
Why this really exists: LWE is THE foundation of post-quantum cryptography. In 2024, NIST (the US standards body) selected Kyber (encryption) and Dilithium (signatures) as the official post-quantum algorithms — both based on LWE and its variant. When quantum computers arrive, they'll break RSA and ECC instantly, but LWE-based systems will remain secure. Your messaging apps and bank will need to switch to these within the next decade.
Say we have a secret s = [72, 69] (the letters "HE").
With enough equations (more than unknowns), the errors cancel out statistically.
1. Get matrix A and vector b from puzzle data. Modulus Q is a small prime
2. If error_scale = 0 (no noise): do Gaussian elimination over Z_Q (exact solve)
3. If noise is present: use least-squares over real numbers, then round modulo Q
4. Convert each entry of s to ASCII → join → the answer word