]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(SBOX4): Renamed arguments.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 8 Jun 2011 11:59:59 +0000 (13:59 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 8 Jun 2011 11:59:59 +0000 (13:59 +0200)
Rev: nettle/serpent-encrypt.c:1.6

serpent-encrypt.c

index 4ce869fd85495949058c339cd2499e176974d6cc..d46c48d763f81d0716b8fc5d29ed200cd66dbe77 100644 (file)
   } 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 */