From 7897170e09aa19122053ff24797b4d7c23f47cbc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 15 Sep 2024 11:57:21 +0200 Subject: Optimisation for w=8,16,32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libkeccak_state_initialise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libkeccak_state_initialise.c') diff --git a/libkeccak_state_initialise.c b/libkeccak_state_initialise.c index 7644ff7..545d3df 100644 --- a/libkeccak_state_initialise.c +++ b/libkeccak_state_initialise.c @@ -34,9 +34,9 @@ libkeccak_state_initialise(struct libkeccak_state *restrict state, const struct } state->nr = 12 + (state->l << 1); - state->wmod = (state->w == 64) ? ~0LL : (int64_t)((1ULL << state->w) - 1); + state->wmod = (state->w == 64) ? ~0ULL : (uint64_t)((1ULL << state->w) - 1); for (x = 0; x < 25; x++) - state->S[x] = 0; + state->S.w64[x] = 0; state->mptr = 0; state->mlen = (size_t)(state->r * state->b) >> 2; -- cgit v1.2.3-70-g09d2