# Two Different Ciphers with Same MD5

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?

• 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? Jun 28, 2021 at 0:20
• 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. Jun 28, 2021 at 0:32

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

 c=bytes.fromhex(x)


n=hashlib.md5(c)

bas.hexlify(n.digest())


b'79054025255fb1a26e4bc422aef54eb4'

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

c2= bytes.fromhex(y)

b'\xd11\xdd\x02\xc5\xe6\xee\xc4i=\x9a\x06\x98\xaf\xf9\\/\xca\xb5\x07\x12F~\xab@\x04X>\xb8\xfb\x7f\x89U\xad4\x06\t\xf4\xb3\x02\x83\xe4\x88\x83%\xf1AZ\x08Q%\xe8\xf7\xcd\xc9\x9f\xd9\x1d\xbdr\x807<[\xd8\x82>1V4\x8f[\xaem\xac\xd46\xc9\x19\xc6\xddS\xe24\x87\xda\x03\xfd\x029c\x06\xd2H\xcd\xa0\xe9\x9f3B\x0fW~\xe8\xceT\xb6p\x80(\r\x1e\xc6\x98!\xbc\xb6\xa8\x83\x93\x96\xf9e\xabo\xf7*p'


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

b'79054025255fb1a26e4bc422aef54eb4'