Commit cbf04e36 authored by Niels Möller's avatar Niels Möller

Eliminated a temporary in the SHA256 round.

parent 9e2ce735
2013-03-11 Niels Möller <nisse@lysator.liu.se>
* sha256-compress.c (ROUND): Eliminated a temporary.
* armv7/sha1-compress.asm: New file, 9% speedup.
* testsuite/testutils.c (test_hash): Test different alignments for
......
......@@ -89,11 +89,11 @@
/* It's crucial that DATA is only used once, as that argument will
* have side effects. */
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
uint32_t T = h + S1(e) + Choice(e,f,g) + k + data; \
d += T; \
h = T + S0(a) + Majority(a,b,c); \
} while (0)
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
h += S1(e) + Choice(e,f,g) + k + data; \
d += h; \
h += S0(a) + Majority(a,b,c); \
} while (0)
void
_nettle_sha256_compress(uint32_t *state, const uint8_t *input, const uint32_t *k)
......
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