<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2629 SYSTEM "reference.RFC.2629.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="std" number="7652" ipr="trust200902" updates="6887"
    submissionType="IETF" consensus="yes">
  <front>
    <title abbrev="PCP Authentication">Port Control Protocol (PCP)
    Authentication Mechanism</title>

    <author fullname="Margaret Cullen" initials="M." surname="Cullen">
      <organization>Painless Security</organization>
      <address>
        <postal>
          <street>356 Abbott Street</street>
          <city>North Andover</city>
          <region>MA</region>
          <code>01845</code>
          <country>United States</country>
        </postal>
        <phone>+1 781 405 7464</phone>
        <email>margaret@painless-security.com</email>
        <uri>http://www.painless-security.com</uri>
      </address>
    </author>

    <author fullname="Sam Hartman" initials="S." surname="Hartman">
      <organization>Painless Security</organization>
      <address>
        <postal>
          <street>356 Abbott Street</street>
          <city>North Andover</city>
          <region>MA</region>
          <code>01845</code>
          <country>United States</country>
        </postal>
        <email>hartmans@painless-security.com</email>
        <uri>http://www.painless-security.com</uri>
      </address>
    </author>

    <author fullname="Dacheng Zhang" initials="D." surname="Zhang">
      <organization></organization>
      <address>
        <postal>
          <street></street>
          <city>Beijing</city>
          <region>China</region>
          <code></code>
          <country>China</country>
        </postal>
        <email>zhang_dacheng@hotmail.com</email>
      </address>
    </author>

    <author fullname="Tirumaleswar Reddy" initials="T." surname="Reddy">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Cessna Business Park, Varthur Hobli</street>
          <street>Sarjapur Marathalli Outer Ring Road</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>tireddy@cisco.com</email>
      </address>
    </author>

    <date month="September" year="2015" />

<!-- [rfced] Please insert any keywords (beyond those that appear in the
title) for use on http://www.rfc-editor.org/search -->

    <abstract>
      <t>An IPv4 or IPv6 host can use the Port Control Protocol (PCP) to
      flexibly manage the IP address-mapping and port-mapping information
      on Network Address Translators (NATs) or firewalls to facilitate
      communication with remote hosts. However, the uncontrolled generation
      or deletion of IP address mappings on such network devices may cause
      security risks and should be avoided. In some cases, the client may
      need to prove that it is authorized to modify, create, or delete PCP
      mappings. This document describes an in-band authentication mechanism
      for PCP that can be used in those cases. The Extensible Authentication
      Protocol (EAP) is used to perform authentication between PCP devices.</t>

      <t>This document updates RFC 6887.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Using the Port Control Protocol (PCP) <xref target="RFC6887"></xref>,
      an application can flexibly manage the IP address-mapping information on
      its network address translators (NATs) and firewalls and can control
      their policies in processing incoming and outgoing IP packets. Because
      NATs and firewalls both play important roles in network security
      architectures, there are many situations in which authentication and
      access control are required to prevent unauthorized users from
      accessing such devices. This document defines a PCP security extension
      that enables PCP&nbsp;servers to authenticate their clients with the
      Extensible Authentication Protocol (EAP). The EAP messages are
      encapsulated within PCP&nbsp;messages during transmission.</t>

      <t>The following issues are considered in the design of this
      extension:</t>

      <t><list style="symbols">
          <t>Loss of EAP messages during transmission.</t>

          <t>Reordered delivery of EAP messages.</t>

          <t>Generation of transport keys.</t>

          <t>Integrity protection and data origin authentication for
          PCP&nbsp;messages.</t>

          <t>Algorithm agility.</t>
        </list>The mechanism described in this document meets the security
      requirements to address the Advanced Threat Model described in the base
      PCP specification <xref target="RFC6887"></xref>. This mechanism can be
      used to secure PCP in the following situations:</t>

      <t><list style="symbols">
          <t>On security infrastructure equipment, such as corporate
          firewalls, that does not create implicit mappings for specific
          traffic.</t>

          <t>On equipment (such as Carrier-Grade NATs (CGNs) or
          service provider firewalls) that serves multiple
          administrative domains and do not have a mechanism to
          securely partition traffic from those domains.</t>

          <t>For any implementation that wants to be more permissive in
          authorizing applications to create mappings for successful inbound
          communications destined to machines located behind a NAT or a
          firewall.</t>
        </list></t>
    </section>

    <section title="Terminology">
      <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 RFC 2119 <xref
      target="RFC2119"></xref>.</t>

      <t>Most of the terms used in this document are introduced in <xref
      target="RFC6887"></xref>.</t>

      <t>PCP client: A PCP software instance that is responsible for issuing
      PCP requests to a PCP&nbsp;server. In this document, a PCP&nbsp;client
      is also an EAP peer <xref target="RFC3748"></xref>, and it is the
      responsibility of a PCP&nbsp;client to provide the credentials when
      authentication is required.</t>

      <t>PCP server: A PCP software instance that resides on the
      PCP&nbhy;controlled device that receives PCP requests from the
      PCP&nbsp;client and creates appropriate state in response to that
      request. In this document, a PCP&nbsp;server is integrated with an
      EAP authenticator <xref target="RFC3748"></xref>. Therefore, when
      necessary, a PCP&nbsp;server can verify the credentials provided by
      a PCP&nbsp;client and make an access control decision based on the
      authentication result.</t>

      <t>PCP-Authentication (PA) session: A series of PCP&nbsp;message
      exchanges transferred between a PCP&nbsp;client and a PCP&nbsp;server.
      The PCP&nbsp;messages that are part of a given session include the
      PA&nbsp;messages used to perform EAP authentication, key distribution,
      and session management, as well as the common PCP&nbsp;messages
      secured with the keys distributed during authentication. Each
      PA&nbsp;session is assigned a distinctive Session&nbsp;ID.</t>

      <t>Session partner: A PCP implementation involved in a PA&nbsp;session.
      Each PA session has two session partners (a PCP&nbsp;server and a
      PCP&nbsp;client).</t>

      <t>PCP device: A PCP client or a PCP&nbsp;server.</t>

      <t>Session lifetime: The lifetime associated with a PA session.
      The session lifetime of the PA&nbsp;session decides the lifetime
      of the current authorization given to the PCP&nbsp;client.</t>

      <t>PA Security Association (PCP SA): An association formed between a
      PCP&nbsp;client and a PCP&nbsp;server by sharing cryptographic
      keying material and associated context. The formed duplex
      security association is used to protect the bidirectional
      PCP signaling traffic between the PCP&nbsp;client and
      PCP&nbsp;server.</t>

      <t>Master Session Key (MSK): A key derived by the partners of a
      PA&nbsp;session, using an EAP key&nbhy;generating method (e.g.,
      the method defined in <xref target="RFC5448"></xref>).</t>

      <t>PCP-Authentication (PA) message: A PCP&nbsp;message containing an
      AUTHENTICATION Opcode. Specifically, a PA&nbsp;message sent from a
      PCP&nbsp;server to a PCP&nbsp;client is referred to as a
      PA&nbhy;Server message, while a PA&nbsp;message sent from a
      PCP&nbsp;client to a PCP&nbsp;server is referred to as a
      PA&nbhy;Client message. Therefore, a PA&nbhy;Server message is actually
      a PCP&nbsp;response message as specified
      in <xref target="RFC6887"></xref>, and a PA&nbhy;Client message is a
      PCP&nbsp;request message. This document specifies an option -- the
      PA_AUTHENTICATION_TAG option defined in <xref
      target="tagB"></xref> for PCP authentication -- to provide integrity
      protection and message origin authentication for PA&nbsp;messages.</t>

      <t>Common PCP&nbsp;message: A PCP&nbsp;message that does not contain an
      AUTHENTICATION Opcode. This document specifies an AUTHENTICATION_TAG
      option to provide integrity protection and message origin authentication
      for the common PCP&nbsp;messages.</t>
    </section>

    <section title="Protocol Details">
      <section anchor="initiation" title="Session Initiation">
        <t>At the beginning of a PA session, a PCP&nbsp;client and a
        PCP&nbsp;server need to exchange a series of PA&nbsp;messages
        in order to perform an EAP authentication process. Each
        PA&nbsp;message MUST contain an AUTHENTICATION
        Opcode and may optionally contain a set of options for various
        purposes (e.g., transporting authentication messages and session
        management). The Opcode&nbhy;specific information in an AUTHENTICATION
        Opcode consists of two fields: Session ID and Sequence Number. The
        Session ID field is used to identify the PA&nbsp;session to which the
        message belongs. The Sequence Number field is used to detect whether
        reordering or duplication occurred during message delivery.</t>

        <section anchor="client"
                 title="Authentication Triggered by the Client">
          <t>When a PCP&nbsp;client intends to proactively initiate a
          PA&nbsp;session with a PCP&nbsp;server, it sends a
          PA&nbhy;Initiation message (a PA&nbhy;Client message with
          the result code INITIATION) to the PCP&nbsp;server.
          <xref target="format"></xref> updates the
          PCP&nbsp;request message format with result codes for the
          PCP authentication mechanism. In the Opcode&nbhy;specific
          information of the message, the Session&nbsp;ID and
          Sequence Number fields are set to zero. The PA&nbhy;Client message
          MUST also contain a NONCE option (defined in <xref
          target="nonce"></xref>) that consists of a random nonce.</t>

          <t>After receiving the PA&nbhy;Initiation message, if the
          PCP&nbsp;server agrees to initiate a PA session with the
          PCP&nbsp;client, it will reply with a PA&nbhy;Server message
          that contains an EAP request, and the Result Code field of
          this PA&nbhy;Server message is set to AUTHENTICATION_REQUEST.
          In addition, the server MUST assign a unique session identifier
          to distinctly identify this session and insert the identifier
          into the Session&nbsp;ID field in the Opcode&nbhy;specific
          information of the PA&nbhy;Server message. The Sequence Number
          field of the message is set to zero. The PA&nbhy;Server message
          MUST contain a NONCE option so as to send the nonce value
          back. The nonce will then be used by the PCP&nbsp;client to
          check the freshness of this message. Subsequent PCP&nbsp;messages
          within this PA&nbsp;session MUST contain this session identifier.</t>

          <figure>
              <artwork><![CDATA[
       PCP                                               PCP
      client                                            server
        |-- PA-Initiation ------------------------------->|
        |    (Seq=0, rc=INITIATION, Session ID=0)         |
        |                                                 |
        |<-- PA-Server -----------------------------------|
        |     (Seq=0, Session ID=X, EAP request,          |
        |      rc=AUTHENTICATION_REQUEST)                 |
        |                                                 |
        |-- PA-Client ----------------------------------->|
        |    (Seq=1, Session ID=X, EAP response,          |
        |     rc=AUTHENTICATION_REPLY)                    |
        |                                                 |
        |<-- PA-Server -----------------------------------|
        |     (Seq=1, Session ID=X, EAP request,          |
        |      rc=AUTHENTICATION_REQUEST)                 |
          ]]></artwork>
            </figure>
        </section>

        <section title="Authentication Triggered by the Server">
          <t>In the scenario where a PCP server receives a common PCP request
          message from a PCP&nbsp;client that needs to be authenticated,
          the PCP&nbsp;server rejects the request with an
          AUTHENTICATION_REQUIRED error code and can reply with an
          unsolicited PA&nbhy;Server message to initiate a PA&nbsp;session.
          The Result Code field of this PA&nbhy;Server message is set to
          AUTHENTICATION_REQUEST. In addition, the PCP&nbsp;server MUST
          assign a Session&nbsp;ID for the session and transfer it within
          the PA&nbhy;Server message. The Sequence Number field in the
          PA&nbhy;Server message is set to zero. If the PCP&nbsp;client
          retries the common request before EAP authentication is
          successful, then it will receive an AUTHENTICATION_REQUIRED
          error code from the PCP&nbsp;server. In subsequent
          PA&nbsp;messages exchanged during this session, the
          Session&nbsp;ID will be used in order to help session partners
          distinguish the messages within this session from those not
          within it. When the PCP&nbsp;client receives this initial
          PA&nbhy;Server message from the PCP&nbsp;server, it can reply with
          a PA&nbhy;Client message or silently discard the request message,
          according to its local policies. In the PA&nbhy;Client message, a
          NONCE option that consists of a random nonce MAY be appended.
          If so, in the next PA&nbhy;Server message, the PCP&nbsp;server MUST
          forward the nonce back within a NONCE option.</t>

          <figure>
              <artwork><![CDATA[
       PCP                                               PCP
      client                                            server
        |-- Common PCP request -------------------------->|
        |                                                 |
        |<- Common PCP response --------------------------|
        |    (rc=AUTHENTICATION_REQUIRED)                 |
        |                                                 |
        |<-- PA-Server -----------------------------------|
        |     (Seq=0, Session ID=X, EAP request,          |
        |      rc=AUTHENTICATION_REQUEST)                 |
        |                                                 |
        |-- PA-Client ----------------------------------->|
        |    (Seq=0, Session ID=X, EAP response,          |
        |     rc=AUTHENTICATION_REPLY)                    |
        |                                                 |
        |<-- PA-Server -----------------------------------|
        |     (Seq=1, Session ID=X, EAP request,          |
        |      rc=AUTHENTICATION_REQUEST)                 |
]]></artwork>
            </figure>
        </section>

        <section anchor="EAP" title="Authentication Using EAP">
          <t>In a PA session, an EAP request message is transported within a
          PA&nbhy;Server message and an EAP response message is transported
          within a PA&nbhy;Client message. EAP relies on the underlying
          protocol to provide reliable transmission; any reordered delivery
          or loss of packets occurring during transmission must be detected
          and addressed. Therefore, after sending out a
          PA&nbhy;Server message, the PCP&nbsp;server will not send a new
          PA&nbhy;Server message in the same PA session until it receives
          a PA&nbhy;Client message with a proper sequence number
          from the PCP&nbsp;client, and vice versa. If a PCP&nbsp;client
          receives a PA&nbsp;message containing an EAP request and for
          some reason cannot generate an EAP response immediately (e.g.,
          waiting for human input in order to construct an EAP message, or
          waiting for the additional PA&nbsp;messages in order to assemble a
          complete EAP message from fragmented packets), the PCP device
          MUST reply with a PA&nbhy;Acknowledgement message
          (a PA&nbsp;message with a RECEIVED_PAK option) to indicate that
          the message has been received. This approach not only
          can avoid unnecessary retransmission of the PA&nbsp;message but 
          also can guarantee reliable message delivery in conditions where
          a PCP device needs to receive multiple PA&nbsp;messages carrying the
          fragmented EAP request before generating an EAP response. The number
          of EAP messages exchanged between the PCP&nbsp;client and
          PCP&nbsp;server depends on the EAP method used for
          authentication.</t>

          <t>In this approach, a PCP&nbsp;client and a PCP&nbsp;server
          MUST perform a key&nbhy;generating EAP method in authentication.
          Specifically, a PCP authentication implementation MUST support 
          Extensible Authentication Protocol Tunneled Transport Layer Security
          (EAP&nbhy;TTLS) <xref target="RFC5281"></xref> and SHOULD support
          the Tunnel Extensible Authentication Protocol (TEAP) <xref
          target="RFC7170"></xref>. Therefore, after a successful
          authentication procedure, a Master Session Key (MSK) will be
          generated. If the PCP&nbsp;client and the PCP&nbsp;server want
          to generate a transport key using the MSK, they need to agree
          upon a Pseudorandom Function (PRF) for the transport key
          derivation and a Message Authentication Code (MAC) algorithm
          to provide data origin authentication for subsequent
          PCP&nbsp;messages. In order to do this, the PCP&nbsp;server needs
          to append a set of PRF options and MAC_ALGORITHM options to the
          initial PA&nbhy;Server message. Each PRF option contains a
          PRF that the PCP&nbsp;server supports, and each MAC_ALGORITHM
          option contains a MAC algorithm that the PCP&nbsp;server supports.
          Moreover, in the first PA&nbhy;Server message,
          the server MAY also attach an ID_INDICATOR option
          (defined in <xref target="ID"></xref>) to direct the client to
          choose correct credentials. After receiving the options, the
          PCP&nbsp;client MUST select the PRF and the MAC algorithm that it
          would like to use; it then MUST add the associated PRF and
          MAC Algorithm options to the next PA&nbhy;Client message.

<!-- [rfced] AD:  Please review the following update (an additional
"MUST") made per an author during AUTH state, and let us know if
you approve.

Original:
 After receiving the options, the PCP client MUST select the PRF and
 the MAC algorithm which it would like to use, and then adds the
 associated PRF and MAC Algorithm Options to the next PA-Client
 message.

Currently:
 After receiving the
 options, the PCP client MUST select the PRF and the MAC algorithm
 that it would like to use; it then MUST add the associated PRF and
 MAC Algorithm options to the next PA-Client message. -->

</t>

          <t>After the EAP authentication, the PCP server sends out a
          PA&nbhy;Server message to indicate the EAP authentication and PCP
          authorization results. If the EAP authentication succeeds, the
          result code of the PA&nbhy;Server message is
          AUTHENTICATION_SUCCEEDED. In this case, before sending out
          the PA&nbhy;Server message, the PCP&nbsp;server MUST update the
          PCP&nbsp;SA with the MSK and transport key and MUST use the
          derived transport key to generate a digest for the message.

<!-- [rfced] AD:  Please review the following update (an additional
"MUST") made per an author during the AUTH state, and let us know if
you approve.

Original:
 In this case, before
 sending out the PA-Server message, the PCP server MUST update the
 PCP SA with the MSK and transport key, and use the derived transport
 key to generate a digest for the message.

