[lamps] Re: [EXTERNAL] Re: KDF in draft-ietf-lamps-cms-kyber

Mike Ounsworth <Mike.Ounsworth@entrust.com> Mon, 30 September 2024 19:36 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 58F9EC18DB95 for <spasm@ietfa.amsl.com>; Mon, 30 Sep 2024 12:36:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.103
X-Spam-Level:
X-Spam-Status: No, score=-1.103 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FONT_INVIS_DOTGOV=1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=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_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no 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 hqwJzP4r2wB8 for <spasm@ietfa.amsl.com>; Mon, 30 Sep 2024 12:36:54 -0700 (PDT)
Received: from mx08-0015a003.pphosted.com (mx08-0015a003.pphosted.com [185.183.30.227]) by ietfa.amsl.com (Postfix) with ESMTP id 55B73C1DFD42 for <spasm@ietf.org>; Mon, 30 Sep 2024 12:36:54 -0700 (PDT)
Received: from pps.filterd (m0242863.ppops.net [127.0.0.1]) by mx08-0015a003.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48UIZJDr013197; Mon, 30 Sep 2024 14:36:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=entrust.com; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=mail1; bh=py44+JlNxoVxysCwEtSmeRXsY/rj 0EphxauoZQNpUMQ=; b=LEUf3MI1sUhTUgp9Y9if0Kvy5cA/SGmTi7jf4yw8Jjzp xjZdzeUICE6GGl3EtgW6BXWSHdqv2WVNNG/gqtXWIYM5r1vQjir4J9F/9fd99R71 /uMPPCefGGcvZJkxq8lB8OmLuNkBRsK+JXeV7oRku04jzX7qkEgdwdsGnbBc2p7j tg9HclAPAbGM+raEOekzBcJ6N/8D7WPD/USLOwT6FtoO6hpfQjfOZV52lGi1Z51R Wz2eQCQnMTBB2L6ygswwiJpUG9/orQH5wLgMpX/K1uX0XqkK9za6FzhXZGmWFnt2 yOtF64ldXEHg+EIRk3wr6IXypeUFeknlMwsI5U0dzA==
Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx08-0015a003.pphosted.com (PPS) with ESMTPS id 4201d5r8ct-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Sep 2024 14:36:49 -0500 (CDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qh2dng+wYmLJqU0H3zufPBDRmdAUrc59Rj3uSJbBZ4bLVuEOGcnaWRFWMwhOOdc2VJikNGQzv7yf5MDXCpAk8VVsm6WU5ORqYRoYtTCOft2dMeO3vP6DtRwglDPif56HN9+0fbCS6NjBmefkYu0YKK+gHXk4rlQMalj+BWM6L1PKbaMplq/Y1rY47DPeFeH7IfdVAqRZh4rQwIUj4GCySDo7m1oxQbfxy9pH9xIwnEfVOL2q22SqKN9ziahi4sh+Gsq7yarJuYWTMmAbFJkozm1Ocr9cJy3dZhzVS5G/+3P7Auz8jA5TLmcqXzDQaILt9NGwDWCGgITOm8L3mBedmw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=py44+JlNxoVxysCwEtSmeRXsY/rj0EphxauoZQNpUMQ=; b=CiXANMZyv9r968ZBdGbI/NO4LY+2kNGJlHuCdei+U4MKaCUpE2g9Ru0c8BFBUym+6qUqzkQoKp5dmR8NO5Z4i1VsepIuUFj01sUzo0SbPHa5s6G/ZTLu/pgTe4tse76+wBmt63bMJd4donbkYQlAr5BfcX4I5J2l4xNwlFny0Dtt7Q+53rGbwg2ynSIKHk5Bz0Ap2ZR3fkjgciqCjsCghcDiQDrsDVTOq5NBoQjmqbFTc63LlPkeF3OojW2OqxqvLYTk4iVJr8M0kiqiUfdgKrEMR5tNe0LZJbhLaOUsydW2jyj6C7ixSM050qKsBV53yuAO6CaWIsrYVNadfNr/PA==
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 CYXPR11MB8661.namprd11.prod.outlook.com (2603:10b6:930:e4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 19:36:44 +0000
Received: from CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::b93d:b2d:3ad8:9702]) by CH0PR11MB5739.namprd11.prod.outlook.com ([fe80::b93d:b2d:3ad8:9702%5]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 19:36:44 +0000
From: Mike Ounsworth <Mike.Ounsworth@entrust.com>
To: "Blumenthal, Uri - 0553 - MITLL" <uri@ll.mit.edu>, Daniel Van Geest <daniel.vangeest@cryptonext-security.com>, "Dang, Quynh H. (Fed)" <quynh.dang@nist.gov>, LAMPS <spasm@ietf.org>, Russ Housley <housley@vigilsec.com>
Thread-Topic: [EXTERNAL] Re: KDF in draft-ietf-lamps-cms-kyber
Thread-Index: AQHbE2rXfiOeI32UmkupDSMgAJL1J7JwuOvg
Date: Mon, 30 Sep 2024 19:36:44 +0000
Message-ID: <CH0PR11MB573933F8D5EC51DB78A9C3DD9F762@CH0PR11MB5739.namprd11.prod.outlook.com>
References: <BN0P110MB1419DD1A938FF299A2C912DF9076A@BN0P110MB1419.NAMP110.PROD.OUTLOOK.COM>
In-Reply-To: <BN0P110MB1419DD1A938FF299A2C912DF9076A@BN0P110MB1419.NAMP110.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_|CYXPR11MB8661:EE_
x-ms-office365-filtering-correlation-id: 56e72ad4-cbd0-437a-7211-08dce1873764
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|4022899009|376014|1800799024|366016|38070700018;
x-microsoft-antispam-message-info: ehNorJropndhZHbw7ygqzfs+f3KkIn/f8l/8FK0Prbk7RjWw5aYNCzW/dubCY2YdA6F2/ILTELD7ql0QGajCF8fpSPYQv/GOuAwFm0DJDcelhXJVX4aI39xCwXdLiFAhzdAvTM7637J7Mn+AJOcwpD509aoaMXEuLaNfAJ5jq7Ud1h1KxcSO64r0dS8TH24VjLAAakNUILY6nxgxlsEkicFCs9Ms3mF1vrALhYITN+2VKLMCMXQKO+ZeKWBv96vGcpzCqCjieaZHSZ7yVb9PWUUh0PazwAsXkuc/ejbb0dFMc0B3OA3m9QE77l/Oug27Zbp0Aibi6TUdnJ2rconYKVJA3+NSyxPViCu+2g7cgko8dZsl2dhOugJ0Nog9Y3EDkONlpHpF5P8n/7RyJesCjHeJg4Z5P2TQtfv5ZUSmB5jpK5g1hzTHBRvDT+Hc7SbB30MEnKe/NsCeL6T4iRzkeQIaM+sdkL3yF4I7oV8Cfe+xbU3jhojFx/K1+yrF5zL96G8rsk4G4T2Up66e0a0KwTZtGNke+voUJzAznmjFMjWQlkmXKSMpdQR6/EKUGcFLw75stLwQIx6bSR2Jul7GM4fCgwIIsOxL8WzQ317b1+OghQDivQdAuAx7hW1N5sY0mumNrvZTKbNY2/5gmHvkaCseVa0TNxK8TipVPY82YuqIuHM+Xy4TLRuAhcLP1m6zXgo5LuXBm457+WbhxVYxcP3UgThR7w/uhnSngEqNMwrVR8WiEMQEQqgV86gK0WPGXbEXS8bc3qLoIIJLzjma5G2cn059WXZPix2Cja4Smv+4fV3a1wM76uSDGwqheB+lD7Sjg+LG1ttbj0thzcsQjPqbiWJaQhWsSZ9q/KVdpnLXgArOAUnJ1jdd7YirktzdfaMBTQ1nPZU5V6dNQ/IvyGulTmDl2eDUWB/8qnaSNZo9yWiqvoZ3xFTWkYNAFPq8+yiVGYtrQKstNeL/zQqjEyVBrO20+IH38P28FGsfK+l8q6KYevz+nh/owgnUSWCkWvnaMe471DeY3MHAv0oMg7Ekrr/jxMNecyKGO0q3U3QQCmiqLLAExkecyLNwOUwD7iyowYw14n26Z5xDeqnc5HDE+SMaI4Gttsoz4g0sXKA80iXdQ8SypmXJoZ9kR+nWnxLP0YaHmsvJDTR3al+/jRMFidIna3g2c/ubYaxWHgtfli976YckUAYKXpD9syTlZ2j3ODlu02XwVq8cWYRc9Mly6I3+KmgH7pr0R6tIxW8IzBiIqZm7fduuiRnuv0zwf6PTC43aue0cnVrC5/W48kQL8WTB6HTeWUmdx+vdwGOJgl5pnVkYXQDteNqGQO+uWenYotrLIKcf5riRJG8SHfh8KBSLQvrTUKky/kat9TVDxzdPudxNGAOpTjRJ4SSwkN6GFFon5icRc9ctYZIBKQ==
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:(13230040)(4022899009)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: XSidk67fWqgTwSprvMFp6Gaf1wOqVfYN+JC1LZylwRZZVZkggVJLmpBqsyKo3mHxnhV0nYcviL2JikPq7mOYLttxv2OnHvzkr8sKweLuNfxqS9bC0pvntKJuaathsHlgzN5R8F6UiefR++T+vMERWDsY2U2vJeH3i7uyxHxmFXmYaFIu9SHu4UvT4kqQ10qWhlwbUjDBpp8T7nPspIgbVx/stePig/wc9pcjpSIaxT9mhH5e0xeUFqeow2irnqTGmv19Ez17XtAQknwZLe2cTaFdQXwVts0HhNftdSXdt4ebGnxrxrZeMq3WrjYCak2pG87HK/uvX71wzil8Jci+Gz8PQwD9dTpa7BpMBYOghJwlGAs75QeKtkCm2NZ8KZ5sp45KK8oIwWzrYA76CTcBln0ylycb8ePWcL+SUDmZxsvfQdpjPPBSLUZASkF4Pv1cmlMC0o7xaUehat17JNxN1DHt9lLtqOGfdThSZw+ai0L2UbTDKUz+tvKCuo+ldqBSCeW+0tI1iQ2p9+sTMLf4pcM4v58V56J4K+KIawwLLwbh8f2mQFhFus3dyK4EUtmYc6Ygd9la4WC9lxz9OZ5bKQQXmJI0V9SHX5KWOLrchXdskCo2w6xC7LLU5bPIdqdPgZfvvN6X7NVOfbs6E46MtyqGiZagYUQujZGgpIjyHMXabf12TgNCJwfom+jjmTomGBhZWLjdN0ots2E+28XJpslSOWG7GEydRJhC74yYbIM7cKxtUWIbyVGTVmEA/O37MEfUUDmFXyWHnYqnoATzwoyMX2U6a6I5CM8M0/dd6t5KXNTXs1soEzakqWISjJnzaBbL0gxzz/wBTYEmAeGKKu73sMAgG2Zv7G6blkcnds/7xoxv0wG3QyOu6UTGerzNGBX3uIbAOBcXCoUDSNNoA3sEnLoxrDtS/M/Gify80PQrgQUnd9GIZ/t+/fWJi7PedU9yhW6uWyGgmJxaUN62WnAVTqZM4fA9nnfz9KFlWMak5jlaO7PakTbul/VGV9YPVWi6JCkEUKHM30briZ91EGTepi7zIkLCsu5RzuJ+gh1DRi+e34Q9I9DXgh+cujEU2eRVUkCQLUjpO0lvUazmz2rpnxiatJqIj2eEDeDr8Qki6d87GmlTDzSyyHAEGy+MjOENhtYvubexH8eLWnemuBWVZRFTY2AO9XMk6XpasWwf0y24TZQWFezUXqJP/0xOOC7nnm6+KC+r5h7MUCH+jeNXBgkJR3ifRXmE3cuwAJMdhEDDb0TkSXNQRNI9/txxHp/EBbzbB6y1ETf8Hi3XgcgAfCDkESOhFy5Xe29YkznJI/N4IhAZ6Ov1sUkihMceOmoQpojRoNF4agHeB2uJ+/+m68ay/IvIiwjBEXNPNqMINxg7ig4BnTwAvtPakNS+khxBnDQt0r7fzQsosYzrhia8IOBU5GIAigqFz2vrVpuYCd/XXg3fe3DW10xOyZ9OP6qumh+kR5iAmYw23QfcQQoiMhYk9EJfsscmNnNivUuz9vhTcAVPifg49A/rkeGxL2XrhuBt7d83f852EQvF0W3sKFVZ1m6UdIHrCxJT99+CuY4Em8zPnyFMYhZHSPC8
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="2.16.840.1.101.3.4.2.1"; boundary="----=_NextPart_000_0158_01DB1346.2ABEFE00"
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: 56e72ad4-cbd0-437a-7211-08dce1873764
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2024 19:36:44.5800 (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: BRyc3kTLNamUfMU1LK1ZrPznaZSJZspDU5gmBWE2XDTC8BTO3GcKuvsFW957Z0AjUVurwJJMK43QyKgCY9f4/oPCOL+fDNGrxVhNKfT25Vg=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8661
X-Proofpoint-GUID: FgAITslddifYkpMjWR_04Lgr6D5nd8yP
X-Proofpoint-ORIG-GUID: FgAITslddifYkpMjWR_04Lgr6D5nd8yP
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-09-30_19,2024-09-30_01,2024-09-30_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 priorityscore=1501 clxscore=1011 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2408220000 definitions=main-2409300142
Message-ID-Hash: B43CUJWELB6766DYA6ZX3E6ZTTWKQHK6
X-Message-ID-Hash: B43CUJWELB6766DYA6ZX3E6ZTTWKQHK6
X-MailFrom: Mike.Ounsworth@entrust.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-spasm.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [lamps] Re: [EXTERNAL] Re: KDF in draft-ietf-lamps-cms-kyber
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/2a4QP9yE4ra5R9TOt2ykBZpdg-o>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Owner: <mailto:spasm-owner@ietf.org>
List-Post: <mailto:spasm@ietf.org>
List-Subscribe: <mailto:spasm-join@ietf.org>
List-Unsubscribe: <mailto:spasm-leave@ietf.org>

Hi Uri,

 

Please don’t confuse the issue. Can you please point to the NIST document that claims that HKDF-SHA2 is allowed as a post-processing KDF with ML-KEM? Because we have a definitive statement and reference from Quynh Dang earlier in this thread that says that it is not.

 

https://mailarchive.ietf.org/arch/msg/spasm/aXSLgBPTX49pzo_mWE7EiADQ5oU/

 

---

Mike Ounsworth

 

From: Blumenthal, Uri - 0553 - MITLL <uri@ll.mit.edu> 
Sent: Monday, September 30, 2024 1:58 PM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com>; Daniel Van Geest <daniel.vangeest@cryptonext-security.com>; Dang, Quynh H. (Fed) <quynh.dang@nist.gov>; LAMPS <spasm@ietf.org>; Russ Housley <housley@vigilsec.com>
Subject: [EXTERNAL] Re: KDF in draft-ietf-lamps-cms-kyber

 

KMAC is NIST-approved, but not CNSA-authorized.

 

HKDF-SHA2 is NIST-approved, and with SHA384 – also CNSA-authorized (AFAICT). And, as pointed out, “widely implemented already”.

 

--

V/R,

Uri

 

There are two ways to design a system. One is to make it so simple there are obviously no deficiencies.

The other is to make it so complex there are no obvious deficiencies.

                                                                                                                                        C. A. R. Hoare

 

I was a shepherd to fools

Causelessly bold or afraid.

They would not abide by my rules.

Yet they escaped. For I stayed.

                                    R. Kipling “Epitaphs of the War. Convoy Escort”

 

 

From: Mike Ounsworth <Mike.Ounsworth=40entrust.com@dmarc.ietf.org <mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org> >
Date: Monday, September 30, 2024 at 12:29
To: Daniel Van Geest <daniel.vangeest@cryptonext-security.com <mailto:daniel.vangeest@cryptonext-security.com> >, Dang, Quynh H. (Fed) <quynh.dang=40nist.gov@dmarc.ietf.org <mailto:quynh.dang=40nist.gov@dmarc.ietf.org> >, LAMPS <spasm@ietf.org <mailto:spasm@ietf.org> >, Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com> >
Subject: [EXT] [lamps] Re: KDF in draft-ietf-lamps-cms-kyber

> I can add a note saying something like "if you want NIST compliance, also implement KMAC,"

 

The problem is, where is that specified? It’s more than just saying “oh, and you can also use KMAC”. You need to at least specify which OIDs to use, what to put in SMIME-CAPS, KMAC128 vs KMAC256, what values to use for K, L, S. You can’t say “You can also use KMAC” without having a spec to point at that has all of this written down. 

 

IMO, IETF / LAMPS should specify at least one FIPS-compatible option. If ML-KEM-with-HKDF-SHA2 is not FIPS-approved, then I think it behooves us to also include in draft-ietf-lamps-cms-kyber the full specification of how to use ML-KEM in CMS with KMAC as the CMS-layer KDF. 

 

---

Mike Ounsworth

 

From: Daniel Van Geest <daniel.vangeest@cryptonext-security.com <mailto:daniel.vangeest@cryptonext-security.com> > 
Sent: Monday, September 30, 2024 11:08 AM
To: Mike Ounsworth <Mike.Ounsworth@entrust.com <mailto:Mike.Ounsworth@entrust.com> >; Dang, Quynh H. (Fed) <quynh.dang=40nist.gov@dmarc.ietf.org <mailto:quynh.dang=40nist.gov@dmarc.ietf.org> >; LAMPS <spasm@ietf.org <mailto:spasm@ietf.org> >; Russ Housley <housley@vigilsec.com <mailto:housley@vigilsec.com> >
Subject: [EXTERNAL] Re: KDF in draft-ietf-lamps-cms-kyber

 

Catching up here. Specifying a particular KDF as MTI with ML-KEM in draft-ietf-lamps-cms-kyber does not prevent an implementer from also supporting another KDF. Specifying an MTI KDF in the RFC just increases interoperability. HDKF-with-SHA2

Catching up here.

 

Specifying a particular KDF as MTI with ML-KEM in draft-ietf-lamps-cms-kyber does not prevent an implementer from also supporting another KDF.  Specifying an MTI KDF in the RFC just increases interoperability.

 

HDKF-with-SHA2 was requested because it is already widely implemented.

 

So, if draft-ietf-lamps-cms-kyber specifies HDKF-with-SHA2 as the MTI KDF, nothing is preventing an implementation from also implementing KMAC in order to get NIST compliance.

 

Is an implementation going to fail to get NIST compliance if it implements both KMAC and HKDF for ML-KEM in CMS?  Even if it's configured to only use KMAC?

 

My inclination for the next version of the draft is to specify HKDF-with-SHA2 as MTI. We know this includes an unnecessary extract step, but it's not hurting anything.  I can add a note saying something like "if you want NIST compliance, also implement KMAC," but then what's to stop more requests for "if you want XYZ compliance, also implement HIJKDF."

 

If I follow this inclination (with or without the note), am I going to hear about it at IETF 121 and need to update this section yet again?

 

Regards,

Daniel Van Geest

 

 

On 2024-09-23 7:07 p.m., Mike Ounsworth wrote:

Dan: right. That’s a pretty solid reason why we need a KDF.

 

 

 

Quynh: Hmm. Well that certainly makes it more complicated.

 

Quynh, can you clarify where those three KDFs listed in SP 800-108r1 come from?

 

4.1 KDF in Counter Mode

4.2 KDF in Feedback Mode

4.3 KDF in Double-Pipeline Mode

 

Do any of them have RFCs? Are any of them HKDF? Is there precedent for RFCs the specify using those KDFs in a CMS *RecipientInfo? (I’m guessing that the answer to all is “no”?)

 

 

The “obvious” thing for draft-ietf-lamps-cms-kyber is to use HKDF-SHA2 as per RFC5869, but at a quick glance, HKDF is not one of the three KDFs defined in 4.1 – 4.3 of SP 800-108r1.

 

But KMAC is.

 

So  <mailto:daniel.vangeest@cryptonext-security.com> @Daniel Van Geest I wonder if we’re back to listing both options?

HKDF-SHA2: use this if you need SHA2

KMAC: use this if you need FIPS compliance.

 

What if you need both SHA2 and FIPS? Too bad?

 

---

Mike Ounsworth

 

From: Dang, Quynh H. (Fed)  <mailto:quynh.dang=40nist.gov@dmarc.ietf.org> <quynh.dang=40nist.gov@dmarc.ietf.org> 
Sent: Monday, September 23, 2024 12:42 PM
To: Mike Ounsworth  <mailto:Mike.Ounsworth@entrust.com> <Mike.Ounsworth@entrust.com>; Daniel Van Geest  <mailto:daniel.vangeest@cryptonext-security.com> <daniel.vangeest@cryptonext-security.com>; LAMPS  <mailto:spasm@ietf.org> <spasm@ietf.org>; Daniel Van Geest  <mailto:daniel.vangeest@cryptonext-security.com> <daniel.vangeest@cryptonext-security.com>; Russ Housley  <mailto:housley@vigilsec.com> <housley@vigilsec.com>
Subject: [EXTERNAL] RE: KDF in draft-ietf-lamps-cms-kyber

 

At this moment, there are 2 NIST compliant methods to get an AES key from the K.

 

1) Get a part or the whole of K depending on AES128, 192 or 256.

2) Run a KDF in SP 800-108 revision 1 and K is the secret input: the pseudorandom key, to the KDF.  Further technical requirements are in the document. 

 

