Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
94d79445
Commit
94d79445
authored
Jan 03, 2014
by
Niels Möller
Browse files
Comment on origin of sha1 and sha224 initial values.
parent
4b98efe1
Changes
2
Hide whitespace changes
Inline
Side-by-side
sha1.c
View file @
94d79445
...
...
@@ -57,7 +57,7 @@ sha1_init(struct sha1_ctx *ctx)
can initialize with a single memcpy. */
static
const
uint32_t
iv
[
_SHA1_DIGEST_LENGTH
]
=
{
/* SHA initial values */
/* SHA initial values
, first 4 identical to md5's.
*/
0x67452301L
,
0xEFCDAB89L
,
0x98BADCFEL
,
...
...
sha256.c
View file @
94d79445
...
...
@@ -129,7 +129,7 @@ sha256_digest(struct sha256_ctx *ctx,
void
sha224_init
(
struct
sha256_ctx
*
ctx
)
{
/* Initial values.
I's unclear how they are chosen
. */
/* Initial values.
Low 32 bits of the initial values for sha384
. */
static
const
uint32_t
H0
[
_SHA256_DIGEST_LENGTH
]
=
{
0xc1059ed8
,
0x367cd507
,
0x3070dd17
,
0xf70e5939
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment