# What are Hash values? Important Hash value Algorithms MD5, SHA-1 and SHA-2

A Hash Value (also called as Hashes or Checksum) is a string value (of specific length), which is the result of calculation of a Hashing Algorithm. Hash Values have different uses. One of the main uses of Hash Values is to determine the Integrity of any Data (which can be a file, folder, email, attachments, downloads etc).

If you want to see how a Hash Value look like, visit next lesson How Hash Values can be used to determine Integrity of Data

The most wonderful character of Hash Values is that they are highly unique. No two data can theoretically have same Hash Value.

There is a condition called as Collision in Hashing. Collision is a situation when two different Data have the same Hash Value. Best hashing algorithm is the one which cannot cause Hash Value Collision.

Important Hashing Algorithms are listed below.

MD5 (Message Digest, defined by RFC 1321) - MD5 Hashing Algorithm was invented by RSA Labs (Ronald Rivest) in 1991. MD5 was invented to replace its previous version, MD4. When Data is fed to MD5 Hashing Algorithm, it generates a 128-bit Hash Value String as a 32 digit hexadecimal number. Hash Value Collisions are reported for MD5 Hashing Algorithm.

SHA-1 (Secure Hash Algorithm 1, defined by RFC 3174): SHA-1 Hashing Algorithm was invented by United States National Security Agency in 1995. When data is fed to SHA-1 Hashing Algorithm, it generates a 160-bit Hash Value String as a 40 digit hexadecimal number.

SHA-2 (Secure Hash Algorithm 2): SHA-2 Hashing Algorithm was designed through The National Institute of Standards and Technology (NIST) and the National Security Agency (NSA) in 2001. SHA-2 is a family of two Hash Algorithms with different block sizes. One of it is called as SHA-256 and other is called as SHA-512. Main difference between SHA-256 and SHA-512 is that SHA-256 uses 32-bit words where SHA-512 uses 64-bit words. There are six types of SHA-2 Hashing Algorithms. They are SHA-256, SHA-512, SHA-224 (224-bit truncation of SHA-256), SHA-512/224, SHA-512/256 and SHA-384 (224-bit, 256-bit 284-bit truncations of SHA-512). SHA-2 has much higher level of security than its predecessor SHA-1. SHA-2 family Hashing Algorithms will replace SHA-1 in near future.