Re: [TLS] Before we PQC... Re: PQC key exchange sizes

Phillip Hallam-Baker <ietf@hallambaker.com> Sat, 06 August 2022 16:47 UTC

Return-Path: <hallam@gmail.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 256C9C157B37 for <tls@ietfa.amsl.com>; Sat, 6 Aug 2022 09:47:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.413
X-Spam-Level:
X-Spam-Status: No, score=-1.413 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no 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 AZySS7ybZ-wq for <tls@ietfa.amsl.com>; Sat, 6 Aug 2022 09:47:47 -0700 (PDT)
Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (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 8F778C14F746 for <tls@ietf.org>; Sat, 6 Aug 2022 09:47:47 -0700 (PDT)
Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-10dc1b16c12so6084323fac.6 for <tls@ietf.org>; Sat, 06 Aug 2022 09:47:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=clWf9cB/p7Wtd5yRud+2GOl/YhqZVKgZA2TXCbYv+DY=; b=XURk9JjFwtAJzL/JbtyV+c9vZp6xdwhZAyN74sJJKyIU+TS+3xzs136RFGWK1zgMPa er40VTMpDR1lRnM7RtqsAUYpEkTsTe4I04B8GggakZLxR6F9a4L0z5AsuG+dURfcFXFy avb3w8HvDvPQPbPTsBRlLW8ECsudW1xaI7K00UiX1uMjZkimMHBDN1A8e1OMaKHalqZf lNEDjm3+5JehontjjogRuYvD/l2gD8cRkJv6xe6NMXl9y4G+/CGf5nLckyYZRo5CLKjI MH68uhIo0ETJiANwtnUe2xVLjaIHTL/e91wSr75fxzO9deaDg8+lA5Krrm/Nhjypr2Cl GM9Q==
X-Gm-Message-State: ACgBeo3bjm5Puj27nK9poGeUOr/ugQ+L7WD8Lvgl5K869CDbyyt1p3fl 5AR3odlrYVht7kqxjmULJtDLP03pQrQxQZS2w0U=
X-Google-Smtp-Source: AA6agR6GS7c9O+JKA1/8DHykVUePRmjDyovONxZZVldQ1wO2wcn/fu8XkCx665paMe0bzoP+IXmJgqXQ1k2tKF7zdW4=
X-Received: by 2002:a05:6870:9590:b0:de:27ca:c60c with SMTP id k16-20020a056870959000b000de27cac60cmr9152949oao.108.1659804466731; Sat, 06 Aug 2022 09:47:46 -0700 (PDT)
MIME-Version: 1.0
References: <CABzBS7nsbEhR-bmHG_ViSJFSH-0_5p0O3vKndS4+wFR=iGQzhw@mail.gmail.com> <CAMm+LwgAzb4t=awzpU4Sb5j7Bf6DuR3u+23n+h_C3Pnsin-SHg@mail.gmail.com> <CH0PR11MB544479BFF3107C532AD75172C1619@CH0PR11MB5444.namprd11.prod.outlook.com> <20220806051105.GP3579@akamai.com>
In-Reply-To: <20220806051105.GP3579@akamai.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
Date: Sat, 06 Aug 2022 12:47:35 -0400
Message-ID: <CAMm+LwhwKW6vmy7vu6Q_8Bg-CNtJyzgPJhKEzo9gP85ktnk75g@mail.gmail.com>
To: Benjamin Kaduk <bkaduk@akamai.com>
Cc: "Scott Fluhrer (sfluhrer)" <sfluhrer=40cisco.com@dmarc.ietf.org>, Thom Wiggers <thom@thomwiggers.nl>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a2e16405e59557ed"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/DGIHX5fzgdMIaAkOvZPzF-tmWyc>
Subject: Re: [TLS] Before we PQC... Re: PQC key exchange sizes
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: Sat, 06 Aug 2022 16:47:52 -0000

On Sat, Aug 6, 2022 at 1:11 AM Benjamin Kaduk <bkaduk@akamai.com> wrote:

> Hi Scott,
>
> mutt+links can't cope with your text/html using [p class="MsoNormal"
> style="margin-left:.5in"] for quoting (and the text/plain multipart
> alternative is completely busted), so I have to trim PHB's original in most
> instances.
>
> On Sat, Aug 06, 2022 at 03:18:31AM +0000, Scott Fluhrer (sfluhrer) wrote:
> >
> > > I have the luxury of having 0 users. So I can completely redesign my
> architecture if needs be.
> >
> > I would disagree; after all, we do have existing TLS 1.3
> implementations.  I believe it is important to avoid unnecessary changes,
> for two reasons:
>
> PHB's use of the first-person singular implies he's talking about the
> mathematical mesh, not TLS at all.
>

