Secure digest functions
A message digest (or hash) function is a cryptographic primitive used for digital signatures and password protection. It maps a message of arbitrary length to a fixed-length hash value or “message digest”. The same input (message) will always result in the same output.
Note that the terms hash function, hash algorithm, and a message-digest algorithm can be used interchangeably. Similarly, the terms message digest, hash value, and digest value mean the same thing.
A cryptographic hash function should be one-way and collision-resistant.
“One-way” means that it’s easy to compute the digest output from the message input, but it’s effectively impossible to go backward and find the input given the digest. More formally, it means that, given an n-bit hash value, it should require work equivalent to about 2n hash computations to find any message that hashes to that value.
MD5
The MD5 algorithm is a hashing algorithm that was developed by Ron Rivest.
Used in a variety of Internet applications today.
A one-way function that makes it easy to compute a hash from the given input data, but makes it unfeasible to compute input data given only a hash value.
SHA-1
U.S. National Institute of Standards and Technology (NIST) developed SHA, the algorithm specified in the Secure Hash Standard (SHS).
SHA-1, published in 1994, corrected an unpublished flaw in SHA.
SHA design is very similar to the MD4 and MD5 hash functions that Ron Rivest developed.
SHA-1 algorithm takes a message of fewer than 2⁶⁴ bits in length and produces a 160-bit message digest. Slightly slower than MD5, but the larger message digest makes it more secure against brute-force collision and inversion attacks. NIST published four additional hash functions in the SHA family, each with longer digests:
- SHA-224 (224 bit)
- SHA-256 (256 bit)
- SHA-384 (384 bit)
- SHA-512 (512 bit)
MD5 Versus SHA-1
Thank you.