For faster navigation, this Iframe is preloading the Wikiwand page for SHA家族.

SHA家族

安全散列算法(英语:Secure Hash Algorithm,缩写为SHA)是一个密码散列函数家族,是FIPS所认证的安全散列算法。能计算出一个数码消息所对应到的,长度固定的字符串(又称消息摘要)的算法。且若输入的消息不同,它们对应到不同字符串的几率很高。

SHA家族的算法,由美国国家安全局(NSA)所设计,并由美国国家标准与技术研究院(NIST)发布,是美国的政府标准,其分别是:

  • SHA-0:1993年发布,当时称做安全散列标准(Secure Hash Standard),发布之后很快就被NSA撤回,是SHA-1的前身。
  • SHA-1:1995年发布,SHA-1在许多安全协议中广为使用,包括TLSGnuPGSSHS/MIMEIPsec,是MD5的后继者。但SHA-1的安全性在2010年以后已经不被大多数的加密场景所接受。2017年荷兰密码学研究小组CWI和Google正式宣布攻破了SHA-1[1]
  • SHA-2:2001年发布,包括SHA-224、SHA-256、SHA-384、SHA-512、SHA-512/224、SHA-512/256。SHA-2目前没有出现明显的弱点。虽然至今尚未出现对SHA-2有效的攻击,但它的算法跟SHA-1基本上仍然相似。
  • SHA-3:2015年正式发布,由于对MD5出现成功的破解,以及对SHA-0和SHA-1出现理论上破解的方法,NIST感觉需要一个与之前算法不同的,可替换的加密散列算法,也就是现在的SHA-3。

SHA函数对比

下表中的中继散列值(internal state)表示对每个资料区块压缩散列过后的中继值(internal hash sum)。

SHA函数对比
算法和变体 输出散列值长度
(bits)
中继散列值长度
(bits)
资料区块长度
(bits)
最大输入消息长度
(bits)
循环次数 使用到的运算符 碰撞攻击
(bits)
性能示例[3]
(MiB/s)
MD5(作为参考) 128 128
(4 × 32)
512 无限[4] 64 And, Xor, Rot, Add (mod 232), Or ≤18
(发现碰撞)
335
SHA-0 160 160
(5 × 32)
512 264 − 1 80 And, Xor, Rot, Add (mod 232), Or <34
(发现碰撞)
-
SHA-1 160 160
(5 × 32)
512 264 − 1 80 <63[5]
(发现碰撞[6]
192
SHA-2 SHA-224
SHA-256
224
256
256
(8 × 32)
512 264 − 1 64 And, Xor, Rot, Add (mod 232), Or, Shr 112
128
139
SHA-384
SHA-512
SHA-512/224
SHA-512/256
384
512
224
256
512
(8 × 64)
1024 2128 − 1 80 And, Xor, Rot, Add (mod 264), Or, Shr 192
256
112
128
154
SHA-3 SHA3-224
SHA3-256
SHA3-384
SHA3-512
224
256
384
512
1600
(5 × 5 × 64)
1152
1088
832
576
无限[7] 24[8] And, Xor, Rot, Not 112
128
192
256
-
SHAKE128
SHAKE256
d (arbitrary)
d (arbitrary)
1344
1088
min(d/2, 128)
min(d/2, 256)
-

SHAd

此章节尚无参考来源,内容或许无法查证。 (2016年12月15日)

SHAd函数是一个简单的相同SHA函数的重述:

SHAd-256(m)=SHA-256(SHA-256(m))。它会克服有关延伸长度攻击的问题。

参考文献

引用

  1. ^ SHAttered. shattered.it. [2017-02-24]. (原始内容存档于2017-02-23) (英语). 
  2. ^ Crypto++ 5.6.0 Benchmarks. [2013-06-13]. (原始内容存档于2016-10-14). 
  3. ^ Found on an AMD Opteron 8354 2.2 GHz processor running 64-bit Linux[2]
  4. ^ The MD5 Message-Digest Algorithm. [2016-04-18]. (原始内容存档于2017-04-26). 
  5. ^ The SHAppening: freestart collisions for SHA-1. [2015-11-05]. (原始内容存档于2017-04-19). 
  6. ^ Announcing the first SHA1 collision. 2017-02-23 [2017-02-23]. (原始内容存档于2017-04-24). 
  7. ^ The Sponge Functions Corner. [2016-01-27]. (原始内容存档于2012-09-04). 
  8. ^ The Keccak sponge function family. [2016-01-27]. (原始内容存档于2016-08-06). 

来源

  • Eli Biham, Rafi Chen, Near-Collisions of SHA-0, Cryptology ePrint Archive, Report 2004/146, 2004 (to appear CRYPTO 2004) [1]页面存档备份,存于互联网档案馆
  • Florent Chabaud, Antoine Joux: Differential Collisions in SHA-0. CRYPTO 1998. pp. 56–71.
  • Henri Gilbert, Helena Handschuh: Security Analysis of SHA-256 and Sisters. Selected Areas in Cryptography 2003: pp. 175–193.

外部链接

参见

{{bottomLinkPreText}} {{bottomLinkText}}
SHA家族
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?