Re: [openpgp] Code-signing in OpenPGP [was: Re: SLH-DSA code points]

Simon Josefsson <simon@josefsson.org> Sun, 24 March 2024 11:31 UTC

Return-Path: <simon@josefsson.org>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4145AC14F6B8 for <openpgp@ietfa.amsl.com>; Sun, 24 Mar 2024 04:31:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=josefsson.org header.b="6vo34246"; dkim=pass (2736-bit key) header.d=josefsson.org header.b="T/TdM0n/"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lpaUZ4t_uwhE for <openpgp@ietfa.amsl.com>; Sun, 24 Mar 2024 04:31:28 -0700 (PDT)
Received: from uggla.sjd.se (uggla.sjd.se [IPv6:2001:9b1:8633::107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F978C14F6AA for <openpgp@ietf.org>; Sun, 24 Mar 2024 04:31:27 -0700 (PDT)
DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:In-Reply-To :Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description; bh=7c96UhX7wLfbtvLhw35urrgvLoqf+TJoxy8idp3zbUg=; t=1711279879; x=1712489479; b=6vo342464c8P1R6RMrzU1seReg52tq5cmVcc43iFZ0Se40J7+C6KjlS61N+nkkiXFSaQRFdgce+ di15XZb8VBA==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7c96UhX7wLfbtvLhw35urrgvLoqf+TJoxy8idp3zbUg=; t=1711279879; x=1712489479; b=T/TdM0n/BuM8gRe8gmt+ykIqhMWSo73Xnb1EpiiwiAH281fQR4R66InuEkBHwlFZ9XSZUlRamgQ IDwKzfzqdcIiGlM97inuc41hcMrvAD1NBynQ6hLm2/iJoCHxl4ZAlYgZeCawFyxxMJTYEvDxO+cQ/ w44vAEGjzfZqK5l1JDcHZhnv9GfvxJNrtrGS7siaQ+7VAJI8c/vNlsQwCMEuOjYjyl8HH9CYqRnQ4 Sy5VZgwiQ3/DyPpJmK0NEzD6udWWF0TyXiv+PAdWaagFdmUAUNy0c+lb8bBj++WzC3FmLKDGfuQ8N o0Ao/8v54P3Ou0SYlT1UE9sZkIClkYrjnrxFp7JpflU3AgSK0pPhBamxx0UPzLqJwix2/xnTSPbHp SKv9t/geCjOQZhkGjiF1ssey4nzagGalDO+ZI5ahS7cQAfxiGxSeapH9BYDKrmwgyPWAHwDBX;
Received: from [2001:9b1:41ac:ff00:823f:5dff:fe09:16ac] (port=51874 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <simon@josefsson.org>) id 1roM4K-003FC7-9c; Sun, 24 Mar 2024 11:31:16 +0000
From: Simon Josefsson <simon@josefsson.org>
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, openpgp@ietf.org
References: <42ff8d55-88a9-4c84-99bd-688f1d29b508@mtg.de> <cmw0WtLf6I-72e-G31FTB9xrwcccedIXaLi0QxYKjN-q9HAwCryEfqHwv6tZnlc2O3STIbVEoFY7gRzENrRBS8EDd_2lKWwx33UQBPrG204=@protonmail.com> <87bk763ykr.fsf@fifthhorseman.net> <877chu10y0.fsf@kaka.sjd.se> <328833.1711246137@dyas>
OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt
X-Hashcash: 1:23:240324:mcr@sandelman.ca::Z42+Khpv2aBylhJQ:2oAP
X-Hashcash: 1:23:240324:openpgp@ietf.org::U+bmH4ot8nqKxlyT:UM3a
X-Hashcash: 1:23:240324:simon=40josefsson.org@dmarc.ietf.org::8G51c2mQKBiwXYcz:yvEk
X-Hashcash: 1:23:240324:dkg@fifthhorseman.net::16wqLI6T1s0SBowC:21HH6
Date: Sun, 24 Mar 2024 12:31:05 +0100
In-Reply-To: <328833.1711246137@dyas> (Michael Richardson's message of "Sun, 24 Mar 2024 12:08:57 +1000")
Message-ID: <87v85bsw7a.fsf@kaka.sjd.se>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/dCfBN4tAU5R5XCiMhVYR2EbSFLk>
Subject: Re: [openpgp] Code-signing in OpenPGP [was: Re: SLH-DSA code points]
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Mar 2024 11:31:34 -0000

Michael Richardson <mcr+ietf@sandelman.ca> writes:

> Simon Josefsson <simon=40josefsson.org@dmarc.ietf.org> wrote:
>     >> If i had to make two bins, it'd probably be something like:
>     >>
>     >> # Lightweight sigs (frequent, informal, maybe EdDSA?)
>     >>
>     >> - daily e-mails
>     >> - git commits
>     >>
>     >> # Heavyweight sigs (infrequent, formal, maybe SLH-DSA?)
>     >>
>     >> - tarballs
>     >> - release announcement e-mails
>     >> - git tags
>
>     > This roughly matches my use-cases too, but I don't feel confident using
>     > EdDSA for the first use-case forever, in case a quantum computers can
>     > attack it in the future.  A hybrid EdDSA + ML-DSA-87 could work.
>
> In the case of git commits, subsequent signatures coroborate (or do I mean
> endorse?) the earlier ones.  And the release/tag commit signature effectively
> signs everything that was before.

Getting off-topic now, but that approach is fragile (easy to overlook
malicious code added three thousand commits ago when signing a new
commit) and git normally uses SHA1 which is known broken, so no, not
really.  There are strongers ways to authenticate git history chains:

https://archive.fosdem.org/2023/schedule/event/security_where_does_that_code_come_from/

To bring this on-topic, that presentation suggests to me that git
commits has to be PQ-safely signed: signatures of git commits is what is
protecting the integrity of the entire Guix operating system, end-to-end
down to the users: every user perform this PGP git commit verification
step on every upgrade.  Guix uses PGP to sign git commits.  To protect
against future quantum attacks, having these developers migrate to a
post-quantum-safe algorithm would be nice, but not if it risks breaking
everything due to implementation bugs in the new PQ-implementation.

I think the Guix integrity model is a good use-case for why we want a
PGP hybrid signature scheme traditional + post-quantum, for example
Ed25519 with robust SPHINCS+.

/Simon