Plan for SHA-256 repos to support SHA-1?

3 messages, 3 authors, 2022-06-26 · open the first message on its own page

Plan for SHA-256 repos to support SHA-1?

From: Eric W. Biederman <hidden>
Date: 2022-06-26 00:09:57

Is there at this point a solid plan for how SHA-256 repos will support
access SHA-1 only clients?

I remember reading a discussion of having a table somewhere that would
translate SHA-256 to SHA-1 when needed.

I had a brainstorm which is probably the uniformed opinion of an
outsider.

I was thinking in server settings that a well-packed pack of all of the
objects is kept to make it quick for git clone to do it's work.

I was thinking perhaps in a repo that wanted to support access from
SHA-1 clients it might makes sense to have three packs instead of the
standard 1.

A pack of all of the blobs with no oid references.  So that either
a SHA-256 or a SHA-1 client could consume it (modulo header changes that
are needed).

The pack of blobs could have both an ordinary SHA-256 index and a SHA-1
index.

Then there could be two packs of metadata (aka trees and commits and
tags that embed oids).  One pack in SHA-256 and one pack in SHA-1.

Then with a little header surgery git clone could be served with
sendfile and gluing the pack of blobs and pack of object together.


In the normal end user client case that is doesn't seem to make a lot of
sense as all that is needed is to figure out which oid to use and always
display SHA-256.

My naivete suggests that just keeping the SHA-1 metadata in a SHA-256
repo could be simple enough to implement that it would allow the
transition to start happening, and it could be optimized away later.

Eric

Re: Plan for SHA-256 repos to support SHA-1?

From: Junio C Hamano <hidden>
Date: 2022-06-26 00:28:15

On Sat, Jun 25, 2022 at 5:10 PM Eric W. Biederman [off-list ref] wrote:
Is there at this point a solid plan for how SHA-256 repos will support
access SHA-1 only clients?

I remember reading a discussion of having a table somewhere that would
translate SHA-256 to SHA-1 when needed.
Documentation/technical/hash-function-transition.txt has flushed out
the necessary details?

Re: Plan for SHA-256 repos to support SHA-1?

From: brian m. carlson <hidden>
Date: 2022-06-26 15:19:16

On 2022-06-26 at 00:27:57, Junio C Hamano wrote:
On Sat, Jun 25, 2022 at 5:10 PM Eric W. Biederman [off-list ref] wrote:
quoted
Is there at this point a solid plan for how SHA-256 repos will support
access SHA-1 only clients?

I remember reading a discussion of having a table somewhere that would
translate SHA-256 to SHA-1 when needed.
Documentation/technical/hash-function-transition.txt has flushed out
the necessary details?
Yup.  The design there sounds very simple and it is, conceptually, but
practically implementing it is quite complex.

You can pull the in-progress work from transition-interop on my GitHub
remote to see where some of the complexity lies.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help