Regards,

Quynh. 

 

From: Mike Ounsworth < <mailto:Mike.Ounsworth=40entrust.com@dmarc.ietf.org> Mike.Ounsworth=40entrust.com@dmarc.ietf.org> 
Sent: Monday, September 23, 2024 11:43 AM
To: Dang, Quynh H. (Fed) < <mailto:quynh.dang@nist.gov> quynh.dang@nist.gov>; Daniel Van Geest < <mailto:daniel.vangeest@cryptonext-security.com> daniel.vangeest@cryptonext-security.com>; LAMPS < <mailto:spasm@ietf.org> spasm@ietf.org>; Daniel Van Geest < <mailto:daniel.vangeest@cryptonext-security.com> daniel.vangeest@cryptonext-security.com>; Russ Housley < <mailto:housley@vigilsec.com> housley@vigilsec.com>
Subject: RE: KDF in draft-ietf-lamps-cms-kyber

 

Quynh,

 

Interesting. Are you proposing that when ML-KEM is used for content encryption within CMS, it does not need a KDF at the KEMRecipientInfo level, and in fact would be in violation of FIPS if it did? IE we should set KEMRecipientInfo.kdf = id-none (does this actually exist?) ?

 

The primary reason for a KDF at the KEMRecipientInfo layer is not for security but to stretch the shared secret output from the KEM to match the require key size for the AES wrap. ML-KEM.Encaps(ek) from FIPS 203 does not have a variable output length param – you always get a 32 byte (256 bit) shared secret from all strengths of ML-KEM, right?

 

