[IPsec] Review of draft-kampanakis-ml-kem-ikev2-02

John Mattsson <john.mattsson@ericsson.com> Sun, 03 March 2024 08:35 UTC

Return-Path: <john.mattsson@ericsson.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DBBF3C14CE2E for <ipsec@ietfa.amsl.com>; Sun, 3 Mar 2024 00:35:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.108
X-Spam-Level:
X-Spam-Status: No, score=-7.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-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_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=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=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ericsson.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 03FCe0xwF_rS for <ipsec@ietfa.amsl.com>; Sun, 3 Mar 2024 00:35:07 -0800 (PST)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2080.outbound.protection.outlook.com [40.107.21.80]) (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 36911C151991 for <ipsec@ietf.org>; Sun, 3 Mar 2024 00:34:43 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXz/GaCXoI/momo2Lk8HtB31GrvQFrFfRDFDDEdrIBHu6wB/VWc6flxatiOfG8TF72qFk/7neRUTsGAf1iNUMbb5De6UaZpH+VyxYqmjN5La+6hismPuzoMt4Plr8vWDjw7T6LwEHaA+ZY+dBhAFAxpQWRsPFMyxwTpMZuKZ48njR6bm5po1e+pzsem+ohCthmlAYMF0+kxzwI2xrVThaILHD9EElcS8Pzk3rhXKvieJD6znKPUQO2tdSFEIjx4DjLBTimQ/C9aJoERp/lTBThJJNpAEnws+kNfonAs/cgsS7r4487hAFRODAg6oQXMLWv46BYEyje+kG47IDf6qag==
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=eV91CNJoFcaUTb8op+piEqTYAtTUwuNzm0wq5of56V0=; b=JkYf4AUs/8bWdxcQUxYf9ORXEtB0rHVB3lW3vJ0i10tJF8nAcc+ef9saBR7BVfp+SNjb6h3dGWm3g93Ti4rEeAelkWRnQBiLiQOSte7Xjc3hha2xcPmvDvPG7YNHDJ/8lvxZHzJb+/9O1BlzdNveP8Ip1ruaeurSVd6SdbR9e4dnOieAXMjBpifUz1xllfbogtZ8khXq3kH1y2C5WWLMhXWUQjLc7ngu48zemzV7VQ4YzvMYQRRmZww5zzl9HS7mwbIDf4UFwBk06cYx5LATObWD10BXYTy3eJjijZS+QlFItGEWCrwkCuhwicZ2qkGnJyAf9ReE5nvAPHeq3FFCbQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eV91CNJoFcaUTb8op+piEqTYAtTUwuNzm0wq5of56V0=; b=Q0UKteNucnN6jlG9/3x3fKVXoHuTcuYfRguLt0BGwkPx96shLUpuPdrXgKgBAWvRBnTBUeC6LLROcELT961nPYmA7C80G6xv/yYfMP/HWB4OclH1dijV6zlASlu5oykMLsapPtsLd93JCLAeOxdwUMdoDA7xW/A08lQ9TTcUFnVshkEVvfe4XRZW424N6H48SE9hP1sqkCWviw2Etv09XKok47wHsYpqWWOjhav+pTH5Eo01KdYWSnL3cZGnoleI6iiB87e2UA9lF2JMlnbrhufTSNyW9wYqHukD1Qm+U2BoXPb8Y6HnmTWHx+SRxHETWWtc8KthoDhdykvK+TV1CA==
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com (2603:10a6:150:114::10) by DB9PR07MB9955.eurprd07.prod.outlook.com (2603:10a6:10:4cc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.37; Sun, 3 Mar 2024 08:34:39 +0000
Received: from GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::b0d0:9785:585a:9568]) by GVXPR07MB9678.eurprd07.prod.outlook.com ([fe80::b0d0:9785:585a:9568%4]) with mapi id 15.20.7316.039; Sun, 3 Mar 2024 08:34:37 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: "ipsec@ietf.org" <ipsec@ietf.org>
Thread-Topic: Review of draft-kampanakis-ml-kem-ikev2-02
Thread-Index: AQHabUL4lpYHU+sYrky7pVeuMVjFvw==
Date: Sun, 03 Mar 2024 08:34:37 +0000
Message-ID: <GVXPR07MB96782561F5F4D7C8126DBDC2895C2@GVXPR07MB9678.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: GVXPR07MB9678:EE_|DB9PR07MB9955:EE_
x-ms-office365-filtering-correlation-id: e1688605-810e-414e-d2db-08dc3b5cc30c
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: bWg85EEndNH4d2HlEU0Ygv3QCj2bq8mhwDygc1fro+kpbGQeSH9UbqNZ02IqtEveC/4UcvHNXfoEVEBvmvaNhOiNMN1oU/ei5rIo2TfVzq3p8pBABqXtv2tLkCX7BGaqvG4d+z78HRvTOAM1kZNo58OWaPiLT5XIhqTxGhSWX7EKRBztcq+lMUhZ4Lv8SuRWzjQ/AexFrB6yb4xUkY/kb6YrbqklONEQnyViR8oMatQi7mBTdPZX6oBKDt8rcNt06wMqPbVDi8L+jNSVbcrxUFisMSBjG19HpzcwEa0aoesm9qwGd9PrBX1xJ/ctgbbAOMsYxcHgPtISXjpWt90yCXEo9f8frsUoe9ngSATU4nwaLiS1LXbqRremSv6t+sdVtvGfXuu3UVgaw6Qiksv2dQu8nu5F/tZvs7ECke8JU50O1y18PWpbHecJ9FM6zOMv7VtPNbwrONbEQWL6QbHqL2G6AUrL12jWF5dsW3lhCGTVG047c10RXOTlaS19K6wAGgekDzyhzy9/rjz7gh7xgmGp8n8PmmANPmurh1tUqQ5h4IZkj2h13n8jzNZZNJHk0UN/m3L4ZCzEkkRHERkw7CljkFxwYJe0Pf62C3mfNcOPyJ43O0G8xxMtsWFFluFBYaBn+RwjFcz/K/H2ElSsMuLuqpd7AkWuREYszHuFtLk=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:ko; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXPR07MB9678.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-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IefV1v2B7JpfqxzSawYYfE7terEkfaHHN4uCjVFAeTqIJnluvw0ZOnaMg0I6QLCG+C+lC23S2qnO/cK874edP9uWoRISaiy4dug378emy0MtpB0DpPVL0M7j6t5KwJ1RMMunW+Gg4omg6m7wGAqv0q3TDtEyuhyl0W2fmNk8d5w79Shfa3swRMQg0xFr6doT7MI9/rIMOULcGvlg/gvJbZpPc2/IEKJ/Lm6yUNUqiStPTJO6RPy7538LxF3wxj4lvtIpDmAASMMcgQpapNjr3NBRqs0eTyBPTV4+GAKTYTOuF+QdyBIwTVEzczI7IhRDGPzTONc1JNkfb8gtok2I12/VpebBdgF9RsuEGZBgofE3j/RuXnSheRXYP1Qe6qnI1Deock4YhzwDeiyQ5Ju6uAwn8VTZt/DyuzkGAiZL2xhtS4Oy/abvJsS6Y4hvarsRxP2PYv6MOAJxy0Vvkmj2C1QN76kDgMm6cLppjJNgWsn/PjHsYeOvvBE3y3b+0AmHbSY7yp2UerLERUb3jZaR8IbOTG1qlyygn/mSJ9rJVeL2rYUw3oMzQz+AfrjeU2vWR8RWAt6xxnYg0=
Content-Type: multipart/alternative; boundary="_000_GVXPR07MB96782561F5F4D7C8126DBDC2895C2GVXPR07MB9678eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: GVXPR07MB9678.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e1688605-810e-414e-d2db-08dc3b5cc30c
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2024 08:34:37.5056 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: +y0ufqgDPismkOgSNiEfd+Q48KDk0nDzVZ9XpTB7IMVVkMei+ee88HWYtGTY2ifxulyu/MsBvqsLgS0mV9N37F5kKK0C/XiIXhyBG66aAao=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB9955
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/KM-n5J9k9tJdg5pOILT3yU57V0I>
Subject: [IPsec] Review of draft-kampanakis-ml-kem-ikev2-02
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 03 Mar 2024 08:35:11 -0000

