diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-03-11 11:08:34 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-03-11 11:08:34 +0100 |
commit | cbf04e364a8c61e4bae650c3584f0d5157c380ba (patch) | |
tree | 0bb6b774c4a5f783bcfdf9984c68c5d1b26cb243 /sha256-compress.c | |
parent | 9e2ce735038c6070941731ce60137606075f5e3f (diff) | |
download | nettle-cbf04e364a8c61e4bae650c3584f0d5157c380ba.tar.gz |
Eliminated a temporary in the SHA256 round.
Diffstat (limited to 'sha256-compress.c')
-rw-r--r-- | sha256-compress.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sha256-compress.c b/sha256-compress.c index 3f441e81..96a88946 100644 --- a/sha256-compress.c +++ b/sha256-compress.c @@ -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) |