Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Brian Smith
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
Show 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 =
ROTL64
(10, x2); \
x0 =
ROTL64
(27, x0); \
x2 = x2 ^ x3 ^
RSHIFT64
(7, x1); \
x2 =
DROTL32
(10, x2); \
x0 =
DROTL32
(27, x0); \
x2 = x2 ^ x3 ^
DRSHIFT32
(7, x1); \
x0 = x0 ^ x1 ^ x3; \
x3 =
ROTL64
(25, x3); \
x1 =
ROTL64
(31, x1); \
x3 = x3 ^ x2 ^
RSHIFT64
(3, x0); \
x3 =
DROTL32
(25, x3); \
x1 =
DROTL32
(31, x1); \
x3 = x3 ^ x2 ^
DRSHIFT32
(3, x0); \
x1 = x1 ^ x0 ^ x2; \
x2 =
ROTL64
(29, x2); \
x0 =
ROTL64
(19, x0); \
x2 =
DROTL32
(29, x2); \
x0 =
DROTL32
(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 =
ROTL64
(13, x0); \
x2 =
ROTL64
(3, x2); \
x0 =
DROTL32
(13, x0); \
x2 =
DROTL32
(3, x2); \
x1 = x1 ^ x0 ^ x2; \
x3 = x3 ^ x2 ^
RSHIFT64
(3, x0); \
x1 =
ROTL64
(1, x1); \
x3 =
ROTL64
(7, x3); \
x3 = x3 ^ x2 ^
DRSHIFT32
(3, x0); \
x1 =
DROTL32
(1, x1); \
x3 =
DROTL32
(7, x3); \
x0 = x0 ^ x1 ^ x3; \
x2 = x2 ^ x3 ^
RSHIFT64
(7, x1); \
x0 =
ROTL64
(5, x0); \
x2 =
ROTL64
(22, x2); \
x2 = x2 ^ x3 ^
DRSHIFT32
(7, x1); \
x0 =
DROTL32
(5, x0); \
x2 =
DROTL32
(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
ROTL64
(n,x) \
#define
DROTL32
(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
RSHIFT64
(n,x) \
#define
DRSHIFT32
(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