Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lsh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LSH
lsh
Commits
b95c4bb4
Commit
b95c4bb4
authored
Jun 09, 2011
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(SBOX4): Renamed arguments. Eliminated temporaries.
Rev: nettle/ChangeLog:1.183 Rev: nettle/serpent-encrypt.c:1.8
parent
8ea0ef0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
nettle/ChangeLog
nettle/ChangeLog
+3
-2
nettle/serpent-encrypt.c
nettle/serpent-encrypt.c
+21
-23
No files found.
nettle/ChangeLog
View file @
b95c4bb4
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
Vincent Torri.
2011-06-08 Niels Mller <nisse@lysator.liu.se>
* serpent-encrypt.c (SBOX4): Renamed arguments.
* examples/eratosthenes.c (find_first_one): Fixed c99-style
declaration. Reported by Sebastian Reitenbach.
(find_first_one): Declare the lookup table as static const, and
...
...
nettle/serpent-encrypt.c
View file @
b95c4bb4
...
...
@@ -207,29 +207,27 @@
y1 = t15 ^ t16;
y0 = ~ t14;
*/
#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 = 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) \
do { \
y3 = x0 | x1; \
y2 = x1 | x2; \
y2 = x0 ^ y2; \
y3 &= x3; \
y0 = x1 ^ x3; \
x3 |= y2; \
x0 &= x3; \
x1 &= x2; \
x2 ^= y3; \
y3 ^= y2; \
y2 |= x1; \
y1 = y3 & y0; \
y2 ^= y1; \
y1 ^= y0; \
y1 |= x1; \
y1 ^= x0; \
y0 &= x3; \
y0 ^= x2; \
y0 = ~y0; \
} while (0)
/* S5: 15 5 2 11 4 10 9 12 0 3 14 8 13 6 7 1 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment