GNU bug report logs

#22883 Trustable "guix pull"

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #186 received at 22883@debbugs.gnu.org (full text, mbox, reply):

Received: (at 22883) by debbugs.gnu.org; 30 Apr 2020 15:32:31 +0000
From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 30 11:32:31 2020
Received: from localhost ([127.0.0.1]:47500 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1jUBAs-0007CT-Qv
	for submit@debbugs.gnu.org; Thu, 30 Apr 2020 11:32:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1jUBAq-0007CD-TW
 for 22883@debbugs.gnu.org; Thu, 30 Apr 2020 11:32:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51649)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@gnu.org>)
 id 1jUBAk-0004uH-WD; Thu, 30 Apr 2020 11:32:23 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34390 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@gnu.org>)
 id 1jUBAk-00046s-7c; Thu, 30 Apr 2020 11:32:22 -0400
From: Ludovic Courtès <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Subject: Re: bug#22883: Authenticating a Git checkout
References: <87io14sqoa.fsf@dustycloud.org> <87h9ep8gxk.fsf@gnu.org>
 <20160426001359.GA23088@jasmine> <874majg0z8.fsf@gnu.org>
 <87bn3iz1xc.fsf_-_@gnu.org> <87wpket748.fsf@gnu.org>
 <87bmkwm8ed.fsf@gnu.org> <87png9o8i2.fsf@elephly.net>
 <87fth4bj6y.fsf@gnu.org>
Date: Thu, 30 Apr 2020 17:32:19 +0200
In-Reply-To: <87fth4bj6y.fsf@gnu.org> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sat, 28 Dec 2019 15:47:49 +0100")
Message-ID: <87bln9oupo.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 22883
Cc: 22883@debbugs.gnu.org, Justus Winter <justus@sequoia-pgp.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Hi there!

Ludovic Courtès <ludo@gnu.org> skribis:

>> You mentioned that checking signatures on commits is also kinda slow
>> because it’s sequential and not cached.  I don’t know what I really
>> want, but is there perhaps a way to aggregate signatures on past commits
>> so that the client’s work is reduced…?
>
> The caching implemented in 787766ed1e7f0806a98e696830542da528f957bb
> makes things acceptable: the first “make authenticate” run takes a bit
> more than two minutes to check all the commits starting from ‘v1.0.1’,
> but subsequent runs take a few seconds.
>
> I have plans to make things faster (independently of the cache) by doing
> OpenPGP signature verification entirely in Scheme instead of spawning
> ‘gpgv’ every time.  Again, we’ll have to get a prototype before we can
> tell whether it actually is faster.

I’ve been able to resume work on that in the ‘wip-openpgp’ branch:

  5a86b96f54 git-authenticate: Use (guix openpgp).
  4e66563449 openpgp: Add 'string->openpgp-packet'.
  dc0b5d5e01 openpgp: 'lookup-key-by-{id,fingerprint}' return the key first.
  740d804621 openpgp: 'verify-openpgp-signature' looks up by fingerprint when possible.
  0157c5ef7f openpgp: Add 'lookup-key-by-fingerprint'.
  31fc7cf080 openpgp: Store the issuer key id and fingerprint in <openpgp-signature>.
  c22bede3ce openpgp: Decode the issuer-fingerprint signature subpacket.
  74d0d85e49 DRAFT Add (guix openpgp).

At this stage, ‘make authenticate’ uses the pure-Scheme implementation
(based on Göran Weinholt’s code, heavily modified).  It can authenticate
14K+ commits in ~20s instead of 4m20s on my laptop, which is really nice.

Signature verification in (guix openpgp) does just that: signature
verification.  It does not validate signature and key metadata, in
particular expiration date.  I guess it should at least error out when a
signature creation time is newer than its key expiration time.

It should also reject SHA1 signatures, at least optionally (I haven’t
checked whether our Git history has any of these).

I would very much welcome feedback and advice from an OpenPGP-savvy
person (I’ve Cc’d one to maximize the chances of success :-)).

Next steps:

  • Clean up the (guix openpgp) API a bit, for instance by using proper
    SRFI-35 error conditions.  Perhaps handle v5 packets too.

  • Load the keyring from files in the repo, possibly in a dedicated
    branch.

  • Load the list of authorized keys from the parent of the commit being
    authenticated.

  • Generalize that to channels.

Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 01:18:08 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.