Currently:
 In this case, before
 sending out the PA-Server message, the PCP server MUST update the PCP
 SA with the MSK and transport key and MUST use the derived transport
 key to generate a digest for the message. -->

 The digest is
          transported within a PA_AUTHENTICATION_TAG option for PCP Auth.
          A more detailed description of generating the authentication data
          can be found in <xref target="AuthG"></xref>. In addition, the
          PA&nbhy;Server message MUST also contain a SESSION_LIFETIME option
          (defined in <xref target="life"></xref>) that indicates the lifetime
          of the PA session (i.e., the lifetime of the MSK). After receiving
          the PA&nbhy;Server message, the PCP&nbsp;client then needs to
          generate a PA&nbhy;Client message in response. If the
          PCP&nbsp;client also authenticates the PCP&nbsp;server, the
          result code of the PA&nbhy;Client message is
          AUTHENTICATION_SUCCEEDED. In addition, the PCP&nbsp;client
          needs to update the PCP SA with the MSK and transport key,
          and it uses the derived transport key to secure the message.
          From then on, all the PCP&nbsp;messages within the session
          are secured with the transport key and the MAC algorithm
          specified in the PCP SA. The first secure PA&nbhy;Client message
          from the client MUST include the set of PRF and MAC_ALGORITHM
          options received from the PCP&nbsp;server. The PCP&nbsp;server
          determines if the set of algorithms conveyed by the client matches
          the set it had initially sent, to detect an algorithm downgrade
          attack. If the server detects a downgrade attack, then it MUST send a
          PA&nbhy;Server message with result code DOWNGRADE_ATTACK_DETECTED and
          terminate the session. If the PCP&nbsp;client sends a common
          PCP&nbsp;request within the PA session without an
          AUTHENTICATION_TAG option, then the PCP&nbsp;server rejects the
          request by returning an AUTHENTICATION_REQUIRED error code.</t>

          <t>If a PCP&nbsp;client/server cannot authenticate its session
          partner, the device sends out a PA&nbsp;message with the result code
          AUTHENTICATION_FAILED. If the EAP authentication succeeds but
          authorization fails, the device making the decision sends out a
          PA&nbsp;message with the result code AUTHORIZATION_FAILED. In
          these two cases, after the PA&nbsp;message is sent out, the
          PA&nbsp;session MUST be terminated immediately. It is possible
          for independent PCP&nbsp;clients on the host to create multiple
          PA&nbsp;sessions with the PCP&nbsp;server.</t>
        </section>
      </section>

      <section anchor="recovery" title="Recovery from Lost PA Session">
        <t>If a PCP server resets or loses the PCP SA due to reboot,
        power failure, or any other reason, then it sends an unsolicited
        ANNOUNCE response, as explained in
        Section 14.1.3 of <xref target="RFC6887"></xref>, to the
        PCP&nbsp;client. Upon receiving the ANNOUNCE response with an anomalous
        Epoch Time, the PCP&nbsp;client deduces that the server may have
        lost state. The ANNOUNCE is either bogus (an attack), legitimate, or
        not seen by the client. These three cases are described below:</t>

        <t><list style="symbols">
            <t>The PCP&nbsp;client sends an integrity-protected unicast
            ANNOUNCE request to the PCP&nbsp;server to see whether the
            PCP&nbsp;server has indeed lost state or an attacker has sent
            the ANNOUNCE response. <list
                style="symbols">
                <t>If an integrity-protected success response is received
                from the PCP&nbsp;server, then the PCP&nbsp;client determines
                that the PCP&nbsp;server has not lost the PA session, and the
                unsolicited ANNOUNCE response was sent by an attacker.</t>

                <t>If the PCP&nbsp;server responds to the ANNOUNCE request with
                an UNKNOWN_SESSION_ID error code, then the PCP&nbsp;client MUST
                initiate full EAP authentication with the PCP&nbsp;server, as
                explained in <xref target="client"></xref>. After EAP
                authentication is successful, the PCP&nbsp;client updates
                the PCP SA and issues new common PCP requests to recreate
                any lost mapping state.</t>
              </list></t>

            <t>In a scenario where the PCP&nbsp;server has lost the
            PCP&nbsp;SA but did not inform the PCP&nbsp;client, if the
            PCP&nbsp;client sends an integrity-protected PCP request, then
            the PCP&nbsp;server rejects the request with an
            UNKNOWN_SESSION_ID error code. The PCP&nbsp;client then
            initiates full EAP authentication with the PCP&nbsp;server, as
            explained in <xref target="client"></xref>, and updates the
            PCP&nbsp;SA after successful authentication.</t>
          </list></t>

        <t>If the PCP&nbsp;client resets or loses the PCP SA due to reboot,
        power failure, or any other reason and sends a common PCP request,
        then the PCP&nbsp;server rejects the request with an
        AUTHENTICATION_REQUIRED error code. The PCP&nbsp;client MUST
        authenticate with the PCP&nbsp;server and, after EAP
        authentication is successful, retry the common PCP&nbsp;request
        with an AUTHENTICATION_TAG option. The PCP&nbsp;server MUST update
        the PCP&nbsp;SA after successful EAP authentication.</t>
      </section>

      <section anchor="termination" title="Session Termination">
        <t>A PA session can be explicitly terminated by either session
        partner. A PCP&nbsp;server may explicitly request termination of the
        session by sending an unsolicited termination-indicating
        PA&nbsp;response (a PA&nbsp;response with a result code of
        SESSION_TERMINATED). Upon receiving a termination-indicating
        message, the PCP&nbsp;client MUST respond with a
        termination-indicating PA&nbsp;message and MUST then remove
        the associated PCP SA. To accommodate packet loss, the
        PCP&nbsp;server MAY transmit the termination-indicating
        PA&nbsp;response up to ten times (with an appropriate
        Epoch&nbsp;Time value in each to reflect the passage of time
        between transmissions), provided that (1)&nbsp;the interval
        between the first two notifications is at least 250&nbsp;ms
        and (2)&nbsp;each interval between subsequent notifications
        at least doubles.</t>

        <t>A PCP client may explicitly request termination of the session by
        sending a termination-indicating PA&nbsp;request (a PA&nbsp;request
        with a result code of SESSION_TERMINATED). After receiving a
        termination-indicating message from the PCP&nbsp;client, a
        PCP&nbsp;server MUST respond with a termination-indicating
        PA&nbsp;message and remove the PCP SA immediately. When
        the PCP&nbsp;client receives the termination-indicating
        PA&nbsp;response, it MUST remove the associated PCP SA immediately.</t>
      </section>

      <section title="Session Re-authentication">
        <t>A session partner may choose to perform EAP re&nbhy;authentication
        if it would like to update the PCP&nbsp;SA without initiating a new
        PA&nbsp;session. For example, a re&nbhy;authentication procedure
        could be triggered for the following reasons:<list style="symbols">
            <t>The session lifetime needs to be extended.</t>

            <t>The sequence number is going to reach the maximum value.
            Specifically, when the sequence number reaches 2**32 -
            2**16, the session partner MUST trigger re&nbhy;authentication.</t>
          </list>When the PCP server would like to initiate a
        re&nbhy;authentication, it sends the PCP&nbsp;client a
        PA&nbhy;Server message. The result code of the message is set
        to RE&nbhy;AUTHENTICATION, which indicates that the message is for a
        re&nbhy;authentication process. If the PCP&nbsp;client would like
        to start the re&nbhy;authentication, it will send a
        PA&nbhy;Client message to the PCP&nbsp;server, with the
        result code of the PA&nbhy;Client message set to
        RE&nbhy;AUTHENTICATION. Then, the session partners exchange
        PA&nbsp;messages to transfer EAP messages for the
        re&nbhy;authentication. During the re&nbhy;authentication procedure,
        the session partners protect the integrity of PA&nbsp;messages
        with the key and MAC algorithm specified in the current PCP SA;
        the sequence numbers associated with the message will continue to
        keep increasing as specified in <xref target="AuthS"></xref>.
        The result code for a PA&nbhy;Server message carrying an
        EAP request will be set to AUTHENTICATION_REQUIRED, and a
        PA&nbhy;Client message carrying an EAP response will be set to
        AUTHENTICATION_REPLY.</t>

        <t>If the EAP re-authentication succeeds, the result code of the last
        PA&nbhy;Server message is AUTHENTICATION_SUCCEEDED. In this case,
        before sending out the PA&nbhy;Server message, the PCP&nbsp;server MUST
        update the SA and use the new key to generate a digest for the
        PA&nbhy;Server message and subsequent PCP&nbsp;messages. In
        addition, the PA&nbhy;Server message MUST be appended with a
        SESSION_LIFETIME option that indicates the new lifetime of the
        PA&nbsp;session. PA and PCP&nbsp;message sequence numbers must
        also be reset to zero.</t>

        <t>If the EAP authentication fails, the result code of the last
        PA&nbhy;Server message is AUTHENTICATION_FAILED. If the EAP
        authentication succeeds but authorization fails, the result code of
        the last PA&nbhy;Server message is AUTHORIZATION_FAILED. In the
        latter two cases, the PA session MUST be terminated immediately
        after the last PA&nbsp;message exchange. If for some unknown reason
        re&nbhy;authentication is not performed and the session lifetime has
        expired, then the PA session MUST be terminated immediately.</t>

        <t>During re-authentication, the session partners can also exchange
        common PCP&nbsp;messages in parallel. The common PCP&nbsp;messages
        MUST be protected with the current SA until the new SA has been
        generated. The sequence of EAP messages exchanged for
        re&nbhy;authentication will not change, regardless of the
        PCP device triggering re&nbhy;authentication. If the PCP&nbsp;server
        receives a re&nbhy;authentication request from the PCP&nbsp;client
        after the PCP&nbsp;server itself had sent a
        re&nbhy;authentication request, then it should discard its
        request and respond to the re&nbhy;authentication request
        from the PCP&nbsp;client.</t>
      </section>
    </section>

    <section title="PA Security Association">
      <t>At the beginning of a new PA session, each PCP device must create and
      initialize state information for a new PA Security Association
      (PCP&nbsp;SA) to maintain its state information for the duration of
      the PA&nbsp;session. The parameters of a PCP&nbsp;SA are as follows:</t>

      <t><list style="symbols">
          <t>IP address and UDP port number of the PCP&nbsp;client.</t>

          <t>IP address and UDP port number of the PCP&nbsp;server.</t>

          <t>Session identifier.</t>

          <t>Sequence number for the next outgoing PA&nbsp;message.</t>

          <t>Sequence number for the next incoming PA&nbsp;message.</t>

          <t>Sequence number for the next outgoing common PCP&nbsp;message.</t>

          <t>Sequence number for the next incoming common PCP&nbsp;message.</t>

          <t>Last outgoing message payload.</t>

          <t>Retransmission interval.</t>

          <t>The Master Session Key (MSK) generated by the EAP method.</t>

          <t>The MAC algorithm that the transport key should use to generate
          digests for PCP&nbsp;messages.</t>

          <t>The pseudorandom function negotiated in the initial PA&nbhy;Server
          and PA&nbhy;Client message exchange for the transport key
          derivation.</t>

          <t>The transport key derived from the MSK to provide integrity
          protection and data origin authentication for the messages in the PA
          session. The lifetime of the transport key SHOULD be identical to
          the lifetime of the session.</t>

          <t>The nonce selected by the PCP&nbsp;client at the initiation of the
          session.</t>

          <t>The key ID associated with the transport key.</t>
        </list></t>

      <t>Specifically, the transport key is computed in the following way:
      transport key = prf(MSK, "IETF PCP" || Session ID || Nonce
      || key&nbsp;ID), where:</t>

      <t><list style="symbols">
          <t>prf is the pseudorandom function assigned in the PRF option
          (<xref target="PRF"/>).</t>

          <t>MSK is the master session key generated by the EAP method.</t>

          <t>"IETF PCP" is the ASCII code representation of the
          non&nbhy;null&nbhy;terminated string (excluding the double quotes
          around&nbsp;it).</t>

          <t>'||' is the concatenation operator.</t>

          <t>Session ID is the ID of the session from which the MSK is
          derived.</t>

          <t>Nonce is the nonce selected by the client and transported in the
          initial PA&nbhy;Client message.</t>

          <t>Key ID is the ID assigned for the transport key.</t>
        </list></t>
    </section>

    <section title="Packet Format">
      <section anchor="format" title="Packet Format of PCP Auth Messages">
        <t>The format of the PA&nbhy;Server message is identical to the
        response message format specified in Section 7.2 of <xref
        target="RFC6887"></xref>. The result code for a PA&nbhy;Server message
        carrying an EAP request MUST be set to AUTHENTICATION_REQUEST.</t>

        <t>This document updates the Reserved field
        (see <xref target="fig1"/>) in the Request header specified in
        Section 7.1 of <xref target="RFC6887"></xref> to carry
        Opcode&nbhy;specific data.</t>

        <figure anchor="fig1" title="Request Packet Format">
            <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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Version = 2  |R|   Opcode    |   Reserved    |Opcode-specific|
  |               | |             |               |   data        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                 Requested Lifetime (32 bits)                  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  |            PCP Client's IP Address (128 bits)                 |
  |                                                               |
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  :                                                               :
  :                  Opcode-specific information                  :
  :                                                               :
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  :                                                               :
  :                   (optional) PCP Options                      :
  :                                                               :
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ]]></artwork> </figure>

        <t>The PA&nbhy;Client messages (as shown in <xref target="fig2"/>)
        use the Request header specified in <xref target="fig1"/>.
        The Opcode-specific data is used to transfer the result codes
        (e.g., INITIATION, AUTHENTICATION_FAILED). Other fields in
        <xref target="fig2"/> are described in
        Section 7.1 of <xref target="RFC6887"></xref>. The result code for
        a PA&nbhy;Client message carrying an EAP response MUST be set to
        AUTHENTICATION_REPLY.</t>

        <figure anchor="fig2" title="PA-Client Message Format">
          <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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Version = 2  |R|   Opcode    |   Reserved    |  Result Code  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                 Requested Lifetime (32 bits)                  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  |            PCP Client's IP Address (128 bits)                 |
  |                                                               |
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  :                                                               :
  :                  Opcode-specific information                  :
  :                                                               :
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  :                                                               :
  :                   (optional) PCP Options                      :
  :                                                               :
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ]]></artwork> </figure>

        <t>The Requested Lifetime field of a PA&nbhy;Client message and
        the Lifetime field of a PA&nbhy;Server message are both set to
        zero on transmission and ignored on reception.</t>
      </section>

      <section title="Opcode-Specific Information of AUTHENTICATION Opcode">
        <t>The following diagram shows the format of the Opcode-specific
        information for the AUTHENTICATION Opcode.</t>

        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Session ID                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Sequence Number                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>

        <t><list style="empty">
            <t>Session ID: This field contains a 32-bit PA session
            identifier.</t>

            <t>Sequence Number: This field contains a 32-bit sequence number.
            A sequence number needs to be incremented on every new
            (non&nbhy;retransmission) outgoing PA&nbsp;message in order to
            provide an ordering guarantee for PA&nbsp;messages.</t>
          </list></t>
      </section>

      <section anchor="nonce" title="NONCE Option">
        <t>Because the session identifier of a PA session is determined by the
        PCP&nbsp;server, a PCP&nbsp;client does not know the session
        identifier that will be used when it sends out a PA&nbhy;Initiation
        message. In order to prevent an attacker from interrupting the
        authentication process by sending spoofed PA&nbhy;Server messages,
        the PCP&nbsp;client needs to generate a random number as a nonce
        in the PA&nbhy;Initiation message. The PCP&nbsp;server will append
        the nonce within the initial PA&nbhy;Server message. If the
        PA&nbhy;Server message does not carry the correct nonce, the
        message MUST be silently discarded.</t>

