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

Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Jan 13, 2023, 16:41 UTC
Message-ID
<20230113164131.swif4buln2py7tyl@meerkat.local>
In-Reply-To
<038b4ea4-2a10-9b5a-14e4-e987a68e93b0@selasky.org>
On Fri, Jan 13, 2023 at 05:35:57PM +0100, Hans Petter Selasky wrote:
Show 10 quoted lines
> > Not to discourage you, but you seem to be making statements without a good
> > understanding of how git works. If there is a history rewrite (even one that
> > for some reason goes back millions of commits) all hash calculations will
> > happen exactly once -- on the system of the person who's rewriting the
> > history. After they push it, it's just a bunch of objects that everyone else
> > merely downloads.
> 
> If you used CRC, you would not need that, because CRC calculations are
> "concatenatable", while SHA-1's are not. CRC would just need the first and
> the last hash, and then you would apply the "difference".

It doesn't matter how it works behind the scenes as long as the produced hash is not unique (and CRC gives you no assurance of being unique). Git is built on the concept that every object has a unique hash. If this is no longer true, then it's literally no longer git, but is something else.

Since we're discussing this on the git list, it's not really a discussion worth having here.

-K
Previous: Hans Petter SelaskyNext: Hans Petter Selasky
Message 21 of 26 in “Gitorious should use CRC128 / 256 / 512 instead of SHA-1”
  1. Hans Petter SelaskyJan 13, 2023
  2. Konstantin KhomoutovJan 13, 2023
  3. Hans Petter SelaskyJan 13, 2023
  4. rsbecker@nexbridge.comJan 13, 2023
  5. Hans Petter SelaskyJan 13, 2023
  6. Konstantin RyabitsevJan 13, 2023
  7. Hans Petter SelaskyJan 13, 2023
  8. rsbecker@nexbridge.comJan 13, 2023
  9. Hans Petter SelaskyJan 13, 2023
  10. Hans Petter SelaskyJan 13, 2023
  11. Konstantin RyabitsevJan 13, 2023
  12. Hans Petter SelaskyJan 13, 2023
  13. Hans Petter SelaskyJan 13, 2023
  14. Konstantin RyabitsevJan 13, 2023
  15. Hans Petter SelaskyJan 13, 2023
  16. Konstantin RyabitsevJan 13, 2023
  17. Hans Petter SelaskyJan 13, 2023
  18. Konstantin RyabitsevJan 13, 2023
  19. Hans Petter SelaskyJan 13, 2023
  20. Hans Petter SelaskyJan 13, 2023
  21. Konstantin RyabitsevJan 13, 2023
  22. Hans Petter SelaskyJan 13, 2023
  23. Hans Petter SelaskyJan 13, 2023
  24. Philip OakleyJan 13, 2023
  25. Konstantin RyabitsevJan 13, 2023
  26. Konstantin KhomoutovJan 13, 2023

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.