Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Wim Lewis
nettle
Commits
d20990fd
Commit
d20990fd
authored
Nov 12, 2012
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed serpent-internal.h macros.
parent
83b7c95b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
18 deletions
+28
-18
ChangeLog
ChangeLog
+10
-0
serpent-decrypt.c
serpent-decrypt.c
+8
-8
serpent-encrypt.c
serpent-encrypt.c
+8
-8
serpent-internal.h
serpent-internal.h
+2
-2
No files found.
ChangeLog
View file @
d20990fd
2012-11-12 Niels Möller <nisse@lysator.liu.se>
* serpent-internal.h [HAVE_NATIVE_64_BIT] (DROTL32): Renamed from...
(ROTL64): ... old name.
(DRSHIFT32): Renamed from ...
(RSHIFT64): ... old name.
* serpent-encrypt.c (LINEAR_TRANSFORMATION64): Updated for above
renames.
* serpent-decrypt.c (LINEAR_TRANSFORMATION64_INVERSE): Likewise.
2012-11-11 Niels Möller <nisse@lysator.liu.se>
From Nikos Mavrogiannopoulos:
...
...
serpent-decrypt.c
View file @
d20990fd
...
...
@@ -438,16 +438,16 @@
/* In-place inverse linear transformation. */
#define LINEAR_TRANSFORMATION64_INVERSE(x0,x1,x2,x3) \
do { \
x2 = ROTL
64
(10, x2); \
x0 = ROTL
64
(27, x0); \
x2 = x2 ^ x3 ^ RSHIFT
64
(7, x1); \
x2 =
D
ROTL
32
(10, x2); \
x0 =
D
ROTL
32
(27, x0); \
x2 = x2 ^ x3 ^
D
RSHIFT
32
(7, x1); \
x0 = x0 ^ x1 ^ x3; \
x3 = ROTL
64
(25, x3); \
x1 = ROTL
64
(31, x1); \
x3 = x3 ^ x2 ^ RSHIFT
64
(3, x0); \
x3 =
D
ROTL
32
(25, x3); \
x1 =
D
ROTL
32
(31, x1); \
x3 = x3 ^ x2 ^
D
RSHIFT
32
(3, x0); \
x1 = x1 ^ x0 ^ x2; \
x2 = ROTL
64
(29, x2); \
x0 = ROTL
64
(19, x0); \
x2 =
D
ROTL
32
(29, x2); \
x0 =
D
ROTL
32
(19, x0); \
} while (0)
#define ROUND64_INVERSE(which, subkey, x0,x1,x2,x3, y0,y1,y2,y3) \
...
...
serpent-encrypt.c
View file @
d20990fd
...
...
@@ -411,16 +411,16 @@
#define LINEAR_TRANSFORMATION64(x0,x1,x2,x3) \
do { \
x0 = ROTL
64
(13, x0); \
x2 = ROTL
64
(3, x2); \
x0 =
D
ROTL
32
(13, x0); \
x2 =
D
ROTL
32
(3, x2); \
x1 = x1 ^ x0 ^ x2; \
x3 = x3 ^ x2 ^ RSHIFT
64
(3, x0); \
x1 = ROTL
64
(1, x1); \
x3 = ROTL
64
(7, x3); \
x3 = x3 ^ x2 ^
D
RSHIFT
32
(3, x0); \
x1 =
D
ROTL
32
(1, x1); \
x3 =
D
ROTL
32
(7, x3); \
x0 = x0 ^ x1 ^ x3; \
x2 = x2 ^ x3 ^ RSHIFT
64
(7, x1); \
x0 = ROTL
64
(5, x0); \
x2 = ROTL
64
(22, x2); \
x2 = x2 ^ x3 ^
D
RSHIFT
32
(7, x1); \
x0 =
D
ROTL
32
(5, x0); \
x2 =
D
ROTL
32
(22, x2); \
} while (0)
#define ROUND64(which, subkey, x0,x1,x2,x3, y0,y1,y2,y3) \
...
...
serpent-internal.h
View file @
d20990fd
...
...
@@ -51,7 +51,7 @@
#if HAVE_NATIVE_64_BIT
/* Operate independently on both halves of a 64-bit word. */
#define ROTL
64
(n,x) \
#define
D
ROTL
32
(n,x) \
(((x) << (n) & ~((((uint64_t) 1 << (n))-1) << 32)) \
|(((x) >> (32-(n))) & ~((((uint64_t) 1 << (32-(n)))-1) << (n))))
...
...
@@ -64,7 +64,7 @@
_sk = (subkey)[3]; _sk |= _sk << 32; (x3) ^= _sk; \
} while (0)
#define RSHIFT
64
(n,x) \
#define
D
RSHIFT
32
(n,x) \
( ((x) << (n)) & ~((((uint64_t) 1 << (n)) - 1) << 32))
#endif
/* HAVE_NATIVE_64_BIT */
...
...
Write
Preview
Markdown
is supported
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