Re: [TLS] ML-KEM key agreement for TLS 1.3

Eric Rescorla <ekr@rtfm.com> Thu, 07 March 2024 12:18 UTC

Return-Path: <ekr@rtfm.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 8BB05C14CEFE for <tls@ietfa.amsl.com>; Thu, 7 Mar 2024 04:18:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Level:
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20230601.gappssmtp.com
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 WaHnFdaM6JJw for <tls@ietfa.amsl.com>; Thu, 7 Mar 2024 04:18:25 -0800 (PST)
Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 D617AC151532 for <tls@ietf.org>; Thu, 7 Mar 2024 04:18:25 -0800 (PST)
Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-609408d4b31so8687517b3.0 for <tls@ietf.org>; Thu, 07 Mar 2024 04:18:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20230601.gappssmtp.com; s=20230601; t=1709813905; x=1710418705; 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=QfogO/0qN6qMpCxnaCASid9vPWLnzuYFuuq8bSBxnsQ=; b=zL3WquaHaMiq/pYU3r9OKVceUYyCuBbgSmMZ1eF7Ju25LjM3t6IK+ctiFeAn4Te4wL bnYFvpmsWNYSOE/Xyuilh8E5whvEb2C1jd6g94CPbCeJYpDLzmL94gs+aW8uWgo/qyjj KIUvIZf1TGH+BhjQd+c6ceGxjCDLyt0GnQJA3eic/QOPJGIlWO7K/Xb7qx+URgR51zeG flp/DTh98akyvywJvBtSBakumaPKRwt67R/gfmBi4rs2o4obsX8h1A6p8C5cgGiwDJPN zMlmh6XHdA8g1M7HwZiQGktWVEyZjsIcGrzur78lVdeOr1yvgIkUfKd9oCfGYTBT1wBy 555g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709813905; x=1710418705; 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=QfogO/0qN6qMpCxnaCASid9vPWLnzuYFuuq8bSBxnsQ=; b=Ciukt6o0Vmf5LlfH+cKfvo/royBvusujdo52PfQLGbbK4mMo3YnX5ouXPCJ/eD0JU8 tp1mSIxga0e62IGCtDvNnrygpk4x5ISMeemS0FFCQtuRtBDZ8qEsyGnCRP6sFJSlSP8+ vNm8LR3pbZR2z9emXvHA/vvn3/F5Pt85I/2MOoAUh4rA70jTk0ywSnrRGjyMcTeDPDcJ Xn/waGC5njWhPluXa0HMw5bXpx3G6548nUC0Vyx4TyV5+1GFND2o/UdU7bBlq6pgtlWY xQUA4F6Vrww2ukt5Tyu4yK/Qk8f3KcsIm+XqtH/h2oRiXwsxrs+/uD9hrdHwz3YhxyIu h4fg==
X-Forwarded-Encrypted: i=1; AJvYcCVLvqOMjuXRfFSzrNPa5Ctis19swm1OhL7+yLpxMsxs/SAYyBPaA65Zj7IJHKntAYXoTiPecbukNyK+ldY=
X-Gm-Message-State: AOJu0YwEy8k4gwcqEXG5VQIHalMJtkmP3g2t/4UxwICYP1bZBaKU2gJw 7T3vQN6+ELHudor0TYTf3rV5wkuzTdQcKASu2wqVRVbMvXcgNb2H0g5VYiEzRSmlpOHOQEiQONd XnitK8mC1MJCK8fdTxtNeWA3LnTskzLxr0xRbcg==
X-Google-Smtp-Source: AGHT+IHcQlWTMt/+h6BeApX/N3xld+747bK9zYox5PRB/f0jX4uq0yP+v/v9WbtPBNiGRV00hHhLhI8lk6VX4jQvBqo=
X-Received: by 2002:a81:4ec3:0:b0:609:96e0:b194 with SMTP id c186-20020a814ec3000000b0060996e0b194mr14820069ywb.9.1709813904877; Thu, 07 Mar 2024 04:18:24 -0800 (PST)
MIME-Version: 1.0
References: <CAFR824wL3sZKoD6OzVpOi8=HZ+aFjqVi4L8UsF8b0p18KOEqVA@mail.gmail.com> <CABcZeBPFidzshG2ZM0+JKc73prvan4_FWTTr6r1byxAeXkkcOw@mail.gmail.com> <CAFR824zbHgwCcHi6C7SATP5q0M7N7rYAjHXt9pGAnK=KDJCJhA@mail.gmail.com> <CABcZeBNth=9q9cyxZD96Ywsw5k0nRk4GbeZA38=P9NmuOc6HPg@mail.gmail.com> <CAChr6Sz4eu3f0bhJXdEg-zQZsa=MYhZzVzi-HuWaSOeso-F3zw@mail.gmail.com> <CACsn0c=nB95t73crnGuBA2GonwcFg7uqTc=T3nOsik8tXAK0bw@mail.gmail.com> <500590c1-c6c9-403a-948f-26f0cd54d0e5@dennis-jackson.uk> <CAMjbhoX4+dUaB7xSyr=BMqhv8MY4USHBmMOCVHKWB98hEFDn8A@mail.gmail.com> <8d876121-b6c5-4b87-9a85-37b0f86de37c@dennis-jackson.uk>
In-Reply-To: <8d876121-b6c5-4b87-9a85-37b0f86de37c@dennis-jackson.uk>
From: Eric Rescorla <ekr@rtfm.com>
Date: Thu, 07 Mar 2024 04:17:48 -0800
Message-ID: <CABcZeBOSfroYBgSiVLaVnQOLtuiYR6pEwSuhd0+VQdzBrAugWA@mail.gmail.com>
To: Dennis Jackson <ietf=40dennis-jackson.uk@dmarc.ietf.org>
Cc: Bas Westerbaan <bas=40cloudflare.com@dmarc.ietf.org>, "TLS@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006ec64f0613111243"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/QUeLdjyoOsHeYLVvSoZih2Vgtmg>
Subject: Re: [TLS] ML-KEM key agreement for TLS 1.3
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: Thu, 07 Mar 2024 12:18:29 -0000

