Skip to content
Snippets Groups Projects
Commit 82530186 authored by Niels Möller's avatar Niels Möller
Browse files

(ROUND): Simplified macro.

Rev: nettle/sha256.c:1.2
parent 4e7d2c8c
No related branches found
No related tags found
No related merge requests found
......@@ -117,14 +117,12 @@ K[64] =
iteration. This code is then replicated 8, using the next 8 values
from the W[] array each time */
/* FIXME: We can probably reorder this to optimize away at least one
* of T1 and T2. It's crucial that DATA is only used once, as that
* argument will have side effects. */
/* 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 T1 = h + S1(e) + Choice(e,f,g) + k + data; \
uint32_t T2 = S0(a) + Majority(a,b,c); \
d += T1; \
h = T1 + T2; \
uint32_t T = h + S1(e) + Choice(e,f,g) + k + data; \
d += T; \
h = T + S0(a) + Majority(a,b,c); \
} while (0)
/* Initialize the SHA values */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment