Doubt in MD5 hash algorithm

silverscorpion

silverscorpion

@silverscorpion-iJKtdQ Oct 25, 2024
Hi guys,
A question regarding MD5 hash algorithm.

The MD5 algo accepts an input block of any arbitrary length and outputs an output of 128 bits.

Since the output is 128 bits, only 2^128 different outputs are possible using md5.

But the number of possible input sequences are far greater than 2^128.

So, md5 is definitely a many to one function.

If that's the case, why is it so difficult to find any two bit sequences whose hash values are the same?

Given the hash value, is it definitely not possible to find some sequence which will have the same hash value as is given?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • dipen30

    dipen30

    @dipen30-hGOPpa Mar 23, 2010

    in MD5 there are basically 5 steps to get message digest.

    1.padding.
    2.Append length.
    3.divide the input into 512-blocks.
    4.Initialize chaining variables.
    5.process block.

    we can get the same message digest upto step 4 but after step 5 we cannot get the two message digest same.
  • silverscorpion

    silverscorpion

    @silverscorpion-iJKtdQ Mar 23, 2010

    Why not?

    My basic question is, the total number of input strings possible is unlimited.
    But we only have 2^128 output strings.
    So, how is it a one way function?
  • silverscorpion

    silverscorpion

    @silverscorpion-iJKtdQ Mar 23, 2010

    Why not?

    My basic question is, the total number of input strings possible is unlimited.
    But we only have 2^128 output strings.
    So, how is it a one way function?
  • silverscorpion

    silverscorpion

    @silverscorpion-iJKtdQ Mar 23, 2010

    Why not?

    My basic question is, the total number of input strings possible is unlimited.
    But we only have 2^128 output strings.
    So, how is it a one way function?
  • silverscorpion

    silverscorpion

    @silverscorpion-iJKtdQ Mar 23, 2010

    oops!!!

    Dunno what happened!! It got posted 3 times! Sorry!!
  • dipen30

    dipen30

    @dipen30-hGOPpa Mar 23, 2010

    I don't know this ans. if anyone know then please give the ans.