I was wondering if someone could help explain md5 collision abit better. I found this resource: https://www.mscs.dal.ca/~selinger/md5collision/ where they provided an example of where two cipher texts have the same md5. I tried to confirm that their example was correct but when I input their examples into a md5 calculator, I get two different md5s for the two different cipher text. What am I doing wrong?

  • 1
    $\begingroup$ Those aren't cipher texts or ciphers, and MD5 is not a cipher. MD5 is a cryptographic hash, also called a digest (algorithm). The data on that page is in hexadecimal aka hex, as is much cryptographic and other computer-related data displayed for humans; is whatever md5 calculator you are using (there are millions of different ones) set up for hex input? $\endgroup$ Jun 28, 2021 at 0:20
  • 1
    $\begingroup$ My result is the same, i.e. 79054025255fb1a26e4bc422aef54eb4, for the both two different inputs. I suggest you to use some HEX tools, such as WinHex, to generate the two files, not note, or noetpad. $\endgroup$
    – ming alex
    Jun 28, 2021 at 0:32

1 Answer 1


you have to convert them to bytes before you use them. I use python to find md5 hash. x='d131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf280373c5bd8823e3156348f5bae6dacd436c919c6dd53e2b487da03fd02396306d248cda0e99f33420f577ee8ce54b67080a80d1ec69821bcb6a8839396f9652b6ff72a70'






same way taking y has another string and converting it to bytes first.

c2= bytes.fromhex(y)


v=hashlib.md5(c2) bas.hexlify(v.digest())


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.