sha3: permute at rate boundary

Not triggered in this context, but correctness doesn't hurt
This commit is contained in:
Frank Denis
2025-12-09 01:59:02 +01:00
parent 1b95172b82
commit 07b2b42713
@@ -235,7 +235,10 @@ sha3_512(unsigned char out[64], const unsigned char *in, size_t inlen)
offset += chunk_size;
consumed += chunk_size;
}
if (offset == SHA3_512_RATE) {
crypto_core_keccak1600_permute_24(state);
offset = 0;
}
if (offset == SHA3_512_RATE - 1) {
pad = SHA3_DOMAIN | 0x80;
crypto_core_keccak1600_xor_bytes(state, &pad, offset, 1);