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
Deploy
Releases
Model registry
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
Brian Smith
nettle
Commits
82530186
Commit
82530186
authored
Oct 24, 2008
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(ROUND): Simplified macro.
Rev: nettle/sha256.c:1.2
parent
4e7d2c8c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sha256.c
+5
-7
5 additions, 7 deletions
sha256.c
with
5 additions
and
7 deletions
sha256.c
+
5
−
7
View file @
82530186
...
@@ -117,14 +117,12 @@ K[64] =
...
@@ -117,14 +117,12 @@ K[64] =
iteration. This code is then replicated 8, using the next 8 values
iteration. This code is then replicated 8, using the next 8 values
from the W[] array each time */
from the W[] array each time */
/* FIXME: We can probably reorder this to optimize away at least one
/* It's crucial that DATA is only used once, as that argument will
* of T1 and T2. It's crucial that DATA is only used once, as that
* have side effects. */
* argument will have side effects. */
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
uint32_t T1 = h + S1(e) + Choice(e,f,g) + k + data; \
uint32_t T = h + S1(e) + Choice(e,f,g) + k + data; \
uint32_t T2 = S0(a) + Majority(a,b,c); \
d += T; \
d += T1; \
h = T + S0(a) + Majority(a,b,c); \
h = T1 + T2; \
} while (0)
} while (0)
/* Initialize the SHA values */
/* Initialize the SHA values */
...
...
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