Don't Reject This: Key-Recovery Timing Attacks Due to Rejection-Sampling in HQC and BIKE
Shows timing leaks from rejection sampling in HQC and BIKE decapsulation enable practical secret-key recovery, despite their constant-time decoders.
Schemes: HQC, BIKE, GJS attack
Findings (quotes checked against the source text)
-
Secret-dependent timing from rejection sampling in HQC's deterministic re-encryption allows key recovery even with the constant-time BCH decoder and RMRS decoder.
In contrast, our attack uses the fact that the rejection sampling routine invoked during the deterministic re-encryption of the decapsulation leaks secret-dependent timing information, which can be efficiently exploited to recover the secret key when HQC is instantiated with the (now constant-time) BCH decoder, as well as with the RMRS decoder of the current submission.
-
HQC key recovery needs about 866,000 idealized decapsulation timing oracle queries at the 128-bit security setting.
Our secret key recovery attack on HQC requires only approx. 866,000 idealized decapsulation timing oracle queries in the 128-bit security setting.
-
Timing of BIKE's constant weight word sampler lets an attacker distinguish successful decoding, which feeds the GJS framework to recover the secret key's distance spectrum.
From the timing information of the constant weight word sampler in the BIKE decapsulation, we demonstrate how to distinguish whether the decoding step is successful or not, and how this distinguisher is then used in the framework of the GJS attack to derive the distance spectrum of the secret key, using 5.8 x 10^7 idealized timing oracle queries.
-
Rejection-sampling timing was missed in NIST round 3 side-channel vetting, and HQC and BIKE were already hardened with constant-time decoders.
one important attack vector has hitherto been missed: PQ schemes often rely on rejection sampling techniques to obtain pseudorandomness from a specific distribution.
Numbers (as extracted, not quote-checked)
- HQC key-recovery decapsulation timing oracle queries (128-bit): approx. 866,000
- BIKE GJS attack timing oracle queries: 5.8 x 10^7
For builders
When implementing code-based or any PQ KEM, make rejection-sampling and re-encryption paths constant-time, not just the decoder, since secret-seeded sampling leaks timing.
Limits
Attacks use idealized timing oracles; the paper discusses countermeasures but notes their limits. Covers code-based KEMs only, not signatures or chain-level design.