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

Re: Migrating away from SHA-1?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 15, 2016, 01:50 UTC
Message-ID
<20160415015004.GB140502@vauxhall.crustytoothpaste.net>
In-Reply-To
<8722D9F3-8A42-4BF7-A945-305F483E8364@zytor.com>
On Tue, Apr 12, 2016 at 06:58:10PM -0700, H. Peter Anvin wrote:
Show 13 quoted lines
> On April 12, 2016 6:51:12 PM PDT, Duy Nguyen <pclouds@gmail.com> wrote:
> >On Wed, Apr 13, 2016 at 5:38 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> >> OK, I'm going to open this can of worms...
> >>
> >> At what point do we migrate from SHA-1?
> >
> >Brian Carlson has been slowly refactoring git code base, abstracting
> >SHA-1 away. Once that work is done, I think we can talk about moving
> >away from SHA-1. The process is slow because it likely causes
> >conflicts with in-flight topics. A quick grep shows we still have
> >about 300 SHA-1 references, so it'll be quite some time.
> 
> Well, at least it sounds like work is underway.  That is a big deal.

Yes, it's a bunch of slow manual refactoring, and I've been busy as we've been doing house- and car-related things recently. I'll try to spend a little more time on it this weekend.

The first step is to convert all of the individual places that use unsigned char [20] to use struct object_id, which can then be extended to use different hash algorithms. There are also constants, GIT_SHA1_RAWSZ and GIT_SHA1_HEXSZ, that abstract the 20 and 40 values in the codebase so they can be changed in the future.

While this is a project I've been mostly working on, I have no objection to other people sending in a patch or series as they feel like it.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
Previous: H. Peter Anvin
Message 21 of 21 in “Migrating away from SHA-1?”
  1. H. Peter AnvinApr 12, 2016
  2. Stefan BellerApr 12, 2016
  3. H. Peter AnvinApr 12, 2016
  4. Jeff KingApr 12, 2016
  5. David TurnerApr 12, 2016
  6. Jeff KingApr 12, 2016
  7. Theodore Ts'oApr 14, 2016
  8. Joey HessApr 14, 2016
  9. David TurnerApr 14, 2016
  10. H. Peter AnvinApr 14, 2016
  11. Theodore Ts'oApr 14, 2016
  12. Jeff KingApr 15, 2016
  13. Junio C HamanoApr 15, 2016
  14. Jeff KingApr 15, 2016
  15. Jeff KingApr 12, 2016
  16. Junio C HamanoApr 13, 2016
  17. Jeff KingApr 13, 2016
  18. H. Peter AnvinApr 13, 2016
  19. Duy NguyenApr 13, 2016
  20. H. Peter AnvinApr 13, 2016
  21. brian m. carlsonApr 15, 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.