Commit 894e849b authored by Niels Möller's avatar Niels Möller

Fixes for big-endian sha3 code.

parent 314365b2
2012-11-15 Niels Möller <nisse@lysator.liu.se>
* sha3.c (sha3_absorb): Fixed big-endian code. Need macros.h.
* macros.h (LE_READ_UINT64): New macro.
2012-11-13 Niels Möller <nisse@lysator.liu.se>
......
......@@ -32,6 +32,7 @@
#include "sha3.h"
#include "macros.h"
#include "memxor.h"
static void
......@@ -41,7 +42,7 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data)
#if WORDS_BIGENDIAN
{
uint64_t *p;
for (p = &state->a[0][0]; length > 0; p++, length -= 8, data += 8)
for (p = state->a; length > 0; p++, length -= 8, data += 8)
*p ^= LE_READ_UINT64 (data);
}
#else /* !WORDS_BIGENDIAN */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment