aboutsummaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--extra/libkeccak_state_marshal.c4
-rw-r--r--extra/libkeccak_state_unmarshal.c4
-rw-r--r--extra/libkeccak_state_wipe_sponge.c2
3 files changed, 5 insertions, 5 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);
diff --git a/extra/libkeccak_state_unmarshal.c b/extra/libkeccak_state_unmarshal.c
index 4714566..0938ba1 100644
--- a/extra/libkeccak_state_unmarshal.c
+++ b/extra/libkeccak_state_unmarshal.c
@@ -30,7 +30,7 @@ libkeccak_state_unmarshal(struct libkeccak_state *restrict state, const void *re
if (!state) {
data += 7U * sizeof(long int);
- data += 1U * sizeof(int64_t);
+ data += 1U * sizeof(uint64_t);
data += sizeof(state->S);
mptr = *(const size_t *)data;
data += 2U * sizeof(size_t);
@@ -46,7 +46,7 @@ libkeccak_state_unmarshal(struct libkeccak_state *restrict state, const void *re
get(wmod);
get(l);
get(nr);
- memcpy(state->S, data, sizeof(state->S));
+ memcpy(&state->S, data, sizeof(state->S));
data += sizeof(state->S);
get(mptr);
get(mlen);
diff --git a/extra/libkeccak_state_wipe_sponge.c b/extra/libkeccak_state_wipe_sponge.c
index 91e845a..69aa46a 100644
--- a/extra/libkeccak_state_wipe_sponge.c
+++ b/extra/libkeccak_state_wipe_sponge.c
@@ -10,7 +10,7 @@
void
libkeccak_state_wipe_sponge(volatile struct libkeccak_state *state)
{
- volatile int64_t *restrict S = state->S;
+ volatile uint64_t *restrict S = state->S.w64;
size_t i;
for (i = 0; i < 25; i++)