pq-crystals/kyber

Constant time fix

kroeckx opened this issue · 0 comments

In commit 9b8d306 you've basically split the code into 2 files, preventing the compiler from seeing both pieces of code and optimizing it. Have you tried putting them in the same file, or tried with LTO?

Looking at the code, I suspect the compiler is either still converting it, or will in the future. OpenSSL and BoringSSL have a value barrier function to prevent the compiler from doing optimizations based on the value.