Skip to content
Snippets Groups Projects
Commit 2b39cfeb authored by Niels Möller's avatar Niels Möller
Browse files

Whitespace and comment changes.

Rev: nettle/serpent-encrypt.c:1.7
parent d8ec143d
No related branches found
No related tags found
No related merge requests found
...@@ -141,6 +141,27 @@ ...@@ -141,6 +141,27 @@
} while (0) } while (0)
/* S3: 0 15 11 8 12 9 6 3 13 1 2 4 10 7 5 14 */ /* S3: 0 15 11 8 12 9 6 3 13 1 2 4 10 7 5 14 */
/* Original single-assignment form:
t01 = x0 ^ x2;
t02 = x0 | x3;
t03 = x0 & x3;
t04 = t01 & t02;
t05 = x1 | t03;
t06 = x0 & x1;
t07 = x3 ^ t04;
t08 = x2 | t06;
t09 = x1 ^ t07;
t10 = x3 & t05;
t11 = t02 ^ t10;
y3 = t08 ^ t09;
t13 = x3 | y3;
t14 = x0 | t07;
t15 = x1 & t13;
y2 = t08 ^ t11;
y0 = t14 ^ t15;
y1 = t05 ^ t04;
*/
#define SBOX3(type, x0, x1, x2, x3, y0, y1, y2, y3) \ #define SBOX3(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \ do { \
y2 = x0 ^ x2; \ y2 = x0 ^ x2; \
...@@ -163,7 +184,29 @@ ...@@ -163,7 +184,29 @@
y0 = x0 ^ x1; \ y0 = x0 ^ x1; \
} while (0) } while (0)
/* S4: 1 15 8 3 12 0 11 6 2 5 4 10 9 14 7 13 */ /* S4: 1 15 8 3 12 0 11 6 2 5 4 10 9 14 7 13 */
/* Original single-assignment form:
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 = x2 ^ t06;
t11 = x1 & x2;
t12 = t04 ^ t08;
t13 = t11 | t03;
t14 = t10 ^ t09;
t15 = x0 & t05;
t16 = t11 | t12;
y2 = t13 ^ t08;
y1 = t15 ^ t16;
y0 = ~ t14;
*/
#define SBOX4(type, x0, x1, x2, x3, y0, y1, y2, y3) \ #define SBOX4(type, x0, x1, x2, x3, y0, y1, y2, y3) \
do { \ do { \
type t02, t03, t04, t05, t06, t08, t09; \ type t02, t03, t04, t05, t06, t08, t09; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment