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

Re: Hash algorithm analysis

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 23, 2018, 18:35 UTC
Message-ID
<20180723183523.GB9285@aiede.svl.corp.google.com>
In-Reply-To
<CANgJU+X39NoEoMyLu+FX38=x19LrRqatz_dUpUAc+WFV+Uw+=A@mail.gmail.com>
Hi Yves,
demerphq wrote:
> On Sun, 22 Jul 2018 at 01:59, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
>> I will admit that I don't love making this decision by myself, because
>> right now, whatever I pick, somebody is going to be unhappy.
[...]
Show 5 quoted lines
> I do not envy you this decision.
>
> Personally I would aim towards pushing this decision out to the git
> user base and facilitating things so we can choose whatever hash
> function (and config) we wish, including ones not invented yet.
There are two separate pieces to this.

One is configurability at compile time. So far that has definitely been a goal, because we want to be ready to start the transition to another hash, and quickly, as soon as the new hash is discovered to be weak. This also means that people can experiment with new hashes and in a controlled environment (where the users can afford to build from source), some users might prefer some bespoke hash for reasons only known to them. ;-)

Another piece is configurability at run time. This is a harder sell because it has some negative effects in the ecosystem:

 - performance impact from users having to maintain a translation table
   between the different hash functions in use
 - security impact, in the form of downgrade attacks
 - dependency bloat, from Git having to be able to compute all hash
   functions permitted in that run-time configuration

The security impact can be mitigated by keeping the list of supported hashes small (i.e. two or three instead of 10ish). Each additional hash function is a potential liability (just as in SSL), so they have to earn their keep.

The performance impact is unavoidable if we encourage Git servers to pick their favorite hash function instead of making a decision in the project. This can in turn affect security, since it would increase the switching cost away from SHA-1, with the likely effect being that most users stay on SHA-1. I don't want to go there.

So I would say, support for arbitrary hash functions at compile time and in file formats is important and I encourage you to hold us to that (when reviewing patches, etc). But in the standard Git build configuration that most people run, I believe it is best to support only SHA-1 + our chosen replacement hash.

Thanks, Jonathan

Previous: Stefan BellerNext: Edward Thomson
Message 32 of 66 in “State of NewHash work, future directions, and discussion”
  1. brian m. carlsonJun 9, 2018
  2. Ævar Arnfjörð BjarmasonJun 9, 2018
  3. Hash algorithm analysisbrian m. carlson, Jun 9, 2018
  4. Jonathan NiederJun 11, 2018
  5. Linus TorvaldsJun 11, 2018
  6. Ævar Arnfjörð BjarmasonJun 11, 2018
  7. David LangJun 12, 2018
  8. Linus TorvaldsJun 12, 2018
  9. brian m. carlsonJun 11, 2018
  10. Gilles Van AsscheJun 12, 2018
  11. brian m. carlsonJun 13, 2018
  12. Gilles Van AsscheJun 15, 2018
  13. brian m. carlsonJul 20, 2018
  14. Jonathan NiederJul 21, 2018
  15. Ævar Arnfjörð BjarmasonJul 21, 2018
  16. brian m. carlsonJul 21, 2018
  17. Johannes SchindelinJul 21, 2018
  18. Linus TorvaldsJul 21, 2018
  19. brian m. carlsonJul 21, 2018
  20. Eric DeplagneJul 22, 2018
  21. brian m. carlsonJul 22, 2018
  22. Eric DeplagneJul 22, 2018
  23. Johannes SchindelinJul 26, 2018
  24. Joan DaemenJul 22, 2018
  25. Adam LangleyJul 22, 2018
  26. Johannes SchindelinJul 26, 2018
  27. demerphqJul 23, 2018
  28. Sitaram ChamartyJul 23, 2018
  29. demerphqJul 23, 2018
  30. Linus TorvaldsJul 23, 2018
  31. Stefan BellerJul 23, 2018
  32. Jonathan NiederJul 23, 2018
  33. Edward ThomsonJul 24, 2018
  34. Linus TorvaldsJul 24, 2018
  35. Jonathan NiederJul 24, 2018
  36. Junio C HamanoJul 24, 2018
  37. brian m. carlsonJul 24, 2018
  38. Johannes SchindelinJul 30, 2018
  39. Dan ShumowJul 30, 2018
  40. Jonathan NiederAug 3, 2018
  41. Joan DaemenSep 18, 2018
  42. Jonathan NiederSep 18, 2018
  43. Linus TorvaldsSep 18, 2018
  44. 0/2 document that NewHash is now SHA-256Ævar Arnfjörð Bjarmason, Jul 25, 2018
  45. 1/2 doc hash-function-transition: note the lack of a changelogÆvar Arnfjörð Bjarmason, Jul 25, 2018
  46. 2/2 doc hash-function-transition: pick SHA-256 as NewHashÆvar Arnfjörð Bjarmason, Jul 25, 2018
  47. Junio C HamanoJul 25, 2018
  48. Jonathan NiederJul 25, 2018
  49. Junio C HamanoJul 25, 2018
  50. 2/2 doc hash-function-transition: pick SHA-256 as NewHashÆvar Arnfjörð Bjarmason, Jul 26, 2018
  51. Jonathan NiederAug 3, 2018
  52. Junio C HamanoAug 3, 2018
  53. Linus TorvaldsAug 3, 2018
  54. Linus TorvaldsAug 3, 2018
  55. Ævar Arnfjörð BjarmasonAug 3, 2018
  56. Jonathan NiederAug 4, 2018
  57. brian m. carlsonAug 3, 2018
  58. brian m. carlsonJul 25, 2018
  59. Ævar Arnfjörð BjarmasonJun 11, 2018
  60. Johannes SchindelinJun 21, 2018
  61. brian m. carlsonJun 21, 2018
  62. Duy NguyenJun 11, 2018
  63. brian m. carlsonJun 12, 2018
  64. Jonathan NiederJun 11, 2018
  65. brian m. carlsonJun 12, 2018
  66. Jonathan NiederJun 12, 2018

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.