[CFRG] X-Wing: the go-to PQ/T hybrid KEM?

Bas Westerbaan <bas@cloudflare.com> Wed, 10 January 2024 20:14 UTC

Return-Path: <bas@cloudflare.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2B3B9C14CE33 for <cfrg@ietfa.amsl.com>; Wed, 10 Jan 2024 12:14:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=cloudflare.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 C_uxYc_3xGB6 for <cfrg@ietfa.amsl.com>; Wed, 10 Jan 2024 12:14:02 -0800 (PST)
Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 E5D37C14CE4D for <cfrg@irtf.org>; Wed, 10 Jan 2024 12:14:02 -0800 (PST)
Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2cd053d5683so55487551fa.2 for <cfrg@irtf.org>; Wed, 10 Jan 2024 12:14:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1704917641; x=1705522441; darn=irtf.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=YfLq93q55TlT4Y/KckGUr4cQsn9yCwW3GzmUKf04mh0=; b=TnwCiX0/meR8V51SjsZOnwLpLElr6g6QqgSqUe6kIg3YGXamRPJaOG71T2X/kEBpal mLo+KA/tlWI1ftTth50V/YRDAWQJt0c2r6hU2SeoXKoTN6wzHs/JkJdFRopPn9qokd1h nCzrZi5rGFL6Sy+f7uLoiSf0H0JRxFfwv6k8lK1vItqkaru7RsrbP8GS0zZkzrnBWNBR 9cGfp/ZVnLZEll6Yy0opr/alSCbBQ9NAvpYX5pfPdDYx7pTxULN607log6oCd/GmaOBA 95dT1ntpcmoRRmNkzIQNcaSouyfsz1LR0G/sxrTGec2wy9O+2zAD6Ewla/bMi13hfU7y ksXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704917641; x=1705522441; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YfLq93q55TlT4Y/KckGUr4cQsn9yCwW3GzmUKf04mh0=; b=cHEEBeknysIRloxXaou/rJI+EaTGSQQ2J6lnUrCimrOb92P3uPbtIxj1k6Mo7YZ21q MBOfmAJ8m5ZZilWR+xEt+HE3q88pdmJREKGhshD+n2aM8C9gXBJHKHwPwR9cNeJzQnsI t/3Wt0hOEksLTG5kY8dRZu2xxyynzPqi3FUVOMBP9jTJIrdQEvBzufHPSbVCkMQLQeS4 wK9xHmjeqrJKo3vDstHEJobwNWkptOv+7pMacyTUF1RVXYYbeP/I/MV3aCjCG7f4DdDB jKBF1S7RFQPQuwXWfNFP8eQPUO2/ae1qr3hBl01NeEcuVz4qp5/+FXQ4nkpkBkia8vKe q1Dg==
X-Gm-Message-State: AOJu0YyFyg5giGR+ps3DeXt7DfF4mX8jr91iRcT6aQbcUbDFGUWd1r7l iSrqaamtotXPqbAa4huYsLStrRVi7mZv8bnHfh14mRLycEyfWG46w+kqaLDCMF0Ynd9s
X-Google-Smtp-Source: AGHT+IEWzXjBeVyhbaEVWHcifZLHz1rPphMhB6EkFx0J2oXJce2X2heQtYideUSLbtnhKFdXc8cLxOwbwt89tNsw1+I=
X-Received: by 2002:a2e:9e01:0:b0:2cd:4c1e:fdcb with SMTP id e1-20020a2e9e01000000b002cd4c1efdcbmr47833ljk.93.1704917640700; Wed, 10 Jan 2024 12:14:00 -0800 (PST)
MIME-Version: 1.0
From: Bas Westerbaan <bas@cloudflare.com>
Date: Wed, 10 Jan 2024 21:13:49 +0100
Message-ID: <CAMjbhoWZxsLFH6yBc0hdx3t3SohurXGkfMzouoxGXM92HBR_dw@mail.gmail.com>
To: IRTF CFRG <cfrg@irtf.org>, "<tls@ietf.org>" <tls@ietf.org>
Cc: Deirdre Connolly <durumcrustulum@gmail.com>, Peter Schwabe <peter@cryptojedi.org>, karo@cupdev.net, mbb@fc.up.pt
Content-Type: multipart/alternative; boundary="00000000000058d568060e9d12eb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/ZnUjSRe6EksTaSmuu45pxE37qp0>
Subject: [CFRG] X-Wing: the go-to PQ/T hybrid KEM?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://mailman.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://mailman.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Jan 2024 20:14:07 -0000

