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

Re: Linus' sha1 is much faster!

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 15, 2009, 20:54 UTC
Message-ID
<alpine.LFD.2.01.0908151336530.3162@localhost.localdomain>
In-Reply-To
<alpine.LFD.2.01.0908151315400.3162@localhost.localdomain>
On Sat, 15 Aug 2009, Linus Torvalds wrote:
> 
> That said, I don't know if the MPL is ok for X11. I've not looked at 
> compatibility issues with MPL. For git, we could just ignore the MPL, 
> since the GPLv2 was acceptable regardless of it.

If MPL isn't ok for X11, then we'd need to make sure that even the silliest Mozilla crud has been rewritten. There really isn't much, but hey, the _history_ is based on the mozilla code, and who knows - the 'blk_SHA_CTX' struct has things like the fields in the same order as the Mozilla equivalent, for all those historical reasons.

(Heh. Looking at that, I probably should move the 'size' field first, since that would have different alignment rules, and the struct would be more tightly packed that way, and initialize better).

Afaik, none of the actual code remains (the mozilla SHA1 thing did the wrong thing for performance even for just the final bytes, and did those a byte at a time etc, so I rewrote even the trivial SHA1_Final parts).

Of course, maybe the Mozilla people would be interested in taking my faster version, and say that the new-BSD license is ok, and make everybody happy. The only listed author for the Mozilla SHA1 is Paul Kocher. I added him to the Cc.

Paul, for your information, we're talking about a faster rewritten "mostly portable" SHA1 routines that you can find at

	http://git.kernel.org/?p=git/git.git;a=tree;f=block-sha1;hb=pu

(follow the "blob" pointers to see sha1.c and sha1.h). I don't know if you're active with Mozilla/Firefox or whether you even care, but you seem to be the logical choice of person to ask.

			Linus
Previous: Linus TorvaldsNext: Nicolas Pitre
Message 5 of 21 in “Linus' sha1 is much faster!”
  1. Pádraig BradyAug 14, 2009
  2. Bryan DonlanAug 15, 2009
  3. John TapsellAug 15, 2009
  4. Linus TorvaldsAug 15, 2009
  5. Linus TorvaldsAug 15, 2009
  6. Nicolas PitreAug 17, 2009
  7. Pádraig BradyAug 26, 2009
  8. galtApr 20, 2017
  9. galtApr 20, 2017
  10. Andreas EricssonAug 17, 2009
  11. Theodore TsoAug 16, 2009
  12. Giuseppe ScrivanoAug 16, 2009
  13. Linus TorvaldsAug 16, 2009
  14. Giuseppe ScrivanoAug 16, 2009
  15. Linus TorvaldsAug 16, 2009
  16. Pádraig BradyAug 17, 2009
  17. Giuseppe ScrivanoAug 17, 2009
  18. Steven NoonanAug 17, 2009
  19. Linus TorvaldsAug 17, 2009
  20. Steven NoonanAug 17, 2009
  21. Giuseppe ScrivanoAug 17, 2009

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.