Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marcus Hoffmann
nettle
Commits
b7923c76
Commit
b7923c76
authored
Jun 21, 2011
by
Niels Möller
Browse files
(SBOX6_INVERSE): Eliminated temporaries.
Rev: nettle/serpent-decrypt.c:1.9
parent
57e05f54
Changes
1
Show whitespace changes
Inline
Side-by-side
serpent-decrypt.c
View file @
b7923c76
...
@@ -345,27 +345,25 @@
...
@@ -345,27 +345,25 @@
*/
*/
#define SBOX6_INVERSE(type, x0, x1, x2, x3, y0, y1, y2, y3) \
#define SBOX6_INVERSE(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \
do { \
type t02, t03, t04, t05, t06, t07, t08, t09; \
y2 = x0 ^ x2; \
type t12, t13, t14, t15, t16, t17, t01; \
x2 = ~ x2; \
t01 = x0 ^ x2; \
y0 = x1 ^ x3; \
t02 = ~ x2; \
y1 = x0 | x2; \
t03 = x1 & t01; \
y1 ^= y0; \
t04 = x1 | t02; \
y3 = x1 & y2; \
t05 = x3 | t03; \
y3 |= x3; \
t06 = x1 ^ x3; \
x3 |= x2; \
t07 = x0 & t04; \
x2 |= x1; \
t08 = x0 | t02; \
x2 &= x0; \
t09 = t07 ^ t05; \
y0 = x2 ^ y3; \
y1 = t06 ^ t08; \
y0 = ~ y0; \
y0 = ~ t09; \
y3 &= y2; \
t12 = x1 & y0; \
y3 ^= x2; \
t13 = t01 & t05; \
x0 ^= y1; \
t14 = t01 ^ t12; \
y3 ^= x0; \
t15 = t07 ^ t13; \
x1 &= y0; \
t16 = x3 | t02; \
y2 ^= x1; \
t17 = x0 ^ y1; \
y2 ^= x3; \
y3 = t17 ^ t15; \
y2 = t16 ^ t14; \
} while (0)
} while (0)
/* S7 inverse: 3 0 6 13 9 14 15 8 5 12 11 7 10 1 4 2 */
/* S7 inverse: 3 0 6 13 9 14 15 8 5 12 11 7 10 1 4 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