diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-14 10:04:55 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-14 10:04:55 +0200 |
commit | aade49d09c5bf56bbed52c4b6fef20e286f73e3f (patch) | |
tree | 7a083bbeed4a921dafd6bd48e1e6ecd2c23db53e | |
parent | Empty signed commit (diff) | |
download | libkeccak-aade49d09c5bf56bbed52c4b6fef20e286f73e3f.tar.gz libkeccak-aade49d09c5bf56bbed52c4b6fef20e286f73e3f.tar.bz2 libkeccak-aade49d09c5bf56bbed52c4b6fef20e286f73e3f.tar.xz |
Fix bug where the hash is incomplete and possiblity corrupt when the bitrate is not a multiple of the word size
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | digest.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -319,7 +319,7 @@ libkeccak_squeezing_phase(register struct libkeccak_state *restrict state, long long int nn, long int ww, register unsigned char *restrict hashsum) { register int_fast64_t v; - register long int ni = rr / ww; + register long int ni = rr / ww + !!(rr % ww); auto long int olen = state->n; auto long int i, j = 0; register long int k; |