SHA-224的初始哈希值(H(0))是如何得到的?

How was the initial hash value (H(0)) of SHA-224 obtained?

RFC 6234: US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF) 仅解释了 SHA-256、SHA- 的初始哈希值 (H(0)) 384,并获得了 SHA-512。 SHA-224 的 H(0) 是如何获得的?

§6.1. SHA-224 and SHA-256 Initialization

For SHA-224, the initial hash value, H(0), consists of the following 32-bit words in hex:

H(0)0 = c1059ed8
H(0)1 = 367cd507
H(0)2 = 3070dd17
H(0)3 = f70e5939
H(0)4 = ffc00b31
H(0)5 = 68581511
H(0)6 = 64f98fa7
H(0)7 = befa4fa4

For SHA-256, the initial hash value, H(0), consists of the following eight 32-bit words, in hex. These words were obtained by taking the first 32 bits of the fractional parts of the square roots of the first eight prime numbers.

H(0)0 = 6a09e667
H(0)1 = bb67ae85
H(0)2 = 3c6ef372
H(0)3 = a54ff53a
H(0)4 = 510e527f
H(0)5 = 9b05688c
H(0)6 = 1f83d9ab
H(0)7 = 5be0cd19

§6.3. SHA-384 and SHA-512 Initialization

For SHA-384, the initial hash value, H(0), consists of the following eight 64-bit words, in hex. These words were obtained by taking the first 64 bits of the fractional parts of the square roots of the ninth through sixteenth prime numbers.

H(0)0 = cbbb9d5dc1059ed8
H(0)1 = 629a292a367cd507
H(0)2 = 9159015a3070dd17
H(0)3 = 152fecd8f70e5939
H(0)4 = 67332667ffc00b31
H(0)5 = 8eb44a8768581511
H(0)6 = db0c2e0d64f98fa7
H(0)7 = 47b5481dbefa4fa4

For SHA-512, the initial hash value, H(0), consists of the following eight 64-bit words, in hex. These words were obtained by taking the first 64 bits of the fractional parts of the square roots of the first eight prime numbers.

H(0)0 = 6a09e667f3bcc908
H(0)1 = bb67ae8584caa73b
H(0)2 = 3c6ef372fe94f82b
H(0)3 = a54ff53a5f1d36f1
H(0)4 = 510e527fade682d1
H(0)5 = 9b05688c2b3e6c1f
H(0)6 = 1f83d9abfb41bd6b
H(0)7 = 5be0cd19137e2179

这是 SHA-224 初始值的第一部分:

H(0)0 = c1059ed8

这是 SHA-384 初始值的第一部分

H(0)0 = cbbb9d5dc1059ed8

注意 SHA-384 的最后 32 位正是 SHA-224 的值。