MD5

 

  • Introduction

                 The MD5 message-digest algorithm is the most widely used hash algorithm developed by Ron Rivest in 1991. It is the 5th version of the Message-Digest algorithm and produces 128-bit messages. MD5 is quite fast than other versions of the message digest algorithm which takes the plain text of 512-bit blocks which is divided into 16 blocks, each of 32 bit and produces the 128-bit message digest which is a set of four-block, each of 32 bit. MD5 produces the message digest through five steps,  padding, append length, divide input into 512-bit blocks, initialize chaining variables a process blocks and 4 rounds, uses different constant it in each iteration.

  According to Ronald Rivest's  definition of MD5,          

"The algorithm takes as input a message of arbitrary length and produces as output a 128-bit 'fingerprint' or 'message digest' of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest or to produce any message having a given pre-specified target message digest. The MD5 algorithm is intended for digital signature applications, where a large file must be 'compressed' in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA."

  • Use Of MD5?


                       Md5 have been used to provide some assurance that the transferred file has arrived intact.MD5 takes any size of the input and produce an output if a 128-bit hash value.MD5 need to meet two requirements to consider that cryptographically secure.
  • Cannot generate two inputs that cannot produce the same hash function.
  • Cannot generate a message having the same hash function.
                                      


MD5 is used in,
--Most Unix based operating systems include MD5 sum utilities in their distribution packages.
--Windows users may install a Microsoft utility or third party applications.
--Android ROMs also utilize this type of checksum.
 

  • How it Works?



Step 01 - Append padding bits

  •  Adding extra bits to the original message called padding. In MD5 original message is padded such that its length in bits is congruent to 448 modulo 512. Padding is done such that the total bits are 64 less being a multiple of 512 bits length.
  • If the length of the original message is already congruent to 448 modulo 512, then padding is done. In the padding bits, the only first bit is 1 and all others are 0.

Step 02 - Append length

After the padding,64 bits are inserted at the end which is used to record the length of the original input. Modulo 2^64. At this point, the resulting message has a length multiple of 512 bits.

Step 03 - Initialized MD buffer

It is used four-word buffer (A, B, C, D) to compute the values for the message digest. A, B, C, D are 32-bit registers and initialized in the following way,





Step 04 - Processing message in 16-word block

The MD5 algorithm uses an auxiliary function that takes input as three 32-bit numbers and produces a 32-bit output. This auxiliary function uses logic operators for implementation. The content of four buffers are mixed with the input using this auxiliary buffer and 16 rounds are performed using 16 basic operations.



  • Advantages
  • Speed-Fastest cryptographic hash functions.
  • Convenience -as nearly every platform has built-in MD5 has function.
  • Easier to compare and store.
  • It is easy to generate a message digest of the original message using this algorithm. 
  • Disadvantages
  • MD5 is also significantly slower than CRC.
  • Lack of Security - MD5 can be broken relatively easily and is no longer suitable for use in secure system. Use MD5 only as a checksum hash, like CRC.

Comments

Popular Posts