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
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
dae705f5
Commit
dae705f5
authored
Jun 07, 2011
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(SBOX1): Renamed arguments. Eliminated temporaries.
Rev: nettle/ChangeLog:1.178 Rev: nettle/serpent-encrypt.c:1.3
parent
66b7bda5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
ChangeLog
ChangeLog
+1
-0
serpent-encrypt.c
serpent-encrypt.c
+20
-22
No files found.
ChangeLog
View file @
dae705f5
...
...
@@ -2,6 +2,7 @@
* serpent-encrypt.c (SBOX0): Renamed arguments. Eliminated
temporaries.
(SBOX1): Likewise.
2011-06-06 Niels Mller <nisse@lysator.liu.se>
...
...
serpent-encrypt.c
View file @
dae705f5
...
...
@@ -95,28 +95,26 @@
} while (0)
/* S1: 15 12 2 7 9 0 5 10 1 11 14 8 6 13 3 4 */
#define SBOX1(type, a, b, c, d, w, x, y, z) \
do { \
type t02, t03, t04, t05, t06, t07, t08; \
type t10, t11, t12, t13, t16, t17, t01; \
t01 = a | d ; \
t02 = c ^ d ; \
t03 = ~ b ; \
t04 = a ^ c ; \
t05 = a | t03; \
t06 = d & t04; \
t07 = t01 & t02; \
t08 = b | t06; \
y = t02 ^ t05; \
t10 = t07 ^ t08; \
t11 = t01 ^ t10; \
t12 = y ^ t11; \
t13 = b & d ; \
z = ~ t10; \
x = t13 ^ t12; \
t16 = t10 | x ; \
t17 = t05 & t16; \
w = c ^ t17; \
#define SBOX1(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \
y1 = x0 | x3; \
y2 = x2 ^ x3; \
y0 = ~ x1; \
y3 = x0 ^ x2; \
y0 |= x0; \
y3 &= x3; \
x0 = y1 & y2; \
y3 |= x1; \
y2 ^= y0; \
y3 ^= x0; \
x0 = y1 ^ y3; \
x0 ^= y2; \
y1 = x1 & x3; \
y1 ^= x0; \
x3 = y3 | y1; \
y3 = ~ y3; \
y0 &= x3; \
y0 ^= x2; \
} while (0)
/* S2: 8 6 7 9 3 12 10 15 13 1 14 4 0 11 5 2 */
...
...
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