But maybe that’s ok because we only ever need up to AES-256. Maybe we can get away with KEMRecipientInfo.kdf = id-none and just truncate as needed for the given AES size?

 

 <mailto:daniel.vangeest@cryptonext-security.com> @Daniel Van Geest,  <mailto:housley@vigilsec.com> @Russ Housley, thoughts?

 

 

 

 

The relevant parts of KEMRecipientInfo (from RFC 9629):

 

IE the KEMRecipientInfo would be:

 

  KEMRecipientInfo ::= SEQUENCE {

    …

    kem id-mlkem-*,

    …

    kdf id-none,

    kekLength INTEGER (1..65535),  <-- if doing this approach, then it would be max 256

    …

    wrap id-aes*-wrap,

    … }

 

?

 

---

Mike Ounsworth

 

From: Dang, Quynh H. (Fed) < <mailto:quynh.dang=40nist.gov@dmarc.ietf.org> quynh.dang=40nist.gov@dmarc.ietf.org> 
Sent: Monday, September 23, 2024 5:41 AM
To: Daniel Van Geest < <mailto:daniel.vangeest=40cryptonext-security.com@dmarc.ietf.org> daniel.vangeest=40cryptonext-security.com@dmarc.ietf.org>; LAMPS < <mailto:spasm@ietf.org> spasm@ietf.org>
Subject: [EXTERNAL] [lamps] Re: KDF in draft-ietf-lamps-cms-kyber

 

