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

Re: SHA-accelerated Git

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 3, 2019, 10:14 UTC
Message-ID
<nycvar.QRO.7.76.6.1906031211470.48@tvgsbejvaqbjf.bet>
In-Reply-To
<CAH8yC8n8XN1wKiF4FgTm6xfnRHUDi+1=iuWXE8F91P=7mLNsLg@mail.gmail.com>
Hi Jeffrey,
On Sun, 2 Jun 2019, Jeffrey Walton wrote:
Show 15 quoted lines
> On Sun, Jun 2, 2019 at 7:21 AM Michal Suchánek <msuchanek@suse.de> wrote:
> >
> > On Sun, 2 Jun 2019 06:43:07 -0400
> > Jeffrey Walton <noloader@gmail.com> wrote:
> >
> > > I have a lot of experience with cutting in SHA acceleration. I have
> > > no experience with Git.
> >
> > sha1 is dead. Git is planning to move away from it. It will not happen
> > overnight but it probably does not make sense to accelerate it at this
> > point.
> >
> > https://github.com/git/git/blob/next/Documentation/technical/hash-function-transition.txt
>
> SHA-1 has been dead for years. That has not stopped Git yet :)

Even worse. Git has changed from an OpenSSL accelerated SHA-1 to a collision-detecting SHA-1 (sha1dc).

As long as your accelerated SHA-1 cannot guarantee the same level of safeguards as sha1dc, there is a negligible likelihood that your patches will be accepted.

> Comparing against a standard C/C++ implementation, Git will see a 3x to
> 6x speedup depending on the platform and algorithm.
Indeed, this reflects my findings.

It's just that we struck the balance on the other side of performance, in favor of preventing possible attack vectors as best as we can.

Ciao, Johannes

Previous: Jeffrey Walton
Message 4 of 4 in “SHA-accelerated Git”
  1. Jeffrey WaltonJun 2, 2019
  2. Michal SuchánekJun 2, 2019
  3. Jeffrey WaltonJun 2, 2019
  4. Johannes SchindelinJun 3, 2019

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.