git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: dwh@linuxprogrammer.org
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org
Subject: Re: Is the sha256 object format experimental or not?
Date: Fri, 14 May 2021 09:45:01 -0400	[thread overview]
Message-ID: <20210514134501.3vzgqdfwwejafkq7@meerkat.local> (raw)
In-Reply-To: <20210513234706.GG11882@localhost>

On Thu, May 13, 2021 at 04:47:06PM -0700, dwh@linuxprogrammer.org wrote:
> On 13.05.2021 16:49, Konstantin Ryabitsev wrote:
> > Check out what we're doing as part of patatt and b4:
> > https://pypi.org/project/patatt/
> > 
> > It takes your keyring-in-git idea and runs with it -- it would be good to have
> > your input while the project is still young and widely unknown. :)
> 
> Konstantin:
> 
> That's really clever. I especially love how you're using the list
> archive as the provenance log of old keys developers used. That seems
> like it would work although I have worries about the security of
> X-Developer-Key and the lack of key history immediately available to
> `git log` because it's in the list archive and not in the repo directly.
>
> I guess the old keys would still be in your local keyring for `gpg` to
> use but it would mark signatures created with old revoked keys as
> invalid even though they are valid.

Thanks for taking a look at it. I don't view this as much of a problem, since
the goal for the project is specifically end-to-end patch attestation. For git
commits, if they are signed with a key from the in-git keyring, it would
actually be really straightforward to get the valid key at the time of signing
-- you just retrieve the keyring using the date of the commit.

> My approach has been to move to cryptographically secure provenance logs
> that contain key rotation events and commitments to future keys and also
> cryptographically linking to arbitrary metadata (e.g. KYC proofs, etc).
> The file format is documented using the Community Standard template from
> the LF. I'm hoping to move Git to use external tools for all digest and
> digital signature operations. Then I can start putting provenance logs
> into a ".well-known" path in Git repos, maybe ".plogs" or something.
> Then I can write/adapt a signing tool to understand provenance logs
> of public keys in the repo instead of the GPG keyring stuff we have
> today.
> 
> Provenance logs accumulate the full key history of a developer over
> time. It represents a second axis of time such that the HEAD of a repo
> will have the full key history, for every contributor available to
> cryptographic tools for verifying signatures. This makes `git log
> --show-signature` operations maximally efficient because we don't have
> to check out old keyrings from history to recreate the state GPG was in
> when the signature was created.

Hmm... I'm not sure if it's an inefficient operation in the first place. If
the keyring is in the same branch as the commit itself, then you can retrieve
the public key using "git show [commit-sha]:path/to/that/pubkey". If it's in a
different branch, then it's slightly more complicated because then you have to
find a keyring commit corresponding to the commit-date of the object you're
checking. In any case, these are all pretty fast operations in git.

> I still like your approach purely for the "it works right now" aspect of
> the solution. Good job. I can't wait to see it in action.

As you know, this is my third attempt at getting patch attestation off the
ground. The first one I implemented using detached attestation documents and
it was clever and neat, but it was too complicated and failed to take off -- I
think mostly because a) it wasn't easy to understand what it's doing, and b)
it required that people adjust their workflows too much.

The second attempt was better, but I think it was still too complicated,
because it required that we parse patch content, making it fragile and slow on
very large patch sets.

I'm hoping that this version resolves the downsides of the previous two
attempts by both being dumb and simple and by only requiring a simple one-time
setup (via the sendemail-validate hook) with no further changes to the usual
git-send-email workflow after that.

I've not yet widely promoted this, as patatt is a very new project, but I'm
hoping to start reaching out to people to trial it out in the next few weeks.

Thanks,
-K

  reply	other threads:[~2021-05-14 13:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  2:22 Preserving the ability to have both SHA1 and SHA256 signatures dwh
2021-05-08  6:39 ` Christian Couder
2021-05-08  6:56   ` Junio C Hamano
2021-05-08  8:03     ` Felipe Contreras
2021-05-08 10:11       ` Stefan Moch
2021-05-08 11:12         ` Junio C Hamano
2021-05-09  0:19 ` brian m. carlson
2021-05-10 12:22   ` Is the sha256 object format experimental or not? Ævar Arnfjörð Bjarmason
2021-05-10 22:42     ` brian m. carlson
2021-05-13 20:29       ` dwh
2021-05-13 20:49         ` Konstantin Ryabitsev
2021-05-13 23:47           ` dwh
2021-05-14 13:45             ` Konstantin Ryabitsev [this message]
2021-05-14 17:39               ` dwh
2021-05-13 21:03         ` Junio C Hamano
2021-05-13 23:26           ` dwh
2021-05-14  8:49           ` Ævar Arnfjörð Bjarmason
2021-05-14 18:10             ` dwh
2021-05-18  5:32         ` Jonathan Nieder

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210514134501.3vzgqdfwwejafkq7@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=avarab@gmail.com \
    --cc=dwh@linuxprogrammer.org \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).