Re: [CFRG] Call for adoption: Hybrid KEM Combiners

Ilari Liusvaara <ilariliusvaara@welho.com> Sun, 18 February 2024 15:26 UTC

Return-Path: <ilariliusvaara@welho.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 AB153C14F6F1 for <cfrg@ietfa.amsl.com>; Sun, 18 Feb 2024 07:26:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham 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 IebRDRrmuws2 for <cfrg@ietfa.amsl.com>; Sun, 18 Feb 2024 07:26:31 -0800 (PST)
Received: from welho-filter4.welho.com (welho-filter4b.welho.com [83.102.41.30]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4928BC14F6EF for <cfrg@irtf.org>; Sun, 18 Feb 2024 07:26:30 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id 07BC467F0E for <cfrg@irtf.org>; Sun, 18 Feb 2024 17:26:28 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new, port 10024) with ESMTP id mNk_lJBZEcA9 for <cfrg@irtf.org>; Sun, 18 Feb 2024 17:26:27 +0200 (EET)
Received: from LK-Perkele-VII2 (78-27-96-203.bb.dnainternet.fi [78.27.96.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id A9365230A for <cfrg@irtf.org>; Sun, 18 Feb 2024 17:26:26 +0200 (EET)
Date: Sun, 18 Feb 2024 17:26:26 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: cfrg@irtf.org
Message-ID: <ZdIhou0UPo2YH-hx@LK-Perkele-VII2.locald>
References: <CAOjisRyCU+nhJm+x-UxEUjEPAPxH6e-Sa+TkwgYYBDcAx_a93g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAOjisRyCU+nhJm+x-UxEUjEPAPxH6e-Sa+TkwgYYBDcAx_a93g@mail.gmail.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/ZzU2JfMIn0YoJxSrx1LYu0nwGy8>
Subject: Re: [CFRG] Call for adoption: Hybrid KEM Combiners
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: Sun, 18 Feb 2024 15:26:33 -0000

On Wed, Jan 31, 2024 at 10:28:50AM -0500, Nick Sullivan wrote:
> Dear CFRG,
> 
> There has been a lot of discussion on the list over the last few weeks
> around the topic of hybrid KEMs, including discussion around the topic of
> where we should go as a group. There seems to be significant interest in
> this topic from around the IETF and in broader industry. We (the chairs)
> have decided to open up a research call for adoption for a topic in this
> area, described below.
> 
> The standard context for the group applies here as always: As part of the
> IRTF, the CFRG is a research group, producing research documents relevant
> to the IETF and broader community. The CFRG does *not* publish standards
> and does *not* dictate cryptographic choices to IETF working groups. CFRG
> documents often come with concrete specifications for parameterizations
> relevant to groups within the IETF. Recent examples of documents of this
> style resulting from topics adopted by the CFRG include RFC 9497 (OPRF) and
> RFC 9381 (VRF), which provide a thorough overview of the topic along with
> concrete parameterizations that can adopted by protocol designers.
> 
> The CFRG has a full docket of important ongoing work, so it’s important to
> ensure that any work the CFRG adopts at this point aligns with the charter
> by offering necessary guidance (for network security in general and for the
> IETF in particular) on the use of emerging mechanisms.
> 
> With that preamble done,* this email starts a three-week call for the
> adoption* of a work item within the CFRG to produce an informational
> document exploring how to safely combine KEMs. This document
> * Will use draft-ounsworth-cfrg-kem-combiners as a starting point for
> describing generic combiners
> * Will include an analysis of the non-generic combiner mechanisms for
> specific KEMs outlined in draft-connolly-cfrg-xwing-kem and other published
> works in the area
> * Will describe the security properties and trade-offs of various methods
> of combining KEMs
> * Will provide concrete instantiations of hybrid KEMs that are relevant to
> IETF protocols (potentially similar to X-Wing and Chempat-X), including
> pseudocode and test vectors

I think CFRG work on hybrid KEMs is very much needed. However, I do not
think draft-ounsworth-cfrg-kem-combiners is a good starting point.

Some of the major issues with that draft are:

1) It solves the wrong problem. The construction in that draft looks
   like a multi-key KDF, not a KEM. Protocols usually integrate the KDF
   rather tightly, making replacing the KDF very difficult. Whereas non-
   exotic asymmetric confidentiality can usually be replaced by a fixed-
   parameter KEM (exotic uses are usually pre-quantum anyway).

   (D)TLS 1.3, COSE, JOSE, CMS and HPKE are all that way.

2) The uses of that draft in various protocols have picked all sorts of
   combinations of algorithms. Supporting that in crypto libraries is a
   PITA. Much worse, the protocols use it in slightly incompatible ways,
   which is just about impossible to deal with in crypto libraries.

   Considering how important crypto libraries are, this is very bad.

3) It labels its slots as IND-CCA2 KEM. It is not safe to just stuff
   ECC into such slot. I don't think there is any widely known
   IND-CCA2 KEM construction based on ECC (HPKE introduced its own one).
   And using such would lead to goofy hash duplication.

   It is very bad to offer crypto tool that will just be widely misused,
   even if that misuse has no practical security impact.

4) Because it is generic, it needs to deal with all sorts of badly
   behaving KEMs that hopefully nobody is using. This makes things
   slower and more complex than needed.

   E.g., KEM that does not resist ciphertext second preimages. Or
   a KEM that does not resist re-encryption.

If version based on draft-ounsworth-cfrg-kem-combiners gets posted, it
should have major warnings not to use it for any protocol work until
published as RFC. Incompatible uses are really bad.


What multiple protocols actually want is a set of fixed-parameter hybrid
KEMs, constructed from ML-KEM (or sometimes other PQC KEMs) and ECC (or
sometimes RSA) And any such can be optimized for both performance and
simplicity (usually the goals do not compete).



What I think CFRG needs to cover:

a) Protocol-universal KEM combiner, accepting KEMs, ECC and RSA as
   components, with no unneeded degrees of freedom.
b) Presumably based on NIST SP 800-56Cr2 (apparently some want that,
   it doesn't really add complexity and haven't seen any conflicting
   requests).
c) No unneeded complexity. If key can be elided, do so. If both key and
   ciphertext can be elided, do so.
d) Number of recommended pre-made instantiations for real-world use,
   complete with test vectors. The rest is NOT RECOMMENDED for use.
e) How to use ML-KEM as a component (simpler/faster than generic).
f) (Possibly how to use NTRU prime as component).
g) How to use ECDH as component (it is not a KEM).
h) How to use X25519/X448 as component (ditto).
i) How to use RSA as component (yes, apparently some do want RSA)
j) How to use generic KEM as component.
k) Description of security properties of all previous (sometimes those
   seem to get a bit funky...)

Details for each algorithm class (except generic KEMs) need to be
worked out anyway for the recommended instantiations. 

The actual instatiations will presumably look something like what is
in this PR:

https://github.com/lamps-wg/draft-composite-kem/pull/11

(I think ciphertext is needed for RSA, even if IND-CCA2 proof would go
through without...)




-Ilari