Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wim Lewis
nettle
Commits
2b39cfeb
Commit
2b39cfeb
authored
14 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
serpent-encrypt.c
+57
-14
57 additions, 14 deletions
serpent-encrypt.c
with
57 additions
and
14 deletions
serpent-encrypt.c
+
57
−
14
View file @
2b39cfeb
...
@@ -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; \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment