Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
e4a28f55
Commit
e4a28f55
authored
Mar 31, 2012
by
Niels Möller
Browse files
Use ROTL32 in the ripemd160 code.
parent
a7bd5fa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
e4a28f55
...
...
@@ -13,6 +13,8 @@
* cast128.c (ROL): Deleted macro.
(F1, F2, F3): Updated to use ROTL32 (reversed order of arguments).
Also added proper do { ... } while (0) wrappers.
* ripemd160-compress.c (ROL32): Deleted macro.
(R): Updated to use ROTL32 (reversed order of arguments).
2012-03-30 Niels Möller <nisse@lysator.liu.se>
...
...
ripemd160-compress.c
View file @
e4a28f55
...
...
@@ -30,12 +30,6 @@
#include
"macros.h"
/****************
* Rotate the 32 bit unsigned integer X by N bits left
*/
#define ROL32(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
/****************
* Transform the message X which consists of 16 32-bit-words
...
...
@@ -76,8 +70,8 @@ _nettle_ripemd160_compress(uint32_t *state, const uint8_t *data)
#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) )
#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) )
#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \
a = ROL32(
t,s
) + e; \
c = ROL32(
c,
10); \
a = RO
T
L32(
s,t
) + e; \
c = RO
T
L32(10
,c
); \
} while(0)
/* left lane */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment