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

Minor sbox fixes.

Rev: nettle/serpent-encrypt.c:1.11
parent edb1b1a4
No related branches found
No related tags found
No related merge requests found
...@@ -164,10 +164,10 @@ ...@@ -164,10 +164,10 @@
*/ */
#define SBOX3(x0, x1, x2, x3, y0, y1, y2, y3) \ #define SBOX3(x0, x1, x2, x3, y0, y1, y2, y3) \
do { \ do { \
y2 = x0 ^ x2; \ y1 = x0 ^ x2; \
y0 = x0 | x3; \ y0 = x0 | x3; \
y3 = x0 & x3; \ y3 = x0 & x3; \
y1 = y2 & y0; \ y1 &= y0; \
y3 |= x1; \ y3 |= x1; \
y2 = x0 & x1; \ y2 = x0 & x1; \
y2 |= x2; \ y2 |= x2; \
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
do { \ do { \
y3 = x0 | x1; \ y3 = x0 | x1; \
y2 = x1 | x2; \ y2 = x1 | x2; \
y2 = x0 ^ y2; \ y2 ^= x0; \
y3 &= x3; \ y3 &= x3; \
y0 = x1 ^ x3; \ y0 = x1 ^ x3; \
x3 |= y2; \ x3 |= y2; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment