<?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.6.17 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-ipsecme-ikev2-sa-ts-payloads-opt-01" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.15.1 -->
  <front>
    <title abbrev="IKEv2 Optional Child SA&amp;TS Payloads">IKEv2 Optional SA&amp;TS Payloads in Child Exchange</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-ipsecme-ikev2-sa-ts-payloads-opt-01"/>
    <author initials="S." surname="Kampati" fullname="Sandeep Kampati">
      <organization abbrev="Microsoft">Microsoft</organization>
      <address>
        <postal>
          <country>India</country>
        </postal>
        <email>skampati@microsoft.com</email>
      </address>
    </author>
    <author initials="W." surname="Pan" fullname="Wei Pan">
      <organization abbrev="Huawei">Huawei Technologies</organization>
      <address>
        <postal>
          <street>101 Software Avenue, Yuhuatai District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code/>
          <country>China</country>
        </postal>
        <email>william.panwei@huawei.com</email>
      </address>
    </author>
    <author initials="P." surname="Wouters" fullname="Paul Wouters">
      <organization abbrev="Aiven">Aiven</organization>
      <address>
        <email>paul.wouters@aiven.io</email>
      </address>
    </author>
    <author initials="M." surname="Bharath" fullname="Meduri S S Bharath">
      <organization abbrev="Mavenir">Mavenir Systems Pvt Ltd</organization>
      <address>
        <postal>
          <street>Manyata Tech Park</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code/>
          <country>India</country>
        </postal>
        <email>bharath.meduri@mavenir.com</email>
      </address>
    </author>
    <author initials="M." surname="Chen" fullname="Meiling Chen">
      <organization abbrev="CMCC">China Mobile</organization>
      <address>
        <postal>
          <street>32 Xuanwumen West Street, West District</street>
          <city>Beijing</city>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>chenmeiling@chinamobile.com</email>
      </address>
    </author>
    <area>Security</area>
    <workgroup>IPSECME Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document describes a method for reducing the size of the Internet Key Exchange version 2 (IKEv2) CREATE_CHILD_SA exchanges used for rekeying of the IKE or Child SA by replacing the SA and TS payloads with a Notify Message payload.
Reducing size and complexity of IKEv2 exchanges is especially useful for low power consumption battery powered devices.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>The Internet Key Exchange protocol version 2 (IKEv2) <xref target="RFC7296"/> is used to negotiate Security Association (SA) parameters for the IKE SA and the Child SAs.
Cryptographic key material for these SAs have a limited lifetime before it needs to be refreshed, a process referred to as "rekeying".
IKEv2 uses the CREATE_CHILD_SA exchange to rekey either the IKE SA or the Child SAs.</t>
      <t>When rekeying, a full set of negotiation parameters are exchanged.
However, most of these parameters will be the same as before, and some of these parameters <bcp14>MUST NOT</bcp14> change.</t>
      <t>For example, the Traffic Selector (TS) negotiated for the new Child SA <bcp14>MUST</bcp14> cover the Traffic Selectors negotiated for the old Child SA.
And in practically all cases, a new Child SA does not need to cover a wider set of Traffic.
In the rare case where this would be needed, either a standard rekey could be used or a new Child SA could be negotiated followed by a deletion of the replaced Child SA.</t>
      <t>Similarly, IKEv2 states that the cryptographic parameters negotiated for rekeying <bcp14>SHOULD NOT</bcp14> be different.
This means that the security properties of the IKE or Child SA in practise do not change during a typical rekey.</t>
      <t>This document specifies a method to omit these parameters and replace them with a single Notify Message declaring that all these parameters are identical to the originally negotiated parameters.</t>
      <t>Large scale IKEv2 gateways such as Evolved Packet Data Gateway (ePDG) in 4G networks or Centralized Radio Access Network (cRAN/Cloud) gateways in 5G networks typically support more than 100,000 IKE/IPsec connections.
At any point in time, there will be hundreds or thousands of IKE SAs and Child SAs that are being rekeyed.
This takes a large amount of bandwidth and CPU power and any protocol simplification or bandwidth reducing would result in a significant resource saving.</t>
      <t>For Internet of Things (IoT) devices which utilize low power consumption technology, reducing the size of the CREATE_CHILD_SA exchange for rekeying reduces its power consumption, as sending bytes over the air is usually the most power consuming operation of such a device.
Reducing the CPU operations required to verify the rekey exchanges parameters will also save power and extend the lifetime for these devices.</t>
      <t>When using identical parameters for the IKE SA or Child SA rekey, the SA and TS payloads can be  omitted thanks to the optimization defined in this document.
For an IKE SA rekey, instead of the (large) SA payload, only a Key Exchange (KE) payload and a new
Notify Type payload with the new SPI are required.
For a Child SA payload, instead of the SA or TS payloads, only an optional nonce payload (when using PFS) and a new Notify Type payload with the new SPI are needed.
This makes the rekey exchange packets much smaller and the peers do not need to verify that the SA or TS parameters are compatible with the old SA parameters.</t>
    </section>
    <section anchor="conventions-used-in-this-document">
      <name>Conventions Used in This Document</name>
      <section anchor="requirements-language">
        <name>Requirements Language</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="negotiation-of-support-for-optimized-rekey">
      <name>Negotiation of Support for OPTIMIZED REKEY</name>
      <t>To indicate support for the optimized rekey negotiation, the initiator includes the OPTIMIZED_REKEY_SUPPORTED notify payload in the IKE_AUTH exchange request. If multiple IKE_AUTH exchanges are sent, the OPTIMIZED_REKEY_SUPPORTED notify payload should be in the last IKE_AUTH exchange, which is the exchange that also contains the TS payloads.
During this initial key request, the entire SA and TS payloads are included as normal.
Note that the notify indicates support for optimized rekey for both IKE and Child SAs.</t>
      <t>A responder that does not support the optimized rekey exchange processes the SA and TS payloads as normal, and does not include the new Notify.
As per regular IKEv2 processing, a responder that does not recognize this new Notify, <bcp14>MUST</bcp14> ignore the notify.
Responders may have been administratively configured with the optimization turned off for local reasons.
The absense of the Notify indicates to the initiator that the optimization is not available, and normal, full rekey should be done.</t>
      <t>When a peer wishes to rekey an IKE SA or Child SA, it <bcp14>MAY</bcp14> use the optimized rekey method during the CREATE_CHILD_SA exchange.
If both peers have exchanged OPTIMIZED_REKEY_SUPPORTED notifies, peers <bcp14>SHOULD</bcp14> use the optimized rekey method for rekeys.
Non-optimized, regular rekey requests <bcp14>MUST</bcp14> always be accepted.</t>
      <t>The IKE_AUTH message exchange in this case is shown below:</t>
      <artwork><![CDATA[
Initiator                       Responder
--------------------------------------------------------------------
HDR, SK {IDi, [CERT,] [CERTREQ,]
    [IDr,] AUTH, SAi2, TSi, TSr,
    N(OPTIMIZED_REKEY_SUPPORTED)} -->
                            <-- HDR, SK {IDr, [CERT,] AUTH,
                                    SAr2, TSi, TSr,
                                    N(OPTIMIZED_REKEY_SUPPORTED)}
]]></artwork>
    </section>
    <section anchor="optimized-rekey-of-the-ike-sa">
      <name>Optimized Rekey of the IKE SA</name>
      <t>The initiator of an optimized rekey request sends a CREATE_CHILD_SA payload with the OPTIMIZED_REKEY notify payload containing the new Security Parameter Index (SPI) for the new IKE SA.
It omits the SA payload.</t>
      <t>The responder of an optimized rekey request replies with an included OPTIMIZED_REKEY notify with its new IKE SPI and also omits the SA payload.</t>
      <t>Both parties send their nonce and KE payloads just as they would do for a regular IKE SA rekey.</t>
      <t>Using the old SPI from the IKE header and the two new SPIs respectively from the initiator and responder's OPTIMIZED_REKEY payloads, both parties can perform the IKE SA rekey operation.</t>
      <t>The CREATE_CHILD_SA message exchange in this case is shown below:</t>
      <artwork><![CDATA[
Initiator                       Responder
--------------------------------------------------------------------
HDR, SK {N(OPTIMIZED_REKEY,newSPIi),
         Ni, KEi} -->
                            <-- HDR, SK {N(OPTIMIZED_REKEY,newSPIr),
                                         Nr, KEr}
]]></artwork>
    </section>
    <section anchor="optimized-rekey-of-child-sas">
      <name>Optimized Rekey of Child SAs</name>
      <t>The initiator of an optimized rekey request sends a CREATE_CHILD_SA payload with the OPTIMIZED_REKEY notify payload containing the new Security Parameter Index (SPI) for the new Child SA.
It omits the SA and TS payloads.
If the current Child SA was negotiated with Perfect Forward Secrecy (PFS), a KEi payload <bcp14>MUST</bcp14> be included as well.
If no PFS was negotiated for the current Child SA, a KEi payload <bcp14>MUST NOT</bcp14> be included.</t>
      <t>The responder of an optimized rekey request performs the same process.
It includes the OPTIMIZED_REKEY notify with its new IKE SPI and omits the SA and TS payloads.  Depending on the PFS negotiation of the current Child SA, the responder includes a KEr payload.</t>
      <t>Both parties send their nonce payloads just as they would do for a regular Child SA rekey.</t>
      <t>Using the old SPI from the REKEY_SA payload and the two new SPIs respectively from the initiator and responder's OPTIMIZED_REKEY payloads, both parties can perform the Child SA rekey operation.</t>
      <t>Notify payloads that can affect the Child SA properties, such as USE_TRANSPORT_MODE or ESP_TFC_PADDING_NOT_SUPPORTED MAY be sent but MUST be ignored and MUST NOT cause the Child SA properties to change. IPCOMP_SUPPORTED MUST be sent as it contains the required updated CPI parameter.</t>
      <t>For the Child SA that was negotiated as part of an initial IKE exchange (eg IKE_AUTH), its rekey parameters for the KE payload SHOULD be the same KE group(s) for Child SA PFS as the negotiated IKE SA. If rekeying without PFS is required, the peer first initiates a regular Child SA rekey without KE payload, and subsequently it can use the optimized rekey method. If a peer responding to an optimized rekey receives a request with a non-allowed PFS proposal, it MUST return an INVALID_KE_PAYLOAD response.</t>
      <t>The CREATE_CHILD_SA message exchange in this case is shown below:</t>
      <artwork><![CDATA[
Initiator                       Responder
--------------------------------------------------------------------
HDR, SK {N(REKEY_SA,oldSPI), N(OPTIMIZED_REKEY,newSPIi),
         Ni, [KEi,]} -->
                            <-- HDR, SK {N(OPTIMIZED_REKEY,newSPIr),
                                         Nr, [KEr,]}
]]></artwork>
    </section>
    <section anchor="payload-formats">
      <name>Payload Formats</name>
      <section anchor="optimizedrekeysupported-notify">
        <name>OPTIMIZED_REKEY_SUPPORTED Notify</name>
        <t>The OPTIMIZED_REKEY_SUPPORTED Notify Message type notification is used by the initiator and responder to indicate their support for the optimized rekey negotiation.</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        |
+---------------+-+-------------+-------------------------------+
|Protocol ID(=0)| SPI Size (=0) |      Notify Message Type      |
+---------------+---------------+-------------------------------+
]]></artwork>
        <ul spacing="normal">
          <li>Protocol ID (1 octet) - <bcp14>MUST</bcp14> be 0.</li>
          <li>SPI Size (1 octet) - <bcp14>MUST</bcp14> be 0, meaning no SPI is present.</li>
          <li>Notify Message Type (2 octets) - <bcp14>MUST</bcp14> be set to the value <tt>TBD1</tt>.</li>
        </ul>
        <t>This Notify Message type contains no data.</t>
        <t>The Critical bit <bcp14>MUST</bcp14> be 0.
