Template:Comparison of SHA functions
class="wikitable" style="margin-top: 0px; width:100%; text-align:center;"
|+ Comparison of SHA functions {{Navbar|Comparison of SHA functions|plain=1|style=float:right}} | |||||||||||
style="vertical-align:bottom;"
! colspan="2" rowspan="2" | Algorithm and variant ! rowspan="2" | Output size ! rowspan="2" | Internal ! rowspan="2" | Block size ! rowspan="2" | Rounds ! rowspan="2" | Operations ! rowspan="2" | Security against collision attacks ! rowspan="2" | Security against length extension attacks ! colspan="2" | Performance on Skylake (median cpb){{cite web |url=http://bench.cr.yp.to/results-hash.html#amd64-skylake |title=Measurements table|website=bench.cr.yp.to}} ! rowspan="2" | First published | |||||||||||
style="vertical-align:bottom;"
! Long messages ! 8 bytes | |||||||||||
style="vertical-align:top;"
| colspan="2" | MD5 (as reference) | 128 | 128 {{nowrap|(4 × 32)}} | 512 | 4 {{nowrap |(16 operations}} in each round) | And, Xor, Or, Rot, {{nowrap|Add (mod 232)}} | {{Bad|≤ 18 (collisions found){{Cite tech report|first1=Xie|last1=Tao|first2=Fanbao|last2=Liu|first3=Dengguo|last3=Feng|year=2013|title=Fast Collision Attack on MD5|work=Cryptology ePrint Archive|publisher=IACR|url=https://eprint.iacr.org/2013/170.pdf}}}} | {{Bad|0}} | 4.99 | 55.00 | 1992 | |
style="vertical-align:top;"
| colspan="2" | {{nowrap|SHA-0}} | rowspan="2" | 160 | rowspan="2" | 160 {{nowrap|(5 × 32)}} | rowspan="2" | 512 | rowspan="2" | 80 | rowspan="2" | And, Xor, Or, Rot, {{nowrap|Add (mod 232)}} | {{Bad|< 34 (collisions found)}} | rowspan="2" {{Bad|0}} | ≈ SHA-1 | ≈ SHA-1 | 1993 | |
style="vertical-align:top;"
| colspan="2" | {{nowrap|SHA-1}} | {{Bad|< 63 (collisions found){{Cite tech report|last1=Stevens|first1=Marc|author-link1=Marc Stevens (cryptology)|last2=Bursztein|first2=Elie|author-link2=Elie Bursztein|last3=Karpman|first3=Pierre|last4=Albertini|first4=Ange|last5=Markov|first5=Yarik|title=The first collision for full SHA-1|publisher=Google Research|url=https://shattered.io/static/shattered.pdf}}
| 3.47 | 52.00 | 1995 | |||||||
style="vertical-align:top;"
| rowspan="4" | {{nowrap|SHA-2}} | SHA-224 SHA-256 | 224 256 | 256 {{nowrap|(8 × 32)}} | 512 | 64 | And, Xor, Or, Rot, Shr, {{nowrap|Add (mod 232)}} | {{Good|112 128}} | {{Bad|32 0}} | 7.62 7.63 | 84.50 85.25 | 2004 2001 |
style="vertical-align:top;"
| SHA-384 | 384 | rowspan="3" | 512 {{nowrap|(8 × 64)}} | rowspan="3" | 1024 | rowspan="3" | 80 | rowspan="3" | And, Xor, Or, Rot, Shr, {{nowrap|Add (mod 264)}} | {{Good|192}} | {{Good|{{nowrap|128}}}} | 5.12 | 135.75 | 2001 | |
style="vertical-align:top;"
| SHA-512 | 512 | {{Good|256}} | {{Bad|0Without truncation, the full internal state of the hash function is known, regardless of collision resistance. If the output is truncated, the removed part of the state must be searched for and found before the hash function can be resumed, allowing the attack to proceed.}} | 5.06 | 135.50 | 2001 | |||||
style="vertical-align:top;"
| {{nowrap|SHA-512/224}} | 224 256 | {{Good|112 128}} | {{Good|288 256}} | {{nowrap|≈ SHA-384}} | {{nowrap|≈ SHA-384}} | 2012 | |||||
style="vertical-align:top;"
| rowspan="2" | {{nowrap|SHA-3}} | SHA3-224 SHA3-256 SHA3-384 SHA3-512 | 224 256 384 512 | rowspan="2" | 1600 {{nowrap|(5 × 5 × 64)}} | 1152 1088 832 576 | rowspan="2" | {{nowrap|24}}{{cite web|url=http://keccak.noekeon.org/specs_summary.html |title=The Keccak sponge function family |access-date=2016-01-27}} | rowspan="2" | And, Xor, Rot, Not | {{Good|112 128 192 256}} | {{Good|448 512 768 1024}} | 8.12 8.59 11.06 15.88 | 154.25 155.50 164.00 164.00 | rowspan="2" | 2015 |
style="vertical-align:top;"
| SHAKE128 | {{nowrap|d (arbitrary)}} {{nowrap|d (arbitrary)}} | 1344 1088 | {{Good|min(d/2, 128) {{nowrap|min(d/2, 256)}}}} | {{Good|{{nowrap|256 512}}}} | 7.08 8.59 | 155.25 155.50 |
{{Template reference list}}
{{documentation
|content=
{{no documentation}}
Category:Computer security templates
}}