git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [zooko@zooko.com: [Revctrl] colliding md5 hashes of human-meaningful documents]

From
MWMorten Welinder <mwelinder@gmail.com>
Date
Jun 12, 2005, 13:14 UTC
Message-ID
<118833cc050612061452f0eb3e@mail.gmail.com>
In-Reply-To
<20050612082555.GB6620@pasky.ji.cz>
I looked at this.

If you can find just *one* colliding pair that does not contain a few select bytes like 0x22 (quote), 0x5c (backslash) and perhaps 0x0a then it is trivial to make a colliding pair of C programs.

Call the initial pair (A,B) and make the programs
/* Common prefix that happens to have integer block size
   ending just before the A below. */
const char junk[] = "AB";
/* "AA" in program 1, "AB" in program 2.  */
...
int
main ()
{
  int hsize = sizeof (junk) / 2;
  if (memcmp (junk, junk + hsize, hsize))
    return do_program_2 ();
  else
    return do_program_1 ();
}
Previous: Petr BaudisNext: Martin Uecker
Message 2 of 5 in “[zooko@zooko.com: [Revctrl] colliding md5 hashes of human-meaningful documents]”
  1. Petr BaudisJun 12, 2005
  2. Morten WelinderJun 12, 2005
  3. Martin UeckerJun 12, 2005
  4. Linus TorvaldsJun 12, 2005
  5. Daniel BarkalowJun 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.