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
Dmitry Baryshkov
nettle
Commits
61c1cfc3
Commit
61c1cfc3
authored
Jun 13, 2011
by
Niels Möller
Browse files
Minor sbox fixes.
Rev: nettle/serpent-encrypt.c:1.11
parent
edb1b1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
serpent-encrypt.c
View file @
61c1cfc3
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
y1 = x0 | x3; \
y1 = x0 | x3; \
y2 = x2 ^ x3; \
y2 = x2 ^ x3; \
y0 = ~ x1; \
y0 = ~ x1; \
y3 = x0
^ x2; \
y3 = x0 ^ x2; \
y0 |= x0; \
y0 |= x0; \
y3 &= x3; \
y3 &= x3; \
x0 = y1 & y2; \
x0 = y1 & y2; \
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
y3 ^= x0; \
y3 ^= x0; \
x0 = y1 ^ y3; \
x0 = y1 ^ y3; \
x0 ^= y2; \
x0 ^= y2; \
y1 = x1
& x3; \
y1 = x1 & x3; \
y1 ^= x0; \
y1 ^= x0; \
x3 = y3 | y1; \
x3 = y3 | y1; \
y3 = ~ y3; \
y3 = ~ y3; \
...
@@ -164,14 +164,14 @@
...
@@ -164,14 +164,14 @@
*/
*/
#define SBOX3(x0, x1, x2, x3, y0, y1, y2, y3) \
#define SBOX3(x0, x1, x2, x3, y0, y1, y2, y3) \
do { \
do { \
y
2
= x0 ^ x2; \
y
1
= x0 ^ x2; \
y0 = x0 | x3; \
y0 = x0 | x3; \
y3 = x0 & x3; \
y3 = x0 & x3; \
y1
= y2
& y0; \
y1 &
=
y0;
\
y3 |= x1; \
y3 |= x1; \
y2 = x0
& x1; \
y2 = x0 & x1; \
y2 |= x2; \
y2 |= x2; \
x2 = x3
^ y1; \
x2 = x3 ^ y1; \
y1 ^= y3; \
y1 ^= y3; \
x0 |= x2; \
x0 |= x2; \
x2 ^= x1; \
x2 ^= x1; \
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
do { \
do { \
y3 = x0 | x1; \
y3 = x0 | x1; \
y2 = x1 | x2; \
y2 = x1 | x2; \
y2
= x0
^ y2
; \
y2
^
= x0;
\
y3 &= x3; \
y3 &= x3; \
y0 = x1 ^ x3; \
y0 = x1 ^ x3; \
x3 |= y2; \
x3 |= y2; \
...
...
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