Re: [Pqc] [lamps] [EXTERNAL] Re: CMS Kyber: include PK and CT in the KDF?

Ilari Liusvaara <ilariliusvaara@welho.com> Fri, 12 April 2024 13:56 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: pqc@ietfa.amsl.com
Delivered-To: pqc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CF15EC14F6FB; Fri, 12 Apr 2024 06:56:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 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, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 E5EPt7rCHWgS; Fri, 12 Apr 2024 06:56:39 -0700 (PDT)
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 A85BEC14F5E8; Fri, 12 Apr 2024 06:56:37 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id 71C3868192; Fri, 12 Apr 2024 16:56:35 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new, port 10024) with ESMTP id y71cyd9M16CQ; Fri, 12 Apr 2024 16:56:35 +0300 (EEST)
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-smtp2.welho.com (Postfix) with ESMTPSA id 3249372; Fri, 12 Apr 2024 16:56:33 +0300 (EEST)
Date: Fri, 12 Apr 2024 16:56:32 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: LAMPS <spasm@ietf.org>, "pqc@ietf.org" <pqc@ietf.org>
Message-ID: <Zhk9kCZ0b_O-Rm7N@LK-Perkele-VII2.locald>
References: <CAFR824w0rBfxGzCJrSZ3f45Lyn7SEVLZK6cM9ZaZVHVPujs-5g@mail.gmail.com> <A31C1C09-297F-4C4A-837E-FD2A703AD96F@vigilsec.com> <CH0PR11MB57391B1E18D87AEB8D9519EE9F052@CH0PR11MB5739.namprd11.prod.outlook.com> <CAFR824ybzCDY-C1cXFHcUhgZ-m8wgqgw4eCNoCraX7sPNNxC6g@mail.gmail.com> <CAFpG3gfj8xp4UxsczBT953BE7yDEu3_GdQgR6z02qV8EVFUfNg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CAFpG3gfj8xp4UxsczBT953BE7yDEu3_GdQgR6z02qV8EVFUfNg@mail.gmail.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/pqc/PxNYBZy2j5X0w82DathmQSRVO8A>
Subject: Re: [Pqc] [lamps] [EXTERNAL] Re: CMS Kyber: include PK and CT in the KDF?
X-BeenThere: pqc@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Post Quantum Cryptography discussion list <pqc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pqc>, <mailto:pqc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pqc/>
List-Post: <mailto:pqc@ietf.org>
List-Help: <mailto:pqc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pqc>, <mailto:pqc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Apr 2024 13:56:40 -0000

On Fri, Apr 12, 2024 at 12:00:39PM +0530, tirumal reddy wrote:
> 
> It would be advantageous if the cryptographic library for PQC KEMs could be
> seamlessly integrated without the need to create a new mechanism within the
> JOSE/COSE WGs to establish a binding of the encapsulation key and
> ciphertext into the shared secret. 

That is already the case, one can just take the raw shared secret out
of IND-CCA2 KEM (e.g., ML-KEM) and dump it into usual JOSE/COSE KDF.
It is not difficult to show that JOSE/COSE can not take advantage of
pk-to-ss or ct-to-ss bindings.

This can be trivially extended to PQ hybrids.


> I also see variations in the KDF usage:
> for instance, the CMS specification utilizes KMAC, while the
> draft-connolly-cfrg-hpke-mlkem proposes use of HKDF-Extract and
> HKDF-Expand. We identified this challenge during our work on
> https://datatracker.ietf.org/doc/draft-reddy-cose-jose-pqc-kem/
> <https://datatracker.ietf.org/doc/draft-reddy-cose-jose-pqc-kem/>

This is nothing new. CMS, HPKE, JOSE and COSE all have different KDFs.
This is exactly why I complained about draft-ounsworth-cfrg-kem-combiners
being multi-key KDF instead of KEM.

The only new thing is draft-connolly-cfrg-hpke-mlkem proposing adding
some extra hashing to KEM because it does not consider IND-CCA2 to be
enough (there is now proof that IND-CCA2 is enough).




-Ilari