kyber
kyber copied to clipboard
The square-and-multiply algorithm used in bn256 is not constant time
Security Code Review finding:
A square-and-multiply algorithm without protection is not constant time and leaks information on the exponent. It is used in the following spots in kyber:
pairing/bn256/gfp.goon line 41pairing/bn256/gfp12.goon line 175pairing/bn256/twist.goon line 160
However notice that it is mentioned in the code that currently only the Ed25519 SuiTe is currently constant time, so this is probably a known issue.
Marked the issue as "won't fix", after analysis by @si-co, considering that (1) the issue is documented in the code and (2) we plan to deprecate BN256, based on https://moderncrypto.org/mail-archive/curves/2016/000740.html