Commit 5cfd895
FIX: potential non-constant time division
Some compilers generate a non-constant time division operation
for the division by KyberConstants::Q.
Fix is based on the patch in the reference implementation:
pq-crystals/kyber@dda29cc
Found and initially reported by Goutam Tamvada, Karthikeyan Bhargavan,
and Franziskus Kiefer of @cryspen. Independently reported by djb
as "Kyberslash".
fixes #3844
Co-Authored-By: Fabian Albert <fabian.albert@rohde-schwarz.com>
Co-Authored-By: Amos Treiber <amos.treiber@rohde-schwarz.com>1 parent 3dbf4da commit 5cfd895
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
386 | 397 | | |
387 | 398 | | |
388 | 399 | | |
389 | | - | |
390 | | - | |
391 | | - | |
| 400 | + | |
392 | 401 | | |
393 | 402 | | |
394 | 403 | | |
| |||
0 commit comments