A non-zero value <bcp14>MUST</bcp14> be ignored.</t>
      </section>
      <section anchor="optimizedrekey-notify">
        <name>OPTIMIZED_REKEY Notify</name>
        <t>The OPTIMIZED_REKEY Notify Message type is used to perform an optimized IKE SA or Child SA rekey.</t>
        <artwork><![CDATA[
 0                 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        |
+---------------+-+-------------+-------------------------------+
|Protocol ID    | SPI Size (=8) |      Notify Message Type      |
+---------------+---------------+-------------------------------+
|                Security Parameter Index (SPI)                 |
|                                                               |
+---------------------------------------------------------------+
]]></artwork>
        <ul spacing="normal">
          <li>Protocol ID (1 octet) - For an IKE SA rekey, this field <bcp14>MUST</bcp14> contain (1).
For Child SAs, this field <bcp14>MUST</bcp14> contain either (2) to indicate AH or (3) to indicate ESP.</li>
          <li>SPI Size (1 octet) - <bcp14>MUST</bcp14> be 8 when rekeying an IKE SA. <bcp14>MUST</bcp14> be 4 when rekeying a Child SA.</li>
          <li>Notify Message Type (2 octets) - <bcp14>MUST</bcp14> be set to the value <tt>TBD2</tt>.</li>
          <li>SPI (4 octets or 8 octets) - Security Parameter Index.
The new SPI.</li>
        </ul>
        <t>The Critical bit <bcp14>MUST</bcp14> be 1.  A value of 0 <bcp14>MUST</bcp14> be ignored.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document defines two new Notify Message Types in the "IKEv2 Notify Message Types - Status Types" registry.
IANA is requested to assign codepoints in this registry.</t>
      <artwork><![CDATA[
NOTIFY messages: status types            Value
----------------------------------------------------------
OPTIMIZED_REKEY_SUPPORTED                TBD1
OPTIMIZED_REKEY                          TBD2
]]></artwork>
    </section>
    <section anchor="operational-considerations">
      <name>Operational Considerations</name>
      <t>Some implementations allow sending rekey messages with a different set of Traffic Selectors or cryptographic parameters in response to a configuration update.
IKEv2 <xref target="RFC7296"/> states this <bcp14>SHOULD NOT</bcp14> be done.
Whether or not optimized rekeying is used, a configuration change that changes the Traffic Selectors or cryptographic parameters <bcp14>MUST NOT</bcp14> use the optimized rekey method.
It <bcp14>SHOULD</bcp14> also not use a regular rekey method but instead start an entire new IKE and Child SA negotiation with the new parameters.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The optimized rekey removes sending unnecessary new parameters that originally would have to be validated against the original parameters.
In that sense, this optimization enhances the security of the rekey process by reducing the complexity and code required.</t>
    </section>
    <section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Special thanks go to Valery Smyslov and Antony Antony.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba">
            <organization/>
          </author>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC7296" target="https://www.rfc-editor.org/info/rfc7296">
        <front>
          <title>Internet Key Exchange Protocol Version 2 (IKEv2)</title>
          <author fullname="C. Kaufman" initials="C." surname="Kaufman">
            <organization/>
          </author>
          <author fullname="P. Hoffman" initials="P." surname="Hoffman">
            <organization/>
          </author>
          <author fullname="Y. Nir" initials="Y." surname="Nir">
            <organization/>
          </author>
          <author fullname="P. Eronen" initials="P." surname="Eronen">
            <organization/>
          </author>
          <author fullname="T. Kivinen" initials="T." surname="Kivinen">
            <organization/>
          </author>
          <date month="October" year="2014"/>
          <abstract>
            <t>This document describes version 2 of the Internet Key Exchange (IKE) protocol.  IKE is a component of IPsec used for performing mutual authentication and establishing and maintaining Security Associations (SAs).  This document obsoletes RFC 5996, and includes all of the errata for it.  It advances IKEv2 to be an Internet Standard.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="79"/>
        <seriesInfo name="RFC" value="7296"/>
        <seriesInfo name="DOI" value="10.17487/RFC7296"/>
      </reference>
    </references>
  </back>
</rfc>
