Links

Ben Laurie blathering


MD5 Collisions, Visualised

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.

4 Comments

  1. [...] http://www.links.org/?p=6 [...]

    Pingback by CryptoWatch » Blog Archive » MD5 Collision Visualized by Ben Laurie — 8 Apr 2007 @ 5:56

  2. [...] But how can you be sure that you have the right message, and not a freak hash collision? [...]

    Pingback by Haje’s Brain — GLH compression — 4 Sep 2008 @ 21:18

  3. To #2, because they have done the same with a program:

    http://www.mscs.dal.ca/~selinger/md5collision/

    Comment by Reply — 4 Dec 2008 @ 20:28

  4. [...] Visualization of an MD5 collision [...]

    Pingback by Strong Hashing - Nates Stuff — 16 Jan 2010 @ 0:30

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress