← Back to section · Research & Analysis
Algorithm Security Is Not Implementation Security: A Long Report on Side-Channel and Fault Attacks Against Post-Quantum Implementations
FIPS standards certify mathematics, not binaries. This report maps the implementation-security landscape of post-quantum algorithms: timing side channels (the KyberSlash incident), decapsulation failure oracles, the true cost ledger of masking, fault injection against lattice signatures, and why implementation security is graduating from a paper topic to a hard compliance and procurement requirement.
When an organisation announces “we have deployed FIPS 203 algorithms”, it has strictly proven one thing: the mathematics it uses matches the standard’s text. But attackers never attack mathematics — they attack the programs and chips running it. One of the most expensive lessons of the past decade in cryptographic engineering is that implementation attacks — timing, cache, power, electromagnetic, fault injection — repeatedly bypass impeccable mathematical arguments. Post-quantum algorithms carry this old problem onto new terrain: novel operation structures (the NTT, rejection sampling, floating-point Gaussian sampling) create novel leakage surfaces, at unprecedented deployment scale. This report maps that landscape: the main attack classes, the landmark incidents, the real cost of countermeasures, and how governance should pull implementation security into its decisions.
Where the leakage lives: four new terrains in post-quantum arithmetic
First, secret-dependent timing. The NTT at the core of lattice schemes can be made constant-time, but the surrounding compression, decompression, encoding and rejection logic easily introduces secret-dependent branches and memory access. The classic case is division: on some platforms integer division latency varies with the operands, and Kyber’s message-decoding path happened to divide secret-dependent intermediates — the root of KyberSlash, below.
Second, rejection sampling. The signing procedures of ML-DSA and Falcon both contain loops that generate candidates and discard them until conditions hold; the iteration count itself correlates with the secret, so the statistical distribution of signing time and power carries information about the private key, to be countered with constant-time sampling and distribution shaping. Third, decapsulation failure oracles. ML-KEM’s security proof tolerates a minuscule decapsulation failure rate, but if an implementation lets an attacker observe whether a failure occurred — even through timing — adaptively crafted boundary ciphertexts can squeeze out the private key bit by bit; no failure rate is small enough to survive a million adaptive queries. Fourth, floating-point sampling. Falcon’s Gaussian sampling runs on floating-point arithmetic, and if the implementation leans on platform math libraries with data-dependent timing, the leakage surface resists audit — one reason FIPS 206 has been slow to finalise.
KyberSlash: a textbook timing incident
In December 2023 researchers publicly disclosed secret-dependent divisions in multiple Kyber implementations, including widely ported code: decapsulation divided secret-dependent intermediate values, while mainstream CPUs execute division with data-dependent latency. By collecting large numbers of remote timing measurements, an attacker could statistically recover private-key components. The incident was named KyberSlash.
Its institutional significance exceeds its technical content. First, it proved timing attacks on lattice KEMs are not a theoretical worry but remotely exploitable reality. Second, the fix was not an algorithm change but line-by-line implementation audit and replacement with constant-time equivalents — an audit that “following the standard’s text” cannot deliver automatically. Third, it taught the whole ecosystem a lesson about the distance between reference and production implementations, about audit responsibility when porting code, and about constant-time as a property requiring continuous verification rather than a one-off declaration. Since then, major cryptographic libraries have progressively adopted constant-time testing tooling targeting division, branches and access patterns, pushing such checks into continuous-integration pipelines.
Physical attacks: power, electromagnetics and fault injection
Where devices can be physically touched — smart cards, vehicle units, IoT nodes — the attack surface widens further. Power and electromagnetic analysis extract secrets from the energy consumption and emissions of computation: the literature repeatedly demonstrates recovery of sampling intermediates from unprotected lattice signature implementations with one or a few traces. Fault injection uses voltage glitches, clock disturbances or laser pulses to make a signing operation err at a chosen step: for ML-DSA, one precisely disturbed rejection-sampling step can yield a malformed signature usable for solving for the private key; for Falcon, disturbing the floating-point sampler is comparably dangerous.
Countermeasures exist, with conspicuous price tags. Masking splits every secret value into random shares so that no intermediate’s statistical distribution depends on the secret: first-order masking typically costs several times the performance, higher orders cost more, and masking the non-linear steps of lattice arithmetic (comparisons, rejection decisions, encoding) needs bespoke constructions, with leakage lurking at every share recombination. Redundancy and infective computation counter fault injection: duplicate critical steps and compare, or verify each signature immediately after producing it and refuse output on failure. Shuffling and random delays merely raise attack cost without provable security bounds. For deployers, the key judgement is scenario grading: a server-side TLS KEM implementation mainly faces remote timing, and its bar is constant time plus unobservable failures; a physically accessible signing device must be selected by side-channel protection grade, with the protected implementation inside the certification scope.
How protection gets verified: the leakage-evaluation methodology
Protection claims need testing, and the testing has itself become a methodology. On the timing side, tools include statistical detection (dudect-style constant-time testing: run fixed-input and random-input workloads repeatedly and use statistical tests to judge whether any distinguishable timing difference exists) and systematic binary audit (checking for dangerous instruction patterns such as division, variable-time multiplication and secret-indexed memory access). On the physical side, the standard method is TVLA (test vector leakage assessment): collect power traces under many fixed and random inputs and apply Welch’s t-test to judge whether the two trace sets separate statistically at any point. TVLA never proves “no leakage”; it yields the quantified statement “no leakage detected at this trace count” — which is why trace count is a parameter every evaluation report must state.
Adapting this methodology to PQC is still under way: trace signal-to-noise for lattice arithmetic, higher-order evaluation of masked implementations, and systematic fault-injection sweeps all need new test setups and criteria. For procurement and acceptance the implication is concrete: what a buyer should demand is not the phrase “side-channel resistant” but the evaluation report itself — who tested, how many traces, which attack classes covered, with what margins. A protection claim without that report is, in engineering terms, no claim at all.
From paper topic to compliance requirement
Implementation security is completing an identity change: from academic-conference topic to hard clause in standards and procurement. FIPS 140-3 cryptographic module validation has long graded physical security, and as PQC modules enter the validation queue, side-channel test methodologies (the ISO/IEC 17825 family for non-invasive attack testing) are being joined with PQC-specific leakage evaluation. European Common Criteria evaluations likewise treat side-channel resistance as a core criterion for smart-card-class products. The operational meaning for buyers: procurement language must carry implementation-security clauses in their own right — constant-time implementation, independent laboratory leakage evaluation, masking order and its performance cost — rather than naming only algorithms and parameter sets.
The report’s conclusion compresses into one engineering discipline: accept and account for “algorithm compliance” and “implementation compliance” separately. FIPS 203/204/205 answer “what to compute”; constant-time audits, failure-oracle elimination, masking grades and fault countermeasures answer “how to compute without leaking”. The completeness of the post-quantum migration will ultimately be measured not by how many standard algorithms were deployed, but by whether this implementation ledger is settled too. Mathematics brought us to a safe place; implementation decides whether we are actually standing there.
Tags: side channelsimplementation securityfault attacksKyberSlash