Exactly, once you have an installed base, every change is difficult. Unless
of course you have a closed system like Signal where everyone uses software
from the same source which also provides the service.

The other big difference is that TLS is critical infrastructure and I am
frankly rather offended by the idea that winning a prize at the NIST cipher
of the year show is all the cryptographers have to do to get us to deploy.
That is not how we go about things, or at least it shouldn't be.

We are designing a security specification here. One that has global impact.
I want to see this done properly. The cryptographers don't always get it
right. If we had paid a little more attention in the specification of HKDF,
we might have spotted an issue I discovered the hard way.

If we are going to add any value in this process we have to have enough
people willing to ask enough hard questions that we can be confident we
have an understanding of the problem in IETF. Right now, it looks like most
people are afraid to ask the obvious questions for fear of looking foolish.

I can explain RSA or DH to people with very little mathematical knowledge
beyond algebra. I literally have a degree in nuclear physics. If the people
presenting themselves as experts in this space are unable to explain the
issues with clarity, not only do I not understand the issues, I am unable
to determine if they understand them either.

Like my college tutor used to say, "There are two ways of constructing a
software design: One way is to make it so simple that there are obviously
no deficiencies, and the other way is to make it so complicated that there
are no obvious deficiencies. The first method is far more difficult."



> > I’m trying to figure out what you’re saying; at least one of us is
> confused.  NIST asked for a Key Exchange Mechanism (KEM), and Kyber meets
> that definition (which is essentially what you describe; both sides gets a
> shared secret).  That is the functionality that TLS needs, and is the
> functionality that NIST (and others) evaluated.  Yes, there are internal
> functions within Kyber; no one is suggesting those be used directly.  And,
> yes, NIST might tweak the precise definition of Kyber before it is formally
> approved; any such tweak would be minor (and there might not be any at
> all); if they do make such a change, it should not be difficult to modify
> any draft we put out to account for that change.
>
> I thought KEM expanded to "Key Encapsulation Mechanism" (viz RFC 9180).
> Indeed, my understanding is that PHB's specific point is that it is *not*
> an exchange, and rather that the sender picks a key and the recipient just
> gets that key without contributing do it.
> (Well, I think there is maybe also some bit in PHB's note that's quibbling
> about how the sender doesn't actually pick the key, and rather the local
> output of the KEM is the encapsulated blob plus the shared key, with the
> shared key not being an input to the KEM ... but I haven't read NIST's
> report yet and can't confirm or reject that assertion.)  I am reading PHB
> as saying that the "internal function" within Kyber that is an "actual KEM"
> is one that takes the shared key as input and produces the encapsulated
> blob as output (again, cannot confirm or reject).
>

It is a bit more than a quibble.

If we are going to make TLS post quantum, we have to allow for the
possibility that we have to change the PQC crypto. There are still laptops
and weekends after all. And if we depend on the replacement algorithm
providing for key recovery, we are going to have to add in additional key
wrap to make things work.


> It was my understanding that TLS 1.3 didn’t do rekeys
> (ChangeCipherSuite).  Instead, the key agreement is done only at connection
> establishment time, and could be broken into:
>

TLS doesn't call them rekeys because it considers each new session to be a
separate protocol exchange. But if you consider all the interactions as
being part of a single protocol, resumption is actually rekeying. That is
why 0-RTT is 'possible', we are not doing 0-RTT, we just called the setup
part of something else.



> >   *   Full negotiation (the client not having any context)
> >   *   Resumption (0-RTT or 1-RTT) negotiation (where the client has some
> secret data from a previous full negotiation)
> > Because those are both fresh negotiations, I don’t see any alternative
> to using a postquantum key exchange for both.
>

Are you proposing pure Kyber or a hybrid though?

Do we really trust the output of the competition enough to make it a single
point of failure in the most widely used cryptographic protocol? That would
seem to be an astonishing decision and one that I for one would be unable
to support.

Until we have PQC certificates, the initial exchange is going to be
classical. Including the output of the initial exchange in the ephemeral
exchange makes the system a hybrid exchange that is secure against QCC and
a breach of the PQC algorithm.