<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4034.xml">
<!ENTITY RFC5890 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5890.xml">
<!ENTITY RFC6698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!ENTITY RFC6982 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml">
<!ENTITY RFC7296 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7296.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc ipr="trust200902" updates="" obsoletes="" category="std" docName="draft-pwouters-ipsecme-child-pfs-info-01">
  <front>
    <title>IKEv2 support for Child SA PFS policy notification</title>
    <author initials="P." surname="Wouters" fullname="Paul Wouters">
      <organization>Aiven</organization>
      <address>
        <email>paul.wouters@aiven.io</email>
      </address>
    </author>
    <date/>
    <area>General</area>
    <workgroup>Network</workgroup>
    <keyword>IKEv2</keyword>
    <keyword>IPsec</keyword>
    <abstract>
      <t>
       This document defines the CHILD_PFS_INFO Notify Message Status Type Payload
       for the Internet Key Exchange Protocol Version 2 (IKEv2) to support exchanging
       the policy settings for the Perfect Forward Secrecy (PFS) and which Key Exchange
       (KE) method(s) setting of the initial Child SA that are expected to be used during
       Child SA rekey.
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>
       The IKEv2 <xref target="RFC7296"/> protocol uses the Keying Exchange (KE)
       payload, formerly known as the Diffie-Hellman Group Transform payload
       to create an ephemeral IKE connection. During an IKE rekey, a new KE payload
       is used to create a new ephemeral IKE connection, resulting in Perfect
       Forward Secrecy (PFS).</t>
      <t>
       A Child SA optionally uses its own PFS settings by including its own KE
       payload and list of acceptable Keying Exchange methods. During Child SA
       rekeys, KE payloads of acceptable Keying Exchange methods are exchanged to
       create PFS.</t>
      <t>The Initial Exchanges establish both an IKE SA and a Child SA using the
       Keying Exchange method negotiated for the IKE SA. Thus, after the Initial
       Exchange, the peers are not aware of each others PFS requirements for the
       existing Child SA. It is common practise to either not perform PFS for Child SAs,
       or to only perform the same KE methods for both the IKE SA and all Child SAs.
       The situation is even more complex when Post-Quantum Key Exchange methods
       are used htat might contain multiple KE payloads, which might not all be
       desired for rekeying the Initial Child SA.  It is currently not possible
       to know the desired PFS configuration for rekey of the initial Child SA.
       The peers find out about this problem only at the first Child SA rekey,
       which is typically 1 to 8 hours later. </t>
      <t>
       This document introduces the CHILD_PFS_INFO Notify payload to exchange
       this information during the estaliblisment of the initial Child SA.</t> 

      <section title="Requirements Language">
        <t>
       The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
       "OPTIONAL" 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 title="Payload Format" anchor="payload_formats">
      <t>
      All multi-octet fields representing integers are laid out in big
      endian order (also known as "most significant byte first", or
      "network byte order").
     </t>
    </section>
    </section>
      <section title="CHILD_PFS_INFO Notify Status Message Payload" anchor="child_pfs_notify_payload">
        <figure align="center">
          <artwork align="left"><![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      !
+---------------+---------------+-------------------------------+
! Transform Type| REQUIRED?     | Child Key Exchange Method     |
+---------------+-----------------------------------------------+
~               :               :                               ~
+-------------------------------+-------------------------------+
            ]]></artwork>
        </figure>
        <t>
          <list style="symbols">
            <t>The Critical Flag (C) MUST NOT be set.</t>
            <t>Protocol ID (1 octet) - MUST be 0. MUST be ignored if not 0.</t>
            <t>SPI Size (1 octet) - MUST be 0. MUST be ignored if not 0.</t>
            <t>Notify Status Message Type (2 octets) - set to [TBD1]</t>
            <t>list of one or more Child Key Exchange Methods</t>
          </list>
        </t>
      <t>Each allowed or mandatory Child Key Exchange Method, and its Transform
         Type for which it is valid. These differ based on the Key Exchange it
         is used in. </t>
      <t>Each entry is four octets. If the KE list payload is a not a multiple of
         four, the entire payload MUST be ignored.</t>
      <t> The REQUIRED fields contains 0 for ALLOWED and 1 for MANDATORY.</t>
      </section>

    <section title="Usage of the CHILD_PFS_INFO Notify" anchor="usage">
    <t>The CHILD_PFS_INFO Notify payload is sent during the (last) IKE_AUTH exchange.</t>

    <t>Any peer MAY send the CHILD_PFS_INFO Notify payload to inform the peer of its acceptable PFS settings.
       If a peer receives no CHILD_PFS_INFO during the IKE_AUTH exchange, it MUST continue without any error condition.
       This might result in a NO_PROPOSAL_CHOSEN error during rekey time later when the initial Child SA fails to rekey.</t>

    <t>When creating additional Child SA's using the CREATE_CHILD_SA Exchange, the Exchange
       already negotiations all the required KEs and the results can be remembered to
       apply to future rekey events for this Child SA and CHILD_PFS_INFO MUST NOT be used.</t>

    <t>If PFS is completely disallowed for the initial Child SA, the KE list contains only the Transform Type with value 4,
       the REQUIRED set to 1 (MANDATORY) and the Child Key Exchange Method set to the value 0 (NONE).</t>

    <t>If PFS is optional for the initial Child SA but allowed, the KE list contains at least one entry for Transform Type with
       value 4, with one value (e.g. 19 for "256-bit random ECP group") with REQUIRED set to OPTIONAL (0). </t>

    <t>If PFS is mandatory for the initial Child SA, the KE list contains at least one entry for Transform Type with
       value 4, with one value (e.g. 19 for "256-bit random ECP group") with REQUIRED set to MANDATORY (1). </t>

    <t>To support PFS requiring additional Child Key Exchange Methods, additional allowed Child Key Exchange Methods for
       Additional Key Exchange Transform Types are specified that can be set to MANDATORY or OPTIONAL. Every Transform Type
       ID with Key Exchange Method entry in the list of Child Key Exchange Methods MUST have been used during the initial IKE SA
       / Child SA establishment and MUST NOT contain the value NONE (0).</t>

    <t>Note that the Additional Key Exchange method order MUST remain the same, but the specific Transform Type
       number in the range 6-12 might be different if an Additional Key Exchange method was used specifically
       for the IKE SA but not desired for the initial Child SA rekey.</t>

    <t>If the Child Key Exchange Method list contains any values (known or unkown) that were not used during the
       initial IKE SA / Child SA establishment, or any values which it is unwilling to use for PFS, it MUST fail
       the Child SA. This means an Initial Responder MUST return NO_PROPOSAL_CHOSEN (and maintain the IKE SA).
       An Initial Initiator MUST immediately send a DELETE notify for the Child SA (not the IKE SA). This behaviour
       ensures that incomptabile peers will immediately fail the initial Child SA and won't only later on during
       rekey fail the Child SA.</t>
      </section>

    <section title="Operational Considerations" anchor="ops_consider">
      <t>
       This document is a result of Operational Considers that have shown peers can run
       into broken IPsec connections at rekey time. These are not obvious to the administrators
       as these usually do not sit around for a few hours to wait and see if the rekey process
       worked successfully. The CHILD_PFS_INFO results in immediate negotiation failure that
       can be repaired before taking the IPsec connection into production.
      </t>
      <t>
       During rekey, the cryptographic strength of a rekeyed Child SA SHOULD remain
       at least as strong as the Child SA being rekeyed. In practise this means the
       negotiated algorithms remain the same. But some deployments use stronger
       settings for the IKE SA compared to its Child SAs, which means technically
       the initial Child SA uses a stronger KE method than for rekeys. The CHILD_PFS_INFO
       payload exposes such settings to the peers during the Initial Exchanges, and peers
       can at that time accept or reject the child proposal. Once the Initial Child SA
       containing CHILD_PFS_INFO is accepted, rekey proposals are guaranteed to be acceptable
       to both parties. For example, an IKE SA could be using KE method 15 (3072-bit MODP)
       and specify in the CHILD_PFS_INFO that it accepts KE method 14 (2048-bit MODP) for
       this Child SA rekey.</t>

      <t>
      Deployments with a large number of Child SAs often use no PFS for their Child SAs. It
      is computationally much cheaper to establish the large number of Child SAs and then
      immediately rekey the IKE SA. This method can also be used if the peer's Child SA KE
      methods are unacceptable. If both peers accept the KE method of 0 (NONE), it can decide
      to rekey the Child SA without PFS and immediately rekey the IKE SA using its accepted KE
      method.
      </t>
    </section>

    <section title="Security Considerations" anchor="sec_consider">
      <t>
       This document introduces no new security considerations, as it only causes an
       increased awareness of peer capabilities with respect to KE methods.
      </t>
    </section>
    <section title="Implementation Status" anchor="impl_status">
      <t>
      [Note to RFC Editor: Please remove this section and the reference to
      <xref target="RFC6982"/> before publication.]
     </t>
      <t>
      This section records the status of known implementations of the
      protocol defined by this specification at the time of posting of
      this Internet-Draft, and is based on a proposal described in
      <xref target="RFC7942"/>. The description of implementations in this
      section is intended to assist the IETF in its decision processes
      in progressing drafts to RFCs. Please note that the listing of
      any individual implementation here does not imply endorsement
      by the IETF. Furthermore, no effort has been spent to verify the
      information presented here that was supplied by IETF contributors.
      This is not intended as, and must not be construed to be, a catalog
      of available implementations or their features. Readers are advised
      to note that other implementations may exist.
     </t>
      <t>
      According to <xref target="RFC7942"/>, "this will allow reviewers
      and working groups to assign due consideration to documents that
      have the benefit of running code, which may serve as evidence of
      valuable experimentation and feedback that have made the implemented
      protocols more mature.  It is up to the individual working groups
      to use this information as they see fit".
     </t>
      <t>
      Authors are requested to add a note to the RFC Editor at the
      top of this section, advising the Editor to remove the entire
      section before publication, as well as the reference to <xref target="RFC7942"/>.
     </t>
      <section anchor="section.impl-status.libreswan" title="Libreswan">
        <t>
          <list style="hanging">
            <t hangText="Organization: ">The Libreswan Project</t>
            <t hangText="Name: ">https://libreswan.org/</t>
            <t hangText="Description: ">
           An initial IKE implementation using the Private Use value 40961 for the Notify payload</t>
            <t hangText="Level of maturity: ">Beta</t>
            <t hangText="Coverage: ">Implements the draft's example reasons</t>
            <t hangText="Licensing: ">GPLv2</t>
            <t hangText="Implementation experience: ">TBD</t>
            <t hangText="Contact: ">Libreswan Development: swan-dev@libreswan.org</t>
          </list>
        </t>
      </section>
     </section>
    <section anchor="IANA" title="IANA Considerations">
      <t>
        This document defines one new IKEv2 Notify Message Type payload for the IANA "IKEv2 Notify Message Types - Status Types" registry.
        </t>
      <figure align="center" anchor="iana_requests_i">
        <artwork align="left"><![CDATA[
      Value   Notify Type Messages - Status Types    Reference
      -----   ------------------------------    ---------------
      [TBD1]   CHILD_PFS_INFO                    [this document]
            ]]></artwork>
      </figure>
    </section>
  </middle>
  <back>
    <references title="Normative References">
     &RFC2119;
     &RFC7296;
     &RFC8174;
    </references>
    <references title="Informative References">
     &RFC6982;
     &RFC7942;
    </references>
  </back>
</rfc>