Review of draft-kampanakis-ml-kem-ikev2-02
Hi,

I think IPSECME should adopt this draft asap. This should definitely be a standards track RFC.

I really like that IKEv2 register KEMs as separate code points and not hybrid code points like in TLS 1.3. I think the hybrid code points in TLS 1.3 might end up being a mess. It is also a good long-term solution, as long-term, people might want to use only a quantum-resistant KEM such as ML-KEM.

We would also like to be able to use ML-DSA for authentication in IKEv2. Is there any draft-xxx-ml-dsa-ikev2, otherwise it should be written asap. I am happy to help.
https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/

Comments of the draft:


- “Post-quantum”



I think the draft should remove “post-quantum” and only use the term “quantum-resistant”, this aligns with draft-ietf-lamps-dilithium-certificates, draft-gazdag-x509-slhdsa, and CNSA 2.0. “Post-quantum” is quite a strange term as ML-KEM needs to be deployed way before CRQCs are built.

- “As post-quantum keys are usually larger than common network Maximum Transport Units (MTU)“

“usually” depends on your sample of algorithms and security categories. As the ciphertext is not a key, I think it would be good to talk about encapsulation keys and ciphertexts, which aligns with FIPS 203. The encapsulation keys and ciphertexts in ML-KEM-512 and ML-KEM-768 are smaller than the typical Internet MTU. Also, it is the packet size carrying the encapsulation key or ciphertext that matters, not just the key ciphertext sizes themselves.

