From: Christian Couder <christian.couder@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Patrick Steinhardt <ps@pks.im>, Jeff King <peff@peff.net>,
"brian m . carlson" <sandals@crustytoothpaste.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v2 0/6] extract algo information from signatures
Date: Thu, 19 Jun 2025 15:38:12 +0200 [thread overview]
Message-ID: <CAP8UFD2zO0Apy5jOrbFdBjq2F73mo3dbESaBqYCG2hsKBamFPg@mail.gmail.com> (raw)
In-Reply-To: <CABPp-BFbF=rp6FZjyL+Fm5TqNZZdhfjS1sK-CBQ_=wtvFmfdLw@mail.gmail.com>
On Mon, May 26, 2025 at 6:03 PM Elijah Newren <newren@gmail.com> wrote:
>
> On Mon, May 26, 2025 at 3:33 AM Christian Couder
> <christian.couder@gmail.com> wrote:
> I'd like to propose that the following are the possible uses that
> users might have regarding commit signatures with
> fast-export/fast-import (if anyone has additional usecases, let me
> know):
>
> (A) Make fast-export include signatures, and make fast-import include
> them unconditionally (even if invalid)
> (B) Similar to (A), but make *fast-import* check them and either error
> out or drop them if they become invalid
> (C) Simliar to (B), but make *fast-import* re-sign the commit if they
> become invalid
> (D) Similar to (A), but make *fast-import* re-sign the commit even if
> the signature would have been valid
>
> Note that in the above, there might be additional processing between
> when fast-export runs and when fast-import does (e.g. by filter-repo
> or a similar tool, or even the user editing by hand).
I agree that they are likely to be the most important use cases, and I
am fine with working on these use cases.
> > To address this, I decided to focus first on extracting the hash
> > algorithm from OpenPGP/X.509 signatures and the key type from SSH
> > signature when checking signatures.
> >
> > To test that, I thought that it could be interesting to add a
> > `--summary` option to `verify-commit` that shows a concise, one-line
> > summary of the signature verification to standard output in the
> > `STATUS FORMAT ALGORITHM` format, where:
> >
> > * STATUS is the result character (e.g., G, B, E, U, N, ...), similar
> > as what the "%G?" pretty format specifier shows,
> >
> > * FORMAT is the signature format (`openpgp`, `x509`, or `ssh`),
> >
> > * ALGORITHM is the hash algorithm used for GPG/GPGSM signatures
> > (e.g. `sha1`, `sha256`, ...), or the key type for SSH signatures
> > (`RSA`, `ECDSA`, `ED25519`, ...).
>
> This sounds like it might be a nice feature extension to the
> verify-commit builtin. I don't see how it helps implement signature
> handling in fast-export/fast-import, though.
Fair enough. In the v3 and v4, I changed the approach and dropped all of this.
> > If we can agree on a concise format output for signature checks, then
> > maybe this format will be a good format to be used in the `git
> > fast-export` output for users who are fine with signatures being
> > checked.
> >
> > What do you think?
>
> Maybe I'm missing something, but it seems to me that checking
> signatures *in fast-export* would be a complete waste of time. For
> usecases (A) & (D), checking signatures at all is a waste of time.
> For usecases (B) & (C), checking signatures in fast-export is
> throwaway work because whether or not the signatures are valid at the
> time fast-export runs, and even in the rare usecase where there is no
> additional processing between fast-export and fast-import (such as by
> filter-repo), the signatures would still need to be re-checked by
> fast-import anyway. (Note that a simple `git fast-export ... | git
> fast-import` is *not* guaranteed to get the same commit hashes even
> when there are no commit signatures; that only happens when the
> history is sufficiently canonical).
Yeah, right. In v3 and v4, I dropped this in favor of something
simpler similar to what was in the v1 patch, and after that I plan to
work on checking signatures in fast-import soon. Thanks.
next prev parent reply other threads:[~2025-06-19 13:38 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 20:39 [PATCH] fast-(import|export): improve on the signature algorithm name Christian Couder
2025-04-24 21:19 ` Junio C Hamano
2025-04-24 21:59 ` Elijah Newren
2025-04-24 22:58 ` Junio C Hamano
2025-05-26 10:35 ` Christian Couder
2025-05-27 15:18 ` Junio C Hamano
2025-05-28 17:29 ` Junio C Hamano
2025-05-28 20:06 ` Elijah Newren
2025-05-28 21:59 ` Junio C Hamano
2025-05-28 23:15 ` Elijah Newren
2025-05-29 3:14 ` Junio C Hamano
2025-06-02 15:56 ` Christian Couder
2025-06-02 15:56 ` Christian Couder
2025-06-02 16:20 ` Junio C Hamano
2025-05-26 10:34 ` Christian Couder
2025-04-24 21:41 ` Elijah Newren
2025-05-26 10:34 ` Christian Couder
2025-04-24 22:05 ` brian m. carlson
2025-05-26 10:35 ` Christian Couder
2025-04-24 23:25 ` Junio C Hamano
2025-05-26 10:33 ` [PATCH v2 0/6] extract algo information from signatures Christian Couder
2025-05-26 10:33 ` [PATCH v2 1/6] gpg-interface: simplify ssh fingerprint parsing Christian Couder
2025-05-26 10:33 ` [PATCH v2 2/6] gpg-interface: use left shift to define GPG_VERIFY_* Christian Couder
2025-05-26 10:33 ` [PATCH v2 3/6] doc/verify-commit: update and improve the whole doc Christian Couder
2025-05-26 10:33 ` [PATCH v2 4/6] gpg-interface: extract hash algorithm from signature status output Christian Couder
2025-05-26 10:33 ` [PATCH v2 5/6] gpg-interface: extract SSH key type " Christian Couder
2025-05-26 10:33 ` [PATCH v2 6/6] verify-commit: add a --summary flag Christian Couder
2025-05-26 16:03 ` [PATCH v2 0/6] extract algo information from signatures Elijah Newren
2025-06-19 13:38 ` Christian Couder [this message]
2025-06-02 22:17 ` brian m. carlson
2025-06-19 13:37 ` Christian Couder
2025-06-18 15:18 ` [PATCH v3] fast-(import|export): improve on commit signature output format Christian Couder
2025-06-19 13:36 ` [PATCH v4] " Christian Couder
2025-06-19 14:55 ` Junio C Hamano
2025-07-08 9:16 ` Christian Couder
2025-06-19 21:44 ` Elijah Newren
2025-06-20 16:12 ` Christian Couder
2025-06-20 19:20 ` Junio C Hamano
2025-07-08 9:16 ` Christian Couder
2025-06-26 19:11 ` Elijah Newren
2025-07-08 9:16 ` Christian Couder
2025-07-07 22:58 ` Junio C Hamano
2025-07-08 3:35 ` Christian Couder
2025-07-08 5:03 ` Junio C Hamano
2025-07-08 6:38 ` Patrick Steinhardt
2025-07-08 11:08 ` Christian Couder
2025-07-08 16:38 ` Junio C Hamano
2025-07-09 0:19 ` Christian Couder
2025-07-09 15:35 ` Junio C Hamano
2025-07-10 8:25 ` Patrick Steinhardt
2025-07-10 15:29 ` Christian Couder
2025-07-10 15:33 ` Junio C Hamano
2025-07-08 10:17 ` Christian Couder
2025-07-08 9:17 ` [PATCH v5] " Christian Couder
2025-07-08 21:58 ` Junio C Hamano
2025-07-08 23:08 ` Elijah Newren
2025-07-09 0:03 ` Junio C Hamano
2025-07-09 0:10 ` Elijah Newren
2025-07-09 10:18 ` Christian Couder
2025-07-09 10:15 ` Christian Couder
2025-07-09 14:12 ` [PATCH v6] " Christian Couder
2025-07-09 23:14 ` Junio C Hamano
2025-07-14 21:07 ` Elijah Newren
2025-07-14 21:23 ` Junio C Hamano
2025-07-25 16:11 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP8UFD2zO0Apy5jOrbFdBjq2F73mo3dbESaBqYCG2hsKBamFPg@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).