<?xml version="1.0" encoding="us-ascii"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.3.24 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7296 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7296.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC5226 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY SELF "[RFCXXXX]">
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-liu-ipsecme-ikev2-rekey-redundant-sas-00" category="info">

  <front>
    <title>IKEv2 Rekey Priority Extension</title>

    <author initials="D." surname="Liu" fullname="Daiying Liu" role="editor">
      <organization>Ericsson</organization>
      <address>
        <email>harold.liu@ericsson.com</email>
      </address>
    </author>
    <author initials="D." surname="Migault" fullname="Daniel Migault" role="editor">
      <organization>Ericsson</organization>
      <address>
        <email>daniel.migault@ericsson.com</email>
      </address>
    </author>
    <author initials="C." surname="Zhang" fullname="Congjie Zhang">
      <organization>Ericsson</organization>
      <address>
        <email>congjie.zhang@ericsson.com</email>
      </address>
    </author>

    <date year="2021" month="November" day="21"/>

    <area>General</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document defines the Internet Key Exchange Version 2 (IKEv2) Rekeying Priority extension 
that enables to agree roles for the next rekey of the child 
SAs and as such optimize IKEv2 rekey negotiation.</t>



    </abstract>


  </front>

  <middle>


<section anchor="sec1" title="Introduction">

<t>The IKEv2 protocol supports
rekey mechanism for IKE Security Association (SA) and Child SA, but may  result in
redundant SAs (<xref target="RFC7296"/>, section 2.8.1) when both peers start rekeying at the same time.
In such case IKEv2 selects the SA created with the
lowest of the four nonces and the redundant SA SHOULD be deleted
by the endpoint that created it.</t>

<t>Among the standards, frequent rekeying is highly recommended, but such an approach can be non optimal when SA are frequently rekeys as SAs are unnecessary computed and adds an additional  IKEv2 exchange.</t>

<t>So this document defines the Rekeying Priority in IKEv2 extension which enables to agree roles for rekeying of child SAs and optimize
IKEv2 rekey negotiation.</t>

</section>
<section anchor="sec2" title="Requirements Language">

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <xref target="RFC2119"/> <xref target="RFC8174"/>.</t>

</section>
<section anchor="sec3" title="Rekeying Priority Notify Message Types">

<t>Figure 2 illustrates the Notify Payload packet format as described in
Section 3.10 of <xref target="RFC7296"/> with a 4 byte Rekeying Priority value as Notification Data used for the REKEY_PRI notification.</t>

<t>The REKEY_PRI notification is used in an IKEv2 exchange
of type IKE_AUTH and CREATE_CHILD_SA.</t>

<figure title="REKEY_PRI Notify Message Type Value" anchor="xml_happy_1"><artwork><![CDATA[
       +=======+========================================+
       | Value |        NOTIFY MESSAGES - STATUS TYPES  |
       +=======+========================================+
       | 16441 |                REKEY_PRI               |
       +-------+----------------------------------------+
]]></artwork></figure>

<figure title="REKEY_PRI Notify Message Format" anchor="xml_happy_2"><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  |   SPI Size    |      Notify Message Type      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                       Notification Data                       ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t><list style="symbols">
  <t>Next Payload - N(41), indicate this is Notify payload.</t>
  <t>Protocol ID - 0, indicate this payload is not concerning the SPI.</t>
  <t>SPI Size - 0, indicate this payload is not concerning the SPI.</t>
  <t>Notify Message Type - REKEY_PRI(16441).</t>
  <t>Notification Data - 4 octets for REKEY_PRI, see <xref target="xml_happy_3"/>:</t>
</list></t>

