Re: [TLS] Next steps for key share prediction

David Benjamin <davidben@chromium.org> Fri, 08 March 2024 23:24 UTC

Return-Path: <davidben@google.com>
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 DF12AC14F68E for <tls@ietfa.amsl.com>; Fri, 8 Mar 2024 15:24:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.258
X-Spam-Level:
X-Spam-Status: No, score=-14.258 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 VwTpoUpP0mns for <tls@ietfa.amsl.com>; Fri, 8 Mar 2024 15:24:51 -0800 (PST)
Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) (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 11FC3C14F684 for <tls@ietf.org>; Fri, 8 Mar 2024 15:24:51 -0800 (PST)
Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-dc6d9a8815fso2651877276.3 for <tls@ietf.org>; Fri, 08 Mar 2024 15:24:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709940290; x=1710545090; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iKT1deG9aYOWvcTzC+AkiQEXTnp41+6PEwMNOGW7yYY=; b=bfXDKv6YNdBmwLleLECDYuB/YJLXBTBTb8rfhAY1Lgc/WdoS5QwZ2cNQEHVFIXatcW dA6eP3d+yTCzkHJvoidpemLHRdkjK5fv4sJcxPXsi4awRgaSCgLM3GXosIoPs6luAk1m lhTYuagmcaqKqAZxlR1qhgtznr4DNdYvvIq9A=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709940290; x=1710545090; h=cc: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=iKT1deG9aYOWvcTzC+AkiQEXTnp41+6PEwMNOGW7yYY=; b=H3DhRMqrbj4Fl3dcZ97ol/Nv90cQO9zpB8k3fY2TaA58Wwedmq63Q9BerdyRL48Lsh yS2Uwsk/F3MXjuCwpsNB+f4MCPyvWSx9agHzhWqrDDvJeDjbpOeXyudgIe7PFFAHbAE0 No6uiXMq12LoW3KpJnelFkhgV2v/1ROlwVOn6lx2gdbOlzmDtidsIs8/KV3L9+B/7fHh O7v1qx5s2TxyKiOxtehJmZRhzS1hykW7oA4vQ6jU+sba6wH+0hq2GZvQsIlgopwsfZeu Q6eKZYUDWK92LIL1FJe7KgN5zMx19kR5Dz9LRw/Gut6v4eb6J5ZyEIdqVuHGRTS2u0Qf uwZg==
X-Gm-Message-State: AOJu0YyrppRMwkjJ4dn6Pm7F8B9+DwYXfQ9IIOvMFML/nnOwex7c89cH Jyo0bO0jhrhZMw/I7U5UfjYhPb9CR+ErWU3+atCbcUr1pO2ULkMVxWCwp/uCV7QLYMyP3yDF4CN qAJbqpaYqzengJsSAqBx9dPEH2O5spfi+dgM=
X-Google-Smtp-Source: AGHT+IG7Par9ETG+MMoa3HTnXFNJl1+i1lXolQGQq8zeeXw1zuVVur845lbTIv0koug5UHlgmz8vG9kT32u4GWXwX8w=
X-Received: by 2002:a25:ce14:0:b0:dcb:e462:6e10 with SMTP id x20-20020a25ce14000000b00dcbe4626e10mr385140ybe.58.1709940289827; Fri, 08 Mar 2024 15:24:49 -0800 (PST)
MIME-Version: 1.0
References: <CAF8qwaB6OZr=Cw7aGyo+9EEo_wQ5Da7KF=3CSEttWqyHQn=+fw@mail.gmail.com> <CACsn0cmc3zM6bWdvFffj11R5vomrnfYQBTe_4j1c=1Sq-GUNyw@mail.gmail.com>
In-Reply-To: <CACsn0cmc3zM6bWdvFffj11R5vomrnfYQBTe_4j1c=1Sq-GUNyw@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Fri, 08 Mar 2024 18:24:32 -0500
Message-ID: <CAF8qwaBsDkL-F8cThUCb5LWnXqj0BD5_ac-WcGpRKF2FvZpXdQ@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000009058f206132e7f8b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/hY-v2Wv2AhXfWAVMaRw9dw1fcIs>
Subject: Re: [TLS] Next steps for key share prediction
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: Fri, 08 Mar 2024 23:24:55 -0000

On Thu, Mar 7, 2024 at 6:34 PM Watson Ladd <watsonbladd@gmail.com> wrote:

> On Thu, Mar 7, 2024 at 2:56 PM David Benjamin <davidben@chromium.org>
> wrote:
> >
> > Hi all,
> >
> > With the excitement about, sometime in the far future, possibly
> transitioning from a hybrid, or to a to-be-developed better PQ algorithm, I
> thought it would be a good time to remind folks that, right now, we have no
> way to effectively transition between PQ-sized KEMs at all.
> >
> > At IETF 118, we discussed draft-davidben-tls-key-share-prediction, which
> aims to address this. For a refresher, here are some links:
> >
> https://davidben.github.io/tls-key-share-prediction/draft-davidben-tls-key-share-prediction.html
> >
> https://datatracker.ietf.org/meeting/118/materials/slides-118-tls-key-share-prediction-00
> > (Apologies, I forgot to cut a draft-01 with some of the outstanding
> changes in the GitHub, so the link above is probably better than draft-00.)
> >
> > If I recall, the outcome from IETF 118 was two-fold:
> >
> > First, we'd clarify in rfc8446bis that the "key_share first" selection
> algorithm is not quite what you want. This was done in
> https://github.com/tlswg/tls13-spec/pull/1331
> >
> > Second, there was some discussion over whether what's in the draft is
> the best way to resolve a hypothetical future transition, or if there was
> another formulation. I followed up with folks briefly offline afterwards,
> but an alternative never came to fruition.
> >
> > Since we don't have another solution yet, I'd suggest we move forward
> with what's in the draft as a starting point. (Or if this email inspires
> folks to come up with a better solution, even better! :-D) In particular,
> whatever the rfc8446bis guidance is, there are still TLS implementations
> out there with the problematic selection algorithm. Concretely, OpenSSL's
> selection algorithm is incompatible with this kind of transition. See
> https://github.com/openssl/openssl/issues/22203
>
> Is that asking whether or not we want adoption? I want adoption.
>

