It is my Birthday¶
I sent out 2 invitations to all of my friends for my birthday! I'll know if they get stolen because the two invites look similar, and they even have the same md5 hash, but they are slightly different! You wouldn't believe how long it took me to find a collision. Anyway, see if you're invited by submitting 2 PDFs to my website.
- On submitting the same PDFs with same/different names, we get "Files are not different!"
- On submitting two different random pdfs, we get "MD5 hashes do not match!"
- We need to submit two different pdfs, MD5 hash of whose binary data is the same
Searching for MD5 collisions led to this
echo -n "TEXTCOLLBYfGiJUETHQ4hEcKSMd5zYpgqf1YRDhkmxHkhPWptrkoyz28wnI9V0aHeAuaKnak" > 1.pdf
echo -n "TEXTCOLLBYfGiJUETHQ4hAcKSMd5zYpgqf1YRDhkmxHkhPWptrkoyz28wnI9V0aHeAuaKnak" > 2.pdf
-n
is important, otherwise a newline is added by echo
which interferes with the hash
Uploading these two pdfs works!