为什么 SHA2 有 384 位版本?

Why SHA2 has a 384 bit version?

我知道有 256 和 512 版本,因为它们都是 2 的幂。但是 384 是从哪里来的呢?

我知道 384 的二进制表示是 110000000 但我无法理解其中的逻辑。

不在256和512的中间,连对数的中间都不是。

为什么是 384?

256 + 128 = 384

只不过是上述2的幂的两个值相加!!

快速浏览维基百科发现:

SHA-256 and SHA-512 are novel hash functions computed with 32-bit and 64-bit words, respectively. They use different shift amounts and additive constants, but their structures are otherwise virtually identical, differing only in the number of rounds. SHA-224 and SHA-384 are simply truncated versions of the first two, computed with different initial values.

查看 comparison between all the variants, it seems that SHA-384 is more resistant to length extension attacks 比 SHA-512(其更长的版本)。

您可以在 Cryptography Stack Exchange 上找到更详细的答案:here