[openpgp] Re: Algorithms vs packets in forwarding and PSK

Heiko Schäfer <heiko.schaefer@posteo.de> Mon, 08 September 2025 23:28 UTC

Return-Path: <heiko.schaefer@posteo.de>
X-Original-To: openpgp@mail2.ietf.org
Delivered-To: openpgp@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 44FE35F836B2 for <openpgp@mail2.ietf.org>; Mon, 8 Sep 2025 16:28:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -4.398
X-Spam-Level:
X-Spam-Status: No, score=-4.398 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_MED=-2.3, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=posteo.de
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H9j_vO69GV1K for <openpgp@mail2.ietf.org>; Mon, 8 Sep 2025 16:28:46 -0700 (PDT)
Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 8AECB5F836AB for <openpgp@ietf.org>; Mon, 8 Sep 2025 16:28:46 -0700 (PDT)
Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CA01E240028 for <openpgp@ietf.org>; Tue, 9 Sep 2025 01:28:38 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1757374118; bh=udMSl6dN0Jt7dRQyzAJcGqLoY4y0swbNafKxl7lMAjU=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding:From; b=egBQyklN/9VqG6WUWUjMdpaiOe6rMjoee5HKObIPnqa8x6jRug8A4D3fsy1eCfqQV yBngTZ85JP+UxJdlASYIDKzPl/E5xZ1qLxrodwe0pAtM8qijMDeOHNE30z8iP8Cyd0 MRI6jzV4btW65UdFa2HYUq1jzo1hHIw0VZ6E+wPJQOvOjRF3X213gkTlltcBq5cTsg 8gYWSQRh527+88srE008drg+rK1dzos5TdwscI5j3Fkp88YFlk/+XDRaIMK7r0k74Z YW9u/R8bqx7huwVdlF1+utkLwA3mAFtHR9iL6XSRYnMhYblCYHew+ylYhwhgWkBwq0 7J5TgueO6FSsQ==
Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4cLNS62vJYz9ryQ for <openpgp@ietf.org>; Tue, 9 Sep 2025 01:28:38 +0200 (CEST)
Received: from services.foundation.hs (services.foundation.hs [192.168.21.4]) by mail.foundation.hs (Postfix) with ESMTP id 0AFB3705C5 for <openpgp@ietf.org>; Tue, 9 Sep 2025 01:28:38 +0200 (CEST)
Message-ID: <a208196f-c456-4f98-9c94-0daad5ec149b@posteo.de>
Date: Mon, 08 Sep 2025 23:28:38 +0000
MIME-Version: 1.0
To: openpgp@ietf.org
References: <Hc3ISJioGLKTY8w-xL2U4-c2UDlDmBR6QZ2IJ_s_PzKT7kpnG9tc1yV0doyJZe9E-X8yvsiJDiyVyvmuQ-iDC03tpNtVnAl2YDHZ9-FJKys=@protonmail.com>
Content-Language: en-US
From: Heiko Schäfer <heiko.schaefer@posteo.de>
In-Reply-To: <Hc3ISJioGLKTY8w-xL2U4-c2UDlDmBR6QZ2IJ_s_PzKT7kpnG9tc1yV0doyJZe9E-X8yvsiJDiyVyvmuQ-iDC03tpNtVnAl2YDHZ9-FJKys=@protonmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Message-ID-Hash: IPKGW7WFISLQ7V7XIPRJVILDUGZRJ6Z6
X-Message-ID-Hash: IPKGW7WFISLQ7V7XIPRJVILDUGZRJ6Z6
X-MailFrom: heiko.schaefer@posteo.de
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-openpgp.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [openpgp] Re: Algorithms vs packets in forwarding and PSK
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/x3nImJLZLm-eCEvneFxFzJDb_g0>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Owner: <mailto:openpgp-owner@ietf.org>
List-Post: <mailto:openpgp@ietf.org>
List-Subscribe: <mailto:openpgp-join@ietf.org>
List-Unsubscribe: <mailto:openpgp-leave@ietf.org>

Hello Daniel, list,

this is going to contain slight duplications with my previous mail, 
apologies.

> We basically have a 3x3 grid of options:
>
> A) Forwarding
>     1. Define new algorithms; reuse private key and PKESK packets
>     2. Define a new key packet and a new FKESK packet
>     3. Define a new FKESK packet, reuse the private key packet
> B) Persistent symmetric keys
>     1. Define new algorithms; reuse private key, PKESK and signature
>        packets
>     2. Define all new packets
>     3. Define a new key packet, reuse other packets, also define new
>        algorithms or the special value 0

To recap, for Persistent symmetric keys (B), I argued in favor of B3.

New key packet (but reuse Signature packet, and probably also reuse the 
PKESK packet).

As I argued, I think persistent symmetric key packets are sufficiently 
different from asymmetric ones that reusing the existing key packet is 
more trouble than the reuse is worth.

I argued for using explicit Algorithm IDs. Presumably two, with no huge 
prospect of that number growing much, or at all.



Regarding Forwarding (A), I prefer A1 (or alternatively A3).

Either way, I'd prefer to reuse the key packet here:

I don't think there's much danger of footguns or excessive burden on 
implementations in reusing the existing secret key packets for 
forwarding keys.
The conceptual difference to "normal asymmetric private keys" is smaller 
than with persistent symmetric keys.

In particular, the failure mode for misusing Forwarding keys is less 
severe. I don't see additional risk for users making dangerous mistakes 
around forwarding keys (I'd judge them as similar to, but less dangerous 
to mishandle than "normal" secret keys).

Signalling the specific intended use of a forwarding subkey via a Key 
Flag (as opposed to with a separate packet type) seems in line with 
existing practice, to me.


For both Forwarding and Persistent symmetric keys I have no strong 
feelings between re-using the PKESK or adding a new type of ESK packet.
However, in both cases, I'd default to re-using the PKESK.


I think the most serious reason for new packet types for Forwarding 
would be if we worry about needing many new entries in the Public Key 
Algorithms Registry. But I don't think that's a serious concern.


To quantify the Public Key Algorithms Registry status quo:

- In RFC 9580 the highest entry in the registry is 28 (but the IDs are 
not densely used)
- draft-ietf-openpgp-pqc-12 uses 30-36,
- draft-ehlen-openpgp-nist-bp-comp (as presented at IETF 123) envisions 
using another 10 code points.

So a grand total of well under 50. Even if we ended up specifying, say, 
20 forwarding algorithms in the Public Key Registry over the next decade 
(which seems like a very generous upper bound), that would not seem 
prohibitive to me.

My conclusion is that there is no strong argument for introducing a new 
ESK type for either of the two formats.


Thanks, regards,
Heiko