Breaking Optimized HQC: The First Cache-Timing Full Decryption Oracle Key-Recovery Attack in Post-Quantum Cryptography
Shows compiler optimizations break constant-time masking in the AVX2 HQC decoder, enabling a Flush+Reload cache-timing attack that recovers the full HQC-1 secret key via Soft-ISD.
Schemes: HQC, hqc-1, Reed-Muller decoding, Soft-ISD, Flush+Reload
Findings (quotes checked against the source text)
-
Source-level constant-time coding is not sufficient; compiler optimizations rewrite mask-based selection in the AVX2 HQC build, introducing secret-dependent control flow and cache access patterns.
In this work, we demonstrate that source-level constant-time coding is not a standalone guarantee: the compiled binary must inherently preserve this behavior.
-
The leak sits in the inner Reed-Muller decoding process of the official AVX2-optimized HQC implementation, despite its constant-time claims.
We identify a severe compiler-induced vulnerability within the official AVX2-optimized implementation of HQC, despite its claims of being constant-time.
-
An unprivileged co-located adversary using Flush+Reload on shared libraries can extract fine-grained predicates of the decoder's internal state.
Using Flush+Reload on shared libraries, an unprivileged co-located adversary can extract fine-grained predicates of the decoder's internal state.
-
A reliability-aware Soft-ISD post-processing step, with GPU meet-in-the-middle, turns the leaked predicates into end-to-end key recovery for hqc-1.
To achieve full key recovery, we develop a novel, reliability-aware Soft Information Set Decoding (Soft-ISD) post-processing framework.
Numbers (as extracted, not quote-checked)
- Online trace collection time for end-to-end hqc-1 key recovery: less than 10 seconds
For builders
Verify the compiled binary, not the C source, for constant-time behavior, and audit any mask-based secret selection in PQ decoders against compiler output and cache side channels.
Limits
Abstract only (full text not read); the attack is on the AVX2 build and hqc-1 specifically, and the claimed first-ness is the authors' best knowledge.
Topics: implementation-sidechannel kem cryptanalysis benchmarks