Secure digest functions

Yasiru Kavishka
2 min readJul 29, 2020

A secure digest function is also called as secure hash function and it is a mathematical function that converts an input into a fixed length output and that output is called a hash. Hashes are also called as message digests and digital fingerprints. This hashing process is based on a one-way mathematical function that is relatively easy to compute, but significantly harder to reverse.

Mathematical representation of hash function

H (x) = h

H = Hash Function

x = input

h = output(hash)

So, let’s talk about some of example algorithms that developed based on hashing algorithms.

1. MD-5 (Message Digest 5 Algorithm)

Message Digest algorithm 5 or MD-5 is one of the widely used hash functions and was created by Rivest. MD-5 can be considered as the 5th member of MD-x family of hash function algorithms and it was published in April 1992. MD-5 algorithm processes data in 512-bit blocks, broken down into 16 words composed of 32 bits each. The output of this process is a 128-bit message digest value (hash value). The hash value computation is done in separate stages that process each 512-bit block of data along with the value computed in the preceding stage. The first stage uses the message digest values initialized using consecutive hexadecimal numerical values. The final value from the last block is the MD-5 digest for that block.

2. SHA-1 (Secure Hash Algorithm 1)

U.S. National Institute of Standards and Technology (NIST) developed SHA and the algorithm specified in the Secure Hash Standard (SHS). SHA-1 published in 1994 and it is correction of unpublished flaw in SHA. SHA design is very similar to the MD-4 and MD-5 hash functions that Ron Rivest developed. But it uses a 160-bit hash value and is therefore much stronger than MD-5 although it consumes time for computation process.

--

--

Yasiru Kavishka

Software Engineering Undergraduate at University of Kelaniya