Kyber-Style Lattice Encryption (Module-LWE)
Interactive Module-LWE key-encapsulation simulator in the style of CRYSTALS-Kyber: encrypt a bit onto a mod-q ring using a secret key and small error noise, watch decryption success or failure as the noise budget grows, and see why a quantum computer's Shor's algorithm cannot break it.
CRYSTALS-Kyber, standardised by NIST as ML-KEM, is the post-quantum key-encapsulation mechanism now replacing RSA and elliptic-curve Diffie-Hellman in TLS. Its security comes from the Learning-With-Errors (LWE) problem: a message is hidden inside a public value plus deliberately added noise, and only the holder of a secret key can cancel that noise out with a small residual error term. This simulator renders the scalar version of that mechanic as a live ring of residues mod q — a message bit is encrypted with fresh randomness, decrypted back with the secret key, and 200 independent trials are decoded in parallel so you can watch the decryption-failure rate rise as the noise bound η grows relative to the modulus q, the exact trade-off real Kyber parameter sets are engineered around.
Encrypt a message bit onto a mod-q ring using a Learning-With-Errors secret key, then decrypt 200 trial ciphertexts at once to watch the decryption-failure rate rise as noise grows relative to the modulus — the exact trade-off CRYSTALS-Kyber (ML-KEM) is tuned around.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install