[openpgp] Re: Encryption subkey selection

Falko Strenzke <falko.strenzke@mtg.de> Mon, 07 April 2025 10:13 UTC

Return-Path: <falko.strenzke@mtg.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 05BDD184CEC0; Mon, 7 Apr 2025 03:13:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, HTML_MESSAGE=0.001, SPF_HELO_NONE=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=mtg.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 orgwpMlJzYqp; Mon, 7 Apr 2025 03:13:34 -0700 (PDT)
Received: from www.mtg.de (www.mtg.de [IPv6:2a02:b98:8:2::2]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (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 CE153184CE88; Mon, 7 Apr 2025 03:13:29 -0700 (PDT)
Received: from minka.mtg.de (minka [IPv6:2a02:b98:8:1:0:0:0:9]) by www.mtg.de (8.18.1/8.18.1) with ESMTPS id 537ADROJ007705 (version=TLSv1.3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256 verify=NOT); Mon, 7 Apr 2025 12:13:27 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mtg.de; s=mail201801; t=1744020807; bh=JlL8NP8HnsK4269eS4WrGCKGE46c7hky7Pv7VwWPnc4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=m+EIOK12fQjLQrFauN0YizdgN0VcCf/rapXdld6OUHeNBfc61oqRwcMlJMlQ4d8Ho yyEVL+LJ/Osz4cq8By+BKR+ehA9XWMIxxWgU46Ba50yq1lHBLubXi62I8Pjb3348zw 7yBiJ6wze0hdeQsUFxtlpfo97nfA7rqfhab9Dw1DLk1TBXs9Mh9pZsQCbko/8b6Hrn 3rhsZFMfurQMSdPtk3XoMjuay18STN0uC4Jbajkt6DZVk1nb0vc2IaPujGRxoDOkiI 0EpRgouR5SdJsPcjG/9BoXavZpwcNkr1LWN+R+dVj9WsZYcPnWuJ1iwuasaCkrGDTI gQeSKCam7V6fg==
Received: from [10.8.0.100] (vpn-10-8-0-100 [10.8.0.100]) by minka.mtg.de (8.18.1/8.18.1) with ESMTPS id 537ADQ2s008540 (version=TLSv1.3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256 verify=NOT); Mon, 7 Apr 2025 12:13:26 +0200
Message-ID: <b1748002-189a-40c0-8221-50f475749c79@mtg.de>
Date: Mon, 07 Apr 2025 12:13:26 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Bart Butler <bart=2Bietf=40pm.me@dmarc.ietf.org>, Andrew Gallagher <andrewg=40andrewg.com@dmarc.ietf.org>
References: <26f46aef-dde6-4564-92b2-2914aa574944@mtg.de> <E84CD5EE-DAAF-44D6-BCEE-CB92AE6CBBEC@andrewg.com> <-r7DKP-up_y2Y19C3aR7UREiHK6ddwWmMF9wJ55R52gaDYWBiRBQYI5rMI6HXFbuWqZC9ykPncT3fj9Mu48g6S6P4wahJDwziqDkFZ0i5cc=@pm.me>
Content-Language: en-GB
From: Falko Strenzke <falko.strenzke@mtg.de>
Organization: MTG AG
In-Reply-To: <-r7DKP-up_y2Y19C3aR7UREiHK6ddwWmMF9wJ55R52gaDYWBiRBQYI5rMI6HXFbuWqZC9ykPncT3fj9Mu48g6S6P4wahJDwziqDkFZ0i5cc=@pm.me>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-512"; boundary="------------ms000606030704050108060008"
Message-ID-Hash: GCIB2XESWEEUWDGLGLQZJKVPB52XT6MQ
X-Message-ID-Hash: GCIB2XESWEEUWDGLGLQZJKVPB52XT6MQ
X-MailFrom: falko.strenzke@mtg.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
CC: Justus Winter <justus@sequoia-pgp.org>, "openpgp\\@ietf.org" <openpgp@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [openpgp] Re: Encryption subkey selection
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/9YdGQhetHWkEOegYEa7x_k9yOqc>
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 Bart,

I think you are right. But I think this aspect touches another point:

Should the sender, if they don't find any set of suitable encryption 
subkeys by processing the ESS

     a) fail to apply encryption (this is how I understand Justus' proposal)
     b) or should they fall back to any custom key selection strategy 
they prefer?

a) doesn't seem very nice in my view, because it introduces a failure 
mode that precludes encryption where previously – without support of the 
ESS packet in either of the implementations on both sides – was none. 
Falling back to the a custom set of keys should always be possible in my 
view. This is because if the sender wouldn't support the ESS, this is 
what they would do anyway (except we go so far as to make the ESS 
critical). So to say pretending not be supporting ESS seems to be a 
viable option in some way. I think failure of the ESS selection could be 
interpreted to the effect that turning on opportunistic encryption 
should be avoided (for whatever reason that would be otherwise 
considered). But encryption explicitly required by the user should still 
be possible.

In case of b) it doesn't seem to matter that much if we assign implicit 
rank 0 to keys or keep them outside the ESS selection algorithm 
altogether. I would tend to say in case the ESS selection fails, the 
sender should be be able to pick any set of encryption subkeys – whether 
they have an associated ESS or not.

Best regards,

Falko


Am 07.04.25 um 10:19 schrieb Bart Butler:
> Hi Andrew and Falko,
>
> I think “use existing implementation behavior” would be better for 
> cases where no suitable subkeys with ESS are found. Assigning zero 
> would seemingly mandate that if the subkeys with nonzero ESS were 
> found to be unusable every other subkey that was usable would have to 
> be used together, which is in general different than current 
> implementation behavior and is an odd side effect.
>
> -Bart
>
> On Mon, Apr 7, 2025 at 9:36 AM, Andrew Gallagher 
> <andrewg=40andrewg.com@dmarc.ietf.org <mailto:On Mon, Apr 7, 2025 at 
> 9:36 AM, Andrew Gallagher <<a href=>> wrote:
>> Hi, Falko.
>>
>> On 7 Apr 2025, at 07:50, Falko Strenzke <falko.strenzke@mtg.de> wrote:
>> >
>> > But I think we need to define a default rank that is assigned to a 
>> subkey in the case that at least one encryption subkey in the 
>> certificate carries the ESS. That would probably be "0".
>>
>> This would be reasonable. Another option would be to treat such 
>> encryption subkeys as “do not automatically select”. This might seem 
>> to render the subkey unusable, but some clients allow the user to 
>> manually override the default subkey selection algorithm, in which 
>> case it could still be used. It’s worth noting that gnupg appears to 
>> now interpret the “reserved for adsk” key flag this way.
>>
>> A
>> _______________________________________________
>> openpgp mailing list -- openpgp@ietf.org
>> To unsubscribe send an email to openpgp-leave@ietf.org
>
> _______________________________________________
> openpgp mailing list --openpgp@ietf.org
> To unsubscribe send an email toopenpgp-leave@ietf.org
-- 

*MTG AG*
Dr. Falko Strenzke

Phone: +49 6151 8000 24
E-Mail: falko.strenzke@mtg.de
Web: mtg.de <https://www.mtg.de>

------------------------------------------------------------------------

MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
Commercial register: HRB 8901
Register Court: Amtsgericht Darmstadt
Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
Chairman of the Supervisory Board: Dr. Thomas Milde

This email may contain confidential and/or privileged information. If 
you are not the correct recipient or have received this email in error,
please inform the sender immediately and delete this email.Unauthorised 
copying or distribution of this email is not permitted.

Data protection information: Privacy policy 
<https://www.mtg.de/en/privacy-policy>