Description
The Kyber reference implementation before 9b8d306, when compiled by LLVM Clang through 18.x with some common optimization options, has a timing side channel that allows attackers to recover an ML-KEM 512 secret key in minutes. This occurs because poly_frommsg in poly.c does not prevent Clang from emitting a vulnerable secret-dependent branch.
References
pqshield.com/...-kem-to-improve-pqc-implementation-maturity/
github.com/antoonpurnal/clangover
github.com/...ommit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c
news.ycombinator.com/item?id=40577486
twitter.com/purnaltoon/status/1797644696568959476
pqshield.com/...-kem-to-improve-pqc-implementation-maturity/
github.com/antoonpurnal/clangover
github.com/...ommit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c
news.ycombinator.com/item?id=40577486
twitter.com/purnaltoon/status/1797644696568959476