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

Re: SHA1 hash safety

From
Theodore Ts'o <tytso@mit.edu>
Date
Apr 18, 2005, 00:09 UTC
Message-ID
<20050418000946.GA7172@thunk.org>
In-Reply-To
<4261E84D.6040208@dwheeler.com>
On Sun, Apr 17, 2005 at 12:38:37AM -0400, David A. Wheeler wrote:
Show 12 quoted lines
> The probability of an accidental overlap for SHA-1 for two
> different files is absurdly remote; it's just not worth worrying about.
> 
> However, the possibility of an INTENTIONAL overlap is a completely
> different matter.  I think the hash algorithm should change in the
> future; I have a proposal below.
> 
> Someone has ALREADY broken into a server to modify the Linux kernel
> code already, so the idea of an attack on kernel code
> is not an idle fantasy. MD5 is dead, and SHA-1's work factor has
> already been sufficiently broken that people have already been told
> "walk to the exits" (i.e., DO NOT USE SHA-1 for new programs like git).
We're very clearly going to need a FAQ for git.

SHA-1's work factor has been decreased to 2**69 from 2**80 for generating two messages that have the same hash value, WHERE THE HASH VALUE AND THE MESSAGES ARE NOT UNDER THE ATTACKER'S CONTROL. This is not the same as a pre-image attack, where given a message M1 which hashes to value H, the attacker can find another message M2 which also hashes to value H. In even if the attacker can do this, the result has to have valid git metadata format, and also be valid C code.

So the the recent result which has weakened (but not broken) SHA-1's use in digital signatures, and which has resulted in the advice to "walk not run" for the exits, do not apply to git.

Can we guarantee that there won't be further innovations that may break SHA-1? Of course not. But an attacker who wants to introduced a trojan into the Linux kernel would have a much easier time doing a "black bag job" --- i.e., breaking into Linus's house in Portland, and then inserting a buggered patch into his master source tree.

If you're going to be a professional paranoid, it's best to worry about the realistic attacks before stressing out over the unrealistic ones.

						- Ted
Previous: David A. WheelerNext: ross@lug.udel.edu
Message 12 of 30 in “SHA1 hash safety”
  1. David LangApr 16, 2005
  2. Ingo MolnarApr 16, 2005
  3. David LangApr 16, 2005
  4. Brian O'MahoneyApr 16, 2005
  5. C. Scott AnanianApr 16, 2005
  6. Petr BaudisApr 16, 2005
  7. C. Scott AnanianApr 16, 2005
  8. David LangApr 16, 2005
  9. Paul JacksonApr 16, 2005
  10. Martin MaresApr 16, 2005
  11. David A. WheelerApr 17, 2005
  12. Theodore Ts'oApr 18, 2005
  13. ross@lug.udel.eduApr 16, 2005
  14. Horst von BrandApr 17, 2005
  15. Brian O'MahoneyApr 18, 2005
  16. C. Scott AnanianApr 18, 2005
  17. Paul JacksonApr 16, 2005
  18. Brian O'MahoneyApr 16, 2005
  19. Andy IsaacsonApr 18, 2005
  20. C. Scott AnanianApr 18, 2005
  21. David MeybohmApr 19, 2005
  22. C. Scott AnanianApr 19, 2005
  23. David MeybohmApr 20, 2005
  24. David LangApr 16, 2005
  25. Paul JacksonApr 16, 2005
  26. David LangApr 16, 2005
  27. TkilApr 17, 2005
  28. Paul JacksonApr 17, 2005
  29. TkilApr 17, 2005
  30. Paul JacksonApr 17, 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.