KyberSlash: Exploiting secret-dependent division timings in Kyber implementations
Discloses KyberSlash1/2 timing attacks: secret-dependent division leaks Kyber/ML-KEM secret keys on Raspberry Pi 2 and Cortex-M4; proposes Valgrind-based and formal detection of variable-time code.
Schemes: Kyber, ML-KEM, KyberSlash1, KyberSlash2
Findings (quotes checked against the source text)
-
Two timing vulnerabilities, KyberSlash1 and KyberSlash2, affect several Kyber implementations including the official reference code, enabling secret key recovery via secret-dependent division timing.
We demonstrate the exploitability of both KyberSlash1 and KyberSlash2 on two popular platforms: the Raspberry Pi 2 (Arm Cortex-A7) and the Arm Cortex-M4 microprocessor.
-
Secret keys are recovered within minutes for KyberSlash2 and a few hours for KyberSlash1 on the tested platforms.
Kyber secret keys are reliably recovered within minutes for KyberSlash2 and a few hours for KyberSlash1.
-
Vulnerabilities were disclosed to library maintainers and patched swiftly.
We responsibly disclosed these vulnerabilities to maintainers of various libraries and they have swiftly been patched.
-
Valgrind was patched to detect variable-time instructions operating on secret data, and applied to over 1000 SUPERCOP primitive implementations.
First, we patch the dynamic analysis tool Valgrind to allow detection of variable-time instructions operating on secret data, and apply it to more than 1000 implementations of cryptographic primitives in SUPERCOP.
-
A formal-methods approach is proposed to guarantee absence of variable-time instructions in cryptographic software.
Second, we propose a more rigid approach to guarantee the absence of variable-time instructions in cryptographic software using formal methods.
For builders
Any PQ KEM/signature implementation must be audited for secret-dependent division and other variable-time instructions, since correct-by-spec code can still leak keys.
Limits
Evidence is from the abstract only; the full text was not read, so attack details and exact per-platform numbers are unverified here.
Topics: kem implementation-sidechannel benchmarks cryptanalysis