When the Rejection Path Fails Open: Tracing a Fault in an ML-KEM Decapsulation Core

The symptom was a decapsulation coprocessor that sometimes returned the real shared secret for a ciphertext it should have rejected. The NTT pipeline, the masking scheme and the key storage were all intact. A single clock glitch landed in the cycle that latched the re-encryption comparison result, and that was enough to turn Fujisaki-Okamoto implicit rejection into a decryption oracle. The glitch explains when the failure happened. It does not explain why one flipped bit was enough to cause it.

Trigger and assumption are separate findings

The trigger was a supply droop that coupled into the clock tree during a lab characterisation run and produced a shortened pulse, which the final reduction stage of the comparator missed. In ML-KEM-768 the comparison covers the full 1088-byte ciphertext, and the design collapsed it into one equality flag that drove the multiplexer choosing between the decrypted key and the pseudorandom rejection key derived from the secret seed z. The underlying assumption was that this flag was ordinary control logic and not a security asset. The team had masked every path that touches the secret polynomial, hardened the NTT against first-order DPA, and left the comparator unprotected because it never handles secret coefficients. That reasoning holds for power analysis and fails for fault injection, because the flag decides whether material derived from the secret key leaves the core. A postmortem that ends at "glitch on the clock" adds a detector and leaves the assumption in place.

Why one bit was enough

Chosen-ciphertext key recovery against lattice KEMs needs only a binary signal: did the modified ciphertext decrypt to the same message or not. Implicit rejection exists to hide that signal, because a rejected ciphertext and an accepted one both return a key the attacker cannot tell apart from random. If the comparison is skipped, a slightly perturbed ciphertext that still decrypts to the original message produces the true key, and the attacker can check that key against a known session. Masking does nothing to stop this, since the attacker never observes an intermediate value and only reads the final output. Published attacks of this class need on the order of thousands of successfully faulted decapsulations, an estimate that depends heavily on how repeatable the glitch is. A lab setup with a stable trigger gets there in an afternoon.

Fail closed by construction

The rejection key has to be the state the core falls into whenever any part of the check is missing, late or ambiguous, so that a skipped comparison yields a key the attacker cannot use instead of the real one.

What keeps working when one part fails

The fix is to make the decision survive the loss of any single element, not to add one more sensor. Compute equality twice with different encodings, for example an OR-accumulation of XOR differences alongside a hash comparison reusing the SHA-3 unit that is already on die, and latch the two results from independent timing sources so that one glitch cannot hit both. Encode acceptance as a multi-bit codeword where exactly one pattern selects the real key and every other value, including the all-zeros and all-ones words left by reset or stuck-at faults, selects rejection. Glitch and jitter detectors stay in the design as a second line that lowers attack yield, but correctness must not depend on them. Validation programmes for cryptographic modules, such as FIPS 140 and the Common Criteria smart card protection profiles, will exercise this path, but their campaigns sample the fault space and cannot prove a single critical bit is absent. The decision rule that comes out of this incident: every register whose single-bit flip changes what leaves the core must either be duplicated with independent timing or be shown to fall to the rejection branch under every corrupted value. The overhead is roughly a few percent of core area, an estimate for a design that can share its existing Keccak datapath, plus a few cycles of latency. What remains open is the clock: two checks clocked from the same tree still fail together, so the next design review has to decide whether the redundant comparator gets its own oscillator or its own phase, and pay for that in timing closure.

Does first-order masking of the decapsulation datapath protect against this fault?

No. Masking hides intermediate values from power and EM observation, but this attack reads only the final key the core outputs, so the integrity of the accept or reject decision has to be protected separately.

Back to MLKEMShield · Domains

← Back to MLKEMShield
Engineering & Architecture Brief

When the Rejection Path Fails Open: Tracing a Fault in an ML-KEM Decapsulation Core

The symptom was a decapsulation coprocessor that sometimes returned the real shared secret for a ciphertext it should have rejected. The NTT pipeline, the masking scheme and the key storage were all intact. A single clock glitch landed in the cycle that latched the re-encryption comparison result, and that was enough to turn Fujisaki-Okamoto implicit rejection into a decryption oracle. The glitch explains when the failure happened. It does not explain why one flipped bit was enough to cause it.

Trigger and assumption are separate findings

The trigger was a supply droop that coupled into the clock tree during a lab characterisation run and produced a shortened pulse, which the final reduction stage of the comparator missed. In ML-KEM-768 the comparison covers the full 1088-byte ciphertext, and the design collapsed it into one equality flag that drove the multiplexer choosing between the decrypted key and the pseudorandom rejection key derived from the secret seed z. The underlying assumption was that this flag was ordinary control logic and not a security asset. The team had masked every path that touches the secret polynomial, hardened the NTT against first-order DPA, and left the comparator unprotected because it never handles secret coefficients. That reasoning holds for power analysis and fails for fault injection, because the flag decides whether material derived from the secret key leaves the core. A postmortem that ends at "glitch on the clock" adds a detector and leaves the assumption in place.

Why one bit was enough

Chosen-ciphertext key recovery against lattice KEMs needs only a binary signal: did the modified ciphertext decrypt to the same message or not. Implicit rejection exists to hide that signal, because a rejected ciphertext and an accepted one both return a key the attacker cannot tell apart from random. If the comparison is skipped, a slightly perturbed ciphertext that still decrypts to the original message produces the true key, and the attacker can check that key against a known session. Masking does nothing to stop this, since the attacker never observes an intermediate value and only reads the final output. Published attacks of this class need on the order of thousands of successfully faulted decapsulations, an estimate that depends heavily on how repeatable the glitch is. A lab setup with a stable trigger gets there in an afternoon.

Fail closed by construction

The rejection key has to be the state the core falls into whenever any part of the check is missing, late or ambiguous, so that a skipped comparison yields a key the attacker cannot use instead of the real one.

What keeps working when one part fails

The fix is to make the decision survive the loss of any single element, not to add one more sensor. Compute equality twice with different encodings, for example an OR-accumulation of XOR differences alongside a hash comparison reusing the SHA-3 unit that is already on die, and latch the two results from independent timing sources so that one glitch cannot hit both. Encode acceptance as a multi-bit codeword where exactly one pattern selects the real key and every other value, including the all-zeros and all-ones words left by reset or stuck-at faults, selects rejection. Glitch and jitter detectors stay in the design as a second line that lowers attack yield, but correctness must not depend on them. Validation programmes for cryptographic modules, such as FIPS 140 and the Common Criteria smart card protection profiles, will exercise this path, but their campaigns sample the fault space and cannot prove a single critical bit is absent. The decision rule that comes out of this incident: every register whose single-bit flip changes what leaves the core must either be duplicated with independent timing or be shown to fall to the rejection branch under every corrupted value. The overhead is roughly a few percent of core area, an estimate for a design that can share its existing Keccak datapath, plus a few cycles of latency. What remains open is the clock: two checks clocked from the same tree still fail together, so the next design review has to decide whether the redundant comparator gets its own oscillator or its own phase, and pay for that in timing closure.

Technical FAQ: Does first-order masking of the decapsulation datapath protect against this fault?

No. Masking hides intermediate values from power and EM observation, but this attack reads only the final key the core outputs, so the integrity of the accept or reject decision has to be protected separately.

Related Architecture Specifications (PQCECOSYSTEM): wcbdcvault.com · cancryptography.com · fhecipher.com

More Technical Articles on mlkemshield.com

Empirical Power and Electromagnetic Leakage Assessment in FPGA Lattice Accelerators →Designing Energy-Efficient ML-KEM Silicon for Battery-Operated Satellite and Medical IoT →