[openpgp] Re: WGLC for draft-ietf-openpgp-pqc [was: Re: I-D Action: draft-ietf-openpgp-pqc-08.txt]

Daniel Huigens <d.huigens@protonmail.com> Thu, 01 May 2025 17:07 UTC

Return-Path: <d.huigens@protonmail.com>
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 F020423AF462 for <openpgp@mail2.ietf.org>; Thu, 1 May 2025 10:07:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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=protonmail.com
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 HFXnQOOog4Wj for <openpgp@mail2.ietf.org>; Thu, 1 May 2025 10:07:26 -0700 (PDT)
Received: from mail-10629.protonmail.ch (mail-10629.protonmail.ch [79.135.106.29]) (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 204F423AF45D for <openpgp@ietf.org>; Thu, 1 May 2025 10:07:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1746119244; x=1746378444; bh=oIhn4g8Gwt7qH7XH/GoI+qeYmYLXXF2E0IdclJVSCAI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Rk8ZLjC2H5u26GD65ODlEt2BqZVdIxKFlb1GVVgnhG1R4Vex59buoqnNvkWWAeN2m z0qOx3m04+HbwvkZzCA3EaXnSGlYu2MPAqJA6/gS/oNTi/UnlYW8oU6YiLs0oKcV+L gStcY5wXJ20/gURIFaRvy29zjRc3phJxHuic94zrUvbzPdOki3HOFqlIUTc3JhIS2T RnGofO7oOyfmiL1xC+ppDJIXOSu9DWCnk+BZmu0lFD0zar+LBHfQYNZKZE6Uslsy+H hx+ilNlI0fDl5VrSWKklm6YX2ZUC/l811LQWlZt26sHvrUIzXa92emctMj1lknszdF 6lhvxL8c+CseQ==
Date: Thu, 01 May 2025 17:07:21 +0000
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
From: Daniel Huigens <d.huigens@protonmail.com>
Message-ID: <3uEh1vLBaG5Cnfic_80Z3QJK3eh_rSNuuX0ZGlrItoy2_HuZ2vtUfqPDjQC-uxdQ2CurgFVG79ET4QyQ3zSgiX8xvTwVERPeA3vOhqjSHpc=@protonmail.com>
In-Reply-To: <87wmblcr8i.fsf@fifthhorseman.net>
References: <174470653269.1286532.14892820163225351018@dt-datatracker-64c5c9b5f9-hz6qg> <LSicuu3DyGQdz5FlANti-HGJ6GuAucc5BKufbsCa603EsSZ0q1XMXYvt_OubLd0UQkg0gh2F--9y9WpoqWfQu5XU-KEcJ15GG66cSFk9ByU=@wussler.it> <87wmblcr8i.fsf@fifthhorseman.net>
Feedback-ID: 2934448:user:proton
X-Pm-Message-ID: 2b807b4e97f9888ae7a1242925a4f20a1b984bae
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: LK52XD5Y7OK5E74U54S7YRRSAI476NPV
X-Message-ID-Hash: LK52XD5Y7OK5E74U54S7YRRSAI476NPV
X-MailFrom: d.huigens@protonmail.com
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
CC: openpgp@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [openpgp] Re: WGLC for draft-ietf-openpgp-pqc [was: Re: I-D Action: draft-ietf-openpgp-pqc-08.txt]
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/ipOOKb5TKii_xtNxe3gifF50d2w>
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>

Hi all,

I've updated the PQC test vectors in the interoperability test suite to
those from draft-08, and we have interop between development versions of
rpgpie, gopenpgp and rnp: https://tests.sequoia-pgp.org/?impls=16420&q=pqc.
OpenPGP.js will follow soon(tm).

Although the tests are green, the behavior isn't fully consistent
between the implementations for the keys that have multiple subkeys,
due to the lack of consensus on encryption subkey selection [1]:
rpgpie encrypts to all subkeys, gopenpgp uses the PQC subkey, and
rnp uses the ECC subkey. Two out of the three of those options
obviously don't achieve post-quantum security.

In previous discussions, we said that encryption subkey selection should
be orthogonal to the PQC draft. However, there is still other text in
the draft suggesting that it should be possible to achieve post-quantum
security by adding a subkey, namely in Section 3.5 (Key version binding):

> ML-KEM-768+X25519 (...) is also allowed in v4 encryption-capable subkeys.
> This permits the keyholder of an existing v4 certificate to add such a
> subkey to defend against store-now, decrypt-later attacks from quantum
> computers without moving to a new primary key.

and Section 8.3 (Key generation strategies):

> Two migration strategies are recommended:
> (...)
> 2. Attach PQ(/T) encryption or signature subkeys to an existing
>    traditional v6 OpenPGP certificate. (...)

(also, if we want to keep this text, it should say "v6 or v4").

So, I see two options:

1. We remove or water down that text, and change the test vectors to
   only have one subkey. (We can make test vectors with multiple subkeys
   once we decide how implementations should behave in that case.)

   However, this would also weaken the justification for allowing
   ML-KEM-768+X25519 to be used in v4 certificates a bit, as it wouldn't
   be possible to add a PQC subkey to an existing certificate to
   (reliably) get post-quantum security, for now.

2. We try to, after all, get consensus that for the test vectors
   presented in the draft, implementations should select the PQC
   subkey, only, and revert some of the changes in draft-08 to make
   that more clear/explicit, perhaps qualified by saying that future
   drafts may amend this guidance. For example, we could say
   (adapted from draft-07):

       In the absence of other indications or guidance on which
       encryption key(s) to select, implementations SHOULD prefer PQ(/T)
       keys when multiple options are available.  When encrypting to a
       certificate that has both a valid PQ/T and a valid traditional
       encryption subkey, an implementation SHOULD use the PQ/T subkey
       only.  Furthermore, if an application has any means to determine
       that encrypting to a PQ/T certificate and a traditional
       certificate is redundant, it should omit encrypting to the
       traditional certificate.

   I'll also make a separate posting to the encryption subkey selection
   thread to try to justify this further.

I originally leaned towards the first option, because of previous
discussions here, but now lean more towards the second, as I think
it'll require fewer changes to this draft, and thus hopefully cause
less of a delay (if the text proposed above is acceptable to folks).
It'd also allow people to achieve post-quantum (encryption) security
sooner.

Apologies for catching / bringing this up a bit late, and on Labor Day
no less :)

Best,
Daniel


[1]: https://mailarchive.ietf.org/arch/msg/openpgp/FMzCI78v8fcRyGovPHpv8ZvxVnI/