Masked Vector Sampling for HQC
Proposes a masked, specification-compliant HQC vector sampling function, using what the authors believe is the first masked Barrett reduction, to counter timing attacks.
Schemes: HQC, BIKE
Findings (quotes checked against the source text)
-
A 2022 timing attack exploited an inconsistency in HQC's rejection sampling to recover the secret key using about 866,000 oracle calls.
In 2022, Guo et al. introduced a timing attack that exploited an inconsistency in HQC rejection sampling function to recover its secret key in 866,000 calls to an oracle.
-
The HQC authors fixed the timing issue by updating the specification to sample vectors in constant time.
The authors of HQC updated its specification by applying an algorithm to sample vectors in constant time.
-
A prior masked vector sampling design for BIKE does not directly apply to HQC.
A masked implementation of this function was then proposed for BIKE but it is not directly applicable to HQC.
-
The paper proposes a masked HQC vector sampler that stays specification-compliant and, to the authors' knowledge, is the first masked Barrett reduction.
In this paper we propose a masked specification-compliant version of HQC vector sampling function which relies, to our knowledge, on the first masked implementation of the Barrett reduction.
Numbers (as extracted, not quote-checked)
- Oracle calls needed for the 2022 Guo et al. timing attack on HQC rejection sampling (secret key recovery): 866,000 calls to an oracle
For builders
If HQC is a candidate KEM, its sampling code needs constant-time or masked implementations, since the earlier rejection-sampling leak allowed key recovery.
Limits
Abstract-only text; no overhead numbers, security proof, or evaluation are given here, so masking cost and leakage model are unverified.