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

Re: [RFC] adding support for md5

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 18, 2006, 10:21 UTC
Message-ID
<Pine.LNX.4.63.0608181209210.28360@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<Pine.LNX.4.63.0608172259280.25827@chino.corp.google.com>
Hi,
On Thu, 17 Aug 2006, David Rientjes wrote:
> I'd like to solicit some comments about implementing support for md5 as a 
> hash function that could be determined at runtime by the user during a 
> project init-db.
Make it a config variable, too, right?
It would be interesting to have other hashes, for three reasons:
1. they could be faster to calculate,
2. they could reduce clashes, and related to that,
3. it is possible that some day SHA1 is broken, i.e. that there is an 
   algorithm to generate a different text for a given hash.

As for 2 and 3, it seems MD5 is equivalent, since another sort of attacks was already successful on both SHA1 and MD5: generating two different texts with the same hash.

So, 1 could be a good reason to have another hash. IIRC SHA1 is about 25% slower than MD5, so it could be worth it.

However, you should know that there is _no way_ to use both hashes on the same project. Yes, you could rewrite the history, trying to convert also the hashes in the commit objects, but people actually started relying on naming commits with the short-SHA1.

I think it would be a nice thing to play through (for example, to find out how much impact the hash calculation has on the overall performance of git), but I doubt it will ever come to real use.

Ciao, Dscho

Previous: Nguyễn Thái Ngọc DuyNext: Petr Baudis
Message 3 of 20 in “[RFC] adding support for md5”
  1. David RientjesAug 18, 2006
  2. Nguyễn Thái Ngọc DuyAug 18, 2006
  3. Johannes SchindelinAug 18, 2006
  4. Petr BaudisAug 18, 2006
  5. David RientjesAug 18, 2006
  6. TrekieAug 18, 2006
  7. Johannes SchindelinAug 18, 2006
  8. TrekieAug 18, 2006
  9. Johannes SchindelinAug 18, 2006
  10. Jon SmirlAug 18, 2006
  11. Johannes SchindelinAug 19, 2006
  12. Linus TorvaldsAug 19, 2006
  13. Chris WedgwoodAug 21, 2006
  14. Junio C HamanoAug 22, 2006
  15. Shawn PearceAug 23, 2006
  16. Junio C HamanoAug 23, 2006
  17. Shawn PearceAug 23, 2006
  18. Junio C HamanoAug 24, 2006
  19. Shawn PearceAug 24, 2006
  20. Junio C HamanoAug 24, 2006

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.