Commit e0add32a authored by Niels Möller's avatar Niels Möller

(SBOX6_INVERSE): Eliminated temporaries.

Rev: nettle/serpent-decrypt.c:1.9
parent de87b900
......@@ -344,28 +344,26 @@
y2 = t16 ^ t14;
*/
#define SBOX6_INVERSE(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \
type t02, t03, t04, t05, t06, t07, t08, t09; \
type t12, t13, t14, t15, t16, t17, t01; \
t01 = x0 ^ x2; \
t02 = ~ x2; \
t03 = x1 & t01; \
t04 = x1 | t02; \
t05 = x3 | t03; \
t06 = x1 ^ x3; \
t07 = x0 & t04; \
t08 = x0 | t02; \
t09 = t07 ^ t05; \
y1 = t06 ^ t08; \
y0 = ~ t09; \
t12 = x1 & y0; \
t13 = t01 & t05; \
t14 = t01 ^ t12; \
t15 = t07 ^ t13; \
t16 = x3 | t02; \
t17 = x0 ^ y1; \
y3 = t17 ^ t15; \
y2 = t16 ^ t14; \
do { \
y2 = x0 ^ x2; \
x2 = ~ x2; \
y0 = x1 ^ x3; \
y1 = x0 | x2; \
y1 ^= y0; \
y3 = x1 & y2; \
y3 |= x3; \
x3 |= x2; \
x2 |= x1; \
x2 &= x0; \
y0 = x2 ^ y3; \
y0 = ~ y0; \
y3 &= y2; \
y3 ^= x2; \
x0 ^= y1; \
y3 ^= x0; \
x1 &= y0; \
y2 ^= x1; \
y2 ^= x3; \
} while (0)
/* S7 inverse: 3 0 6 13 9 14 15 8 5 12 11 7 10 1 4 2 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment