<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp   "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.2 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-ipsecme-ikev2-mlkem-05" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.18.2 -->
  <front>
    <title abbrev="ML-KEM IKEv2">Post-quantum Key Exchange with ML-KEM in the Internet Key Exchange Protocol Version 2 (IKEv2)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-ipsecme-ikev2-mlkem-05"/>
    <author fullname="Panos Kampanakis">
      <organization>Amazon Web Services</organization>
      <address>
        <email>kpanos@amazon.com</email>
      </address>
    </author>
    <date/>
    <area>Security</area>
    <workgroup>IPSECME</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>NIST standardized ML-KEM, a new key encapsulation mechanism, which can be used for quantum-resistant key establishment. This draft specifies how to use ML-KEM by itself or as an additional key exchange in IKEv2 along with a traditional key exchange. These options allow for negotiating IKE and Child SA keys which are safe against cryptographically relevant quantum computers. <!--and theoretical weaknesses in ML-KEM or implementation issues.--> </t>
    </abstract>
  </front>
  <middle>

<section anchor="introduction">
      <name>Introduction</name>
      <t>A Cryptographically Relevant Quantum Computer (CRQC) would pose a significant threat to current public key establishment algorithms. Someone storing encrypted communications that use (Elliptic Curve) Diffie-Hellman ((EC)DH) to establish keys could decrypt these communications in the future after a CRQC became available to them which is also known as a 'harvest-now-decrypt-later' attack. Such communications include Internet Key Exchange Protocol Version 2 (IKEv2) <xref target="RFC7296"/>.</t>

      <!-- <t>To address this concern, the Mixing Preshared Keys in IKEv2 specification <xref target="RFC8784"/> introduced Post-quantum Preshared Keys (PPK) as a temporary option for stirring a pre-shared key of adequate entropy in the derived Child SA encryption keys in order to provide quantum-resistance. This specification can be used in conjunction with PPK as defined in <xref target="RFC8784"/>. Alternatively, <xref target="RFC9867"/> can be used for mixing pre-shared keys in IKEv2, as it provides better security properties than <xref target="RFC8784"/> and, since the PPK negotiation can be combined with additional ML-KEM key exchanges, the extra round-trip penalty can be avoided. </t> 
      <t>Since then, NIST has been working on a public project <xref target="NIST-PQ"/> for standardizing quantum-resistant algorithms which include key encapsulation and signatures. At the end of Round 3, they picked Kyber as the first Key Encapsulation Mechanism (KEM) for standardization <xref target="I-D.cfrg-schwabe-kyber"/> . Kyber was then standardized as Module-Lattice-based Key-Encapsulation Mechanism (ML-KEM) in 2024 <xref target="FIPS203"/>.</t> -->
      <t>This document describes how ML-KEM <xref target="FIPS203"/> can be used as a quantum-resistant key exchange in IKEv2. ML-KEM is a Key Encapsulation Mechanism (KEM) which is believed to be infeasible to break, even by adversaries with a CRQC. By integrating ML-KEM into IKEv2, IKEv2/IPsec tunnels become resistant to harvest-now-decrypt-later attacks.</t>
	
      <!-- <t>As post-quantum public keys and ciphertexts may make UDP packet sizes larger than common network Maximum Transport Units (MTU), the Intermediate Exchange in IKEv2 document <xref target="RFC9242"/> defined how to do additional large message exchanges by using new IKE_INTERMEDIATE messages. IKE_INTERMEDIATE messages can only be used after IKE_SA_INIT. The Multiple Key Exchanges in IKEv2 specification <xref target="RFC9370"/> defined how to do up to seven additional key exchanges by using IKE_INTERMEDIATE or IKE_FOLLOWUP_KE messages and by deriving new SKEYSEED and KEYMAT key materials. These messages can be fragmented at the IKEv2 layer before causing IP fragmentation <xref target="RFC7383"/>. If a post-quantum KEM does not fit inside IKE_SA_INIT without causing IP fragmentation, then it can be used after IKE_SA_INIT in an IKE_INTERMEDIATE, CREATE_CHILD_SA, or IKE_FOLLOWUP_KE message as an additional key establishment algorithm.</t> -->
    <!-- <t>This document describes how ML-KEM can be used as a quantum-resistant KEM in IKEv2 in an IKE_SA_INIT or CREATE_CHILD_SA exchange, or in one additional IKE_INTERMEDIATE or IKE_FOLLOWUP_KE key exchange after an initial IKE_SA_INIT or CREATE_CHILD_SA respectively. The latter approach of combining a quantum-resistant (ML-KEM in IKE_INTERMEDIATE, IKE_FOLLOWUP_KE, or CREATE_CHILD_SA) with a traditional algorithm (in IKE_SA_INIT), is commonly called Post-Quantum Traditional (PQ/T) Hybrid <xref target="RFC9794"/> key exchange and combines the security of a well-established algorithm with relatively new quantum-resistant algorithms. The result is a new Child SA key or an IKE or Child SA rekey with quantum-resistant keying material. Another use of a PQ/T Hybrid key exchange in IKEv2 is for someone that wants to exchange keys using the high security parameter of ML-KEM. As these may not fit in common network packet payload sizes, they will need to be sent in a IKE_FOLLOWUP_KE or CREATE_CHILD_SA key exchange which can be fragmented. This specification is a profile of the Multiple Key Exchanges in IKEv2 specification <xref target="RFC9370"/> and registers new algorithm identifiers for ML-KEM key exchanges in IKEv2.</t>-->
	  <t>This specification describes how ML-KEM can be used by itself or combined with a traditional (EC)DH key exchange in IKEv2 for key establishment and registers three new algorithm identifiers for IKEv2. Combining traditional with post-quantum key exchanges is a technique commonly called Post-Quantum Traditional (PQ/T) Hybrid <xref target="RFC9794"/> key exchange. Other than combining the security of a well-established algorithm with relatively new quantum-resistant algorithms, another use of a PQ/T Hybrid key exchanges in IKEv2 is to prevent fragmentation of key exchanges with the high security parameter of ML-KEM which may not fit in common network packet payload sizes.</t>

      <section anchor="kems">
        <name>KEMs</name>
        <t>In the context of the NIST Post-Quantum Cryptography Standardization Project <xref target="NIST-PQ"/>, key exchange algorithms are formulated as KEMs, which consist of three steps:</t>
        <ul spacing="normal">
          <li>
            <t>'KeyGen() -&gt; (pk, sk)': A probabilistic key generation algorithm, which generates a public / encapsulation key 'pk' and a private / decapsulation key 'sk'. The resulting pk is sent to the responder in the KEi payload.</t>
          </li>
          <li>
            <t>'Encaps(pk) -&gt; (ct, ss)': A probabilistic encapsulation algorithm, which takes as input a public key pk (from the KEi) and outputs a ciphertext 'ct' and shared secret 'ss'. The ct is sent back to intiator in the KEr payload.</t>
          </li>
          <li>
            <t>'Decaps(sk, ct) -&gt; ss': A decapsulation algorithm, which takes as input a secret key sk and ciphertext ct (from the KEr) and outputs a shared secret ss, or in some rare cases a distinguished error value.</t>
          </li>
        </ul>
		<t>Note that ML-KEM's Decaps routine uses implicit rejection and will not return a distinguished error value. Instead it will always produce an ss value which will be incorrect if the ct was manipulated and will be detected by the IKEv2 protocol.</t>
      </section>
      <section anchor="ml-kem">
        <name>ML-KEM</name>
        <t>ML-KEM is a standardized lattice-based key encapsulation mechanism <xref target="FIPS203"/>. It uses Module Learning with Errors as its underlying primitive which is a structured lattices variant that offers good performance and relatively small and balanced key and ciphertext sizes. ML-KEM was standardized with three parameters, ML-KEM-512, ML-KEM-768, and ML-KEM-1024. These were mapped by NIST to the three security levels defined in the NIST PQC Project, Level 1, 3, and 5. These levels correspond to the hardness of breaking AES-128, AES-192 and AES-256 respectively.</t>
        <t>ML-KEM-512, ML-KEM-768 and ML-KEM-1024 key exchanges will not have noticeable performance impact on IKEv2/IPsec tunnels which usually stay up for long periods of time and transfer sizable amounts of data. ML-KEM-768 and ML-KEM-1024 public key and ciphertext sizes can exceed the network MTU; these key exchanges could require two or three network IP packets from both the initiator and the responder. </t>
      </section>
      <section anchor="conventions-and-definitions">
        <name>Conventions and Definitions</name>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
</section>
    
    <section anchor="ml-kem-in-ikev2">
      <name>ML-KEM in IKEv2</name>
      <t>Intuitively, ML-KEM is used in IKEv2 like a traditional key exchange, where the the initiator's KE payload is an ML-KEM public key and the responder KE payload is the ML-KEM ciphertext. The 32-byte ML-KEM shared secret output is used without padding like the traditional shared g^ir value in the IKEv2 specification <xref target="RFC7296"/>. ML-KEM key exchanges can be negotiated in IKE_INTERMEDIATE, CREATE_CHILD_SA, or IKE_FOLLOWUP_KE messages as defined in the Multiple Key Exchanges in IKEv2 specification <xref target="RFC9370"/>. <xref target="appendix"/> summarizes them for completeness.</t> 

	  <section anchor="key-exchange-payload">
		<name>Key Exchange Payload</name>
        <t>The KE payload is shown below and the fields inside it has meaning as defined in Section 3.4 of the IKEv2 standard <xref target="RFC7296"/>:</t>
        <artwork><![CDATA[
                     1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload  |C|  RESERVED   |         Payload Length        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Key Exchange Method Num     |           RESERVED            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       Key Exchange Data                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
]]></artwork>

	    <t>The Key Exchange Data from the initiator to the responder contains the public key (pk) from the KeyGen() operation encoded as a raw byte array (i.e., output of ByteEncode) as defined in Section 7.1 of Module-Lattice-Based KEM standard <xref target="FIPS203"/>.</t>
	    <t>The Key Exchange Data from the responder to the initiator contains the ciphertext (ct) from the Encaps operation encoded as a raw byte array.</t>
	    <t><xref target="ke_payload_table"/> shows the Payload Length, Key Exchange Method Num identifier and the Key Exchange Data Size in octets for Key Exchange Payloads from the initiator and the responder for the ML-KEM variants specified in this document.</t>
	
<table anchor="ke_payload_table">
  <name>Key Exchange Payload Fields</name>
  <thead>
    <tr>
      <th align='center'>KEM</th>
      <th align='center'>Payload Length (initiator / responder)</th>
      <th align='center'>Key Exchange Method Num</th>
      <th align='center'>Data Size in Octets (initiator / responder)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">ML-KEM-512</td>
      <td align="center">808 / 776</td>
      <td align="center">35</td>
      <td align="center">800 / 768</td>
    </tr>
    <tr>
      <td align="center">ML-KEM-768</td>
      <td align="center">1192 / 1096</td>
      <td align="center">36</td>
      <td align="center">1184 / 1088 </td>
    </tr>
    <tr>
      <td align="center">ML-KEM-1024</td>
      <td align="center">1576 / 1576</td>
      <td align="center">37</td>
      <td align="center">1568 / 1568</td>
    </tr>
  </tbody>
</table>

		<t>Although, this document focuses on using ML-KEM as the second key exchange in a PQ/T Hybrid KEM <xref target="RFC9794"/> scenario, ML-KEM-512 Key Exchange Method identifier 35 <bcp14>MAY</bcp14> be used in IKE_SA_INIT as a quantum-resistant-only key exchange. The encapsulation key and ciphertext size for this ML-KEM parameter may not push the UDP packet to size larger than typical network MTUs. On the other hand, IKE_SA_INIT messages using ML-KEM-768 or ML-KEM-1024 Key Exchange Method identifiers 36 and 37 respectively could exceed typical network MTUs and could not be IKEv2 fragmented <xref target="RFC7383"/>. Thus, implementations transporting IKE over UDP and not performing Path MTU (PMTU) discovery <bcp14>SHOULD NOT</bcp14> use ML-KEM-768 or ML-KEM-1024 in the IKE_SA_INIT exchange on networks where the PMTU is unknown or restricted. However, when reliable transport is used for IKE (e.g. <xref target="RFC9329"/>, <xref target="I-D.ietf-ipsecme-ikev2-reliable-transport"/>) or a sufficient PMTU is guaranteed, implementations <bcp14>MAY</bcp14> use any ML-KEM parameter in an IKE_SA_INIT exchange.</t>

      </section>

      <section anchor="receipent-tests">
        <name>Recipient Tests</name>
        <t>Receiving and handling of malformed ML-KEM public keys or ciphertexts must <!--EDNOTE: General, non-normative "must" here because the normative "MUST check"s are broken down more prescriptively for the responder and the initiator in the text that follows. --> follow the input validation described in the Module-Lattice-Based KEM standard <xref target="FIPS203"/>. Responders <bcp14>MUST</bcp14> perform the checks on the initiator public key specified in section 7.2 of the Module-Lattice-Based KEM standard <xref target="FIPS203"/> before the Encaps(pk) operation. If the checks fail, the responder <bcp14>SHOULD</bcp14> send a Notify payload of type INVALID_SYNTAX as a response to the request from initiator.</t>
        <t>Initiators <bcp14>MUST</bcp14> perform the Ciphertext type check specified in section 7.3 of the Module-Lattice-Based KEM standard <xref target="FIPS203"/> before the Decaps(sk, ct) operation. If the check fails, the initiator <bcp14>MUST</bcp14> reject the ciphertext and <bcp14>MUST</bcp14> fail the exchange, log the error, and stop creating the SA (i.e. not initiate IKE_AUTH or next IKE_INTERMEDIATE). <!-- [ EDNOTE: Removing since it violates RFC 7296 Section 2.21 as Valery pointed out. ] In this case, the initiator <bcp14>MAY</bcp14> send a Notify payload of type INVALID_SYNTAX to the responder as a separate INFORMATIONAL exchange, usually with no other payloads. This is an exception for the general rule of not starting new exchanges based on errors in responses. --> If the error occurs in the CREATE_CHILD_SA or IKE_FOLLOWUP_KE exchanges, the initiator <bcp14>MUST</bcp14> delete the existing IKE SA and send a Delete payload in a new INFORMATIONAL exchange for the responder to also remove it. </t>
        <t>Note that during decapsulation, ML-KEM uses implicit rejection which leads the decapsulating entity to implicitly reject the decapsulated shared secret by setting it to a hash of the ciphertext together with a random value stored in the ML-KEM secret when the re-encrypted shared secret does not match the original one. This would result to different and unrelated keys for the initiator and the responder (and failing IKEv2/IPsec tunnel) in the event of a malformed or maliciously manipulated responder ciphertext.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>All security considerations from <xref target="RFC9242"/> and <xref target="RFC9370"/> apply to the ML-KEM exchanges described in this specification.</t>
      <t>The main security property for KEMs standardized by NIST is indistinguishability under adaptive chosen ciphertext attacks (IND-CCA2) <xref target="FIPS203"/>, which means that shared secret values should be indistinguishable from random strings even given the ability to have arbitrary ciphertexts decapsulated. IND-CCA2 corresponds to security against an active attacker, and the public key / secret key pair can be treated as a long-term key or reused.  A weaker security notion is indistinguishability under chosen plaintext attacks (IND-CPA), which means that the shared secret values should be indistinguishable from random strings given a copy of the public key. IND-CPA roughly corresponds to security against a passive attacker, and sometimes corresponds to one-time key exchange. Generating an ephemeral keypair and ciphertext for each ML-KEM key exchange is <bcp14>REQUIRED</bcp14> by this specification. Note that this is also common practice for (EC)DH keys today. Responders also <bcp14>MUST NOT</bcp14> reuse randomness in the generation of KEM ciphertexts.</t>
      <t>The ML-KEM public key generated by the initiator and the ciphertext generated by the responder use randomness (usually a seed) which <bcp14>MUST</bcp14> be independent of any other random seed used in the IKEv2 negotiation. For example, at the initiator, the ML-KEM and (EC)DH keypairs used in a PQ/T Hybrid key exchange <bcp14>MUST NOT</bcp14> be generated from the same seed. For more detailed ML-KEM specific security considerations regarding this, randomness, misbinding properties, decapsulation failures, key reuse, and key checks, refer to <xref target="I-D.sfluhrer-cfrg-ml-kem-security-considerations"/>.</t>
	  <t>For guidelines of how to securely implement and use KEMs in applications, refer to Sections 3 and 4 of <xref target="SP800227"/>.</t>
      <t>When using PQ/T Hybrid key exchanges, SKEYSEED and KEYMAT in this specification are generated by using shared secrets, nonces, and SPIs with a pseudorandom function as defined in <xref target="RFC9370"/>. As discussed in <xref target="PQ-PROOF2"/>, such PQ/T Hybrid key derivations are IND-CPA, but not proven to be IND-CCA2 secure. <!-- although the keys could be reused if the nonces are never reused--></t>

     <t>IKEv2 is susceptible to downgrade attacks where an active man-in-the-middle could force the peers to negotiate the weakest key exchange method supported by both. In particular, if both peers support some sequence of key exchanges that involve only traditional algorithms, an active, on-path attacker with a CRQC may be able to convince the peers to use it even if they both support ML-KEM as well. Note that to achieve such a downgrade, the adversary needs to break traditional (EC)DH IKE_SA_INIT ephemeral exchanges while the negotiation is still taking place and completely control the flow to delay or drop legitimate IKEv2 messages. <!-- It cannot go back in time to achieve the downgrade because the (EC)DH IKE_INITs are ephemeral. --> IKEv2 downgrades is a known issue <xref target="DOWN-RES"/>, <xref target="IKEv2-A"/> caused by the way IKEv2 authenticates messages only in one direction of the exchange; <xref target="PQIKEV2-FA"/> concluded that IKE_INTERMEDIATE <xref target="RFC9370"/> does not introduce additional attacks with respect to IKEv2's original security model.</t> 
     <t>The simplest way to prevent such active attacks is to disable support for traditional-only sequences of key exchanges whenever possible. If the responder knows out-of-band that initiators support ML-KEM, then it SHOULD reject any proposal that doesn't include ML-KEM in the IKE_SA_INIT or IKE_INTERMEDIATE. Likewise, if the initiator knows out-of-band that a responder supports ML-KEM, it SHOULD only include proposals for ML-KEM or abort the negotiation if the responder selects a proposal that doesn't include ML-KEM. A long-term solution for the downgrade issue in IKEv2 is proposed in <xref target="I-D.ietf-ipsecme-ikev2-downgrade-prevention"/>.</t>
     <t>As an alternative, in cases where there is a subset of known identities of peers that have been upgraded to support ML-KEM, the initiator or responder can enforce a policy to not encrypt any data to one of these peers until an ML-KEM exchange has taken place. <xref target="RFC9370"/> supports Childless IKE SAs which can be followed by a new Child SA after doing more key exchanges. To ensure that data is encrypted over a quantum-resistant IPsec Child SA, the peers could enforce a policy which first establishes a Childless IKE SA <xref target="RFC6023"/> (or a Child SA which does not encrypt any data) with a traditional key exchange and without an IKE_INTERMEDIATE exchange. Subsequently the peers can rekey the initial IKE SA and derive a new Child SA (or rekey the existing Child SA that did not encrypt any data) with ML-KEM in a CREATE_CHILD_SA exchange or with ML-KEM as an additional key exchange in a IKE_FOLLOWUP_KE exchange which follows a traditional CREATE_CHILD_SA exchange. Section 2.2.5.1 of <xref target="RFC9370"/> discusses the details of the latter PQ/T Hybrid approach. <!--This approach could be enforced only for certain, known out-of-band, peer identities that support ML-KEM which are known to the initiator or responder during the CREATE_CHILD_SA exchange that follows IKE_AUTH. --> This approach has the disadvantage that an adversary with a CRQC that could decrypt the IKE_SA_INIT exchange has access to all the information exchanged over the initial IKE SA or Child SA before the rekey. This information includes the identities of the peers, configuration parameters, and all negotiated SA information (including traffic selectors), but not the information and data encrypted after the CREATE_CHILD_SA (and IKE_FOLLOWUP_KE with ML-KEM) <!-- This was the case with the IKE SA before stirring in the PPK in <xref target="RFC8784"/> as well. --> <!-- Previously, a man-in-the-middle attacker who could not complete the IKE_AUTH exchange could only see the identity of the initiator <xref target="RFC7296"/>. --> </t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>IANA is requested to assign three values for the names "ml-kem-512", "ml-kem-768", and "ml-kem-1024" in the IKEv2 "Transform Type 4 - Key Exchange Method Transform IDs" and has listed this document as the reference. The Recipient Tests field should also point to this document:</t>
      <table anchor="tab1">
        <name>Updates to the IANA "Transform Type 4 - Key Exchange Method Transform IDs" table</name>
        <thead>
          <tr>
            <th align="left">Number</th>
            <th align="left">Name</th>
            <th align="left">Status</th>
            <th align="left">Recipient Tests</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody> 
          <tr>
            <td align="left">35</td>
            <td align="left">ml-kem-512</td>
            <td align="left"> </td>
            <td align="left">[TBD, this RFC, <xref target="receipent-tests"/>],</td>
            <td align="left">[TBD, this RFC] </td>
          </tr>
          <tr>
            <td align="left">36</td>
            <td align="left">ml-kem-768</td>
            <td align="left"> </td>
            <td align="left">[TBD, this RFC, <xref target="receipent-tests"/>],</td>
            <td align="left">[TBD, this RFC]</td>
          </tr>
          <tr>
            <td align="left">37</td>
            <td align="left">ml-kem-1024</td>
            <td align="left"> </td>
            <td align="left">[TBD, this RFC, <xref target="receipent-tests"/>],</td>
            <td align="left">[TBD, this RFC]</td>
          </tr>

        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="FIPS203" target="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.pdf">
          <front>
            <title>Module-Lattice-Based Key-Encapsulation Mechanism Standard</title>
            <author>
              <organization>National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2024" month="August" day="13"/>
          </front>
          <seriesInfo name="NIST" value="Federal Information Processing Standards"/>
        </reference>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9242.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9370.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7296.xml"/>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6023.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9329.xml"/>
		<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-ipsecme-ikev2-reliable-transport.xml"/>
		<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-sfluhrer-cfrg-ml-kem-security-considerations.xml"/>
		<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-ipsecme-ikev2-downgrade-prevention.xml"/>
		<!-- <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9867.xml"/> -->
	    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9794.xml"/>
        <reference anchor="NIST-PQ">
          <front>
            <title>Post-Quantum Cryptography</title>
            <author>
              <organization>National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date/>
          </front>
          <seriesInfo name="https://csrc.nist.gov/projects/post-quantum-cryptography" value=""/>
        </reference>
		<!-- <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8784.xml"/> -->
		<!-- <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-cfrg-schwabe-kyber.xml"/> -->
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7383.xml"/>
        <reference anchor="PQ-PROOF2" target="https://eprint.iacr.org/2023/972">
          <front>
            <title>Security of Hybrid Key Establishment using Concatenation</title>
            <author initials="A." surname="Petcher" fullname="Adam Petcher">
              <organization></organization>
            </author>
            <author initials="M." surname="Campagna" fullname="Matthew Campagna">
              <organization></organization>
            </author>
            <date year="2023"/>
          </front>
        </reference>
        <reference anchor="DOWN-RES" target="https://ieeexplore.ieee.org/document/7546520">
          <front>
            <title>Downgrade Resilience in Key-Exchange Protocols</title>
            <author initials="K." surname="Bhargavan" fullname="Karthikeyan Bhargavan">
              <organization></organization>
            </author>
            <author initials="C." surname="Brzuska" fullname="Chris Brzuska">
              <organization></organization>
            </author>
            <author initials="C." surname="Fournet" fullname="Cédric Fournet">
              <organization></organization>
            </author>
            <author initials="M." surname="Green" fullname="Matthew Green">
              <organization></organization>
            </author>
            <author initials="M." surname="Kohlweiss" fullname="Markulf Kohlweiss">
              <organization></organization>
            </author>
            <author initials="S." surname="Zanella-Béguelin" fullname="Santiago Zanella-Béguelin">
              <organization></organization>
            </author>
            <date year="2016"/>
          </front>
        </reference>
        <reference anchor="PQIKEV2-FA" target="https://www.mnm-team.org/pub/Publikationen/gggh21b/PDF-Version/gggh21b.pdf ">
          <front>
            <title>A formal analysis of IKEv2's post-quantum extension</title>
            <author initials="S." surname="Gazdag" fullname="Stefan-Lukas Gazdag">
              <organization></organization>
            </author>
            <author initials="S." surname="Grundner-Culemann" fullname="Sophia Grundner-Culemann">
              <organization></organization>
            </author>
            <author initials="T." surname="Guggemos" fullname="Tobias Guggemos">
              <organization></organization>
            </author>
            <author initials="T." surname="Heider" fullname="Tobias Heider">
              <organization></organization>
            </author>
            <author initials="D." surname="Loebenberger" fullname="Daniel Loebenberger">
              <organization></organization>
            </author>
            <date year="2021"/>
          </front>
        </reference>
        <reference anchor="IKEv2-A" target="https://ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/appliedcrypto/education/theses/semester-project_eduarda-assuncao.pdf">
          <front>
            <title>Analyzing IKEv2: Security Proofs, Known Attacks, and Other Insights</title>
            <author initials="E." surname="Assuncao" fullname="Eduarda Assuncao">
              <organization></organization>
            </author>
            <date year="2025"/>
          </front>
        </reference>
        <reference anchor="SP800227" target="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-227.pdf">
          <front>
            <title>Recommendations for Key-Encapsulation Mechanisms</title>
            <author>
              <organization>National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2025" month="September" day="18"/>
          </front>
          <seriesInfo name="NIST" value="Federal Information Processing Standards"/>
        </reference>
      </references>
    </references>

    <section anchor="appendix" numbered="true" toc="default">
      <name>ML-KEM in RFC9370</name>
	  <t>Section 2.2.2 of <xref target="RFC9370"/> specifies that KEi(0), KEr(0) are regular key exchange messages in the first IKE_SA_INIT exchange which end up generating a set of keying material, SK_d, SK_a[i/r], and SK_e[i/r]. The peers then perform an IKE_INTERMEDIATE exchange, carrying new Key Exchange payloads. These are protected with the SK_e[i/r] and SK_a[i/r] keys which were derived from the IKE_SA_INIT as per Section 3.3.1 of the Intermediate Exchange in IKEv2 document <xref target="RFC9242"/>. The initiator generates an ML-KEM keypair (pk, sk) using KeyGen(), and sends the public key (pk) to the responder inside a KEi(1) payload. The responder will encapsulate a shared secret ss using Encaps(pk) and the resulting ciphertext (ct) is sent to initiator using the KEr(1). After the initiator receives KEr(1), it will decapsulate it using Decaps(sk, ct). Both Encaps and Decaps return the shared secret (ss) and both peers have a common shared secret SK(1) at the end of this KE(1) exchange. The ML-KEM shared secret is stirred into new keying material SK_d, SK_a[i/r], and SK_e[i/r] as defined in Section 2.2.2 of the Multiple Key Exchanges in IKEv2 document <xref target="RFC9370"/>. Afterwards the peers can perform more exchanges if necessary and then continue to the IKE_AUTH exchange phase as defined in Section 3.3.2 of the Intermediate Exchange in IKEv2 specification <xref target="RFC9242"/>.</t>
	  <t>ML-KEM can also be used to create or rekey a Child SA or rekey the IKE SA in a PQ/T Hybrid approach by using a IKE_FOLLOWUP_KE exchange which follows a traditional CREATE_CHILD_SA. After the additional ML-KEM key exchange KE(1) has taken place in the IKE_FOLLOWUP_KE exchange, the IKE or Child SA are rekeyed by stirring the new ML-KEM shared secret SK(1) in SKEYSEED and KEYMAT as specified in Section 2.2.4 of <xref target="RFC9370"/>. Alternatively, ML-KEM can still be used on its own in a CREATE_CHILD_SA that rekeys the IKE or IPsec SAs without any other key exchanges as per <xref target="RFC7296"/>.</t>
	  <t>One issue with ML-KEM (and other post-quantum KEMs) is that the public keys and ciphertexts that need to be exchanged are large, sometimes exceeding common network Maximum Transport (MTU) sizes. ML-KEM-768 and ML-KEM-1024 public keys and ciphertexts, specufically, may make UDP packet sizes larger than typical network MTUs. This means that post-quantum ML-KEM key exchanges carried in IKE_SA_INIT messages could cause IP fragmentation. To prevent it, Multiple Key Exchanges in IKEv2 specified in <xref target="RFC9370"/> defined a mechanism that allows ML-KEM to be used in messages following the IKE_SA_INIT (i.e., IKE_INTERMEDIATE <xref target="RFC9242"/>, CREATE_CHILD_SA, or IKE_FOLLOWUP_KE <xref target="RFC9370"/>). These messages can be fragmented using standard IKEv2 fragmentation in <xref target="RFC7383"/>. </t>
    </section>
	<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors would like to thank Valery Smyslov, Graham Bartlett, Scott Fluhrer, Ben S, Leonie Bruckert, Tero Kivinen, Rebecca Guthrie, Wang Guilin, Michael Richardson, John Mattsson, and Gerardo Ravago for their valuable feedback. Special thanks to Chris Patton for bringing up the downgrade issue.</t>
    </section>
  </back>
</rfc>