- “ML-KEM-768 and ML-KEM-1024 public keys and ciphertexts can exceed typical network MTUs (1500 bytes).

ML-KEM-768 encapsulation keys and ciphertexts are smaller than 1500 bytes. The word "can" is weird as the sizes are fixed. Should probably talk about packets.


- “Thus, ML-KEM-1024 Key Exchange Method identifier TBD37 SHOULD only be used in IKE_INTERMEDIATE exchanges.  It SHOULD NOT be used in IKE_FOLLOWUP_KE messages until there is a separate document which defines how such exchanges are split in several messages.”

I think this should be rewritten to say that ML-KEM-1024 should only be used in IKE_SA_INIT when it is known that the network MTU is large. There is no reason to discourage use of ML-KEM-1024 in networks that use 9000 bytes ethernet jumbo frames.


- “which generates a public key 'pk' and a secret key 'sk'.”



I think the document should align with FIPS 203, which calls them encapsulation key and decapsulation key.



- “Otherwise keep a normative reference of [FIPS203].”



I think FIPS203 should be the normative reference no matter what.



- " which will not have material performance impact on IKEv2/IPsec tunnels which usually stay up for long periods of time."



Not sure that long-lived tunnels are so relevant as best practice is to rekey with PFS based on both time and data (ANSSI says 1 hour or 100 GB).

https://cyber.gouv.fr/sites/default/files/2015/09/NT_IPsec_EN.pdf



I think the document should stress how fast ML-KEM is. On a single core AMD Ryzen 5 5560U [17], a mobile CPU from 2021, the cryptographic operations in ML-KEM takes 12 μs for the initiator and 8 μs for the responder. The key generation can be pre-computed, reducing the time required for real-time cryptographic operations to 6 μs for the initiator and 8 μs for the responder.

https://bench.cr.yp.to/results-kem.html



- “Consider adding ML-KEM-512 which would fit in one packet.”



I strongly think this document should just register all variant in FIPS 203. NIST latest assessment is that “the most plausible values for the practical security of Kyber512 against known attacks are significantly higher than that of AES128”. Ericsson agrees with that assessment and so do Sophie Schmieg (Google).

https://csrc.nist.gov/csrc/media/Projects/post-quantum-cryptography/documents/faq/Kyber-512-FAQ.pdf

https://keymaterial.net/2023/11/18/kyber512s-security-level/



- “The ML-KEM-768 public key is 1184 bytes”



I think it would be good with a table that shows the encapsulation key and ciphertext sizes for ML-KEM-512, ML-KEM-768, and ML-KEM-1024.



- “Although ML-KEM is IND-CCA2 secure, reusing the same ML-KEM keypair does not offer forward secrecy.”



I strongly think IPsec should continue to use the term "perfect forward secrecy", this aligns with RFC 4949, RFC 7296 and most government documents talking about ephemeral key exchange in IKEv2. The TLS 1.3 use of "forward secrecy" for both ephemeral key exchange and symmetric ratcheting has had the unfortunate result that people think they get the same security properties from both, which is absolutely not the case.



- “The initiator should generate a new ML-KEM keypair with every ML-KEM key exchange.”



I think this should be a MUST. On a single core AMD Ryzen 5 5560U [17], a mobile CPU from 2021, key generation with ML-KEM-512 takes the initiator 6 microsecond. Reuse was needed with the very slow FFDH key exchange on old CPUs of the past. Forbidding reuse significantly simplifies the security analysis.

Cheers,
John Preuß Mattsson