Hi Daniel and all, The shared secret key K coming out of a ML-KEM Encap/Decap is a pseudorandom key. So, it is pointless to run an extraction function over it before running an expansion function as the version 04 does. NIST might update SP

 

Hi Daniel and all,
 
The shared secret key K coming out of a ML-KEM Encap/Decap is a pseudorandom key.  So, it is pointless to run an extraction function over it before running an expansion function as the version 04 does. 
 
NIST might update SP 800-56C to allow the KDFs (including the HKDF with HMAC) there to derive keys from K in the future. But nothing is a sure thing before it happens. 
 
At this moment, if someone wants to use a NIST-compliant KDF, they can use one of the KDFs in SP 800-108 revision 1 here:  <https://urldefense.com/v3/__https:/nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf__;!!FJ-Y8qCqXTj2!cEXz6BLF7QDTmt2iYATb3Cgg0-8nfYlozfv4UKugL3mEb0D5gV7EO_XEFP27ISzrt1YoALEyIpjNIzYqYEGlI51-GGmoTOj-IpJ6FUVGZg$> https://urldefense.com/v3/__https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf__;!!FJ-Y8qCqXTj2!cEXz6BLF7QDTmt2iYATb3Cgg0-8nfYlozfv4UKugL3mEb0D5gV7EO_XEFP27ISzrt1YoALEyIpjNIzYqYEGlI51-GGmoTOj-IpJ6FUVGZg$
 
