Why Decryption Works
August 25, 20265 min readbeginner
This is the note to follow line by line. It is short, it is the mathematical heart of the scheme, and everything about the parameter choices falls out of it.
This is the note to follow line by line. It is short, it is the mathematical heart of the scheme, and everything about the parameter choices falls out of it.
01.Decryption
Bob receives , decompresses it back to and , and computes
Then he decodes each coefficient of : the bit is if the coefficient is closer to than to , and otherwise.
That is the whole algorithm. One inner product and 256 comparisons. The interesting part is why it works.
02.The cancellation
Ignore compression for the moment and substitute what and actually are.
From encryption, and . So
Now use what key generation guaranteed: . Transposing gives . Substitute that into the first term:
The two copies of cancel.
That cancellation is the entire construction. It is why encryption multiplies by while key generation multiplies by , and it is why the two ciphertext components have the shapes they do. Everything else in ML-KEM is arranged so that this one term appears twice with opposite signs.
What is left is
The encoded message, plus a leftover called the decryption error.
03.What looks like
Every ingredient of is small. The vectors , , and all came from a centred binomial distribution with , so every coefficient is in , and is one more such polynomial.
So each coefficient of is a sum of products of small numbers, centred near zero. It is not zero, and it cannot be made zero, because the noise is what provides the security. The question is only whether it stays small enough.
04.The bound
Decoding returns the correct bit for coefficient exactly when has not pushed the coefficient past the midpoint between the two anchors and . That midpoint is a quarter of the way round, so the condition is
That single inequality is what every parameter in the scheme is calibrated against. Noise widths, module rank and compression widths all trade against this one number.
Two consequences follow immediately.
The bound is per coefficient. There are 256 of them in a message and each is an independent chance to fail, so the failure probability for a whole message is roughly 256 times the per-coefficient probability.
And the bound explains step E4. Encoding to and puts the anchors as far apart as the ring allows, which makes the tolerance rather than something smaller. Any other encoding would leave less room.
05.Adding compression back
Compression is lossy, so Bob does not recover and exactly. Write the rounding errors as and . Repeating the derivation with and gives
Two new terms, and their asymmetry is the reason and differ.
The term is the compression noise on multiplied by the secret. Multiplication inflates it, so must be compressed gently. Hence .
The term is the compression noise on standing alone, unmultiplied by anything. It enters the budget at full size and no larger, so can be compressed hard. Hence .
That is the whole justification for two different compression widths, and it comes straight out of this equation.
06.The published failure probabilities
Folding all the distributions through and applying concentration bounds gives the numbers in FIPS 203:
These deserve a sentence about what they mean, because a non-zero failure probability is unfamiliar to anyone whose intuition comes from RSA, where decryption either works or the key is wrong.
A probability of is not "rare". It is smaller than the chance of guessing a 128-bit key correctly on the first try. No deployment will ever observe one.
The reason it has to be non-zero at all is that the noise is unbounded in principle. The centred binomial has finite support, so is actually bounded, but the bound is far above and only the extreme tail exceeds it. Parameters are chosen to push that tail below the point where anybody could exploit it.
That last clause matters. A decryption failure is not merely an inconvenience: an attacker who can induce failures learns something about , since whether a given ciphertext fails depends on the secret. Attacks of that form exist against schemes with sloppier margins. Pushing the probability below makes finding even one failing ciphertext harder than breaking the scheme directly.