Re: [TLS] TLS 1.3 servers and psk_key_exchange_modes == [psk_ke]?

Nick Harper <ietf@nharper.org> Tue, 07 March 2023 23:49 UTC

Return-Path: <nharper@nharper.org>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AAA54C1522AB for <tls@ietfa.amsl.com>; Tue, 7 Mar 2023 15:49:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
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 puzSasWZGQJn for <tls@ietfa.amsl.com>; Tue, 7 Mar 2023 15:49:31 -0800 (PST)
Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D8005C14CE24 for <tls@ietf.org>; Tue, 7 Mar 2023 15:49:26 -0800 (PST)
Received: by mail-ed1-f48.google.com with SMTP id i34so59140673eda.7 for <tls@ietf.org>; Tue, 07 Mar 2023 15:49:26 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678232965; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n6n0lYo83zGisWd1Mh2wcMwzFGFbMH01jui9J1l8/kU=; b=UdhKbKcXOWn5rzDVbUBIK6Jfirs/iU29GQN3PIJ0ipKEvOpWLuHNXP/PTmA9llIVjB Kf2w0GsqR7IH70BN915ZX9MR6iw/PE9d2F/cwyS/3CTkZj9StfEUEMgg6fOp52aG1gz7 B3viAxpefrcz22KdxRqXmlaRlYpy/9gfGTEIZtm0WzHmFvN/6d5+bNL5OR5wcgN+UTRY OlStKNKjNE5vHUlq5UeDhND3rrYzACXv2yRkapCxpvtwoR3qE649lYUwinZ4OROrsrJz xaWkXuqvRnjLYkOrsU4YXoY7jO+sPoj21lfWjOTCiCzVk1kYjMl6cOOtjK+Q25q1t7pI LtPA==
X-Gm-Message-State: AO0yUKXfx1hsjpxKWU8RmV7/XqFRt2VYVslbFBFH1q4V8VzBfEX2ZMak ZLpJuj9aga+iwnQsCjZC8dB+1ler1ZZNq6T5uXCQtk3/WXPVClOnbUXaeQ==
X-Google-Smtp-Source: AK7set/prPp5v1ftOnTtXXBy9KCNKVYkqgLKiE5/AIWLxLW3Slu/JE8660prjKvvOJpZmPoBSia1s5W80YDc85cgIsw=
X-Received: by 2002:a17:906:3c51:b0:8b2:d30:e72b with SMTP id i17-20020a1709063c5100b008b20d30e72bmr7509232ejg.12.1678232964475; Tue, 07 Mar 2023 15:49:24 -0800 (PST)
MIME-Version: 1.0
References: <Y/1ngz1ITlYds2WP@straasha.imrryr.org> <SY4PR01MB6251E03AE8A05E38FA8A3F0DEEB79@SY4PR01MB6251.ausprd01.prod.outlook.com> <ZAbL6AP8uzgb60NB@straasha.imrryr.org> <CACcvr=mS9DM__U-7=SEg58YFCJzfhheckbY==QNRy2KFCY8x2A@mail.gmail.com> <ZAdPGnIJe63I035Z@straasha.imrryr.org>
In-Reply-To: <ZAdPGnIJe63I035Z@straasha.imrryr.org>
From: Nick Harper <ietf@nharper.org>
Date: Tue, 07 Mar 2023 15:49:13 -0800
Message-ID: <CACcvr=mUACw8uHG0zmGZsUSFFdHq9+i7hZx6ST6RFsdWX_WsUA@mail.gmail.com>
To: tls@ietf.org
Content-Type: multipart/alternative; boundary="000000000000b2c02905f6580f38"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/r3pu8RZEqQwuxPl-P7WHaOWXMHE>
Subject: Re: [TLS] TLS 1.3 servers and psk_key_exchange_modes == [psk_ke]?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Mar 2023 23:49:35 -0000

On Tue, Mar 7, 2023 at 6:50 AM Viktor Dukhovni <ietf-dane@dukhovni.org>
wrote:

> On Mon, Mar 06, 2023 at 11:18:50PM -0800, Nick Harper wrote:
>
> > > Basically, one way or another, PSK key exchange mode negotiation needs
> > > to be interoperable by default.
> >
> > Based on your first message, it sounds like you have identified an
> > implementation where it is not interoperable. All of the spec language in
> > the world won’t fix implementation bugs.
>
> It isn't the only one.
>

Yet other implementations get this correct. If one's goal is to increase
adoption of psk_ke, it would seem to be a better use of time to work with
those implementers to fix those bugs instead of arguing that the spec
should be changed to work around those bugs (which would decrease security
for other parts of the ecosystem).

>
> > PSK only key exchange lacks forward secrecy.
>
> That's not quite accurate.


https://www.rfc-editor.org/rfc/rfc8446#section-2.2 disagrees.

>
> > For general purpose libraries, defaulting to PSK-DHE with forward
> > secrecy is the right choice for security.
>
> Defaulting, sure, provided both sides offer it.  But defaulting
> (interoperable) is different from exclusively offering only psk_dhe_ke
> (not interoperable with clients offeringl only "psk_ke").


> > (As you point out, a server that only supports DHE PSKs shouldn’t send
> > new session tickets to a client that doesn’t support psk_dhe_ke, but
> > that doesn’t contradict psk_dhe_ke only as being a sane default.)
>
> Yes, but the more serious issue is that resumption is impossible,
> sending an unusable ticket is only a minor nuisance.
>
> > RFC 8446 provides the right building blocks, and delegates the choice of
> > which to use to an application profile standard. There’s no need for any
> > additional language in the TLS 1.3 spec to encourage or mandate the use
> of
> > non-FS PSK modes.
>
> I disagree, protocols need to be interoperable by default.  Features
> that fragment clients and servers into non-interoperable islands of
> compatibility are poorly designed.  This is why we have MTI code points,
> and mechanisms to negotiate more preferred options.  We need both PSK
> modes to be MTI and enabled by default, with the stronger chosen when
> mutually supported and enabled.
>

It is interoperable by default, if the implementations follow the spec. If
implementations don't follow the spec, no amount of spec language will fix
their behavior.

Having both PSK modes MTI is a bad idea. Resumption is an optimization:
psk_dhe_ke removes an asymmetric cryptographic operation to verify the
certificate chain, while retaining forward secrecy. psk_ke further
optimizes the handshake by removing all asymmetric crypto, at the cost of
forward secrecy. An implementation could decide that it wants the
certificate verified on every connection (and support no resumption), or
could decide that it only wants to support connections with forward secrecy
(and not support psk_ke). Making any PSK modes MTI reduces security.

>
> > For applications where forward secrecy isn’t needed or the computation
> > costs outweigh the security benefits, the application profiles for
> > those use cases can encourage or mandate psk_ke.
>
> This is not well understood or likely to happen.  For example, ADoT in
> DNS (from iterative resolver to authoritative server, not user to
> resolver) is a good candidate for psk_ke, but it is not possible to to
> enable it, so as a non-trivial fraction of servers are psk_dhe_ke-only,
> negotiating "psk_ke" based on the client's preferred mode does not work.
> This is a protocol issue first, and implementation issue second.
>

This isn't a protocol issue. This is an implementation issue (buggy
implementations sending psk_dhe_ke NSTs in response to psk_ke ClientHellos)
and an ecosystem issue.