Dear tls and cfrg working groups,

With ML-KEM (née Kyber) expected to be finalized this year, it’s time to
revisit the question of which PQ/T hybrid KEMs to standardize, and which to
recommend.

# Status quo

For TLS at the time of writing there are two PQ/T hybrids registered:
X25519Kyber768 [1] and P256Kyber768 [2]. The former has been deployed
widely [3]. Both are instances of the hybrid-design draft [4], which use
the simple combiner ss_ECC || ss_Kyber, which is suitable for TLS, but not
for other applications such as HPKE, as it’s not IND-CCA2 robust [5].

For HPKE, there is a different KEM called X25519Kyber768 [6], which uses a
different combiner that mixes in the X25519 ephemeral key, by using HPKE’s
DHKEM construction instead of raw X25519.

There is also the ounsworth-kem-combiners I-D [7] that informed by [5]
proposes the generic combiner

  KDF( counter || ct1 || ss1 || ct2 || ss2 || fixedInfo, outputBits )

>From a security standpoint that would be suitable for HPKE and TLS. To TLS
it is somewhat unattractive as it requires hashing the typically large PQ
ciphertexts, and adds some extra hashing in the conversion of the ECDH into
a KEM. On the other hand, for TLS it would be nice to have a KEM that is
also suitable for HPKE, as HPKE is used in ECH.

>From a usability perspective, ounsworth-kem-combiners requires the user to
make several choices: which KEMs and in particular which method to use to
turn ECDH into a KEM, which security levels, which KDF, etc.

# The proposal: X-Wing

Let us introduce X-Wing [0]. The goal of X-Wing is to be *the* go-to PQ/T
hybrid KEM for the majority of use cases (including TLS and HPKE): no need
to make choices, or understand the subtleties.

X-Wing aims for 128-bit security, and for that combines the time-tested
X25519 with ML-KEM-768 [8]. X-Wing uses the combiner

  SHA3-256( xwing-label || ss_ML-KEM || ss_X25519 || ct_X25519 || pk_X25519
)

Here ss_X25519 is the plain X25519 shared secret; ct_X25519 is the
ephemeral public key; xwing-label a 6-byte label. Note that it doesn’t hash
in the ML-KEM ciphertext. For a generic KEM one cannot leave out the
ciphertext, but in the case of ML-KEM we can, assuming we can model
SHA3/SHAKE as a random oracle. This is proven in [0]. The gist is that FO
transform in ML-KEM makes it “ciphertext collision resistant”: even if the
underlying lattice problem is broken, it’s infeasible to create from one
ciphertext another different ciphertext with the same shared secret.

# Not final

We would love to hear your input: X-Wing is not final. For one, ML-KEM
itself might still change (presumably only in minor ways) before final
standardization. We think the CFRG would be a good venue to standardize
X-Wing — do you concur?

Best,

Bas, Deirdre, Karolin, Manuel, Peter


PS. We want to mention explicitly that we see value in the kem-combiners
and hybrid-design drafts as generic safe methods to construct hybrids for
those use cases where X-Wing would not suffice.


[0] Spec: https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/
Proof: https://eprint.iacr.org/2024/039
[1] Full name X25519Kyber768Draft00.
https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/
[2] Full name SecP256r1Kyber768Draft00.
https://datatracker.ietf.org/doc/draft-kwiatkowski-tls-ecdhe-kyber/
[3]
https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html
https://twitter.com/bwesterb/status/1734586155868287457
[4] https://datatracker.ietf.org/doc/draft-stebila-tls-hybrid-design/
[5] https://link.springer.com/chapter/10.1007/978-3-319-76578-5_7
[6] https://datatracker.ietf.org/doc/draft-westerbaan-cfrg-hpke-xyber768d00/
[7] https://datatracker.ietf.org/doc/draft-ounsworth-cfrg-kem-combiners/
[8] Following earlier deployment of X25519Kyber768, despite targeting 128
bits, we use ML-KEM-768 instead of ML-KEM-512 to hedge against advances in
lattice attacks.