Implicit Rejection Is a Clause You Implement, Not a Branch You Write

FIPS 203 says that when the re-encrypted ciphertext does not match the one received, decapsulation returns J(z‖c) instead of an error. That one sentence sets the shape of the whole Fujisaki-Okamoto core. Every call has to compute both candidate keys, compare the ciphertexts with no exit that depends on the data, and pick the result through a mask. It also changes what failure looks like: a broken NTT backend no longer crashes anything, it silently turns every handshake into a mismatch, and that is the failure your evidence has to show you can catch.

Three questions, three kinds of document

Read the standards by the question each one answers, not by year of publication. The algorithm specification, FIPS 203 together with NIST's validation vectors, tells you what to compute. Module validation under FIPS 140-3 and the CMVP tells you how the module proves at runtime that it still computes it, through known-answer self-tests and pairwise consistency tests. Side-channel test methodology, meaning the non-invasive leakage testing described in ISO/IEC 17825 and TVLA-style fixed-versus-random campaigns, tells you whether the computation leaks while it runs. Only one version distinction changes an engineering decision here. The final FIPS 203 derives the rejection key directly as J(z‖c) and drops the closing KDF that round 3 Kyber applied, so a library that still passes the old Kyber known-answer files is evidence that the wrong algorithm is deployed, not evidence of compliance.

What the rejection clause does to the code

Decapsulation decrypts to m′, derives (K′, r′) from G(m′‖h), computes K̄ = J(z‖c) whether or not it will be needed, re-encrypts to get c′, and then compares c′ against c. For ML-KEM-768 that comparison covers 1088 bytes. It has to fold the XOR of every byte pair into one accumulator, turn the accumulator into an all-ones or all-zeros mask, and select K′ or K̄ with a conditional move. The usual way this goes wrong is the compiler: modern optimizers recognize a byte-equality loop and emit an early exit, or turn the final mask back into a branch. That is why your evidence should include the disassembly of the shipped binary alongside the source, with a value barrier on the accumulator. In an AVX-512 or Neon comparison, the per-lane results must be reduced into one mask before anything reaches a general-purpose register, and no conditional jump may depend on a partial result. Re-encryption also needs canonical coefficients. As an estimate, it accounts for most of the cost of decapsulation, which is exactly why vectorized NTT and Barrett paths get aggressive about lazy reduction there.

When the fast path is wrong

A Barrett step that leaves coefficients in [0, 2q) before compression, or an AVX-512 NTT that mishandles one twiddle permutation, does not crash decapsulation: it produces a c′ that never equals an honest c, so every call takes the rejection path and returns a well-formed pseudorandom key, and the only visible symptom is that the peers disagree on the session key and the handshake fails one layer up, where nobody looks at the KEM.

Keeping a degraded module honest

The pairwise consistency test FIPS 140-3 runs at key generation will not catch this. When encapsulation and decapsulation share the same faulty backend they agree with each other while disagreeing with every other implementation. The decision rule for your evidence is this: a backend selected by CPU feature dispatch serves no decapsulation until it has passed, in the same process, a known-answer decapsulation on a valid ciphertext and a second one on a deliberately corrupted ciphertext that must return the expected J(z‖c). If either test fails, the module falls back to the portable scalar path and records that it did. The same discipline covers the input checks the final standard requires. The encapsulation key modulus check means ByteEncode(ByteDecode(ek)) must equal ek byte for byte, and a decoder that quietly reduces modulo 3329 defeats it. The decapsulation key check recomputes H(ek) against the stored hash. An operational counter of implicit rejections completes the picture, because on an honest network the rate should be close enough to zero (an estimate, not a measured bound) that a sustained nonzero rate points to a local fault rather than an attacker. The remaining trade-off is that the counter must be incremented arithmetically from the selection mask and aggregated outside the constant-time core, so the reviewer will ask you to show that the monitoring you added to detect failure has not reintroduced the timing branch the clause was written to eliminate.

Is a passing FIPS 140-3 self-test suite enough evidence that the vectorized backend is correct?

No. Pairwise consistency only shows that the module agrees with itself, so you also need a known-answer decapsulation run against the backend that is actually dispatched on the target CPU, and it must include a corrupted-ciphertext vector that exercises the implicit rejection output.

Back to MLKEMCipher · Domains

← Back to MLKEMCipher
Engineering & Architecture Brief

Implicit Rejection Is a Clause You Implement, Not a Branch You Write

