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

Phillip Hallam-Baker <ietf@hallambaker.com> Fri, 05 August 2022 18:54 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 B7B10C1F65DD for <tls@ietfa.amsl.com>; Fri, 5 Aug 2022 11:54:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.432
X-Spam-Level:
X-Spam-Status: No, score=-1.432 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 rBB-TAsBePxT for <tls@ietfa.amsl.com>; Fri, 5 Aug 2022 11:54:49 -0700 (PDT)
Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) (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 059FAC1F8024 for <tls@ietf.org>; Fri, 5 Aug 2022 11:54:39 -0700 (PDT)
Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-10e615a36b0so3899324fac.1 for <tls@ietf.org>; Fri, 05 Aug 2022 11:54:39 -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=pFfxZxOjKP41RjTruEcF5vuGPjgZOns7tFvCj1GhHbM=; b=AS7CR9zfSzPomHuCVgTTLemEqzaWbt0Nu6t3onzjhfhy1ezh2OFwckWBHqf3MO0/yC V4rJV1WGV4t6x6r0LRwfcqc0j0Y936NdZprJWPhw9PKx87ndn6mJvB5nOLud4GqpsniN gP2ezI3HqDOGiLPB7o0eIjhFKRQczcDcfBhfjrFeKWPgf5jm7tQ1pJrXvihC/hF/s4qK 3UXaPEjqOWj9YFuZMp6YELo8HIIfQjEfh22H2kJCXzQVKi8KkPZ14BG7q4d4Zd4bdF6w pGp/FU3ZxeIr5HEdEByPdCnw5kdJSonZqrFy9z1VEbgJwHg0jmfGlajc9A8c2dgoRXCn tOrA==
X-Gm-Message-State: ACgBeo3LumWG25/hxYrGSJfpKz5JH9wOSHXa0xBnkFryS+Dv2cgHqgoL h7H6Y4UO2E8GfFA3W7qvkhNRupm/xT8S38Gx8h6W1LR6/gQ=
X-Google-Smtp-Source: AA6agR530lPkiKyDBTxx0mVspfK8tJho1BMdyznci1QD3T/jD01EttmLzsvLhTPGZSZZn4Tru+dM636HN2kGS8zenB8=
X-Received: by 2002:a05:6870:1601:b0:101:5e61:d8ee with SMTP id b1-20020a056870160100b001015e61d8eemr3644833oae.244.1659725679158; Fri, 05 Aug 2022 11:54:39 -0700 (PDT)
MIME-Version: 1.0
References: <CABzBS7nsbEhR-bmHG_ViSJFSH-0_5p0O3vKndS4+wFR=iGQzhw@mail.gmail.com>
In-Reply-To: <CABzBS7nsbEhR-bmHG_ViSJFSH-0_5p0O3vKndS4+wFR=iGQzhw@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
Date: Fri, 05 Aug 2022 14:54:27 -0400
Message-ID: <CAMm+LwgAzb4t=awzpU4Sb5j7Bf6DuR3u+23n+h_C3Pnsin-SHg@mail.gmail.com>
To: Thom Wiggers <thom@thomwiggers.nl>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000087eb9505e582fffe"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/2gexNJMGsxeK7e0D3S7SoR3nHHk>
Subject: [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: Fri, 05 Aug 2022 18:54:53 -0000

On Tue, Jul 26, 2022 at 8:16 AM Thom Wiggers <thom@thomwiggers.nl> wrote:

> Hi all,
>
> In yesterday’s working group meeting we had a bit of a discussion of the
> impact of the sizes of post-quantum key exchange on TLS and related
> protocols like QUIC. As we neglected to put Kyber’s key sizes in our slide
> deck (unlike the signature schemes), I thought it would be a good idea to
> get the actual numbers of Kyber onto the mailing list.
>
Before we dive into applying the NIST algorithms to TLS 1.3 let us first
consider our security goals and recalibrate accordingly.

I have the luxury of having 0 users. So I can completely redesign my
architecture if needs be. But the deeper I have got into Quantum Computer
Cryptanalysis (QCC) PQC, the less that appears to be necessary.


First off, let us level set. Nobody has built a QC capable of QCC and it is
highly unlikely anyone will in the next decade. So what we are concerned
about today is data we exchange today being cryptanalyzed in the future. We
can argue about that if people want but can we at least agree that our #1
priority should be confidentiality.

So the first proposal I have is to separate our concerns into two separate
parts with different timelines:

#1 Confidentiality, we should aim to deliver a standards based proposal by
2025.
#2 Fully QCC hardened spec before 2030.

That immediately reduces our scope to confidentiality. QCC of signature
keys is irrelevant as far as the priority is concerned. TLS can wait for
the results of round 4 before diving into signatures at the very least.

[This is not the case for the Mesh as I need a mechanism that enables me to
upgrade from my legacy base to a PQC system. The WebPKI should probably
give some thought to these concerns as well. We should probably be talking
about deploying PQC root keys but that is not in scope for TLS.]


Second observation is that all we have at this point is the output of the
NIST competition and that is not a KEM. No sorry, NIST has not approved a
primitive that we can pass a private key to and receive that key back
wrapped under the specified public key. What NIST actually tested was a
function to which we pass a public key and get back a shared secret
generated by the function and a blob that decrypts to the key.

NIST did not approve 'KYBER' at least it has not done so yet. The only
primitive we have at this point is what NIST actually tested. Trying to
extract the Kyber function from that code and use it independently is not
kosher for a standards based protocol. The final report might well provide
that function but it might not and even if it does, the commentary from the
cryptographers strongly suggests that any use of the inner function is
going to be accompanied by a lot of caveats.

Since we won't have that report within the priority timeline, I suggest
people look at the function NIST tested which is a non-interactive key
establishment protocol. If you want to use Kyber instead of the NIST
output, you are going to have to wait for the report before we can start
the standards process.


Third observation is that people are looking at how to replace existing
modules in the TLS exchange rather than asking where the most appropriate
point to deploy PQC is. I have faced that exact same problem in the Mesh
and I have a rather bigger problem because the Mesh is all about Threshold
cryptography and there is no NIST threshold PQC algorithm yet.

The solution I am currently working with is to regard QCC at the same level
as a single defection. So if Alice has established a separation of the
decryption role between Bob and the Key Service, both have to defect (or be
breached) for disclosure to occur. Until I get Threshold PQC, I am going to
have to accept a situation in which the system remains secure against QCC
but only if the key service does not defect.

Applying the same principles to TLS we actually have two key agreements in
which we might employ PQC:

1) The primary key exchange
2) The forward secrecy / ephemeral / rekey

Looking at most of the proposals they seem to be looking to drop the PQC
scheme into the ephemeral rekeying. That is one way to do it but does the
threat of QCC really justify the performance impact of doing that?

PQC hardening the initial key exchange should suffice provided that we fix
the forward secrecy exchange so that it includes the entropy from the
primary. This would bring TLS in line with Noise and with best practice. It
would be a change to the TLS key exchange but one that corrects an
oversight in the original forward secrecy mechanism.


PHB