On Thu, Mar 7, 2024 at 1:47 AM Dennis Jackson <ietf=
40dennis-jackson.uk@dmarc.ietf.org> wrote:

> On 07/03/2024 03:57, Bas Westerbaan wrote:
>
> We think it's worth it now, but of course we're not going to keep hybrids
> around when the CRQC arrives.
>
> Sure, but for now we gain substantial security margin* against
> implementation mistakes, advances in cryptography, etc.
>
> On the perf/cost side, we're already making a large number of sub-optimal
> choices (use of SHA-3, use of Kyber in TLS rather than a CPA scheme,
> picking 768 over 512, etc), we can easily 'pay' for X25519 if you really
> wanted. I think if handshake cycles really mattered then we'd have shown
> RSA the door much more quickly [1].
>
> Best,
> Dennis
>
> * As in, actual security from combination of independent systems, not the
> mostly useless kind from using over-size primitives.
>
In a world where there is a CRQC, there are two distinct costs to
continuing to support hybrids:

1. The computational cost of actually doing X25519 (or whatever)
2. The software complexity cost of the code to do the hybrid and to
negotiate it.

>From the perspective of an implementation the computational cost scales
with the
number of handshakes it has to do with the hybrid rather than pure ML-KEM.
The complexity cost, however, is constant up to the point where you can
remove it
entirely. Because of the highly centralized structure of the TLS browser
and server
ecosystem, these timelines can be very different: it's relatively fast to
get to high
levels of deployment so that most handshakes are "new", but can be quite
slow
to eliminate the last "old-only" peers.

So, the question I have is whether having a code point for pure ML-KEM now
advances the project of deprecating hybrids at the point where the X25519
part
isn't doing anything meaningful (again, assuming that point eventually
comes).
My sense is that it largely does so if fielded implementations are willing
to do
pure-ML-KEM, because, as above, it's that quantity that dominates the
decision
of whether you can remove the hybrid code entirely. Personally, I'd still
be quite
uncomfortable with allowing pure ML-KEM negotiation in a major product. If
others
feel the same way, I'm not quite sure what it gets us, other than saving us
the
fairly small amount of specification effort of doing the pure version.

It's of course worth noting that a CRQC might be very far in the future and
we
might get better PQ algorithms by that point, in which case we'd never
deploy
pure ML-KEM.

-Ekr


> [1] https://blog.cloudflare.com/how-expensive-is-crypto-anyway
>
>
> Best,
>
>  Bas
>
> On Thu, Mar 7, 2024 at 1:56 AM Dennis Jackson <ietf=
> 40dennis-jackson.uk@dmarc.ietf.org> wrote:
>
>> I'd like to understand the argument for why a transition back to single
>> schemes would be desirable.
>>
>> Having hybrids be the new standard seems to be a nice win for security
>> and pretty much negligible costs in terms of performance, complexity and
>> bandwidth (over single PQ schemes).
>>
>> On 07/03/2024 00:31, Watson Ladd wrote:
>> > On Wed, Mar 6, 2024, 10:48 AM Rob Sayre <sayrer@gmail.com> wrote:
>> >> On Wed, Mar 6, 2024 at 9:22 AM Eric Rescorla <ekr@rtfm.com> wrote:
>> >>>
>> >>>
>> >>> On Wed, Mar 6, 2024 at 8:49 AM Deirdre Connolly <
>> durumcrustulum@gmail.com> wrote:
>> >>>>> Can you say what the motivation is for being "fully post-quantum"
>> rather than hybrid?
>> >>>> Sure: in the broad scope, hybrid introduces complexity in the
>> short-term that we would like to move off of in the long-term - for TLS 1.3
>> key agreement this is not the worst thing in the world and we can afford
>> it, but hybrid is by design a hedge, and theoretically a temporary one.
>> >>>
>> >>> My view is that this is likely to be the *very* long term.
>> >>
>> >> Also, the ship has sailed somewhat, right? Like Google Chrome,
>> Cloudflare, and Apple iMessage already have hybrids shipping (I'm sure
>> there many more, those are just really popular examples). The installed
>> base is already very big, and it will be around for a while, whatever the
>> IETF decides to do.
>> > People can drop support in browsers fairly easily especially for an
>> > experimental codepoint. It's essential that this happen: if everything
>> > we (in the communal sense) tried had to be supported in perpetuity, it
>> > would be a recipe for trying nothing.
>> >
>> >> thanks,
>> >> Rob
>> >>
>> >> _______________________________________________
>> >> TLS mailing list
>> >> TLS@ietf.org
>> >> https://www.ietf.org/mailman/listinfo/tls
>> > _______________________________________________
>> > TLS mailing list
>> > TLS@ietf.org
>> > https://www.ietf.org/mailman/listinfo/tls
>>
>> _______________________________________________
>> TLS mailing list
>> TLS@ietf.org
>> https://www.ietf.org/mailman/listinfo/tls
>>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>