As we all know, the two blocks



d131dd02c5e6eec4693d9a0698aff95c

2fcab58712467eab4004583eb8fb7f89

55ad340609f4b30283e488832571415a

085125e8f7cdc99fd91dbdf280373c5b

d8823e3156348f5bae6dacd436c919c6

dd53e2b487da03fd02396306d248cda0

e99f33420f577ee8ce54b67080a80d1e

c69821bcb6a8839396f9652b6ff72a70



and



d131dd02c5e6eec4693d9a0698aff95c

2fcab50712467eab4004583eb8fb7f89

55ad340609f4b30283e4888325f1415a

085125e8f7cdc99fd91dbd7280373c5b

d8823e3156348f5bae6dacd436c919c6

dd53e23487da03fd02396306d248cda0

e99f33420f577ee8ce54b67080280d1e

c69821bcb6a8839396f965ab6ff72a70



produce an MD5 collision. I thought it would be interesting to visualise MD5’s internal state for these two blocks.

The bits go horizontally, and the rounds vertically. A white square is zero for both blocks, black is one for both blocks, red is one for the first and zero for the second and green is zero for the first and one for the second.

The first block of bits, to the left, is the input used in that round (32 bits per round). The remainder are A, B, C and D, the internal state (32 bits each). There is a horizontal break at the end of each input block.

By contrast, here’s what it looks like if the second block is the same as the first but with the MSB flipped in the first byte.