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

Re: Git and SHA-1 security (again)

From
Philip Oakley <philipoakley@iee.org>
Date
Aug 22, 2016, 22:01 UTC
Message-ID
<C651AA234E5A461BBA55E2D8D6E4DC85@PhilipOakley>
In-Reply-To
<CACsJy8A3ZTfRRNuYXYD-nzXm6KXHu8cHU6fzfysJxfW0EggKNA@mail.gmail.com>
Sorry if I'm dropping in at the wrong point (this is one I'd bookmarked)..
From: "Duy Nguyen" <pclouds@gmail.com>
Sent: Wednesday, July 20, 2016 3:44 PM
Show 15 quoted lines
> On Wed, Jul 20, 2016 at 2:28 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
>> But that strategy *still* ignores the distributed nature of Git. Just
>> because *you* make that merge at a certain point does not necessarily 
>> mean
>> that I make it at that point, too.
>>
>> Any approach that tries to have one single point of conversion will most
>> likely fall short of a solution.
>
> OK I see the difference in our views now. To me an sha256 repo would
> see an sha1 repo as a _foreign_ DVCS, pretty much like git sees
> mercurial now. So a transition from sha1 to sha256 is not that
> different from cvs -> svn -> a dvcs bubble -> git.
>

I think that within Git, that it is possible to have inter-workability (for those parts that negotiate) between instances with different views about the availability of two hash types. Fetch/push negotiation is a normal part of working with a remote.

Show 22 quoted lines
>> To be honest, I am less concerned about the GPG-signed commits (after 
>> all,
>> after switching to a more secure hash algorithm, a maintainer could
>> cross-sign all signed commits, or only the branch tips or tags, as new
>> tags, to reinstitute trust).
>>
>> I am much more concerned about references to commits, both inside and
>> outside the repository. That is, if I read anywhere on the internet about
>> Git having added support for `git add --chmod=+x <file>` in 4e55ed3 (add:
>> add --chmod=+x / --chmod=-x options, 2016-05-31), I want to find that
>> commit by that reference.
>>
>> And I am of course concerned what should happen if a user wants to fetch
>> from, or push to, a SHA-1-hashed remote repository into, or from, a
>> SHA-256-hashed local one.
>
> to follow the above, in my view, interaction with sha1 repos go
> through some conversion bridges like what we have with hg and svn. I
> don't know if we are going this route. It's certainly simpler and
> people already have experiences (from previous migration) to prepare
> for it.
> -- 

The main thought was that rather than worrying about which advanced hash to pick (with all the arguments that entails), rather it is worth reducing the problem space to create a 'toy problem', to look at the interaction issues.

For the toy problem view we'd keep the current oid length (so that the transmission formats don't change size), however we swap the old-new to make sha1 the new hash and use an older shorter hash (e.g. md5) to investigate the transition from a short to long hash.

Keeping it as a 'toy problem' avoids folks having too much invested in the new hash choice, rather the interworking can be more easily sorted, and some issue can be punted on (e.g. the choice of salt to extend the md5 to the sha1, and collisions therein).

-- Philip

Previous: Junio C HamanoNext: Herczeg Zsolt
Message 50 of 52 in “Git and SHA-1 security (again)”
  1. Herczeg ZsoltJul 16, 2016
  2. brian m. carlsonJul 16, 2016
  3. Herczeg ZsoltJul 16, 2016
  4. brian m. carlsonJul 16, 2016
  5. Johannes SchindelinJul 17, 2016
  6. brian m. carlsonJul 17, 2016
  7. Duy NguyenJul 17, 2016
  8. brian m. carlsonJul 17, 2016
  9. Theodore Ts'oJul 17, 2016
  10. brian m. carlsonJul 17, 2016
  11. Junio C HamanoJul 18, 2016
  12. Jonathan NiederJul 18, 2016
  13. brian m. carlsonJul 18, 2016
  14. Johannes SchindelinJul 21, 2016
  15. Johannes SchindelinJul 21, 2016
  16. Junio C HamanoJul 22, 2016
  17. Johannes SchindelinJul 18, 2016
  18. brian m. carlsonJul 18, 2016
  19. Johannes SchindelinJul 21, 2016
  20. Duy NguyenJul 18, 2016
  21. Johannes SchindelinJul 19, 2016
  22. David LangJul 19, 2016
  23. Duy NguyenJul 19, 2016
  24. Junio C HamanoJul 19, 2016
  25. Duy NguyenJul 19, 2016
  26. Junio C HamanoJul 19, 2016
  27. Ævar Arnfjörð BjarmasonJul 18, 2016
  28. Herczeg ZsoltJul 18, 2016
  29. Ævar Arnfjörð BjarmasonJul 18, 2016
  30. Junio C HamanoJul 18, 2016
  31. Herczeg ZsoltJul 18, 2016
  32. David LangJul 18, 2016
  33. Fwd: Git and SHA-1 security (again)Herczeg Zsolt, Jul 18, 2016
  34. Johannes SchindelinJul 18, 2016
  35. Herczeg ZsoltJul 18, 2016
  36. Johannes SchindelinJul 18, 2016
  37. Duy NguyenJul 18, 2016
  38. Johannes SchindelinJul 19, 2016
  39. Duy NguyenJul 19, 2016
  40. David LangJul 19, 2016
  41. Duy NguyenJul 19, 2016
  42. David LangJul 19, 2016
  43. Duy NguyenJul 19, 2016
  44. Herczeg ZsoltJul 19, 2016
  45. Duy NguyenJul 20, 2016
  46. Johannes SchindelinJul 20, 2016
  47. Duy NguyenJul 20, 2016
  48. Stefan BellerJul 20, 2016
  49. Junio C HamanoJul 20, 2016
  50. Philip OakleyAug 22, 2016
  51. Herczeg ZsoltJul 18, 2016
  52. Johannes SchindelinJul 19, 2016

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.