← Back to section · Research & Analysis
Experiment Design: Verifying a Decryption Failure Rate Too Small to Observe
ML-KEM's decryption failure rate sits around 2 to the minus 138 and below — direct experiments will never hit a single failure. This article unpacks how such tiny probabilities are verified: importance sampling, the legitimate limits of extrapolation, and why the failure rate and the security proof are two faces of one fact.
The research question: an event you will never hit
ML-KEM’s decryption failure rate, by FIPS 203 design targets, sits around 2^-139 to 2^-174 depending on the parameter set. What does that mean? It means every computer on Earth running decapsulation non-stop would not hit one failure within the age of the universe. The direct experiment — run decapsulation N times and count failures — fails completely here: a hundred million runs with zero failures prove only that the rate is below roughly one in a hundred million, more than a hundred orders of magnitude short of the target.
Yet the failure rate is no decoration: it is written directly into the security proof. When an LWE-based KEM uses the Fujisaki-Okamoto transform, failure events hand reaction attacks a grip, and the proof needs the failure probability to be negligible. So the verification problem is real; it just has to be asked differently. Do not measure the unmeasurable number — verify the model chain that produces it: is the noise-distribution model right, and is the derivation from model to failure rate right, with every link of the chain stress-tested in the region where measurement is possible.
Method one: validate the noise model where probabilities are moderate
Failures arise when accumulated noise exceeds the error-correction margin. The noise distribution is directly measurable at moderate magnitudes: build an experiment that harvests large numbers of decapsulation intermediates — the errors introduced by compression and decompression, actual samples of product noise — and compare the empirical distribution term by term against the distributions assumed in the specification and papers (centred binomial distributions, uniform models of rounding error), confirming with goodness-of-fit tests that the model holds in the measurable region.
This stage’s output is “the model agrees with the implementation in the measurable region”. Note also how intermediates are obtained: instrumented export must not change the implementation’s behaviour — the test build and the release build may differ only in observation points, never in computation paths, or once again a different object has been verified. Note its boundary: tail behaviour cannot be measured directly, and whether the model holds in the tail can only be supported indirectly by the second method. The report must say this sentence out loud, so readers do not mistake the tail for something directly verified.
Method two: importance sampling to enlarge the failure region
Importance sampling deliberately biases the experimental conditions so failures become common, then folds the result back by the known bias. Concretely: inject larger-than-specification noise when generating keys and ciphertexts, lifting the failure rate into the measurable band of one in a thousand to one in a hundred, count failures there, and convert back to the original parameters through the noise-scaling relation.
The conversion rests on a premise: the law by which failure probability varies with noise scale is known and smooth. Test that premise with a multi-point scaling experiment — measure a failure rate at several noise amplification factors and check whether the points lie on the theoretical curve. If the multi-point fit is good, confidence in the extrapolation to the original parameters rests on the agreement of the whole curve, not on a guess at one point. If some amplification point deviates markedly from the curve, the noise model has an unmodelled effect in that region and the extrapolation must halt — this veto condition is the most important part of the design and must be written down in advance.
Method three: full-chain cross-check on small-parameter instances
Add a second, independent line of verification: scale all parameters down (small dimension, small modulus) to build an isomorphic small instance whose failure rate is around one in a million. That rate can be counted directly, and also computed with the same analytic formulas — compare the two. The small instance verifies the consistency between the derivation formulas and the implementation’s behaviour: a noise source missing from the formulas, or an extra rounding step in the implementation, shows up as a measurable discrepancy at small parameters. This line is independent of importance sampling; only when both lines pass is the evidence closed.
Interpretation: how the conclusion must be written
The conclusion of such a verification can never read “the failure rate was measured to be 2^-150”. The correct form is layered: the noise model was experimentally validated in the measurable region (with sample sizes and test results); the scaling curve agrees with theory at several amplification points (with the data for each); the small-parameter instance’s direct count matches the analytic formula (with both numbers); under these three pieces of evidence, the extrapolated failure rate at specification parameters agrees with the design target. Laying the evidence chain out lets reviewers check it link by link; a lone number asks for unconditional trust.
Also report the failure-correlation check. Security proofs usually assume failures are roughly independent; if the implementation has a factor that makes failures cluster — certain keys failing particularly easily — a small average does not save it. The experiment must tally failures grouped by key and check for a “bad key” long tail.
Common pitfalls
First, reporting a hundred million runs with zero failures as “failure rate below 2^-138 verified”: zero events only yield an upper bound at the order of the sample size, and a hundred-plus orders of magnitude cannot be bridged by tone. Second, simulating noise in double-precision floating point and counting tails: floating-point tails are artefacts of the representation and have nothing to do with the true integer-arithmetic distribution in the extreme tail. Third, extrapolating from a single amplification point in importance sampling: one point cannot test the scaling law itself. Fourth, measuring only the average over random keys and never the per-key tail. Fifth, forgetting the model–implementation correspondence: the formulas describe the specification algorithm while the experiment measures a concrete implementation, and their sampling and rounding paths must be aligned item by item first, or you have verified two different objects.
Tags: ML-KEMDecryption Failure RateRare-Event EstimationExperiment Design