I suppose that would be the next step. :-) I think, last meeting, we were a
little unclear what we wanted the document to be, so I was trying to take
stock first. Though MT prompted me to ponder this a bit more in
https://github.com/davidben/tls-key-share-prediction/issues/5, and now I'm
coming around to the idea that we don't need to do anything special to
account for the "wrong" server behavior. Since RFC8446 already explicitly
said that clients are allowed to not predict their most preferred groups,
we can already reasonably infer that such servers actively believe that all
their groups are comparable in security. OpenSSL, at least, seems to be
taking that position. I... question whether taking that position is wise,
given the ongoing postquantum transition, but so it goes. Hopefully your
TLS server software, if it advertises pluggable cryptography with a PQ use
case, and yet opted for a PQ-incompatible selection criteria, has clearly
documented this so it isn't a surprise to you. ;-)

Between all that, we probably can reasonably say that's the server
operator's responsibility? I'm going to take some time to draft a hopefully
simpler version of the draft that only defines the DNS hint, and just
includes some rough text warning about the implications. Maybe also some
SHOULD level text to call out that servers should be sure their policy is
what they want. Hopefully, in drafting that, it'll be clearer what the
options are. If nothing else, I'm sure writing it will help me crystalize
my own preferences!


> > Given that, I don't see a clear way to avoid some way to separate the
> old behavior (which impacts the existing groups) from the new behavior. The
> draft proposes to do it by keying on the codepoint, and doing our future
> selves a favor by ensuring that the current generation of PQ codepoints are
> ready for this. That's still the best solution I see right now for this
> situation.
> >
> > Thoughts?
>
> I think letting the DNS signal also be an indicator the server
> implements the correct behavior would be a good idea.


I'm afraid DNS is typically unauthenticated. In most TLS deployments, we
have to assume that the attacker has influence over DNS, which makes it
unsuitable for such a signal. Of course, if we end up settling on not
needing a signal, this is moot.

David