Regards,
Quynh. 
 
 
 
> -----Original Message-----
> From: Daniel Van Geest <daniel.vangeest=40cryptonext-
>  <mailto:security.com@dmarc.ietf.org> security.com@dmarc.ietf.org>
> Sent: Monday, September 23, 2024 5:26 AM
> To: LAMPS < <mailto:spasm@ietf.org> spasm@ietf.org>
> Subject: [lamps] KDF in draft-ietf-lamps-cms-kyber
> 
> Hi LAMPS,
> 
> The feedback in IETF 120 for draft-ietf-lamps-cms-kyber was to specify a single
> MTI KDF to use with ML-KEM in KEMRecipientInfo. The draft I presented
> specified that one of KMAC or HMAC with SHA2 must be implemented.
> Feedback from previous meetings was to please include HMAC with SHA2.
> 
> So, in the next version we will specify that the following KDFs MUST be
> supported:
> 
> If ML-KEM-512 is supported, HMAC with SHA2-256.
> If ML-KEM-768 is supported, HMAC with SHA2-512.
> If ML-KEM-1024 is supported, HMAC with SHA2-512.
> 
> The question for the group is whether we should just leave it that, or should
> we say something about KMAC?
> 
> For example, we could say implementations SHOULD to support KMAC.  The
> reasoning for KMAC is that it uses the same underlying Keccak primitives as
> ML-KEM.  But SHOULD seems to strong to me, I think it implies that most
> implementations would want to implement this and I don't know if that's the
> case.
> 
> Or, we could say implementations MAY support KMAC.  To me this statement
> seems meaningless because implementation may already support any
> additional KDF with KEMRecipientInfo as long as they also support the MTI
> one.
> 
> Thanks,
> Daniel Van Geest
> 
> 
> _______________________________________________
> Spasm mailing list --  <mailto:spasm@ietf.org> spasm@ietf.org
> To unsubscribe send an email to  <mailto:spasm-leave@ietf.org> spasm-leave@ietf.org
_______________________________________________
Spasm mailing list --  <mailto:spasm@ietf.org> spasm@ietf.org
To unsubscribe send an email to  <mailto:spasm-leave@ietf.org> spasm-leave@ietf.org