summaryrefslogtreecommitdiff
path: root/serpent-encrypt.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2011-06-08 13:59:59 +0200
committerNiels Möller <nisse@lysator.liu.se>2011-06-08 13:59:59 +0200
commit859abcc78629b3df7a5852c90dfeb4e17e68ac46 (patch)
tree43f5993f31ba74bdf5075a5f9fc802839722101e /serpent-encrypt.c
parentf504af2342833d5089739b69250579da419f0cd6 (diff)
downloadnettle-859abcc78629b3df7a5852c90dfeb4e17e68ac46.tar.gz
(SBOX4): Renamed arguments.
Rev: nettle/serpent-encrypt.c:1.6
Diffstat (limited to 'serpent-encrypt.c')
-rw-r--r--serpent-encrypt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/serpent-encrypt.c b/serpent-encrypt.c
index 4ce869fd..d46c48d7 100644
--- a/serpent-encrypt.c
+++ b/serpent-encrypt.c
@@ -164,29 +164,29 @@
} while (0)
/* S4: 1 15 8 3 12 0 11 6 2 5 4 10 9 14 7 13 */
-#define SBOX4(type, a, b, c, d, w, x, y, z) \
+#define SBOX4(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \
type t02, t03, t04, t05, t06, t08, t09; \
type t10, t11, t12, t13, t14, t15, t16, t01; \
- t01 = a | b ; \
- t02 = b | c ; \
- t03 = a ^ t02; \
- t04 = b ^ d ; \
- t05 = d | t03; \
- t06 = d & t01; \
- z = t03 ^ t06; \
- t08 = z & t04; \
+ t01 = x0 | x1 ; \
+ t02 = x1 | x2 ; \
+ t03 = x0 ^ t02; \
+ t04 = x1 ^ x3 ; \
+ t05 = x3 | t03; \
+ t06 = x3 & t01; \
+ y3 = t03 ^ t06; \
+ t08 = y3 & t04; \
t09 = t04 & t05; \
- t10 = c ^ t06; \
- t11 = b & c ; \
+ t10 = x2 ^ t06; \
+ t11 = x1 & x2 ; \
t12 = t04 ^ t08; \
t13 = t11 | t03; \
t14 = t10 ^ t09; \
- t15 = a & t05; \
+ t15 = x0 & t05; \
t16 = t11 | t12; \
- y = t13 ^ t08; \
- x = t15 ^ t16; \
- w = ~ t14; \
+ y2 = t13 ^ t08; \
+ y1 = t15 ^ t16; \
+ y0 = ~ t14; \
} while (0)
/* S5: 15 5 2 11 4 10 9 12 0 3 14 8 13 6 7 1 */