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

Re: Preserving the ability to have both SHA1 and SHA256 signatures

From
Christian Couder <christian.couder@gmail.com>
Date
May 8, 2021, 06:39 UTC
Message-ID
<CAP8UFD0vp-zZv=Q1+KWv8PHnxTuspTw2aSCUp8QUic0HOSyq4w@mail.gmail.com>
In-Reply-To
<20210508022225.GH3986@localhost>
Hi,

(Not sure why, but, when using "Reply to all" in Gmail, it doesn't actually reply to you (or Cc you), only to the mailing list. I had to manually add your email back.)

On Sat, May 8, 2021 at 4:25 AM <dwh@linuxprogrammer.org> wrote:
Show 23 quoted lines
>
> Hi Everybody,
>
> I was reading through the
> Documentation/technical/hash-function-transition.txt doc and realized
> that the plan is to support allowing BOTH SHA1 and SHA256 signatures to
> exist in a single object:
>
> > Signed Commits
> > 1. using SHA-1 only, as in existing signed commit objects
> > 2. using both SHA-1 and SHA-256, by using both gpgsig-sha256 and gpgsig
> >   fields.
> > 3. using only SHA-256, by only using the gpgsig-sha256 field.
> >
> > Signed Tags
> > 1. using SHA-1 only, as in existing signed tag objects
> > 2. using both SHA-1 and SHA-256, by using gpgsig-sha256 and an in-body
> >   signature.
> > 3. using only SHA-256, by only using the gpgsig-sha256 field.
>
> The design that I'm working on only supports a single signature that
> uses a combination of fields: one 'signtype', zero or more 'signoption'
> and one 'sign' in objects.

Here I understand that your design doesn't support both a SHA1 and a SHA256 signature.

> I am thinking that the best thing to do is
> replace the gpgsig-sha256 fields in objects and allow old gpgsig (commits)
> and in-body (tags) signatures to co-exist along side to give the same
> functionality.
Is this part of your design, or a, maybe temporary, alternative to it?
> That not only paves the way forward but preserves the full backward
> compatibility that is one of my top requirements.

There has been patches and discussions quite recently about this, that have been reported on in our Git Rev News newsletter:

https://git.github.io/rev_news/2021/02/27/edition-72/
You can see that, with the latest patches (not sure the documentation
is up-to-date though), signing both commits and tags
 can now be round-tripped through both SHA-1 and SHA-256 conversions.
How isn't that fully backward compatible?

Best, Christian.

Previous: dwh@linuxprogrammer.orgNext: Junio C Hamano
Message 2 of 19 in “Preserving the ability to have both SHA1 and SHA256 signatures”
  1. dwh@linuxprogrammer.orgMay 8, 2021
  2. Christian CouderMay 8, 2021
  3. Junio C HamanoMay 8, 2021
  4. Felipe ContrerasMay 8, 2021
  5. Stefan MochMay 8, 2021
  6. Junio C HamanoMay 8, 2021
  7. brian m. carlsonMay 9, 2021
  8. Is the sha256 object format experimental or not?Ævar Arnfjörð Bjarmason, May 10, 2021
  9. brian m. carlsonMay 10, 2021
  10. dwh@linuxprogrammer.orgMay 13, 2021
  11. Konstantin RyabitsevMay 13, 2021
  12. dwh@linuxprogrammer.orgMay 13, 2021
  13. Konstantin RyabitsevMay 14, 2021
  14. dwh@linuxprogrammer.orgMay 14, 2021
  15. Junio C HamanoMay 13, 2021
  16. dwh@linuxprogrammer.orgMay 13, 2021
  17. Ævar Arnfjörð BjarmasonMay 14, 2021
  18. dwh@linuxprogrammer.orgMay 14, 2021
  19. Jonathan NiederMay 18, 2021

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.