From fe603e6ba49f1d0ca4f27ac5039806c4f7b53779 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 12 Dec 2024 13:08:59 +0000 Subject: [PATCH] FIPS202: Remove redundant zeroization in shake128_absorb_once() `shake128_absorb_once()` calls `keccak_absorb_once()`, which already includes zeroization of the state. The zeroization can therefore be dropped from `shake128_absorb_once()`. Signed-off-by: Hanno Becker --- fips202/fips202.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fips202/fips202.c b/fips202/fips202.c index 0080d236a..39832829d 100644 --- a/fips202/fips202.c +++ b/fips202/fips202.c @@ -133,11 +133,6 @@ static void keccak_squeeze_once(uint8_t *h, size_t outlen, uint64_t *s, void shake128_absorb_once(shake128ctx *state, const uint8_t *input, size_t inlen) { - int i; - for (i = 0; i < 25; i++) - { - state->ctx[i] = 0; - } keccak_absorb_once(state->ctx, SHAKE128_RATE, input, inlen, 0x1F); }