diff options
author | Niels Möller <nisse@lysator.liu.se> | 2014-01-03 21:58:15 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2014-01-03 21:58:15 +0100 |
commit | 94d79445b1aa74e9d93d0d8f82ef392fdd81321e (patch) | |
tree | 4e59ac80f8db365adf7e4fa562de4e12511663b9 | |
parent | 4b98efe1661d14defd2b6a136781979a963a1439 (diff) | |
download | nettle-94d79445b1aa74e9d93d0d8f82ef392fdd81321e.tar.gz |
Comment on origin of sha1 and sha224 initial values.
-rw-r--r-- | sha1.c | 2 | ||||
-rw-r--r-- | sha256.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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, @@ -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, |