Script to do instant MD5 collisions of any pair of PDFs
github.com
github.com
Commit: https://github.com/corkami/pocs/commit/3832f62d8aad64d541c5d...
Readme: https://github.com/corkami/pocs/blob/master/collisions/READM... ("With this script, it takes less than a second to collide the 2 public PDF papers")
And colliding SHA-1 in pdf form in 2017: https://news.ycombinator.com/item?id=13723892
Not saying you didn't, but I'm unable to find any earlier reference to making 2 arbitrary, existing pdf files collide with MD5.
But once you can do that, this isn't new. Assuming you can append garbage on a PDF, it's the same solution.
Admittedly I know how easy it is to say, "That's obvious!" in hindsight, but... isn't it?!
He explains the method here: https://github.com/corkami/pocs/blob/master/collisions/READM...
For MD5 we have what's called a chosen prefix collision. Given a start of a file, you can get back two "next bits" of the file which are similar but slightly different, and both those files (the chosen prefix plus A or chosen prefix plus B) have the same MD5.
Then because this is an MD family hash you can add any fixed suffix whatsoever to both and still get the same MD5.
So you put A and B inside a part of the file that isn't visible but can influence a conditional test elsewhere. Then you use the conditional test to flow the two different outputs, all the rest of the file is the same.
Some day this will definitely be possible with SHA1 and almost certainly (though it could be decades away) SHA256 too.
SHA3 is different, despite the name, we might perhaps never find any way to collide it, and if we do it's not MD it's a sponge design, so you can't just add a suffix or the output diverges again.