https://github.com/mupq/pqm4
Revision 8970d37a8c3055d9579007e954449d926c3583b4 authored by Matthias J. Kannwischer on 22 September 2021, 09:09:56 UTC, committed by rpls on 26 September 2021, 17:25:47 UTC
Fixes two minor bugs in matacc. They did not actually result in wrong
outputs.

In the uniform sampling, we use 3 bytes to sample 2 coefficients. In
case the sampled coefficient is too large, we throw it away.
Once we sampled 256 coefficients it is possible that we still have one
coefficient left which needs to be discarded.
The check if we are at the end of a polynomial already was wrongly
implemented by checking for ctr < KYBER_Q/4 rather than ctr < KYBER_N/4
in two places.

Luckily, it has no effect in both cases.
In the first, ctr = KYBER_N/4 implies k=0 and hence the the code does
nothing.
In the second, an additional Keccak squeeze is triggered, but the output
is never used.
1 parent 844e7ca
History
Tip revision: 8970d37a8c3055d9579007e954449d926c3583b4 authored by Matthias J. Kannwischer on 22 September 2021, 09:09:56 UTC
Fix two bugs in Kyber
Tip revision: 8970d37
File Mode Size
common
crypto_kem
crypto_sign
hostside
ldscripts
libopencm3 @ b1d8a4c
mk
mupq @ 64787de
.gitignore -rw-r--r-- 99 bytes
.gitmodules -rw-r--r-- 168 bytes
Makefile -rw-r--r-- 357 bytes
README.md -rw-r--r-- 24.7 KB
benchmarks.csv -rw-r--r-- 30.4 KB
benchmarks.md -rw-r--r-- 47.8 KB
benchmarks.py -rwxr-xr-x 994 bytes
build_everything.py -rwxr-xr-x 341 bytes
convert_benchmarks.py -rwxr-xr-x 417 bytes
interface.py -rw-r--r-- 3.5 KB
requirements.txt -rw-r--r-- 14 bytes
skiplist.py -rw-r--r-- 12.7 KB
st_nucleo_l4r5.cfg -rw-r--r-- 225 bytes
test.py -rwxr-xr-x 314 bytes
testvectors.py -rwxr-xr-x 303 bytes

README.md

back to top