2 ms·
This isn't fair to the OP. > > That is, take some data and manipulate it until it has the same MD5 as a different piece of data. > Second sentence is false -
by cipherboy 4y ago
This isn't fair to the OP.
> > That is, take some data and manipulate it until it has the same MD5 as a different piece of data.
> Second sentence is false - that's called a preimage attack.
It's actually rather poorly specified description of either, tbh. I don't think this is a charitable read of the sentence.
Formally, a second preimage game has one party (the adversary to your algorithm) generate some data and and a second party (your algorithm) generate some other different data, with a hash that matches that of the unmodified data chosen by the first party.
A collision attack lets your algorithm choose both pieces of data, and the adversary simply verifies the hashes match.
Most collision attacks, going back to Wang's original attack on md5, generate a random string and manipulate it until certain preconditions hold and hope that its pair's hash matches, and otherwise try again until one matches. (Where pair is defined as some inversion under the constraint system -- usually the same block with certain bits flipped).
But that description sounds awfully like the original vague description. :-)
Edit to add: the OP is misinformed about preimage attacks being easy, outside of specific scenarios like rainbow tables and the like. For the general case of arbitrary hashes it is hard.