Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

Mike Ounsworth <Mike.Ounsworth@entrust.com> Sun, 10 December 2023 20:47 UTC

Return-Path: <Mike.Ounsworth@entrust.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C19FDC14F5E6 for <spasm@ietfa.amsl.com>; Sun, 10 Dec 2023 12:47:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.002
X-Spam-Level:
X-Spam-Status: No, score=-7.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DC_PNG_UNO_LARGO=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=entrust.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 Ox3zU0vGuw-c for <spasm@ietfa.amsl.com>; Sun, 10 Dec 2023 12:47:37 -0800 (PST)
Received: from mx07-0015a003.pphosted.com (mx07-0015a003.pphosted.com [185.132.183.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56DF5C14F5E4 for <spasm@ietf.org>; Sun, 10 Dec 2023 12:47:36 -0800 (PST)
Received: from pps.filterd (m0242864.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BA4vBMl025991; Sun, 10 Dec 2023 14:47:33 -0600
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=entrust.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=mail1; bh=7NdfXlxG6oF5pO2PmcCxp0Ey yfSHHgyYDDFpE5DPa3Y=; b=P2HiBcKIIiB4+1M3ikK8kdSWPDh5r2HiaHbFWNWQ IzBayahzEdpgQSC8Hvo5EOVX8ZMLDvmOrLjJI570KkrRu1XXWTxi3sFaQcAOm/ZW x97RkoOrM+nLFQ+BWve7GPbx0SaYFjdfFgSRT3VlqOZGbzPQ99zdSV0lXIK5Z1kM 0Yt7yaO/C8GwR0gKDEaJW+ufSQpSCShwWuE5apuF8LCJ5ZQiJVVuDHyBKgFKHNma 8hox8YbhYDp8CTQ1iVlCR0XYXLR8SGWE80bmbNr83VLCPVwZtaTjClBi6yaHz4gR m74HY71YkktQvg7/rew3TF5TqLt2AG2lGanXFaRFIb88wA==
Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 3uvnt32uvb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Dec 2023 14:47:31 -0600 (CST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyWmAmaGCreVEEXx5XRNt3sDQRix+Gg9WlPZIkbsXcFpi5Z73Tyqkd2YWPZ4d1/LPImvZ9WSMaxaLw0LKujkS2RaAO4Mtf5r+cMrqGEv2AEgullieWqJyv5ofD5hYlK9IMjJqdGtwSX335mDNK05CqtLmQHP0ePoz11Faps/shrpHqDSS7S6vxt7mkqrT2yEOhwl5sGe8pQaEaLzISv9reuFUZCbF+4g8AiHtRooqTdX5Ah79DCPjMd+9wJt2Y+wn6968IHs+Xoz/hQfwehphLKpAzwBNi/X83d+hcxPXRFVu8dfSb88mUTztoizevzNM7g+2EOpcNU666F4il16Dw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N1nFuiJR0zPaL4BfSFkA+WmDOMm+WH10PrCYCBZ3Cjg=; b=Ol+1c1rWYlcGG3IM7+cFafsOyEx3kS0jehc2/oa3S6Fv7w6z1WzKcI28WgszJ4R5wQDU6FCRgqTDm9cbWOg92aGppN2TQJleu+q6423qkqAktpU0R2/qJZTfCkVGU/UInSHVesbNJgFStWK1QQDwnQeAOdSwIR31RcSJutBL5JkFpG9X0QD0h1ikodNS7iI40/4awJV9flxkZ9eH4i9qPmMmKUr17Q1acX8DGCw+YnYSNUMIb7gIVFvCIa9jklg62nf9T9UjUB53QRpFo2AHDnhSh/v2RHfy3vlXzlqm/8tp0JhDwS77wRhP+9FYPxjT4nFSqHihY6nMpmPCEbBwuw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=entrust.com; dmarc=pass action=none header.from=entrust.com; dkim=pass header.d=entrust.com; arc=none
Received: from CH0PR11MB5739.namprd11.prod.outlook.com (2603:10b6:610:100::20) by IA0PR11MB7883.namprd11.prod.outlook.com (2603:10b6:208:3de::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Sun, 10 Dec 2023 20:47:26 +0000
Received: from CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::4dec:c4b4:5adf:cb83]) by CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::4dec:c4b4:5adf:cb83%7]) with mapi id 15.20.7068.031; Sun, 10 Dec 2023 20:47:25 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: John Gray <John.Gray@entrust.com>, Daniel Van Geest <daniel.vangeest.ietf@gmail.com>, Carl Wallace <carl@redhoundsoftware.com>
CC: Deirdre Connolly <durumcrustulum@gmail.com>, Russ Housley <housley@vigilsec.com>, LAMPS <spasm@ietf.org>
Thread-Topic: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?
Thread-Index: AQHaKKFym2LQNywm7kSsoFam8TZyTrCeLWYAgAEJfYCAAArHAIAAHTgAgAAqF4CAA3lSwA==
Date: Sun, 10 Dec 2023 20:47:25 +0000
Message-ID: <CH0PR11MB5739CC80E66F4465C5D07C4A9F88A@CH0PR11MB5739.namprd11.prod.outlook.com>
References: <CH0PR11MB573932B4763971DEEBD1BDC99FAEA@CH0PR11MB5739.namprd11.prod.outlook.com> <585EF804-869F-46E0-9A51-91B498983594@vigilsec.com> <CH0PR11MB573936D2855BB8B65E1592EE9FBCA@CH0PR11MB5739.namprd11.prod.outlook.com> <CAFR824wU_wpHACYyray8StgqH80KRJ8FfJc6o6md_SyG=e5-PA@mail.gmail.com> <016401da28a1$6d281500$47783f00$@gmail.com> <DM6PR11MB25857E2779A443250AF32466EA8BA@DM6PR11MB2585.namprd11.prod.outlook.com> <009901da29c4$13add860$3b098920$@gmail.com> <D3A9D6F0-22DD-4D66-8909-3E10E639C38B@redhoundsoftware.com> <CA+8n3ZMC9gVwingR4-ZtwxwVT48imBz0RKS+9L=PkE1VdFWz2w@mail.gmail.com> <DM6PR11MB2585805771354CFD9D1E96A0EA8AA@DM6PR11MB2585.namprd11.prod.outlook.com>
In-Reply-To: <DM6PR11MB2585805771354CFD9D1E96A0EA8AA@DM6PR11MB2585.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH0PR11MB5739:EE_|IA0PR11MB7883:EE_
x-ms-office365-filtering-correlation-id: 0de69053-d416-41ff-c673-08dbf9c13722
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 8nWiryUShITO+lDXUEOE59T6Kttw69GYX2cAqlW9PAfdV+2ehwI9VLkdgAuupULd0NEmfhDm+MOBxKtO3PIXqaBT5JnArT69MniMsHe5mZHDA7e4sQzQ9UItU6bw5jpDIW0geRqaqScYVRRaFDCSv287j6K+wezZNK3uKHx00Msx7tmEuu+JmN4Wu2thFgj1wa1BOc9ZUYhMY2v4q7tVcu+VsKO3yl5rwcwxyNyTdEWQNT+J/RgjL2DsjnkqZDfx+RWDoMQXI5jBc/o37jizk1nm9tQiIgcebhg+pEyDefMkawm0oOnM9nJhBMRAF4C6UjXhkk2dLZkowRTvA1hiCn+4nskRS5s85jlojLEcSwLyAaJVVmXFnhwU7DLi0dy7v096Z6CfO5ia6Z1wa5wu6D7b5rLoLWwmTizuG2yptlrSauBY6icm7zZrWdrEsj0Yf6j6tMXnSmsRd6NGz3G9opT163WlrKqzmvAkwIQEXSL8ur51W7NR10gBRj/64+WSHPDtJLuXqIANkyWrq4fXQKFAezOgScadDCxQK7+NhzAhmA1PRchjN99jjP0uLBzA8R7ADpB/XYoUMRrZkua7A1eloyL5DqE5wnQKVb2+XwgtXgW2uf567ABBIHs//qou6rkue1Je+dRGeY//jF5YfQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR11MB5739.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(396003)(39850400004)(346002)(366004)(230273577357003)(230173577357003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(41300700001)(30864003)(38070700009)(5660300002)(2906002)(9686003)(6506007)(53546011)(71200400001)(7696005)(478600001)(966005)(55016003)(33656002)(38100700002)(122000001)(99936003)(166002)(83380400001)(26005)(8936002)(8676002)(4326008)(86362001)(66446008)(66476007)(66556008)(64756008)(54906003)(110136005)(316002)(76116006)(66946007)(52536014)(579004); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: FG8XiNAsva0Rj45zwcqu4We4XlaiOFtH2OoiWoMriPi+MS/RURTyZDvz6id1gUg9jviqLY1weJkiEdzciApHL9QsYaTyPVk5GimGUIFl2ABxkYQ+vY0ma5udsLbHoaPEJ8kWMitsmaNkfS8PlpKfuTxjVJxFQd+QweoMJhMRfQ3iulohoeRIKaTooDJccnH8qTcMXzwnBJ19MEUCD992YtzCpPl04rUn6pgOUht7G9NsdAepK2572cay6AmfsnRB6EGl0YiKsuexo6IW1uEKgVfD/v5kQPN38ZlbUUF98DlP5+1hO9i17mKoDhpC/V5aHsxDREiMG0RpJeq/Ys/qW0xPSxzuVL70OYttBRIJifbEyyZbwEWOGTwzWmIxhde13e/KhnEVWrm6YYoITyxB9OogCoem/2uP2LvBEAAYeUcSEN9+Y9AK+Q3OQs2wLt9WSacwaUPPW6bMbloeBLlGbEmpAhL20sv1iivkZogwz8jl8pnZyeufKl0f/rs8wTLxVYz3bWGIvEPAhgLSwlqtTOWODU1Kc9btVR4lXHY56YcBZLR+N714OWlmJs2TINCOhOG0yvz2POYNsJyLse7lI6NsTA3GKiSORbnaPmkH3Z0Y7UaneG+s1viXSLYx1Ki+SVDMEXTprfPArn626Z0Py2Ja2ixnbVKOBFicaiiulmiRE2wXfLylS5ZvzbQ5GRMOPSYOtI/6th0E+5ZIAa3GCfrjZJhN+bwZE4Z645GS0vXo7h92s5d6lsCsJXC+VL45/wrai1RM+nE/mlokwFrg1UOmmfKFN3D6AxFwwSoyuC8uQb2BKO9GhIMSrbRnkqLr1YNGV4xp8YlwnTivM/7Z7C5sjisbf770hmO7R13neXxlvR1q3jqXj2cwEyzMoxXHOh8u9JVBSY6zkdBxrDbegYcZWRElhqRFustOdeQgjxEEK3MplppIfM8F8rSJ4tcYK6G9Q1WYvBmq0pqadlaoJhEs/qzMpUMXc8XdV1JaP4K2oWtEKcYvwkhxEfKRKmJmpU/cEDVFKQ7PynsKuIy/+aFo6kd5RnqFypQg80/PjbV/y4wnGW44sk4nWIBcZ04gSI57DvY4hM8+lfQnIpgDn4Qk+eOxkiq98ZOwoKTmIqh1QX/UzZGOf1jk8X8oB2TjLqdSI2raymdvxGMngPBr1JyNbDt9/k7p6ehgwSbTJR7c2iXWt7+8/hHseHFNe9XyP/bDfbaU1FW87EoLZH7qP5kpnlYwbnl4oeJokvD0oZPQBBinpRQqM3xRrAgE0K3laU9Jcprn6K3IIi/idilZibOkYv3OkYDykFefXWnHupDehthV4DwqOI8BHHBzsPGggOeZSlbc90ozckkN+eq2P+IHVuq+bUwFlqsJ4FZ6v3i1gCpoGoTq2nP1p4fkRXbHIpbkzAdy3WDy6X17UZvSOvP8ng947Ytn5/0OQT+qhq5gS5ueVXRC7w5XGUtvjYK+0asNBWFNJ/pHQVzznvNLptjDcY+JkJ0o9LnvDrmDP0P1/OEh8CdR3p1cw3eJWRHrkMlE6s/Zqk0rPaOGVSEQ0ZFCEkQZWLgNr5Cs+Dhmg1G8ftI0p+QWHFKqkouoZpvXJRcevj7IhjYzCbG/t1A/cw==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_011B_01DA2B77.C8B33020"
MIME-Version: 1.0
X-OriginatorOrg: entrust.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH0PR11MB5739.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0de69053-d416-41ff-c673-08dbf9c13722
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2023 20:47:25.1987 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f46cf439-27ef-4acf-a800-15072bb7ddc1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: WeNNGLEQ8Fbcy+Tp4+JQj2PkEs2ksQJcqsr32F6gpqz8ktVqjB//qICXsTYugugIH4Qf4lCe/xsXBPeYf6roSh2yKkQeadZGGY8/c8s2iTc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7883
X-Proofpoint-ORIG-GUID: vUp10QPKo854IA0bkOtgLbmkGoaXoTtg
X-Proofpoint-GUID: vUp10QPKo854IA0bkOtgLbmkGoaXoTtg
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-28_20,2023-11-27_01,2023-05-22_02
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 bulkscore=0 spamscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 suspectscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312100182
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/fwQJAPKe3AXmdCvmRBhpQOJ3fdc>
Subject: Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 10 Dec 2023 20:47:41 -0000

Good point Dan and Peter that KEM combiners need to include the ct's at the combiner level even if the component KEMs already do. I want to point out that that statement ought to apply to both composite KEMs, as well as to protocols that build an AKE out of two or three KEM exchanges as per RFC9180 AuthKEM or [kyber2021], but I do not aware of any KEM-based AKEs being specified within LAMPS -- 4210bis comes close when both the client and server have KEM certificates, but in fact we need to keep the two direction of KEMs isolated and non-interacting because CMP needs to allow for the ciphers used in the Client -> Server direction to be chosen indpendently from those used in the Server -> Client direction.

 

Having read this thread, I think I am convinced that we "might as well" include ct in the KDF, but I am personally somewhat undecided on whether it's better to do so at the kemri level or at the RSAKEM; DHKEM; ML-KEM level; but I think I'm leaning towards doing it in kemri.

 

Cons of doing it in RSAKEM; DHKEM; ML-KEM level: RSAKEM is about to pass WGLC, so we'd have to pull it back or do a 5990tris. Also, this would force a new layer of KDF, and a KDF param, in draft-ietf-lamps-cms-kyber that is otherwise not needed.

 

Cons of doing it in KEMRI: some handwavy-bordering-on-moot argument about duplicating rounds of KDFs if the underlying KEM already does it. However, given that DHKEM is not even adopted yet, we can change that, and I am not aware of any other KEM that does this, hance "handwavy-bordering-on-moot".

 

 

[kyber2021]: “CRYSTALS - Kyber: A CCA-Secure Module-Lattice-Based KEM”, Bos et al. 2021

 

---

Mike Ounsworth

 

From: John Gray <John.Gray@entrust.com> 
Sent: Friday, December 8, 2023 9:42 AM
To: Daniel Van Geest <daniel.vangeest.ietf@gmail.com>; Carl Wallace <carl@redhoundsoftware.com>
Cc: Deirdre Connolly <durumcrustulum@gmail.com>; Mike Ounsworth <Mike.Ounsworth@entrust.com>; Russ Housley <housley@vigilsec.com>; LAMPS <spasm@ietf.org>
Subject: RE: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

See Inline also

 

From: Daniel Van Geest <daniel.vangeest.ietf@gmail.com <mailto:daniel.vangeest.ietf@gmail.com> > 
Sent: Friday, December 8, 2023 8:12 AM
To: Carl Wallace <carl@redhoundsoftware.com <mailto:carl@redhoundsoftware.com> >
Cc: John Gray <John.Gray@entrust.com <mailto:John.Gray@entrust.com> >; Deirdre Connolly <durumcrustulum@gmail.com <mailto:durumcrustulum@gmail.com> >; Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >; Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com> >; LAMPS <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

Inline also. . . On Fri, Dec 8, 2023 at 11: 27 AM Carl Wallace <carl@ redhoundsoftware. com> wrote: Inline… From: Spasm <spasm-bounces@ ietf. org> on behalf of Daniel Van Geest <daniel. vangeest. ietf@ gmail. com> Date: Friday, December 



Inline also...

 

On Fri, Dec 8, 2023 at 11:27 AM Carl Wallace <carl@redhoundsoftware.com <mailto:carl@redhoundsoftware.com> > wrote:

Inline…

 

From: Spasm <spasm-bounces@ietf.org <mailto:spasm-bounces@ietf.org> > on behalf of Daniel Van Geest <daniel.vangeest.ietf@gmail.com <mailto:daniel.vangeest.ietf@gmail.com> >
Date: Friday, December 8, 2023 at 5:48 AM
To: 'John Gray' <John.Gray@entrust.com <mailto:John.Gray@entrust.com> >, 'Deirdre Connolly' <durumcrustulum@gmail.com <mailto:durumcrustulum@gmail.com> >, 'Mike Ounsworth' <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >
Cc: 'Russ Housley' <housley@vigilsec.com <mailto:housley@vigilsec.com> >, 'LAMPS' <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

I don’t think that “giving future drafts more to write” is a good reason for putting the ciphertext in one place or another.

[JG]  I didn’t mean to imply more things to write was a reason to put the CipherText anywhere else, I just mean the details of how it is used within CMS could be defined in that document, outside of cms-kemri.   For something like ML-KEM, a ukm structure that included the CipherText as a required piece of data (along with anything else that was needed), could be specified as part of a  its use of CMSORIforKEMOtherInfo.    

I think the only place it makes sense to add the ciphertext is to CMSORIforKEMOtherInfo. Other options are in UserKeyingMaterial but the ciphertext isn’t user material, or adding another KDF step for KEMs which want to mix in the ciphertext which doesn’t feel nice.

[JG]  Yes, I agree adding it into ukm may seem like a bit of a hack unless you are thinking of yourself as “an ML-KEM user”.  😊    Perhaps the main question for the group is the following:

1.	Do we need to have the CipherText as part of the input to the KDF for all types of KEMS (ML-KEM, RSA-KEM, EC_KEM, future-KEM)   

a.       If the answer is yes, then lets add it into the CMSORIForKEMotherInfo structure in the cms-kemri draft as required.

b.       If the answer is no, then we don’t add it.

c.       If the answer is sometimes, then we can add it as an optional item to the CMSORIforKEMOtherInfo.   Something like the following:

CMSORIforKEMOtherInfo ::= SEQUENCE {

          wrap KeyEncryptionAlgorithmIdentifier,

          kekLength INTEGER (1..65535),

          ukm [0] EXPLICIT UserKeyingMaterial OPTIONAL,

                           kemct [1] EXPLICIT OCTET STRING OPTIONAL

}

When adding the ciphertext to the CMSORIforKEMOtherInfo ASN.1 structure it could be defined OPTIONAL or not. If not OPTIONAL, it wouldn’t be a per-KEM decision.  If OPTIONAL it could be a per-KEM decision.  My concern with making it a per-KEM decision is I don’t want algorithm-specific logic to make its way into general KEMRI code.  I haven’t implemented this draft yet (but I will), so I don’t know if per-algorithm logic would be a problem.  I suspect for OpenSSL it won’t because the providers interface includes CMS communication, but I don’t know how it would be for other implementations.

 [JG]  Good point.   I don’t think the per algorithm logic should be an issue, but I suppose anywhere there is an “if KEM x add that” statement could lead to implementation bugs…   I guess we could re-ask the question a different way:

1.       Would adding the kemct into CMSORIforKEMOtherInfo for all KEMs cause any issues?   

Essentially if it doesn’t hurt anything, then why not do it, other than it takes some extra computation time.  

[CW] If the thought is that ciphertext should always be incorporated, why is this not feedback to NIST? In the recent pre-hash discussion, the preference was to not push the detail into the protocol level and instead handle it “uniformly in a standardized way at the crypto level”. The ciphertext was incorporated in the round 3 Kyber draft then dropped in the IPD, so feedback may be appropriate. Why are additional CMS steps nicer than another KDF step for KEMs?

 

[DVG] The deadline for comments has passed but I see that there was one comment made recommending the restoration of the ciphertext commitment: https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/n8dsN_aMsa8 <https://urldefense.com/v3/__https:/groups.google.com/a/list.nist.gov/g/pqc-forum/c/n8dsN_aMsa8__;!!FJ-Y8qCqXTj2!cacphgaKgajO3u-_dnF-MXXxVC0zlwN37QtTxlE8jmqcwyeSv8ygSEKr9b_8DLQ5dRF4cK93XJbC2BrMkuMVmoj71Gbb$> 

Also discussions when it was originally removed: https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/C0D3W1KoINY <https://urldefense.com/v3/__https:/groups.google.com/a/list.nist.gov/g/pqc-forum/c/C0D3W1KoINY__;!!FJ-Y8qCqXTj2!cacphgaKgajO3u-_dnF-MXXxVC0zlwN37QtTxlE8jmqcwyeSv8ygSEKr9b_8DLQ5dRF4cK93XJbC2BrMkuMVmq92Hvef$>  and https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/WFRDl8DqYQ4 <https://urldefense.com/v3/__https:/groups.google.com/a/list.nist.gov/g/pqc-forum/c/WFRDl8DqYQ4__;!!FJ-Y8qCqXTj2!cacphgaKgajO3u-_dnF-MXXxVC0zlwN37QtTxlE8jmqcwyeSv8ygSEKr9b_8DLQ5dRF4cK93XJbC2BrMkuMVmu9TLzIB$>  with agreement that it should be removed.

 

I'm not a cryptographer so I can't argue whether the ciphertext should be included at the KEM level or the protocol level, I just have Deirdre's "'robustness', session independence and 'contributory behavior'".  Perhaps for session independence (the only formally defined of the terms), ciphertext commitment wouldn't be necessary when the KEM is used ephemerally but in CMS the keypair is reused.

 

BTW, unrelated to CMS but related to ciphertext commitment I've read a statement that including the ciphertext in the KEM shared secret derivation would mean that we don't need to include the ciphertext in the KEM combiners. That's not true, in the combiners all but one of the KEMs may be arbitrarily broken (e.g. two ciphertexts decapsulate to the same shared secret) so in  order to preserve IND-CCA security the combiner needs to include the ciphertext regardless of what the underlying KEMs do.

 

[JG]  One thing that is nagging the back of my brain is that not all CipherTexts can be used to derive the shared secret (like RSA-KEM) because the cipherText is an encapsulation of the shared secret!  I had to look at the details of ML-KEM to see that yes, they are independent of each other for ML- KEM.  So for many KEM’s this can’t be an issue because it just wouldn’t work.   However, the way we are describing its use here for cms-kemri would always work because we aren’t using the kemct to derive a shared-secret, we are using it to derive the KEK.    

 

Thanks,

Daniel Van Geest

 

 

From: John Gray <John.Gray@entrust.com <mailto:John.Gray@entrust.com> > 
Sent: Thursday, December 7, 2023 6:58 PM
To: daniel.vangeest.ietf@gmail.com <mailto:daniel.vangeest.ietf@gmail.com> ; 'Deirdre Connolly' <durumcrustulum@gmail.com <mailto:durumcrustulum@gmail.com> >; Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >
Cc: 'Russ Housley' <housley@vigilsec.com <mailto:housley@vigilsec.com> >; 'LAMPS' <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: RE: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

I agree, the public key might not be “easily” available at the recipient side, which would require the recipient to fetch it in some way.  The cipherText is available for both the originator and recipient, so it could easily be an input to the KDF.   This has come up because ML-KEM.Encaps no longer includes a hash of the ciphertext in
the derivation of the shared secret.   In KEMRecipientInfo, the shared-secret produced by the underlying KEM algorithm (ML-KEM) for example, is used as an input to the KDF used to derive the Key Encryption Key (the key used to encrypt the bulk content encryption key).  So it is used in a similar way (if you think of the KEK as a kind of shared-secret).  So I can see why it seems like a good idea.

 

I think the specific details of how you SHOULD OR MUST use kemct, as an input to the KDF for ML-KEM, can be specified in (https://datatracker.ietf.org/doc/draft-ietf-lamps-kyber/ <https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-ietf-lamps-kyber/__;!!FJ-Y8qCqXTj2!cacphgaKgajO3u-_dnF-MXXxVC0zlwN37QtTxlE8jmqcwyeSv8ygSEKr9b_8DLQ5dRF4cK93XJbC2BrMkuMVmmzym001$> ).  That would make having future drafts that add KEM algorithms to CMS more than just a list of OIDs and a statement saying it can be used in CMS.  The other reason for doing it this way is that perhaps future KEM’s might not need to use the cipherText in this way.   

 

 

Cheers,

 

John Gray

 

 

From: Spasm <spasm-bounces@ietf.org <mailto:spasm-bounces@ietf.org> > On Behalf Of daniel.vangeest.ietf@gmail.com <mailto:daniel.vangeest.ietf@gmail.com> 
Sent: Wednesday, December 6, 2023 7:08 PM
To: 'Deirdre Connolly' <durumcrustulum@gmail.com <mailto:durumcrustulum@gmail.com> >; Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >
Cc: 'Russ Housley' <housley@vigilsec.com <mailto:housley@vigilsec.com> >; 'LAMPS' <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

Deirdre, I don’t think I understand the attack where the public key is not mixed into the KDF. Would it still apply if the ciphertext is mixed in? Needing to mix in the public key might cause some issues. Does the recipient have their own public 

 

Deirdre,

 

I don’t think I understand the attack where the public key is not mixed into the KDF. Would it still apply if the ciphertext is mixed in?

 

Needing to mix in the public key might cause some issues.  Does the recipient have their own public key (in the same place that they do the KDF, i.e. not off on an HSM somewhere)?  Is it encoded in the same way that the sender’s copy of the public key is? If we can’t assume that, does the sender include a copy of the public key in KEMRecipientInfo (yuck)?  If so, does the receiver need to verify that the public key in CMSORIforKEMOtherInfo corresponds to their private key? Probably, otherwise the sender could send whatever they want, defeating the purpose of sending the public key.

 

I agree that the ciphertext should be mixed into the KDF. While we’re at it, should anything else be mixed in for similar ‘robustness’ reasons? (RecipientIdentifier? KEMAlgorithmIdentifier? CMSVersion?!)

 

Daniel Van Geest

 

 

From: Spasm <spasm-bounces@ietf.org <mailto:spasm-bounces@ietf.org> > On Behalf Of Deirdre Connolly
Sent: Thursday, November 30, 2023 11:40 PM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >
Cc: Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com> >; LAMPS <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: Re: [lamps] [EXTERNAL] Does cms-kemri need to include H(ct) as a KDF input?

 

I am not well-versed in CMS but looking at https://www.ietf.org/archive/id/draft-ietf-lamps-cms-kemri-06.html <https://urldefense.com/v3/__https:/www.ietf.org/archive/id/draft-ietf-lamps-cms-kemri-06.html__;!!FJ-Y8qCqXTj2!aN-NXsCExIdlniTxBhGmS3I0gRF8wqAI7-LSEeIj26pziq8q8VYGqkehqX5mtxiSs_TmeI6v0Vt8b7v7ZHplt5Fl_7T4-Cbjjg$>  my concerns are:



Is this supposed to be `ss` from `KEM.Encaps(pk) -> ss, ct` ? I do not see the encrypted ss ciphertext `ct` being explicitly fed in the key-encryption key KDF, _nor_ the KEM public key. _Kyber/ML-KEM_ mixes in the public key, but a generic KEM does not make any guarantees on this, as IND-CCA security does not rely on this. Since cms-kemri does not specify Kyber or ML-KEM, but a generic KEM, I would rather see the public key mixed into the KDF input. This way, if a prior KEM pubkey pair is compromised, and a malicious ciphertext handed over, and successfully decrypts to a `ss` (as allowed under IND-CCA), which, if nothing else is mixed into the KDF, means this particular key-encryption key is the same across sessions, and doesn't violate the security guarantees of the KEM.  

 

As to the ciphertext, I generally think it should be mixed into the KDF of any protocol like this that has public information being passed back and forth, for 'robustness', session independence, and 'contributory behavior' (these terms are quoted because the first and third do not have robust formal definitions in the literature even though the lack of these properties seems to correlate with protocol vulnerabilities discovered via symbolic analysis.) To make a more concrete argument, all security analysis of hybrid, composite, or other KEM combinations models the _whole_ KEM, including the ciphertext resulting from KEM.Encaps(pk) -> (ss, ct), in their proofs of security. Under IND-CCA of the KEM, the adversary is allowed to feed whatever ciphertexts they like to KEM.Decaps(pk, ct), including ones that may decrypt to the same `ss` as another session (not likely to happen with honest correct implementations etc etc but this is where the formal proofs show a gap.) Not committing to the ciphertexts along with the public key and `ss` as part of the KDF can further impair session independence / uniqueness of the key-encryption keys.

If you can afford it (computationally, and in terms of document / IETF bureaucracy) I would just do it. If I have misunderstood the draft and how the pieces fit together, my apologies (if I have, maybe that indicates some clarifications could help?) 

In general, all the guidance on KEMs (not just the PQ ones) emphasize that the only security guarantees they are aiming for are IND-CCA2 security, and that Kyber/ML-KEM is an outlier in commiting to the public key at all (some other PQC finalist KEMs commit to the ciphertext in computing the shared secret, but not the public key), and so any designs that specify just a KEM must take care to keep that in mind.

 

On Tue, Nov 28, 2023 at 10:42 AM Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> > wrote:

Thanks for starting this thread Russ!

 

 <mailto:durumcrustulum@gmail.com> @Deirdre Connolly would you be willing to put into writing the attack that you described to me at 118 that necessitates putting the CT into the key derivation?

 

My very hazy understanding is that we are not aware of a practical attack today, but we are concerned that Falko will find one in two years 😉

 

---

Mike Ounsworth

 

From: Spasm <spasm-bounces@ietf.org <mailto:spasm-bounces@ietf.org> > On Behalf Of Russ Housley
Sent: Tuesday, November 28, 2023 9:35 AM
To: LAMPS <spasm@ietf.org <mailto:spasm@ietf.org> >
Subject: [EXTERNAL] [lamps] Does cms-kemri need to include H(ct) as a KDF input?

 

This topic has also been raised on the CFRG mail list in a more general way. Here, we need to discuss the impact to cms-kemri. FIPS 203-IPD says: The ML-KEM. Encaps and ML-KEM. Decaps algorithms in this specifcation use a dif- ferent variant 

This topic has also been raised on the CFRG mail list in a more general way.  Here, we need to discuss the impact to cms-kemri.

 

FIPS 203-IPD says:


   The ML-KEM.Encaps and ML-KEM.Decaps algorithms in this specifcation use a dif-
   ferent variant of the Fujisaki-Okamoto transform (see [5 , 6]) than the third-round specif-
   cation [ 4 ]. Specifcally, ML-KEM.Encaps no longer includes a hash of the ciphertext in
   the derivation of the shared secret, and ML-KEM.Decaps has been adjusted to match this
   change.

 

My understanding is that dropping the H(ct) from ML-KEM provides a cleaner proof.

 

By including H(ct) as an input to the KDF, an attacker will cause the originator and recipient to derive different keys if the ct value is modified. 

 

The IESG has sent cms-kemri back to the working group to determine what, if anything, needs to change as a result of this change to ML-KEM.

 

Russ

 

Any email and files/attachments transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If this message has been sent to you in error, you must not copy, distribute or disclose of the information it contains. Please notify Entrust immediately and delete the message from your system. 

_______________________________________________ Spasm mailing list Spasm@ietf.org <mailto:Spasm@ietf.org>  https://www.ietf.org/mailman/listinfo/spasm <https://urldefense.com/v3/__https:/www.ietf.org/mailman/listinfo/spasm__;!!FJ-Y8qCqXTj2!cacphgaKgajO3u-_dnF-MXXxVC0zlwN37QtTxlE8jmqcwyeSv8ygSEKr9b_8DLQ5dRF4cK93XJbC2BrMkuMVmgHbcWuu$>