Finding the
nearest corner
Its sibling exhibit asked for the shortest vector in a lattice. This one asks something subtler: given a target point floating off the grid, which lattice corner is closest? Answer it and you can decrypt. Fail, and you're staring at noise. This is the ground Kyber stands on.
A point that isn't on the grid
An attacker given a basis has a description of the entire lattice. The difficulty of finding a closest point in suitable high-dimensional instances is computational, not that the grid's geometry was withheld.
Rounding in the basis you're handed
This demo uses coordinate rounding: express the target in the supplied basis, then round each coefficient. It is exact for the orthogonal good basis shown here. A merely short or nearly perpendicular basis does not guarantee exact rounding for every target. Skewed bases can make this simple algorithm fail.
- Good basisthe trapdoorOrthogonal vectors in this preset. Coordinate rounding gives a nearest lattice point.
- Bad basiswhat an attacker getsLong, skewed vectors for the same lattice. Rounding misfires on most targets — for many targets.
A geometric model of noisy decoding
This is a geometric decoding model: add a random displacement of the displayed magnitude to a lattice point, then try to recover that original point. Decoding succeeds when the perturbation stays in that point's nearest-neighbor cell. This is not itself the LWE sampling distribution or a deployed encryption scheme.
What ML-KEM actually holds
The two-basis picture above is the classical way to build a lattice trapdoor, and it is how schemes in the GGH and NTRU lineage work. It is not how the deployed standards are keyed, and the difference is worth stating plainly. ML-KEM (Kyber) and ML-DSA (Dilithium) publish a matrix A together with a noisy product of that matrix and a short secret vector:
These keys contain short secret vectors, not a generic secret good basis. The public equations and their sampling rules lead to Module-LWE-related assumptions; ML-DSA also rounds the public product and uses additional assumptions. In ML-KEM's underlying encryption, the secret cancels a shared term before decoding. ML-DSA is a signature scheme and does not decrypt messages.
The connection is geometric intuition: lattice attacks can turn noisy equations into decoding or short-vector problems. Concrete attacks include primal, dual and hybrid approaches; it is inaccurate to say they all solve exactly this two-dimensional closest-point task. See the LWE exhibit for the public equations and message-cancellation model.
Why the owner can still get in
This exhibit shows how decoding can recover a point from a bounded perturbation. Real encryption balances correctness and resistance to attacks using a complete parameter set. Signatures have different correctness conditions; a decryption noise budget is not a universal description of lattice cryptography.
Three views of one problem. §147 is the geometry — why the secret stays hidden. §152 is the decoding — why its owner still gets in. §157 is the algebra — what the keys are actually made of. Also related: Reduction & Proof, for what "reduces to this problem" claims.