in reply to Digest::MD5::md5_hex giving different values on different machines

Differing files may give the same md5, just to complicate things... http://www.cits.rub.de/MD5Collisions/
  • Comment on Re: Digest::MD5::md5_hex giving different values on different machines

Replies are listed 'Best First'.
Re^2: Digest::MD5::md5_hex giving different values on different machines
by ctilmes (Vicar) on Jun 21, 2007 at 11:31 UTC
    Differing files may give the same md5.

    For any hash function, there will be collisions, infinite collisions in fact. (Informal proof: Once you've hashed as many distinct files as you have total hash values, if you hash yet another distinct file, you must have a collision somewhere.)

    The key here is a Cryptographic Hash Function.

    Are you trying to detect accidental differences or malicious ones?

    MD5 is very good at detecting the former with high confidence. Given the published research, it isn't as good for the later.