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 --- extra/libkeccak_state_marshal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extra/libkeccak_state_marshal.c') diff --git a/extra/libkeccak_state_marshal.c b/extra/libkeccak_state_marshal.c index 7541164..f4fd4b5 100644 --- a/extra/libkeccak_state_marshal.c +++ b/extra/libkeccak_state_marshal.c @@ -28,7 +28,7 @@ libkeccak_state_marshal(const struct libkeccak_state *restrict state, void *rest if (!data) { return 7 * sizeof(long int) + - 1 * sizeof(int64_t) + + 1 * sizeof(uint64_t) + sizeof(state->S) + 2 * sizeof(size_t) + state->mptr; @@ -42,7 +42,7 @@ libkeccak_state_marshal(const struct libkeccak_state *restrict state, void *rest set(wmod); set(l); set(nr); - __builtin_memcpy(data, state->S, sizeof(state->S)); + __builtin_memcpy(data, &state->S, sizeof(state->S)); data += sizeof(state->S); set(mptr); set(mlen); -- cgit v1.2.3-70-g09d2