Suppose you have access to an oracle implementation that you think is the correct output.
The most obvious way to do this seems to be to run a set of known plaintext / hash combinations through an implementation and see if they come out as expected. An arbitrary number of these cases can be constructed by generating random plaintexts (using static seed to keep it deterministic) and using the oracle to find their hashes.
The main problem that I see in this is that it does not guarantee the entry of possible angular cases. Creating more cases will reduce the likelihood of no corner cases, but how many cases are enough?
There is also the problem of specifying the lengths of these random plaintexts, since MD5 accepts a string of arbitrary length as input. For my purposes, I donโt need long inputs (let's say something longer than 16 bytes), so you can use the fact that this is an implementation of the โspecial purposeโ MD5 in your answer, if it simplifies or you can just answer the general case, if he cares.
source share