<figure> <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Nonce                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ]]></artwork>
          </figure>
          <t><list style="empty">


            <t>Option Code: 4.</t>

            <t>Reserved: 8 bits. MUST be set to zero on transmission
            and MUST be ignored on reception.</t>

            <t>Option-Length: 4 octets.</t>

            <t>Nonce: A random 32-bit number that is transported within a
            PA&nbhy;Initiation message and the corresponding reply message
            from the PCP&nbsp;server.</t>
          </list></t>
      </section>

      <section anchor="tag" title="AUTHENTICATION_TAG Option">
        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Session ID                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Sequence Number                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Key ID                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                Authentication Data (Variable)                 |
   ~                                                               ~
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   ]]></artwork>
          </figure>

        <t>Because there is no authentication Opcode in common
        PCP&nbsp;messages, the authentication tag for common
        PCP&nbsp;messages needs to carry the Session&nbsp;ID and
        Sequence Number.<list style="empty">
            <t>Option Code: 5.</t>

            <t>Reserved: 8 bits. MUST be set to zero on transmission and
            MUST be ignored on reception.</t>

            <t>Option-Length: The length of the AUTHENTICATION_TAG option for
            the common PCP&nbsp;message (in octets), including the
            12&nbhy;octet fixed&nbhy;length header and the
            variable-length authentication data.</t>

            <t>Session ID: A 32-bit field used to identify the session to
            which the message belongs and identify the secret key used to
            create the message digest appended to the PCP&nbsp;message.</t>

            <t>Sequence Number: A 32-bit sequence number. In this option, a
            sequence number needs to be incremented on every new
            (non&nbhy;retransmission) outgoing common PCP&nbsp;message in
            order to provide an ordering guarantee for common
            PCP&nbsp;messages.</t>

            <t>Key ID: The ID associated with the transport key used to
            generate authentication data. This field is filled with zeros if
            the MSK is directly used to secure the message.</t>

            <t>Authentication Data: A variable-length field that carries the
            Message Authentication Code for the common PCP&nbsp;message. The
            generation of the digest varies according to the algorithms
            specified in different PCP SAs. This field MUST end on a 32-bit
            boundary, padded with zeros when necessary.</t>
          </list></t>
      </section>

      <section anchor="tagB" title="PA_AUTHENTICATION_TAG Option">
        <t>This option is used to provide message authentication for
        PA&nbsp;messages. In contrast to the AUTHENTICATION_TAG option
        for common PCP&nbsp;messages, the Session&nbsp;ID field and the
        Sequence Number field are removed because such information is
        provided in the Opcode&nbhy;specific information of the
        AUTHENTICATION Opcode.</t>

        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Key ID                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                Authentication Data (Variable)                 |
   ~                                                               ~
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ]]></artwork>
          </figure>
            <t><list style="empty">
            <t>Option Code: 6.</t>

            <t>Reserved: 8 bits. MUST be set to zero on transmission and
            MUST be ignored on reception.</t>

            <t>Option-Length: The length of the PA_AUTHENTICATION option for
            the PCP Auth message (in octets), including the 4&nbhy;octet
            fixed-length header and the variable-length authentication
            data.</t>

            <t>Key ID: The ID associated with the transport key used to
            generate authentication data. This field is filled with zeros if
            the MSK is directly used to secure the message.</t>

            <t>Authentication Data: A variable-length field that carries the
            Message Authentication Code for the PCP Auth message. The
            generation of the digest varies according to the algorithms
            specified in different PCP SAs. This field MUST end on a 32-bit
            boundary, padded with null characters when necessary.</t>
          </list></t>
      </section>

      <section anchor="EAPA" title="EAP_PAYLOAD Option">
        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                           EAP Message                         |
   ~                                                               ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   ]]></artwork>
          </figure>

        <t><list style="empty">
            <t>Option Code: 7.</t>

            <t>Reserved: 8 bits. MUST be set to zero on transmission and
            MUST be ignored on reception.</t>

            <t>Option-Length: Variable.</t>

            <t>EAP Message: The EAP message transferred. Note that this
            field MUST end on a 32-bit boundary, padded with zeros when
            necessary.</t>
          </list></t>
      </section>

      <section anchor="PRF" title="PRF Option">
        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          PRF                                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   ]]></artwork>
          </figure>

        <t><list style="empty">
        <t>Option Code: 8.</t>

        <t>Reserved: 8 bits. MUST be set to zero on transmission and MUST be
        ignored on reception.</t>

        <t>Option-Length: 4 octets.</t>

        <t>PRF: The pseudorandom function that the sender supports to
        generate an MSK. This field contains a value indicating 
        Internet Key Exchange Protocol version 2 (IKEv2) Transform
        Type&nbsp;2 <xref target="RFC7296"></xref>
        <xref target="RFC4868"></xref>. A PCP implementation MUST support
        PRF_HMAC_SHA2_256 (transform&nbsp;ID&nbsp;=&nbsp;5).</t>
       </list></t>
      </section>

      <section anchor="MAC" title="MAC_ALGORITHM Option">
        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    MAC Algorithm ID                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
        <t><list style="empty">
        <t>Option Code: 9.</t>

        <t>Reserved: 8 bits. MUST be set to zero on transmission and MUST be
        ignored on reception.</t>

        <t>Option-Length: 4 octets.</t>

        <t>MAC Algorithm ID: Indicates the MAC algorithm that the sender
        supports to generate authentication data. The MAC Algorithm ID field
        contains a value indicating IKEv2 Transform Type&nbsp;3 <xref
        target="RFC7296"></xref> <xref target="RFC4868"></xref>. A PCP
        implementation MUST support AUTH_HMAC_SHA2_256_128
        (transform&nbsp;ID&nbsp;=&nbsp;12).</t>
       </list></t>
      </section>

      <section anchor="life" title="SESSION_LIFETIME Option">
        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Session Lifetime                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
        <t><list style="empty">
        <t>Option Code: 10.</t>

        <t>Reserved: 8 bits. MUST be set to zero on transmission and MUST be
        ignored on reception.</t>

        <t>Option-Length: 4 octets.</t>

        <t>Session Lifetime: An unsigned 32-bit integer, in seconds, ranging
        from 0 to 2^32-1 seconds. The lifetime of the PA session, which is
        decided by the authorization result.</t>
      </list></t>
      </section>

      <section anchor="Ack-Seq" title="RECEIVED_PAK Option">
        <t>This option is used in a PA&nbhy;Acknowledgement message to indicate
        that a PA&nbsp;message with the contained sequence number has been
        received.</t>
   <figure><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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Received Sequence Number                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
        <t><list style="empty">
        <t>Option Code: 11.</t>

        <t>Reserved: 8 bits. MUST be set to zero on transmission and MUST be
        ignored on reception.</t>

        <t>Option-Length: 4 octets.</t>

        <t>Received Sequence Number: The sequence number of the last received
        PA&nbsp;message.</t>
      </list></t>
      </section>

      <section anchor="ID" title="ID_INDICATOR Option">
        <t>The ID_INDICATOR option is used by the PCP&nbsp;client to determine
        which credentials to provide to the PCP&nbsp;server.</t>

        <figure>
            <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Option Code  |  Reserved     |       Option-Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                          ID Indicator                         |
   ~                                                               ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
        <t><list style="empty">
            <t>Option Code: 12.</t>

            <t>Reserved: 8 bits. MUST be set to zero on transmission and
            MUST be ignored on reception.</t>

            <t>Option-Length: Variable.</t>

            <t>ID Indicator: The identity of the authority that issued the EAP
            credentials to be used to authenticate the client. The field
            MUST&nbsp;NOT be null terminated, and its length is indicated by
            the Option&nbhy;Length field. In particular, when a client
            receives an ID_INDICATOR option, it MUST NOT rely on the presence
            of a null character in the wire format data to identify the end
            of the ID&nbsp;Indicator field.</t>

            <t>The field MUST end on a 32-bit boundary, padded with zeros when
            necessary. The ID Indicator field is a UTF-8 encoded <xref
            target="RFC3629"></xref> Unicode string conforming to the
            UsernameCaseMapped profile of the PRECIS IdentifierClass <xref
            target="RFC7613"></xref>. The PCP&nbsp;client validates that the
            ID Indicator field conforms to the UsernameCaseMapped profile
            of the PRECIS IdentifierClass. The PCP&nbsp;client enforces the
            rules specified in Section 3.2.2 of <xref target="RFC7613"></xref>
            to map the ID Indicator field. The PCP&nbsp;client compares the
            resulting string with the ID indicators stored locally on the
            PCP&nbsp;client to pick the credentials for authentication. The two
            indicator strings are to be considered equivalent by the client
            if and only if they are an exact octet-for-octet match.</t>
          </list></t>
      </section>
    </section>

    <section title="Processing Rules">
      <section anchor="AuthG" title="Authentication Data Generation">
        <t>After a successful EAP authentication process, every subsequent
        PCP&nbsp;message within the PA&nbsp;session MUST carry an
        authentication tag that contains the digest of the PCP&nbsp;message
        for data origin authentication and integrity protection.</t>

        <t><list style="symbols">
            <t>Before generating a digest for a PA&nbsp;message, a
            device needs to first locate the PCP SA according to the
            session identifier and then get the transport key. Then, the
            device appends a PA_AUTHENTICATION_TAG option for PCP Auth
            at the end of the PCP&nbsp;Auth message. The length of the
            Authentication Data field is decided by the MAC algorithm
            adopted in the session. The device then fills the Key&nbsp;ID
            field with the key&nbsp;ID of the transport key and sets
            the Authentication Data field to zero. After this, the device
            generates a digest for the entire PCP&nbsp;message (including
            the PCP header and PA_AUTHENTICATION_TAG option) using the
            transport key and the associated MAC algorithm, and inserts the
            generated digest into the Authentication Data field.</t>

            <t>Similar to generating a digest for a PA&nbsp;message, before
            generating a digest for a common PCP&nbsp;message, a device needs
            to first locate the PCP SA according to the session identifier
            and then get the transport key. Then, the device appends the
            AUTHENTICATION_TAG option at the end of the common
            PCP&nbsp;message. The length of the Authentication Data field is
            decided by the MAC algorithm adopted in the session. The
            device then uses the corresponding values derived from the SA
            to fill the Session&nbsp;ID field, the Sequence Number field,
            and the Key&nbsp;ID field, and sets the Authentication Data
            field to zero. After this, the device generates a digest for
            the entire PCP&nbsp;message (including the PCP header and
            AUTHENTICATION_TAG option) using the transport key and
            the associated MAC algorithm, and inserts the generated digest
            into the Authentication Data field.</t>
          </list></t>
      </section>

      <section anchor="AuthV" title="Authentication Data Validation">
        <t>When a device receives a common PCP&nbsp;message with an
        AUTHENTICATION_TAG option for common PCP&nbsp;messages, the device
        needs to use the Session&nbsp;ID transported in the option to
        locate the proper SA and then find the associated transport key
        (using the key&nbsp;ID in the option) and the MAC algorithm. If
        no proper SA or transport key is found or the sequence number is
        invalid (see <xref target="AuthC"></xref>), the PCP device stops
        processing the PCP&nbsp;message and silently discards the message.
        After storing the value of the Authentication field of the
        AUTHENTICATION_TAG option, the device fills the
        Authentication field with zeros. Then, the device generates
        a digest for the message (including the PCP header and
        AUTHENTICATION_TAG option) with the transport key and the
        MAC algorithm. If the value of the newly generated digest is
        identical to the stored one, the device can ensure that the
        message has not been tampered with, and the validation succeeds.
        Otherwise, the PCP device stops processing the PCP&nbsp;message
        and silently discards the message.</t>

        <t>Similarly, when a device receives a PA&nbsp;message with a
        PA_AUTHENTICATION_TAG option for PCP authentication, the device needs
        to use the Session ID transported in the Opcode to locate the proper
        SA and then find the associated transport key (using the key ID in
        the option) and the MAC algorithm. If no proper SA or transport key is
        found or the sequence number is invalid (see <xref
        target="AuthS"></xref>), the PCP device stops processing the
        PCP&nbsp;message and silently discards the message. After storing
        the value of the Authentication field of the
        PA_AUTHENTICATION_TAG option, the device fills the Authentication
        field with zeros. Then, the device generates a digest for the
        message (including the PCP header and PA_AUTHENTICATION_TAG option)
        with the transport key and the MAC algorithm. If the value of the
        newly generated digest is identical to the stored one, the device
        can ensure that the message has not been tampered with, and the
        validation succeeds. Otherwise, the PCP device stops processing
        the PCP&nbsp;message and silently discards the message.</t>
      </section>

      <section anchor="AuthR" title="Retransmission Policies for PA Messages">
        <t>Because EAP relies on the underlying protocols to provide reliable
        transmission, after sending a PA&nbsp;message, a PCP&nbsp;client/server
        MUST&nbsp;NOT send out any subsequent messages until it has
        received a PA&nbsp;message with a proper sequence number from the peer.
        If no such message is received, the PCP device will resend the last
        message according to retransmission policies. This specification uses
        the retransmission policies specified in
        Section 8.1.1 of the base PCP specification <xref target="RFC6887"/>.
        In base PCP, such retransmission policies are only applied by
        PCP&nbsp;clients. However, in this specification, such retransmission
        policies are also applied by the PCP&nbsp;servers. If the
        "maximum retransmission" duration (in seconds) has elapsed and no
        expected response is received, the device will terminate the
        session and discard the current SA.</t>

        <t>As discussed in <xref target="EAP"></xref>, in order to avoid
        unnecessary retransmission, the device receiving a PA&nbsp;message MUST
        send a PA&nbhy;Acknowledgement message to the sender of the
        PA&nbsp;message when it cannot send a PA&nbsp;response immediately.
        The PA&nbhy;Acknowledgement message is used to indicate the receipt of
        the PA&nbsp;message. When the sender receives the
        PA&nbhy;Acknowledgement message, it will stop the retransmission.</t>

        <t>Note that the last PA&nbsp;messages transported within the phases of
        session initiation, session re&nbhy;authentication, and
        session termination do not have to follow the above policies, since
        the devices sending out those messages do not expect any
        further PA&nbsp;messages.</t>

        <t>When a device receives a retransmitted last incoming PA&nbsp;message
        from its session partner, it MUST try to answer it by sending the last
        outgoing PA&nbsp;message again. However, if the duplicate message has
        the same sequence number but is not bitwise identical to the original
        message, then the device MUST discard it. In order to perform this
        function, the device may need to maintain the last incoming message
        and the associated outgoing messages. In this case, if no outgoing
        PA&nbsp;message has been generated for the received duplicate
        PA&nbsp;message yet, the device needs to send a
        PA&nbhy;Acknowledgement message. The rate of replying to duplicate
        PA&nbsp;messages MUST be limited to provide robustness against
        denial-of-service (DoS) attacks. The details of rate limiting
        are outside the scope of this specification.</t>
      </section>

      <section anchor="AuthS" title="Sequence Numbers for PCP Auth Messages">
        <t>PCP uses UDP to transport signaling messages. As an unreliable
        transport protocol, UDP does not guarantee ordered packet delivery and
        does not provide any protection from packet loss. In order to ensure
        that the EAP messages are exchanged in a reliable way, every
        PCP&nbsp;message exchanged during EAP authentication must carry a
        monotonically increasing sequence number. During a PA session, a
        PCP device needs to maintain two sequence numbers for PA&nbsp;messages:
        one for incoming PA&nbsp;messages and one for outgoing
        PA&nbsp;messages. When generating an outgoing PA&nbsp;message, the
        device adds the associated outgoing sequence number to the message
        and increments the sequence number maintained in the SA by 1. When
        receiving a PA&nbsp;message from its session partner, the device
        will not accept it if the sequence number carried in the message
        does not match the incoming sequence number maintained in the device.
        After confirming that the received message is valid, the device
        increments the incoming sequence number maintained in the SA by 1.</t>

        <t>The above rules are not applicable to PA&nbhy;Acknowledgement
        messages (i.e., PA&nbsp;messages containing a RECEIVED_PAK option). A
        PA&nbhy;Acknowledgement message does not transport any EAP message
        and only indicates that a PA&nbsp;message is received. Therefore,
        reliable transmission of PA&nbhy;Acknowledgement messages is not
        required. For instance, after sending out a PA&nbhy;Acknowledgement
        message, a device generates an EAP response. In this case, the
        device does not have to confirm whether the PA&nbhy;Acknowledgement
        message has been received by its session partner or not.
        Therefore, when receiving or sending out a
        PA&nbhy;Acknowledgement message, the device MUST NOT increase the
        corresponding sequence number stored in the SA. Otherwise, loss of a
        PA&nbhy;Acknowledgement message will cause a mismatch in sequence
        numbers.</t>

        <t>Another exception is the message retransmission scenario. As
        discussed in <xref target="AuthR"></xref>, when a PCP device does not
        receive any response from its session partner, it needs to retransmit
        the last outgoing PA&nbsp;message, following the retransmission
        procedure specified in
        Section 8.1.1 of <xref target="RFC6887"></xref>. The
        original message and duplicate messages MUST be bitwise identical.
        When the device receives such a duplicate PA&nbsp;message from its
        session partner, it MUST send the last outgoing PA&nbsp;message
        again. In such cases, the maintained incoming and outgoing sequence
        numbers will not be affected by the message retransmission.</t>
      </section>

      <section anchor="AuthC" title="Sequence Numbers for Common PCP Messages">
        <t>When transporting common PCP&nbsp;messages within a PA&nbsp;session,
        a PCP device needs to maintain a sequence number for outgoing
        common PCP&nbsp;messages and a sequence number for incoming
        common PCP&nbsp;messages. When generating a new outgoing
        PCP&nbsp;message, the PCP device updates the Sequence Number
        field in the AUTHENTICATION_TAG option with the outgoing
        sequence number maintained in the SA and increments the
        outgoing sequence number by 1.</t>

        <t>When receiving a PCP&nbsp;message from its session partner, the PCP
        device will not accept it if the sequence number carried in the
        message is smaller than the incoming sequence number maintained in
        the device. This approach can protect the PCP device from replay
        attacks. After confirming that the received message is valid, the PCP
        device will update the incoming sequence number maintained in the PCP
        SA with the sequence number of the incoming message.</t>

        <t>Note that the sequence number in the incoming message may not
        exactly match the incoming sequence number maintained locally. As
        discussed in the base PCP specification <xref
        target="RFC6887"></xref>, if a PCP&nbsp;client is no longer
        interested in the PCP transaction and has not yet received a
        PCP&nbsp;response from the server, then it will stop retransmitting
        the PCP&nbsp;request. After that, the PCP&nbsp;client might
        generate new PCP&nbsp;requests for other purposes, using the
        current SA. In this case, the sequence number in the new request
        will be larger than the sequence number in the old request and
        so will be larger than the incoming sequence number maintained in the
        PCP&nbsp;server.</t>

        <t>Note that, as discussed in the base PCP specification <xref
        target="RFC6887"></xref>, a PCP&nbsp;client needs to select a
        nonce in each MAP or PEER request, and the nonce is sent back
        in the response. However, it is possible for a client to use the
        same nonce in multiple MAP or PEER requests, and this may cause a
        potential risk of replay attacks. This attack is addressed by
        using the sequence number in the PCP&nbsp;response.</t>
      </section>

      <section anchor="AuthM" title="MTU Considerations">
        <t>EAP methods are responsible for MTU handling, so no special
        facilities are required in PCP to deal with MTU issues. Specifically,
        EAP lower layers indicate to EAP methods and
        Authentication, Authorization, and Accounting (AAA) servers the MTU of
        the lower layer. EAP methods such as EAP-TLS <xref
        target="RFC5216"></xref>, TEAP <xref target="RFC7170"></xref>, and
        others that are likely to exceed reasonable MTUs provide support for
        fragmentation and reassembly. Others, such as 
        EAP - Generalized Pre-Shared Key (EAP-GPSK) <xref
        target="RFC5433"></xref>, assume that they will never send packets
        larger than the MTU and use small EAP packets.</t>

        <t>If an EAP message is too long to be transported within a single
        PA&nbsp;message, it will be divided into multiple sections and sent
        within different PA&nbsp;messages. Note that the receiver may not
        be able to know what to do in the next step until it has received
        all the sections and reconstructed the complete EAP message. In
        this case, in order to guarantee reliable message transmission, after
        receiving a PA&nbsp;message, the receiver replies with a
        PA&nbhy;Acknowledgement message to notify the sender to send the
        next PA&nbsp;message.</t>
      </section>
    </section>

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

      <t>The following PCP Opcode has been allocated from the Standards Action
      range of the "PCP Opcodes" registry (which is maintained in
      &lt;http://www.iana.org/assignments/pcp-parameters&gt;):</t>

      <t><list style="empty">
      <t>3 AUTHENTICATION.</t>
      </list></t>

      <t>The following PCP result codes have been allocated from the
      Standards Action range of the "PCP Result Codes" registry (which is maintained
      in &lt;http://www.iana.org/assignments/pcp-parameters&gt;):</t>

<!-- [rfced] Please review the updated descriptions, which have been edited
for parallelism and grammer. If you agree with the changes, we will send
mail to ask IANA to update the registry
(http://www.iana.org/assignments/pcp-parameters) to match. If you prefer
the original, we will revert the text.

Original:
      TBA INITIATION: The client indication to the server for
      authentication.

      TBA AUTHENTICATION_REQUIRED: The error response is signaled to the
      client that EAP authentication is required.

      TBA AUTHENTICATION_FAILED: This error response is signaled to the
      client if EAP authentication had failed.

      TBA AUTHENTICATION_SUCCEEDED:This success response is signaled to
      the client if EAP authentication had succeeded.

      TBA AUTHORIZATION_FAILED: This error response is signaled to the
      client if the EAP authentication had succeeded but authorization
      failed.

      TBA SESSION_TERMINATED: This PCP result code indicates to the
      partner that the PA session must be terminated.

      TBA UNKNOWN_SESSION_ID: The error response is signaled from the
      PCP server that there is no known PA session associated with the
      Session ID signaled in the PA request or common PCP request from
      the PCP client.

      TBA DOWNGRADE_ATTACK_DETECTED: This error response is signaled to
      the client if the server detects downgrade attack.

      TBA AUTHENTICATION_REQUEST: The server indication to the client
      that EAP request is signaled in the PA message.

      TBA AUTHENTICATION_REPLY: The client indication to the server that
      EAP response is signaled in the PA message.

Current:
      14 INITIATION: The client includes this PCP result code in its
      request to the server for authentication.

      15 AUTHENTICATION_REQUIRED: This error response is sent to the
      client if EAP authentication is required.

      16 AUTHENTICATION_FAILED: This error response is sent to the
      client if EAP authentication failed.

      17 AUTHENTICATION_SUCCEEDED: This success response is sent to the
      client if EAP authentication succeeded.

      18 AUTHORIZATION_FAILED: This error response is sent to the client
      if EAP authentication succeeded but authorization failed.

      19 SESSION_TERMINATED: This PCP result code indicates to the
      partner that the PA session must be terminated.

      20 UNKNOWN_SESSION_ID: This error response is sent from the
      PCP server if there is no known PA session associated with the
      Session ID sent in the PA request or common PCP request from the
      PCP client.

      21 DOWNGRADE_ATTACK_DETECTED: This PCP result code indicates to
      the client that the server detected a downgrade attack.

      22 AUTHENTICATION_REQUEST: The server indicates to the client that
      the PA message contains an EAP request.

      23 AUTHENTICATION_REPLY: The client indicates to the server that
      the PA message contains an EAP response.
-->

      <t><list style="empty">
          <t>14 INITIATION: The client includes this PCP result code in
          its request to the server for authentication.</t>

          <t>15 AUTHENTICATION_REQUIRED: This error response is sent to
          the client if EAP authentication is required.</t>

          <t>16 AUTHENTICATION_FAILED: This error response is sent to the
          client if EAP authentication failed.</t>

          <t>17 AUTHENTICATION_SUCCEEDED: This success response is sent to
          the client if EAP authentication succeeded.</t>

          <t>18 AUTHORIZATION_FAILED: This error response is sent to the
          client if EAP authentication succeeded but authorization
          failed.</t>

          <t>19 SESSION_TERMINATED: This PCP result code indicates to the
          partner that the PA session must be terminated.</t>

          <t>20 UNKNOWN_SESSION_ID: This error response is sent from the
          PCP&nbsp;server if there is no known PA session associated with the
          Session&nbsp;ID sent in the PA request or common PCP request from
          the PCP&nbsp;client.</t>

          <t>21 DOWNGRADE_ATTACK_DETECTED: This PCP result code indicates
          to the client that the server detected a downgrade attack.</t>

          <t>22 AUTHENTICATION_REQUEST: The server indicates to the client
          that the PA&nbsp;message contains an EAP request.</t>

          <t>23 AUTHENTICATION_REPLY: The client indicates to the server
          that the PA&nbsp;message contains an EAP response.</t>
        </list></t>

      <t>The following PCP options have been allocated 
      from the Standards Action range (the registry
      for PCP options is maintained in
      &lt;http://www.iana.org/assignments/pcp&nbhy;parameters&gt;):</t>

<!-- [rfced] In Sections 7.1-7.9, we have made the following updates
to match the IANA registry. Please let us know if you prefer otherwise.

"Option Name" to "Name"
"option-code" to "Value"
"option-len" to "Length"
-->

      <section title="NONCE">
        <t><list style="hanging">
            <t hangText="Name:">NONCE.</t>

            <t hangText="Value:">4.</t>

            <t hangText="Purpose:">See <xref target="nonce"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">4 octets.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="AUTHENTICATION_TAG">
        <t><list style="hanging">
            <t hangText="Name:">AUTHENTICATION_TAG.</t>

            <t hangText="Value:">5.</t>

            <t hangText="Purpose:">See <xref target="tag"></xref>.</t>

            <t hangText="Valid for Opcodes:">MAP, PEER, ANNOUNCE.</t>

            <t hangText="Length:">variable.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="PA_AUTHENTICATION_TAG">
        <t><list style="hanging">
            <t hangText="Name:">PA_AUTHENTICATION_TAG.</t>

            <t hangText="Value:">6.</t>

            <t hangText="Purpose:">See <xref target="tagB"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">variable.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="EAP_PAYLOAD">
        <t><list style="hanging">
            <t hangText="Name:">EAP_PAYLOAD.</t>

            <t hangText="Value:">7.</t>

            <t hangText="Purpose:">See <xref target="EAPA"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">variable.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="PRF">
        <t><list style="hanging">
            <t hangText="Name:">PRF.</t>

            <t hangText="Value:">8.</t>

            <t hangText="Purpose:">See <xref target="PRF"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">4 octets.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">as many as fit within
               maximum PCP&nbsp;message size.</t>
          </list></t>
      </section>

      <section title="MAC_ALGORITHM">
        <t><list style="hanging">
            <t hangText="Name:">MAC_ALGORITHM.</t>

            <t hangText="Value:">9.</t>

            <t hangText="Purpose:">See <xref target="MAC"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">4 octets.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">as many as fit within
               maximum PCP&nbsp;message size.</t>
          </list></t>
      </section>

      <section title="SESSION_LIFETIME">
        <t><list style="hanging">
            <t hangText="Name:">SESSION_LIFETIME.</t>

            <t hangText="Value:">10.</t>

            <t hangText="Purpose:">See <xref target="life"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION</t>

            <t hangText="Length:">4 octets.</t>

            <t hangText="May appear in:">Response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="RECEIVED_PAK">
        <t><list style="hanging">
            <t hangText="Name:">RECEIVED_PAK.</t>

            <t hangText="Value:">11.</t>

            <t hangText="Purpose:">See <xref target="Ack-Seq"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">4 octets.</t>

            <t hangText="May appear in:">Request and response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>

      <section title="ID_INDICATOR">
        <t><list style="hanging">
            <t hangText="Name:">ID_INDICATOR.</t>

            <t hangText="Value:">12.</t>

            <t hangText="Purpose:">See <xref target="ID"></xref>.</t>

            <t hangText="Valid for Opcodes:">AUTHENTICATION.</t>

            <t hangText="Length:">variable.</t>

            <t hangText="May appear in:">Response.</t>

            <t hangText="Maximum occurrences:">1.</t>
          </list></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>As described in this specification, after a successful
      EAP authentication process is performed between two PCP devices,
      an MSK will be exported. The MSK will be used to derive the
      transport keys to generate MAC digests for subsequent PCP&nbsp;message
      exchanges. However, before a transport key has been generated,
      the PA&nbsp;messages exchanged within a PA session have little
      cryptographic protection, and if there is no already-established
      security channel between two session partners, these messages are
      subject to man-in-the-middle attacks and DoS attacks. For instance, the
      initial PA&nbhy;Server and PA&nbhy;Client message exchange is vulnerable
      to spoofing attacks, as these messages are not authenticated and
      integrity protected. In addition, because the PRF and MAC algorithms are
      transported at this stage, an attacker may try to remove the PRF and MAC
      options containing strong algorithms from the initial PA&nbhy;Server
      message and force the client to choose the weakest algorithms.
      Therefore, the server needs to guarantee that all the PRF and MAC
      algorithms for which it provides support are strong enough.</t>

      <t>In order to prevent very basic DoS attacks, a PCP device SHOULD
      generate state information as little as possible in the initial
      PA&nbhy;Server and PA&nbhy;Client message exchanges. The choice of
      EAP method is also very important. The selected EAP method must
      (1) be resilient to attacks that are possible in an insecure network
      environment, (2) provide user-identity confidentiality and protection
      against dictionary attacks, and (3) support session-key
      establishment.</t>

      <t>When a PCP proxy <xref target="RFC7648"></xref> is located
      between a PCP&nbsp;server and PCP&nbsp;clients, the proxy may perform
      authentication with the PCP&nbsp;server before it processes
      requests from the clients. In addition, re&nbhy;authentication between
      the PCP&nbsp;proxy and PCP&nbsp;server will not interrupt the service
      that the proxy provides to the clients, since the proxy is still
      allowed to send common PCP&nbsp;messages to the PCP&nbsp;server
      during that period.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

<!-- draft-ietf-pcp-proxy (RFC 7648) -->
<reference anchor='RFC7648' target="http://www.rfc-editor.org/info/rfc7648">
<front>
<title>Port Control Protocol (PCP) Proxy Function</title>
<author initials='S' surname='Perreault' fullname='Simon Perreault'>
    <organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='R' surname='Penno' fullname='Reinaldo Penno'>
    <organization />
</author>
<author initials='D' surname='Wing' fullname='Dan Wing'>
    <organization />
</author>
<author initials='S' surname='Cheshire' fullname='Stuart Cheshire'>
    <organization />
</author>
<date month='September' year='2015' />
</front>
<seriesInfo name='RFC' value='7648' />
<seriesInfo name="DOI" value="10.17487/RFC7648"/>
</reference>

      <?rfc include='reference.RFC.3629'?>

      <?rfc include='reference.RFC.3748'?>

      <?rfc include='reference.RFC.7296'?>

      <?rfc include='reference.RFC.4868'?>

      <?rfc include='reference.RFC.5281'?>

      <?rfc include='reference.RFC.6887'?>

      <?rfc include='reference.RFC.7170'?>

      <?rfc include='reference.RFC.7613'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.5448'?>

      <?rfc include='reference.RFC.5216'?>

      <?rfc include='reference.RFC.5433'?>
    </references>

    <section anchor="Acknowledgements" title="Acknowledgements" numbered="no">
      <t>Thanks to Dan Wing, Prashanth Patil, Dave Thaler, Peter Saint-Andre,
      Carlos Pignataro, Brian Haberman, Paul Kyzivat, Jouni Korhonen, Stephen
      Farrell, and Terry Manderson for their valuable comments.</t>
    </section>
  </back>
</rfc>