FIPS 203 says that when the re-encrypted ciphertext does not match the one received, decapsulation returns J(z‖c) instead of an error. That one sentence sets the shape of the whole Fujisaki-Okamoto core. Every call has to compute both candidate keys, compare the ciphertexts with no exit that depends on the data, and pick the result through a mask. It also changes what failure looks like: a broken NTT backend no longer crashes anything, it silently turns every handshake into a mismatch, and that is the failure your evidence has to show you can catch.

Three questions, three kinds of document

Read the standards by the question each one answers, not by year of publication. The algorithm specification, FIPS 203 together with NIST's validation vectors, tells you what to compute. Module validation under FIPS 140-3 and the CMVP tells you how the module proves at runtime that it still computes it, through known-answer self-tests and pairwise consistency tests. Side-channel test methodology, meaning the non-invasive leakage testing described in ISO/IEC 17825 and TVLA-style fixed-versus-random campaigns, tells you whether the computation leaks while it runs. Only one version distinction changes an engineering decision here. The final FIPS 203 derives the rejection key directly as J(z‖c) and drops the closing KDF that round 3 Kyber applied, so a library that still passes the old Kyber known-answer files is evidence that the wrong algorithm is deployed, not evidence of compliance.

What the rejection clause does to the code

Decapsulation decrypts to m′, derives (K′, r′) from G(m′‖h), computes K̄ = J(z‖c) whether or not it will be needed, re-encrypts to get c′, and then compares c′ against c. For ML-KEM-768 that comparison covers 1088 bytes. It has to fold the XOR of every byte pair into one accumulator, turn the accumulator into an all-ones or all-zeros mask, and select K′ or K̄ with a conditional move. The usual way this goes wrong is the compiler: modern optimizers recognize a byte-equality loop and emit an early exit, or turn the final mask back into a branch. That is why your evidence should include the disassembly of the shipped binary alongside the source, with a value barrier on the accumulator. In an AVX-512 or Neon comparison, the per-lane results must be reduced into one mask before anything reaches a general-purpose register, and no conditional jump may depend on a partial result. Re-encryption also needs canonical coefficients. As an estimate, it accounts for most of the cost of decapsulation, which is exactly why vectorized NTT and Barrett paths get aggressive about lazy reduction there.

When the fast path is wrong

A Barrett step that leaves coefficients in [0, 2q) before compression, or an AVX-512 NTT that mishandles one twiddle permutation, does not crash decapsulation: it produces a c′ that never equals an honest c, so every call takes the rejection path and returns a well-formed pseudorandom key, and the only visible symptom is that the peers disagree on the session key and the handshake fails one layer up, where nobody looks at the KEM.

Keeping a degraded module honest

The pairwise consistency test FIPS 140-3 runs at key generation will not catch this. When encapsulation and decapsulation share the same faulty backend they agree with each other while disagreeing with every other implementation. The decision rule for your evidence is this: a backend selected by CPU feature dispatch serves no decapsulation until it has passed, in the same process, a known-answer decapsulation on a valid ciphertext and a second one on a deliberately corrupted ciphertext that must return the expected J(z‖c). If either test fails, the module falls back to the portable scalar path and records that it did. The same discipline covers the input checks the final standard requires. The encapsulation key modulus check means ByteEncode(ByteDecode(ek)) must equal ek byte for byte, and a decoder that quietly reduces modulo 3329 defeats it. The decapsulation key check recomputes H(ek) against the stored hash. An operational counter of implicit rejections completes the picture, because on an honest network the rate should be close enough to zero (an estimate, not a measured bound) that a sustained nonzero rate points to a local fault rather than an attacker. The remaining trade-off is that the counter must be incremented arithmetically from the selection mask and aggregated outside the constant-time core, so the reviewer will ask you to show that the monitoring you added to detect failure has not reintroduced the timing branch the clause was written to eliminate.

Technical FAQ: Is a passing FIPS 140-3 self-test suite enough evidence that the vectorized backend is correct?

No. Pairwise consistency only shows that the module agrees with itself, so you also need a known-answer decapsulation run against the backend that is actually dispatched on the target CPU, and it must include a corrupted-ciphertext vector that exercises the implicit rejection output.

Related Architecture Specifications (PQCECOSYSTEM): shield6g.com · a2atshield.com · dronetpm.com

More Technical Articles on mlkemcipher.com

Mathematical Foundations of Module Learning with Errors (M-LWE) →Assembly-Level Vectorization: Benchmarking AVX-512 vs ARM NEON in ML-KEM →Implicit Rejection in ML-KEM Decapsulation: The Clause That Deletes Your Error Path →