Commit 32166fb
committed
ML-DSA: Fix poly_uniform
In the second and later squeezes, it squeezes SHAKE128_BLOCK_SIZE
(168) bytes, but then it uses only the first DILITHIUM_SEEDBYTES
(32) bytes.
Now, that 32 is on top of the 840-byte first squeeze, so there are 872
correct bytes which is enough for 290 samples. So an incorrect matrix
would be generated only if more than 290 samples happen to be required
to get the 256 coefficients. q / 2^23 = ~99.9% of coefficients are
accepted, so that number of rejections would be pretty unlikely.
Reported-by Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Stephan Mueller <smueller@chronox.de>1 parent 5b01bb2 commit 32166fb
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments