aboutsummaryrefslogtreecommitdiffstats
path: root/extra/libkeccak_state_marshal.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-15 11:57:21 +0200
committerMattias Andrée <maandree@kth.se>2024-09-15 11:57:21 +0200
commit7897170e09aa19122053ff24797b4d7c23f47cbc (patch)
tree7d13e4ed39c46ffe803076603b742bb47479122d /extra/libkeccak_state_marshal.c
parentm (diff)
downloadlibkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.gz
libkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.bz2
libkeccak-7897170e09aa19122053ff24797b4d7c23f47cbc.tar.xz
Optimisation for w=8,16,32
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'extra/libkeccak_state_marshal.c')
-rw-r--r--extra/libkeccak_state_marshal.c4
1 files changed, 2 insertions, 2 deletions
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);