<P> The corresponding standards are FIPS PUB 180 (original SHA), FIPS PUB 180 - 1 (SHA - 1), FIPS PUB 180 - 2 (SHA - 1, SHA - 256, SHA - 384, and SHA - 512). NIST has updated Draft FIPS Publication 202, SHA - 3 Standard separate from the Secure Hash Standard (SHS). </P> <P> In the table below, internal state means the "internal hash sum" after each compression of a data block . </P> <Ul> <Li> view </Li> <Li> talk </Li> <Li> </Li> </Ul> <Table> Comparison of SHA functions <Tr> <Th_colspan="2"> Algorithm and variant </Th> <Th> Output size (bits) </Th> <Th> Internal state size (bits) </Th> <Th> Block size (bits) </Th> <Th> Max message size (bits) </Th> <Th> Rounds </Th> <Th> Operations </Th> <Th> Security bits (Info) </Th> <Th> Capacity against length extension attacks </Th> <Th_colspan="2"> Performance on Skylake (median cpb) </Th> <Th> First Published </Th> </Tr> <Tr> <Th> long messages </Th> <Th> 8 bytes </Th> </Tr> <Tr> <Td_colspan="2"> MD5 (as reference) </Td> <Td> 128 </Td> <Td> 128 (4 × 32) </Td> <Td> 512 </Td> <Td> Unlimited </Td> <Td> 64 </Td> <Td> And, Xor, Rot, Add (mod 2), Or </Td> <Td> <64 (collisions found) </Td> <Td> 0 </Td> <Td> 4.99 </Td> <Td> 55.00 </Td> <Td> </Td> </Tr> <Tr> <Td_colspan="2"> SHA - 0 </Td> <Td> 160 </Td> <Td> 160 (5 × 32) </Td> <Td> 512 </Td> <Td> 2 − 1 </Td> <Td> 80 </Td> <Td> And, Xor, Rot, Add (mod 2), Or </Td> <Td> <34 (collisions found) </Td> <Td> 0 </Td> <Td> ≈ SHA - 1 </Td> <Td> ≈ SHA - 1 </Td> <Td> </Td> </Tr> <Tr> <Td_colspan="2"> SHA - 1 </Td> <Td> <63 (collisions found) </Td> <Td> 3.47 </Td> <Td> 52.00 </Td> <Td> 1995 </Td> </Tr> <Tr> <Td> SHA - 2 </Td> <Td> SHA - 224 SHA - 256 </Td> <Td> 224 256 </Td> <Td> 256 (8 × 32) </Td> <Td> 512 </Td> <Td> 2 − 1 </Td> <Td> 64 </Td> <Td> And, Xor, Rot, Add (mod 2), Or, Shr </Td> <Td> 112 128 </Td> <Td> 32 0 </Td> <Td> 7.62 7.63 </Td> <Td> 84.50 85.25 </Td> <Td> </Td> </Tr> <Tr> <Td> SHA - 384 SHA - 512 </Td> <Td> 384 512 </Td> <Td> 512 (8 × 64) </Td> <Td> 1024 </Td> <Td> 2 − 1 </Td> <Td> 80 </Td> <Td> And, Xor, Rot, Add (mod 2), Or, Shr </Td> <Td> 192 256 </Td> <Td> 128 (≤ 384) 0 </Td> <Td> 5.12 5.06 </Td> <Td> 135.75 135.50 </Td> </Tr> <Tr> <Td> SHA - 512 / 224 SHA - 512 / 256 </Td> <Td> 224 256 </Td> <Td> 112 128 </Td> <Td> 288 256 </Td> <Td> ≈ SHA - 384 </Td> <Td> ≈ SHA - 384 </Td> </Tr> <Tr> <Td> SHA - 3 </Td> <Td> SHA3 - 224 SHA3 - 256 SHA3 - 384 SHA3 - 512 </Td> <Td> 224 256 384 512 </Td> <Td> 1600 (5 × 5 × 64) </Td> <Td> 1152 1088 832 576 </Td> <Td> Unlimited </Td> <Td> 24 </Td> <Td> And, Xor, Rot, Not </Td> <Td> 112 128 192 256 </Td> <Td> 448 512 768 1024 </Td> <Td> 8.12 8.59 11.06 15.88 </Td> <Td> 154.25 155.50 164.00 164.00 </Td> <Td> 2015 </Td> </Tr> <Tr> <Td> SHAKE128 SHAKE256 </Td> <Td> d (arbitrary) d (arbitrary) </Td> <Td> 1344 1088 </Td> <Td> min (d / 2, 128) min (d / 2, 256) </Td> <Td> 256 512 </Td> <Td> 7.08 8.59 </Td> <Td> 155.25 155.50 </Td> </Tr> </Table>

Why the hash algorithm sha256 is more secure than md5 and sha1