<figure title="Notification Data for REKEY_PRI" anchor="xml_happy_3"><artwork><![CDATA[
        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
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                                                               |
       |              P = Rekeying Priority value                      |
       |                                                               |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>A peer supporting rekey SHOULD put a randomly selected value that is non null for the Rekeying Priority value.<vspace />
For example, the random value could be generated from some local unique information like hardware serial number 
or MAC. A random value insure an uniform distribution of the roles.</t>

<t>A value set to zero indicates the peer does not support rekey. Although disabling the rekeying is not recommended in
<xref target="RFC7296"/> section 2.8, disabling rekeying is implemented by most of the products.</t>

<t>A peer supporting the Rekeying Priority Extension SHOULD NOT set the Rekeying Priority value to zero unless it does not support rekey.</t>

<t>An initiator supporting the Rekeying Priority Extension SHOULD send a Priority Notify Payload in its IKE_AUTH and CREATE_CHILD_SA message. 
A responder supporting the Rekeying Priority Extension receiving a Priority Notify Payload SHOULD respond with a Priority Notify Payload. 
When initiator and responders have received the Rekeying Priority Extension, the sender of the highest Rekeying Priority value 
is expected to be assigned the initiator role of the next rekey. The rekey is expected to be performed as recommended in <xref target="RFC7296"/> 
a reasonable value is to perform the rekey at XXX % of the SA life time. 
When that trigger has been reach the peer being assigned the responder role MAY proceed to a rekey as defined in <xref target="RFC7296"/>.</t>

<t>Maybe section 4 and 5 could be example.</t>

</section>
<section anchor="sec4" title="IKE_SA_INIT Stage">

<t>No changes have been made to IKE_SA_INIT in this document. 
IKE_SA_INIT is described here (see <xref target="RFC7296"/> Section 1.2) for the sake of logical coherence and completeness and to make it easier for the reader to understand.</t>

<t>The initial exchanges are shown as <xref target="xml_happy_4"/>:</t>

<figure title="IKE_SA_INIT Exchanges" anchor="xml_happy_4"><artwork><![CDATA[
    Initiator                         Responder
    -------------------------------------------------------------------
    HDR, SAi1, KEi, Ni  -->
                                     <--  HDR, SAr1, KEr, Nr, [CERTREQ]
]]></artwork></figure>

</section>
<section anchor="sec5" title="IKE_AUTH Stage">

<t>When IKE_SA_INIT is completed, the IKE_AUTH message exchanges will take place and the NOTIFY message "REKEY_PRI" should be added to IKE_AUTH, as shown below:</t>

<figure title="IKE_AUTH Exchanges" anchor="xml_happy_5"><artwork><![CDATA[
    Initiator                             Responder
    -------------------------------------------------------------------
    HDR, SK {IDi, [CERT,] [CERTREQ,]
        [IDr,] AUTH, SAi2,
        TSi, TSr, N(REKEY_PRI)}  -->
                                       <--  HDR, SK {IDr, [CERT,] AUTH,
                                          SAr2, TSi, TSr, N(REKEY_PRI)}
]]></artwork></figure>

<t>The initiator begins negotiation of a Child SA using the SAi2 payload, and the responder completes negotiation of a Child SA with the additional fields.</t>

<t>At this point, the two endpoints get the Rekeying Priority of the opposite end via the IKE_AUTH message, 
and can decide which endpoint to trigger rekeying using the mechanism described in <xref target="sec3"/>.</t>

</section>
<section anchor="sec6" title="CREATE_CHILD_SA Stage">

<t>If creating the Child SA during the IKE_AUTH exchange fails for some reason, the IKE SA is still created as usual 
and use CREATE_CHILD_SA message to create new Child SA (<xref target="RFC7296" /> Section 1.2), the exchanges are as follow:</t>

<figure title="CREATE_CHILD_SA Exchanges for Create Child SA" anchor="xml_happy_6"><artwork><![CDATA[
    Initiator                            Responder
    -------------------------------------------------------------------
    HDR, SK {SA, Ni, [KEi,]
    TSi, TSr,
    N(REKEY_PRI)}       -->
                                         <--  HDR, SK {SA, Nr, [KEr,],
                                                  N(REKEY_PRI)
]]></artwork></figure>

<t>The Rekeying Priority configuration may be changed after the SA is set up. 
In this case, the Rekeying Priority should be added to the CREATE_CHILD_SA message in order to 
renegotiate which end to trigger rekeying. 
This allows both sides to renegotiate the Rekeying Priority the next time they exchange the CREATE_CHILD_SA message 
(for example, rekeying will be processed by the CREATE_CHILD_SA message).</t>

<t>The CREATE_CHILD_SA request for rekeying an IKE SA is:</t>

<figure title="CREATE_CHILD_SA Exchanges for IKE SA Rekeying" anchor="xml_happy_7"><artwork><![CDATA[
    Initiator                            Responder
    -------------------------------------------------------------------
    HDR, SK {SA, Ni, [KEi,]
    N(REKEY_PRI)}       -->
                                         <--  HDR, SK {SA, Nr, [KEr,],
                                                  N(REKEY_PRI)
]]></artwork></figure>

<t>The CREATE_CHILD_SA request for rekeying an Child SA is:</t>

<figure title="CREATE_CHILD_SA Exchanges for Child SA Rekeying" anchor="xml_happy_14"><artwork><![CDATA[
    Initiator                            Responder
    -------------------------------------------------------------------
    HDR, SK {N(REKEY_SA),
    SA, Ni, [KEi,],
    TSi, TSr,
    N(REKEY_PRI)}       -->
                                         <--  HDR, SK {SA, Nr, [KEr,],
                                                    TSi, TSr,
                                                  N(REKEY_PRI)
]]></artwork></figure>

</section>
<section anchor="sec7" title="Security Considerations">

<t>This document defines new IKE Notify message types that are naturally protected by the IKE encryption mechanism when the payloads are applied.</t>

<t>So there is no security problem or potential risk.</t>

</section>
<section anchor="sec8" title="IANA Considerations">

<t>ANA need to update the "IKEv2 Notify Message Types - Status Types" registry 
(available at https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml#ikev2-parameters-16) with the following definition:</t>

<figure anchor="xml_happy_28"><artwork><![CDATA[
          +=======+========================================+
          | Value |        NOTIFY MESSAGES - STATUS TYPES  |
          +=======+========================================+
          | 16441 |                REKEY_PRI               |
          +-------+----------------------------------------+
]]></artwork></figure>

</section>
<section anchor="sec9" title="Acknowledgements">

<t>This document reproduces some parts of the similar IKEv2 document (<xref target="RFC7296"/>).</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC2119;
&RFC7296;
&RFC8174;


    </references>

    <references title='Informative References'>

&RFC5226;


    </references>



  </back>

<!-- ##markdown-source:
H4sIAAg7hmEAA91abXPbNhL+rhn9B4wzN2NfREWSHcfWNJ3TWUqjie24ktIm
1+lkIBKScKYIFgCtqIn7228XLyT15tqJ+6HHTCyJJBaL3Wcf7i4YBEG1ormO
WZv03/RuWmTArtmSXEkuJNdL0vukWaK4SKqVSIQJncONkaQTHcQ8C3iqWDhn
Ab9mN61A4lD4G2VJRBMdKKqCRgMGUg2jWo1WM2icBo2TauVJluJJ1SYvWqfH
1QpPZZtomSndajROG61qhUpG2+QHljBJ42plMW2TS6YXQl6Tn+EPT6bkBymy
tFq5XoDqiWYyYTroomrVSkh1m/BkIqoV+CEiuL1NMhVQFXJeraS8Xa0QokXY
Jkum8LsSUks2UcWJ5bz0GxTK9ExIMw6PwH8hMA/c1a2Tc54VJ62lupQvUdWV
S0KCMj3JQ6XQrP60FOgEFnEtZHH2iQK1GKzmSig9oeGMHB42jo4apTtC8FOb
/FuyOUvKp0WEGgStk8Pnpyvns0TLJRpXzmmyLF1KZyKBMU+PToMjcFareRIc
H562mqVbQAXF5zxeu+1Fo1FSic0pj9tkRmFNUR2A8i/mllsPxfwOE17wKc1i
vWnGhLN48+qDLOmUioys+tzKupdiZ3XynxlNputqnYlk+l/O1i/u0MrNH9pB
9d9x0Nr01UoiwCea3zAA2hM/MiByEraazdONc8fN45Vz/aBb50xPglBIBn9o
ivMPXp3h6Lb7jiHnv580Xxy1cWIMlmJqc+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