Abstract
Lattice-based Key Encapsulation Mechanisms (KEMs) are leading candidates in the NIST Post-Quantum Cryptography (PQC) standardization process due to their balance of efficiency and security. However, while these algorithms are mathematically robust against quantum adversaries, their physical implementations may be vulnerable to side-channel attacks (SCA). This paper investigates a critical vulnerability in the message encoding phase of several NIST finalists. By exploiting "determiners"—intermediate values with high Hamming weight variance—and employing deep learning techniques, researchers achieved a 100% success rate in recovering secret keys for CRYSTALS-KYBER and SABER from a single power consumption trace. The study further demonstrates that standard compiler optimizations fail to mitigate these leakages.
Introduction
As the industry prepares for the post-quantum era, the physical security of cryptographic implementations on embedded devices, such as smart cards and IoT sensors, becomes paramount. Side-channel attacks typically require thousands of operations to extract a signal from noise. This research focuses on the more potent "single-trace" attack, where an adversary recovers the entire secret key from a single observation of a device's power consumption during the encapsulation phase.
Methodology
The authors identified vulnerabilities within the message encoding step, where a secret message is transformed into a mathematical polynomial. They developed three distinct attack methodologies:
- Clustering-based Attack (Type 1): This targets "determiners"—intermediate values whose physical properties, such as Hamming weight, vary significantly based on a secret bit. For instance, a bit value of
0might result in a0x0000mask, while1results in0xFFFF, creating a massive, detectable power spike. - ML-based Single-bit Attack (Type 2): In the absence of obvious determiners, deep learning models were trained to recognize subtle power signatures of individual bits processed sequentially.
- ML-based Multi-bit Attack (Type 3): For algorithms processing multiple bits simultaneously, complex machine learning models were used to classify bit combinations.
Experiments were conducted using a ChipWhisperer UFO STM32F3 target board featuring an ARM Cortex-M4 processor.
Key Insights and Experimental Validation
The "Determiner" Vulnerability
In algorithms like CRYSTALS-KYBER, the reference implementation uses a 16-bit mask derived from a single message bit. The resulting Hamming weight difference (0 vs. 16) causes the secret bit to produce a distinct signature in the power trace, allowing for trivial clustering of bit values.
Optimization as a False Security Measure
A common misconception is that high-level compiler optimizations (e.g., -O3) might obscure side-channel leakages by increasing code complexity. However, experimental results showed that the "determiner" leakage remains highly visible and exploitable across all optimization levels.
Results and Impact
The attacks proved highly effective against the NIST Round 3 candidates:
- CRYSTALS-KYBER: Achieved a 100% success rate for full key recovery using a single trace.
- SABER: Achieved a 100% success rate by combining ML results with a minimal exhaustive search ($2^{11}$ candidates).
- FrodoKEM: Success rates exceeded 79%, reaching nearly 100% when optimizations were disabled.
The authors successfully mapped these vulnerabilities to the broader suite of lattice-based KEM candidates, including NTRU and NTRU Prime, indicating a systemic issue in reference implementations.
Conclusion and Countermeasures
The study highlights that mathematical complexity does not equate to physical security. Reference implementations provided for standardization often lack side-channel protections. To mitigate these risks, the authors suggest shuffling—randomizing the order of bit processing—as an effective countermeasure. However, they caution that shuffling must be robust enough to resist "de-shuffling" techniques. Future research will likely explore the efficacy of combined defenses, such as masking and shuffling, against these single-trace methodologies.
Summary updated