Comparison of Hash Methods

A cryptographic hash function is a hash function that takes an arbitrary block of data and returns a fixed-size bit string, the cryptographic hash value, such that any (accidental or intentional) change to the data will (with very high probability) change the hash value. The data to be encoded are often called the message, and the hash value is sometimes called the message digest or simply digest.

 

Hash Algorithm

 

Output

Size

(bits)

Internal

State

(bits)

Block Size

(bits)

Rounds

Security

SHA1

128

 

128

512

80

  • More secure than MD5.
  • According to Wikipedia article:
    Cryptographic weaknesses were discovered in SHA-1, and the standard was no longer approved for most cryptographic uses after 2010..

 

SHA256

 

256

256

512

64

  • More secure than SHA1.
  • Takes somewhat longer to produce.

 

SHA384

 

384

512

1024

64

  • More secure than SHA256.
  • Takes somewhat longer to produce.

 

SHA512

 

512

512

1024

64

  • More secure than SHA384.
  • Takes somewhat longer to produce.

 

SHA224

 

224

256

512

64

  • Somewhat faster than SHA256

 

MD5

 

128

128

512

64

  • Security is described in Wikipedia as “severely compromised”.

 

MD2

 

128

-

128

18

  • Optimized for 8-bit computers.
  • Should be avoided, if possible.
  • No longer considered secure.

 

RIPEMD160

 

160

 

 

 

  • Similar in performance to SHA1
  • Less used than SHA1
  • Output size less than SHA256.

 

 

NOTE: SHA (Secure Hash Algorithm) variations listed above were designed by the NSA.