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
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Norbert Pócs
nettle
Commits
b44a75d0
Commit
b44a75d0
authored
Jun 9, 2011
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(SBOX4): Renamed arguments. Eliminated temporaries.
Rev: nettle/ChangeLog:1.183 Rev: nettle/serpent-encrypt.c:1.8
parent
92de427d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+3
-2
3 additions, 2 deletions
ChangeLog
serpent-encrypt.c
+21
-23
21 additions, 23 deletions
serpent-encrypt.c
with
24 additions
and
25 deletions
ChangeLog
+
3
−
2
View file @
b44a75d0
2011-06-09 Niels Mller <nisse@lysator.liu.se>
2011-06-09 Niels Mller <nisse@lysator.liu.se>
* serpent-encrypt.c (SBOX4): Renamed arguments. Eliminated
temporaries.
* configure.ac (LIBNETTLE_LINK, LIBHOGWEED_LINK): Cygwin fix, from
* configure.ac (LIBNETTLE_LINK, LIBHOGWEED_LINK): Cygwin fix, from
Vincent Torri.
Vincent Torri.
2011-06-08 Niels Mller <nisse@lysator.liu.se>
2011-06-08 Niels Mller <nisse@lysator.liu.se>
* serpent-encrypt.c (SBOX4): Renamed arguments.
* examples/eratosthenes.c (find_first_one): Fixed c99-style
* examples/eratosthenes.c (find_first_one): Fixed c99-style
declaration. Reported by Sebastian Reitenbach.
declaration. Reported by Sebastian Reitenbach.
(find_first_one): Declare the lookup table as static const, and
(find_first_one): Declare the lookup table as static const, and
...
...
This diff is collapsed.
Click to expand it.
serpent-encrypt.c
+
21
−
23
View file @
b44a75d0
...
@@ -209,27 +209,25 @@
...
@@ -209,27 +209,25 @@
*/
*/
#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; \
y3 = x0 | x1; \
type t10, t11, t12, t13, t14, t15, t16, t01; \
y2 = x1 | x2; \
t01 = x0 | x1; \
y2 = x0 ^ y2; \
t02 = x1 | x2; \
y3 &= x3; \
t03 = x0 ^ t02; \
y0 = x1 ^ x3; \
t04 = x1 ^ x3; \
x3 |= y2; \
t05 = x3 | t03; \
x0 &= x3; \
t06 = x3 & t01; \
x1 &= x2; \
y3 = t03 ^ t06; \
x2 ^= y3; \
t08 = y3 & t04; \
y3 ^= y2; \
t09 = t04 & t05; \
y2 |= x1; \
t10 = x2 ^ t06; \
y1 = y3 & y0; \
t11 = x1 & x2; \
y2 ^= y1; \
t12 = t04 ^ t08; \
y1 ^= y0; \
t13 = t11 | t03; \
y1 |= x1; \
t14 = t10 ^ t09; \
y1 ^= x0; \
t15 = x0 & t05; \
y0 &= x3; \
t16 = t11 | t12; \
y0 ^= x2; \
y2 = t13 ^ t08; \
y0 = ~y0; \
y1 = t15 ^ t16; \
y0 = ~ t14; \
} while (0)
} while (0)
/* S5: 15 5 2 11 4 10 9 12 0 3 14 8 13 6 7 1 */
/* S5: 15 5 2 11 4 10 9 12 0 3 14 8 13 6 7 1 */
...
...
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