<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc5296 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5296.xml">
<!ENTITY rfc3588 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3588.xml">
<!ENTITY rfc3748 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3748.xml">
<!ENTITY rfc5836 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5836.xml">
<!ENTITY rfc4962 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4962.xml">
<!ENTITY I-D.ietf-dime-local-keytran PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-dime-local-keytran.xml">
]>
<?rfc strict="yes"?>
<?rfc comments="no"?>
<?rfc inline="yes"?>
<?rfc editing="no"?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc rfcprocack="no"?>
<?rfc tocindent="yes"?>
<rfc category="std" docName="draft-ietf-hokey-erp-aak-10" ipr="trust200902">
  <front>
    <title abbrev="ERP/AAK">EAP Re-authentication Protocol Extensions for
    Authenticated Anticipatory Keying (ERP/AAK)</title>

    <author fullname="Zhen Cao" initials="Z." surname="Cao">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>53A Xibianmennei Ave., Xuanwu District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100053</code>

          <country>P.R. China</country>
        </postal>

        <email>zehn.cao@gmail.com</email>
      </address>
    </author>

    <author fullname="Hui Deng" initials="H." surname="Deng">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>53A Xibianmennei Ave., Xuanwu District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100053</code>

          <country>P.R. China</country>
        </postal>

        <email>denghui02@gmail.com</email>
      </address>
    </author>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Floor 12, HuiHong Mansion, No.91 BaiXia Rd.</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210001</code>

          <country>P.R. China</country>
        </postal>

        <phone>+86 25 56623633</phone>

        <email>sunseawq@huawei.com</email>
      </address>
    </author>

    <author role="editor" fullname="Glen Zorn" initials="G." surname="Zorn">
      <organization>Network Zen</organization>

      <address>
        <postal>
          <street>227/358 Thanon Sanphawut</street>

          <city>Bang Na</city>

          <region>Bangkok</region>

          <code>10260</code>

          <country>Thailand</country>
        </postal>

        <phone>+66 (0) 87-040-4617</phone>

        <email>glenzorn@gmail.com</email>
      </address>
    </author>

    <date year="2012"/>

    <abstract>
      <t>The Extensible Authentication Protocol (EAP) is a generic framework
      supporting multiple types of authentication methods. <vspace
      blankLines="1" /> The EAP Re-authentication Protocol (ERP) specifies
      extensions to EAP and the EAP keying hierarchy to support an EAP
      method-independent protocol for efficient re-authentication between the
      peer and an EAP re-authentication server through any authenticator.
      <vspace blankLines="1" /> 
      Authenticated Anticipatory Keying (AAK) is a
      method by which cryptographic keying material may be established upon
      one or more candidate attachment points (CAPs) prior to handover. AAK
      uses the AAA infrastructure for key transport. <vspace blankLines="1" />
      This document specifies the extensions necessary to enable AAK support
      in ERP.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The Extensible Authentication Protocol (EAP) <xref
      target="RFC3748"></xref> is a generic framework supporting multiple
      types of authentication methods. In systems where EAP is used for
      authentication, it is desirable to not repeat the entire EAP exchange
      with another authenticator. The EAP Re-authentication Protocol (ERP)
      <xref target="RFC5296"></xref> specifies extensions to EAP and the EAP
      keying hierarchy to support an EAP method-independent protocol for
      efficient re-authentication between the EAP re-authentication peer and
      an EAP re-authentication server through any authenticator. The
      re-authentication server may be in the home network or in the local
      network to which the mobile host (i.e., the EAP re-authentication peer) is
      connecting. <vspace blankLines="1" /> Authenticated Anticipatory Keying
      (AAK) <xref target="RFC5836"></xref> is a method by which cryptographic
      keying materials may be established prior to handover upon one or more
      candidate attachment points (CAPs). AAK utilizes the AAA infrastructure
      for key transport. <vspace blankLines="1" /> This document specifies the
      extensions necessary to enable AAK support in ERP.</t>
    </section>

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

      <section title="Acronyms">
        <t>The following acronyms are used in this document; see the
        references for more details. 
			<list hangIndent="4" style="hanging">
				<t hangText="AAA">
					<vspace blankLines="0"/>
					Authentication, Authorization and Accounting
					<xref target="RFC3588"></xref>
				</t>

				<t hangText="CAP">
					<vspace blankLines="0"/>
					Candidate Attachment Point <xref target="RFC5836"></xref>
				</t>

				<t hangText="EA">
					<vspace blankLines="0"/>
					Abbreviation for "ERP/AAK"
				</t>

				<t hangText="EA Peer">
					<vspace blankLines="0"/>
					 An EAP peer that supports the ERP/AAK. Note
					that all references to "peer" in this document imply an EA peer,
					unless specifically noted otherwise.
				</t>

				<t hangText="SAP">
					<vspace blankLines="0"/>
					Serving Attachment Point <xref target="RFC5836"></xref>
				</t>
          </list>
         </t>
      </section>
    </section>

    <section title="ERP/AAK Description">
      <t>ERP/AAK is intended to allow the establishment of cryptographic
      keying materials on a single Candidate Attachment Point prior to the
      arrival of the peer at the Candidate Access Network (CAN) upon request
      by the peer.
      <vspace blankLines="1" />
      In this document, ERP/AAK support
      by the peer is assumed. Also it is assumed that the peer has previously
      completed full EAP authentication and that either the peer or SAP knows the
      identities of neighboring attachment points. Note that the behavior of
      a peer that does not support the ERP-AAK scheme defined in this
      specification is out of the scope of this document.
      <xref target="fig_1"></xref> shows the general protocol exchange by which the
      keying material is established on the CAP. 

<?rfc needLines="31"?>
<figure align="center" anchor="fig_1" title="ERP/AAK Exchange"> <artwork>     
+------+         +-----+        +-----+          +-----------+
| Peer |         | SAP |        | CAP |          | EA Server |
+--+---+         +--+--+        +--+--+          +-----+-----+
   |                |              |                   |
a. | [EAP-Initiate/ |              |                   |
   | Re-auth-start  |              |                   |
   | (E-flag)]      |              |                   |
   |&lt;---------------|              |                   |
   |                |              |                   |
b. | EAP-Initiate/  |              |                   |
   | Re-auth        |              |                   |
   | (E-flag)       |              |                   |
   |---------------&gt;|              |                   |
c. |                | AAA(EAP-Initiate/Re-auth(E-flag))| 
   |                |---------------------------------&gt;|
   |                |              |         +---------+---------+
   |                |              |         | CA authorized &amp;   |
d. |                |              |         |  and EA Keying    |
   |                |              |         |   Distribution    |
   |                |              |         +---------+---------+
   |                |              |                   |
   |                |              |                   |
f. |                | AAA (EAP-Finish/Re-auth(E-flag)) |
   |                |&lt;---------------------------------|
g. | EAP-Finish/    |              |                   |
   | Re-auth(E-flag)|              |                   |
   |&lt;---------------|              |                   |
   |                |              |                   |
</artwork>
        </figure><figure align="center" anchor="fig_2"
          title="Key Distribution for ERP/AAK">
          <artwork>
+-----------+               +---------+
|           |               |         |
| EA Server |               |   CAP   |
|           |               |         |
+-----|-----+               +----|----+
      |                          |
      |                          |
      |    AAA Request(pMSK)     |
   e.1|-------------------------&gt;|
      |                          |
      |                          |
      |                          |
      |  AAA Response (Success)  |
   e.2|&lt;-------------------------|
      |                          |
      |                          |
      |                          |
</artwork>
        </figure>
       ERP/AAK re-uses the packet format defined by ERP, but
      specifies a new flag to differentiate EAP early-authentication from EAP
      re-authentication. The peer initiates ERP/AAK itself, or does so in
      response to an EAP-Initiate/Re-Auth-Start message from the SAP. <vspace
      blankLines="1" />In the latter case, the SAP MAY send the identity of one or more
      Candidate Attachment Points to which the
      SAP is adjacent to the peer in the EAP-Initiate/Re-auth-Start message
      (see a. in <xref target="fig_1"/>). 
      The Peer SHOULD override the identity of
      CAP(s) carried in EAP-Initiate/Re-auth-Start message by sending
      EAP-Initiate/Re-auth with the 'E' flag set if it knows to which CAP 
      it will move. If the EAP-Initiate/ Re-auth-Start packet is
      not supported by the peer, it MUST be silently discarded. 
      <vspace blankLines="1" />
      If the peer initiates ERP/AAK, the peer MAY send an
      early-authentication request message (EAP-Initiate/Re-auth with the 'E'
      flag set) containing the keyName-NAI, the CAP-Identifier, rIK and
      sequence number (see b. in <xref target="fig_1"/>). 
      The realm in the keyName-NAI
      field is used to locate the peer's ERP/AAK server. The CAP-Identifier
      is used to identify the CAP. The rIK is defined in Narayanan &amp; Dondeti <xref target="RFC5296"/>
      and used to
      protect the integrity of the message. The sequence number is used for
      replay protection. <vspace blankLines="1" />The SAP SHOULD verify the
      integrity of thus message at step b. If this verification fails, the SAP
      MUST send an EAP-Finish/Re-auth message with the Result flag set to '1'
      (Failure).
      If the verification succeeds, the SAP SHOULD encapsulate the
      early-authentication message into a AAA message and send it to the
      peer's ERP/AAK server in the realm indicated in the keyName-NAI field
      (see c. in <xref target="fig_1"/>). 
      <vspace blankLines="1" />
      Upon receiving the
      message, the ERP/AAK server MUST first use the keyName indicated in the
      keyName-NAI to look up the rIK and check the integrity and
      freshness of the message. Then the ERP/AAK server MUST verify the
      identity of the peer by checking the username portion of the
      KeyName-NAI. If any of the checks fail, the server MUST send an early-
      authentication finish message (EAP-Finish/Re-auth with E-flag set) with
      the Result flag set to '1'. 
      Next, the server MUST authorize the CAP
      specified in the CAP-Identifier TLV. 
      In the success case, the server MUST
      derive a pMSK from the pRK for the CAP carried in the the
      CAP-Identifier field using the sequence number associated with
      CAP-Identifier as an input to the key derivation. (see d. in <xref target="fig_1"/>).
      <vspace blankLines="1" />
      Then the ERP/AAK server MUST transport the
      pMSK to the authorized CAP via AAA <xref target="AAA"></xref> as
      illustrated above (see e.1 and e.2 in <xref target="fig_2"/>). 
      Note that key
      distribution in <xref target="fig_2"/>
      is one part of step d. in <xref target="fig_1"/>.
      <vspace blankLines="1" />Finally, in response to the
      EAP-Initiate/Re-auth message, the ERP/AAK server SHOULD send the
      early-authentication finish message (EAP-Finish/ Re-auth with E-flag
      set) containing the identity of the authorized CAP to the peer via the
      SAP along with the lifetime of the pMSK.
      If the peer also
      requests the rRK lifetime, the ERP/AAK server SHOULD send
      the rRK lifetime in the EAP-Finish/Re-auth message. (see f. and g. in <xref target="fig_1"/>).
</t>
    </section>

    <section title="ERP/AAK Key Hierarchy">
      <t>ERP/AAK uses a key hierarchy similar to that
      of ERP. 
      The ERP/AAK pre-established Root Key (pRK) is derived from
      either the EMSK or the DSRK as specified below (see <xref target="key-derivation"/>). In general, the pRK
      is derived from the EMSK if the peer is located in the home AAA
      realm and derived from the DRSK if the peer is in a visited
      realm. The DSRK is delivered from the EAP server to the ERP/AAK server
      as specified in <xref target="I-D.ietf-dime-local-keytran"></xref>. If
      the peer has previously been authenticated by means of ERP or ERP/AAK,
      the DSRK SHOULD be directly re-used. <figure align="center" anchor="KH1"
          title="ERP/AAK Root Key Derivation">
          <artwork>
    DSRK    EMSK
     |       |
 +---+---+---+---+
 |              
pRK            ...
</artwork>
        </figure>Similarly, the pre-established Master Session Key (pMSK) is
      derived from the pRK. The pMSK is established for the CAP when the peer
      early authenticates to the network. The hierarchy relationship is
      illustrated <xref target="KH2"></xref>, <figure align="center"
          anchor="KH2" title="ERP/AAK Key Hierarchy">
          <artwork>
         pRK
          |
 +--------+--------+
 |                
 pMSK             ...
</artwork>
        </figure> below.</t>

      <section anchor="key-derivation" title="Derivation of the pRK and pMSK">
        <t>The rRK is derived as specified in <xref
        target="RFC5295"></xref>.</t>

        <t>pRK = KDF (K, S), where<list>
            <t>K = EMSK or K = DSRK and</t>

            <t>S = pRK Label | "\0" | length</t>
          </list></t>

        <t>The pRK Label is an IANA-assigned 8-bit ASCII string:<list>
            <t>EAP Early-Authentication Root Key@ietf.org</t>
          </list></t>

        <t>assigned from the "USRK key labels" name space in accordance with Salowey, et al.
        <xref target="RFC5295"></xref>. The KDF and algorithm agility for the
        KDF are also defined in RFC 5295. The KDF algorithm is indicated in the cryptosuit
        field or list of cryptosuits TLV payload as specified in the section 5.2 and 
        section 5.3.</t>

        <t>The pMSK uses the same PDF as pRK and is derived as follows:</t>

        <t>pMSK = KDF (K, S), where<list>
            <t>K = pRK and</t>

            <t>S = pMSK label | "\0" | SEQ | length</t>
          </list></t>

        <t>The pMSK label is the 8-bit ASCII string:<list>
            <t>EAP Early-Authentication Master Session Key@ietf.org</t>
          </list></t>

        <t>The length field refers to the length of the pMSK 
        in octets encoded as specified in RFC 5295. SEQ is sent by either
        the peer or the server in the ERP/AAK message using the SEQ field or the 
        Sequence number TLV and encoded as an 16-bit number as specified in <xref target="EIRaPE"/>
        and <xref target="EFRaPTE"/>.</t>
      </section>
    </section>

    <section title="Packet and TLV Extension">
      <t>This section describes the packet and TLV extensions for the ERP/AAK
      exchange.</t>

      <section title="EAP-Initiate/Re-auth-Start Packet and TLV Extension">
        <t><xref target="StartPacket"></xref> shows the new parameters
        contained in the EAP-Initiate/Re-auth-Start packet defined in <xref
        target="RFC5296">RFC 5296</xref>.</t>

        <figure align="center" anchor="StartPacket">
          <artwork>   
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |E| Reserved    |     1 or more TVs or TLVs     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
        </figure>

        <t>Flags</t>

        <t>'E' - The E flag is used to indicate early-authentication. This
        field MUST be set to '1' if early authentication is in use and MUST be
        set to '0' otherwise.</t>

        <t>The rest of the 7 bits (Reserved ) MUST be set to 0 and ignored on
        reception.</t>

        <t>TVs and TLVs</t>

        <t>CAP-Identifier: Carried in a TLV payload. The format is identical
        to that of a DiameterIdentity <xref target="RFC3588"></xref>. It is
        used by the SAP to advertise the identity of the CAP to the peer.
        Exactly one CAP-Identifier TLV MAY be included in the
        EAP-Initiate/Re-auth-Start packet if the SAP has performed CAP
        discovery.</t>

        <t>If the EAP-Initiate/Re-auth-Start packet is not supported by the
        peer, it SHOULD be discarded silently.</t>
      </section>

      <section anchor="EIRaPE"
               title="EAP-Initiate/Re-auth Packet and TLV Extension">
        <t><xref target="ReauthPacket"></xref> illustrates the new
        parameters contained in the EAP-Initiate/Re-auth packet defined in
        <xref target="RFC5296">RFC 5296</xref>.</t>

        <figure align="center" anchor="ReauthPacket">
          <artwork>   
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |R|x|L|E|Resved |             SEQ               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 1 or more TVs or TLVs                         ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cryptosuite  |         Authentication Tag                     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
        </figure>

        <t>Flags</t>

        <t>'x' - The x flag is reserved. It MUST be ignored on receipt.</t>
        
        <t>'L' - As defined in section 5.3.2 of <xref target="RFC5296"></xref>, this
        bit is used to request the key lifetimes from the server.</t>

        <t>'E' - The E flag is used to indicate early-authentication.</t>

        <t>The first bit(R) and final 4 bits (Resved) MUST be set to 0 and ignored on
        reception.</t>

        <t>SEQ</t>

        <t>As defined in Section 5.3.2 of <xref target="RFC5296"></xref>,this
        field is 16-bit sequence number and used for replay protection.</t>

        <t>TVs and TLVs</t>

        <t>keyName-NAI: As defined in <xref target="RFC5296">RFC 5296</xref>,
        this is carried in a TLV payload. The Type is 1. The NAI is variable
        in length, not exceeding 253 octets. The username part of the NAI is
        the EMSKname used to identify the peer. The realm part of the NAI is
        the peer's home domain name if the peer communicates with the home EA
        server or the domain to which the peer is currently attached (i.e.,
        local domain name) if the peer communicates with a local EA server.
        The SAP knows whether the KeyName-NAI carries the local domain name by
        comparing the domain name carried in KeyName-NAI with the local domain
        name which is associated with the SAP.
        Exactly one keyName-NAI attribute SHALL be present in an
        EAP-Initiate/Re-auth packet and the realm part of it SHOULD follow
        the use of internationalized domain names defined in RFC5890 <xref
        target="RFC5890"></xref>.</t>

        <t>CAP-Identifier: Carried in a TLV payload.The Type is TBD (less than
        128). This field is used to indicate the FQDN of a CAP. The value
        field MUST be encoded as specified in Section 8 of RFC 3315 <xref
        target="RFC3315"></xref>. Exactly one instance of the
        CAP-Identifier TLV MUST be present in the ERP/AAK-Key TLV.</t>

        <t>Sequence number: The Type is TBD (less than 128). The value field
        is a 16-bit field and used in the derivation of the pMSK for a CAP.</t>

        <t>Cryptosuite</t>

        <t>This field indicates the integrity algorithm used for ERP/AAK. Key
        lengths and output lengths are either indicated or obvious from the
        cryptosuite name, e.g., HMAC-SHA256-128 denotes HMAC computed using
        the SHA-256 function <xref target="RFC4868"></xref>  with 256-bit
        key length and the output truncated to 128 bits <xref
        target="RFC2104"></xref>. We specify some cryptosuites below: <list
            style="hanging">
            <t hangText="0-1">RESERVED</t>

            <t hangText="2">HMAC-SHA256-128</t>

            <t hangText="3">HMAC-SHA256-256</t>
          </list></t>

        <t>HMAC-SHA256-128 is REQUIRED to implement and SHOULD be enabled in
        the default configuration.</t>

        <t>Authentication Tag</t>

        <t>This field contains an integrity checksum over the ERP/AAK packet
        from the first bit of the Code field to the last bit of the Cryptosuite field,
        excluding the
        Authentication Tag field itself. The value field is calculated using
        the integrity algorithm indicated in the Cryptosuite field and rIK
        specified in <xref target="RFC5296"></xref> as the secret key. The
        length of the field is indicated by the Cryptosuite.</t>

        <t>The peer uses the Authentication Tag to determine the validity of the
        EAP-Finish/Re-auth message from the server.</t>

        <t>If the message doesn't pass verification or the Authentication Tag is
        not included in the message, the message SHOULD be discarded
        silently.</t>

        <t>If the EAP-Initiate/Re-auth packet is not supported by the SAP, it
        SHOULD be discarded silently. The peer MUST maintain retransmission
        timers for reliable transport of the EAP-Initiate/Re-auth message. If
        there is no response to the EAP-Initiate/Re-auth message from the
        server after the necessary number of retransmissions (see <xref
        target="LLC"></xref>), the peer MUST assume that ERP/AAK is not
        supported by the SAP.</t>
      </section>

      <section anchor="EFRaPTE" title="EAP-Finish/Re-auth packet and TLV extension">
        <t><xref target="FinishPacket"></xref> shows the new parameters
        contained in the EAP-Finish/Re-auth packet defined in <xref
        target="RFC5296"></xref>. <figure align="center" anchor="FinishPacket">
            <artwork>   
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Code      |  Identifier   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |R|x|L|E|Resved |             SEQ               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 1 or more TVs or TLVs                         ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cryptosuite  |         Authentication Tag                     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
          </figure></t>

        <t>Flags</t>
        
        <t>'R' - As defined in Section 5.3.3 of <xref target="RFC5296"></xref>, this
        bit is used to used as the Result flag. This field MUST be set
        to '1' if indicates success and MUST be set to '0' otherwise.</t>

        <t>'x' - The x flag is reserved. It MUST be ignored on receipt.</t>
        
        <t>'L' - As defined in section 5.3.3 of <xref target="RFC5296"></xref>, this
        bit is used to request the key lifetimes from the server.</t>

        <t>'E' - The E flag is used to indicate early-authentication.</t>

        <t>The final 4 bits (Resved) MUST be set to 0 and ignored on
        reception.</t>

        <t>SEQ</t>

        <t>As defined in Section 5.3.3 of <xref target="RFC5296"></xref>, this
        field is a 16-bit sequence number and used for replay protection.</t>

        <t>TVs and TLVs</t>

        <t>keyName-NAI: As defined in <xref target="RFC5296">RFC 5296</xref>,
        this is carried in a TLV payload. The Type is 1. The NAI is variable
        in length, not exceeding 253 octets. Exactly one keyName-NAI attribute
        SHALL be present in an EAP-Finish/Re-auth packet.</t>

        <t>ERP/AAK-Key: Carried in a TLV payload for the key container. The
        type is TBD. Exactly one ERP/AAK-key SHALL only be present in an
        EAP-Finish/Re-auth packet. <figure>
            <artwork>
ERP/AAK-Key ::= 
     { sub-TLV: CAP-Identifier }
     { sub-TLV: pMSK-lifetime }
     { sub-TLV: pRK-lifetime }
     { sub-TLV: Cryptosuites }
</artwork>
          </figure> <list style="hanging">
            <t hangText="CAP-Identifier"><vspace blankLines="0" />Carried in a
            sub-TLV payload. The Type is TBD (less than 128). This field is
            used to indicate the identifier of the candidate authenticator.
            The value field MUST be encoded as specified in Section 8 of RFC
            3315 <xref target="RFC3315"></xref>. There at least one instance
            of the CAP-Identifier TLV MUST be present in the ERP/AAK-Key
            TLV.</t>

            <t hangText="pMSK-lifetime"><vspace blankLines="0" />Carried in a
            sub-TLV payload of the EAP-Finish/Re-auth message. The Type is TBD.
            The value field is an unsigned 32-bit field and contains the
            lifetime of the pMSK in seconds. This value is calculated by the
            server after pRK-lifetime computation upon receiving the
            EAP-Initiate/Re-auth message. The rIK SHOULD share the same
            lifetime as the pMSK.
            If the 'L' flag is set, the pMSK-Lifetime
            attribute MUST be present.</t>

            <t hangText="pRK-lifetime"><vspace blankLines="0" />Carried in a
            sub-TLV payload of EAP-Finish/Re-auth message. The Type is TBD.
            The value field is an unsigned 32-bit field and contains the
            lifetime of the pRK in seconds. This value is calculated by the
            server before pMSK-lifetime computation upon receiving a
            EAP-Initiate/Re-auth message. If the 'L' flag is set, the
            pRK-Lifetime attribute MUST be present.</t>

            <t hangText="List of Cryptosuites"><vspace blankLines="0" />
            Carried in a sub-TLV payload. The Type is 5 <xref
            target="RFC5296"></xref>. The value field contains a list of
            cryptosuites (at least one cryptosuite SHOULD be included), each 1
            octet in length. The allowed cryptosuite values are as specified
            in <xref target="EIRaPE"></xref>, above. The server SHOULD include
            this attribute if the cryptosuite used in the EAP-Initiate/Re-auth
            message was not acceptable and the message is being rejected. The
            server MAY include this attribute in other cases. The server MAY
            use this attribute to signal to the peer about its cryptographic
            algorithm capabilities.</t>
          </list></t>

        <t>Cryptosuite</t>

        <t>This field indicates the integrity algorithm and PRF used for ERP/
        AAK. HMAC-SHA256-128 is REQUIRED to implement and SHOULD be enabled
        in the default configuration. Key lengths and output lengths are
        either indicated or obvious from the cryptosuite name.</t>

        <t>Authentication Tag</t>

        <t>This field contains the integrity checksum over the ERP/AAK packet
        from the first bit of the Code field to the last bit of the Cryptosuite field
        excluding the
        Authentication Tag field itself. The value field is calculated using
        the integrity algorithm indicated in the Cryptosuite field and the rIK
        <xref target="RFC5296"></xref> as the integrity key. The length of the
        field is indicated by the corresponding Cryptosuite.</t>

        <t>The peer uses the authentication tag to determine the validity of the
        EAP-Finish/Re-auth message from a server.</t>

        <t>If the message doesn't pass verification or the authentication tag is
        not included in the message, the message SHOULD be discarded
        silently.</t>

        <t>If the EAP-Initiate/Re-auth packet is not supported by the SAP, it
        is discarded silently. The peer MUST maintain retransmission timers
        for reliable transport of EAP-Initiate/Re-auth message. If there is no
        response to the EAP-Initiate/Re-auth message from the server after the
        necessary number of retransmissions (See <xref target="LLC"></xref>), the peer
        MUST assume that ERP/AAK is not supported by the SAP.</t>
      </section>

      <section title="TV and TLV Attributes">
        <t>With the exception of the rRK-Lifetime and rMSK-Lifetime TV
        payloads, the attributes specified in <xref target="RFC5296">Section
        5.3.4 of </xref> also apply to this document. In this document, new
        attributes which may be present in the EAP-Initiate and EAP-Finish
        messages are defined as below: <list style="symbols">
            <t>Sequence number: This is a TV payload. The type is 7.</t>

            <t>ERP/AAK-Key: This is a TLV payload. The type is 8.</t>

            <t>pRK-Lifetime: This is a TV payload. The type is 9.</t>

            <t>pMSK-Lifetime: This is a TV payload. The type is 10.</t>
            
            <t>CAP-Identifier: This is a TLV payload. The type is 11.</t>
          </list></t>
      </section>
    </section>

    <section anchor="LLC" title="Lower Layer Considerations">
      <t>Similar to ERP, some lower layer specifications may need to be
      revised to support ERP/AAK; refer to <xref target="RFC5296">Section
      6 of</xref> for additional guidance.</t>
    </section>

    <section anchor="AAA" title="AAA Transport Considerations">
      <t>The AAA transport of ERP/AAK messages is the same as that of the
      ERP message <xref target="RFC5296"></xref>. In addition, this document
      requires AAA transport of the ERP/AAK keying materials delivered by the
      ERP/AAK server to the CAP. Hence, a new AAA message for the ERP/AAK
      application should be specified to transport the keying materials.</t>
    </section>

    <section title="Security Considerations">
      <t>This section provides an analysis of the protocol in accordance with
      the AAA key management requirements specified in RFC 4962 <xref
      target="RFC4962"></xref>.</t>

      <t><list style="symbols">
          <t>Cryptographic algorithm independence: ERP-AAK satisfies this
          requirement. The algorithm chosen by the peer for calculating the
          authentication tag is indicated in the EAP-Initiate/Re-auth message.
          If the chosen algorithm is unacceptable, the EAP server returns an
          EAP-Finish/Re-auth message with a Failure indication.</t>

          <t>Strong, fresh session keys: ERP-AAK results in the derivation of
          strong, fresh keys that are unique for the given CAP. An pMSK is
          always derived on-demand when the peer requires a key with a new
          CAP. The derivation ensures that the compromise of one pMSK does not
          result in the compromise of a different pMSK at any time.</t>

          <t>Limit key scope: The scope of all the keys derived by ERP-AAK is
          well defined. The pRK is used to derive the pMSK for the CAP.
          Different sequence numbers for each CAP MUST be used to derive a
          unique pMSK.</t>

          <t>Replay detection mechanism: For replay protection
          a sequence number associated with the pMSK is used.The
          peer increments the sequence number by one after it sends an ERP/AAK
          message. The server sets the expected sequence number to the
          received sequence number plus one after verifying the validity of
          the received message and responds to the message.</t>

          <t>Authenticate all parties: The EAP Re-auth Protocol provides
          mutual authentication of the peer and the server. The peer and SAP
          are authenticated via ERP. The CAP is authenticated and trusted by
          the SAP.</t>

          <t>Peer and authenticator authorization: The peer and authenticator
          demonstrate possession of the same keying material without disclosing
          it, as part of the lower layer secure authentication protocol.</t>

          <t>Keying material confidentiality: The peer and the server derive
          the keys independently using parameters known to each entity.</t>

          <t>Uniquely named keys: All keys produced within the ERP context can
          be referred to uniquely as specified in this document.</t>

          <t>Prevent the domino effect: Different sequence numbers for each
          CAP MUST be used to derive the unique pMSK. So the compromise of one
          pMSK does not hurt any other CAP.</t>

          <t>Bind key to its context: the pMSK are bound to the context in
          which the sequence numbers are transmitted.</t>

          <t>Confidentiality of identity: this is the same as with the ERP
          protocol <xref target="RFC5296"></xref>.</t>

          <t>Authorization restriction: All the keys derived are limited in
          lifetime by that of the parent key or by server policy. Any
          domain-specific keys are further restricted to be used only in the
          domain for which the keys are derived. Any other restrictions of
          session keys may be imposed by the specific lower layer and are out
          of scope for this specification.</t>
        </list></t>
    </section>

    <section title="IANA Considerations">
      <t>IANA is requested to assign four TLV type values from the registry of
      EAP Initiate and Finish Attributes maintained at
      http://www.iana.org/assignments/eap-numbers/eap-numbers.xml. <vspace
      blankLines="0" />with the following numbers: <list
          style="symbols">
          <t>Sequence number: This is a TV payload. The type is 7.</t>

          <t>ERP/AAK-Key: This is a TLV payload. The type is 8.</t>

          <t>pRK Lifetime: This is a TLV payload. The type is 9.</t>

          <t>pMSK Lifetime: This is a TLV payload. The type is 10.</t>
          
          <t>CAP-Identifier: This is a TLV payload. The type is 11.</t>
        </list></t>

      <t>This document reuses the crytosuites have already created for
      'Re-authentication Cryptosuites' in <xref target="RFC5296"></xref>.</t>

      <t>Further, this document instructs IANA to add a new label in the User
      Specific Root Keys (USRK) Key Labels of the Extended Master Session Key
      (EMSK) Parameters registry, as follows: <list>
          <t>EAP Early-Authentication Root Key@ietf.org</t>
        </list></t>
        
     <t>This document creates a new registry for the flags in the
     EAP Initiate/Re-auth-Start message called the 
     "EAP Initiate/Re-auth-Start Flags" and assigns a 
     new flag (E) as follows: <list>
          <t>(E) 0x80 </t>
        </list></t>

     <t>The rest of the values in the 8-bit field are reserved.  New values
     can be assigned by Standards Action or IESG approval.</t>

     <t>This document also creates a new registry for the flags in the EAP
     Initiate/Re-auth message called the "EAP Initiate/Re-auth Flags".
     The following flag are reserved: <list>
          <t>(B) 0x40 [RFC5296] </t>
          <t>(L) 0x20 [RFC5296] </t>
        </list></t>

     <t>This document assigns a new flag (E) as follows: <list>
          <t>(E) 0x10 </t>
        </list></t>

     <t>The rest of the values in the 8-bit field are reserved.  New values
     can be assigned by Standards Action or IESG approval.</t>

     <t>Further,this document creates a new registry for the flags in the
     EAP Finish/Re-auth message called the "EAP Finish/Re-auth
     Flags".  The following values are reserved. <list>
         <t>(R) 0x80 [RF5296] </t>
         <t>(B) 0x40 [RFC5296] </t>
         <t>(L) 0x20  [RFC5296] </t>
       </list></t>

     <t> This document assigns a new flag (E) as follows: <list>
         <t> (E) 0x10 </t>
       </list></t>

    <t> The rest of the values in the 8-bit field are reserved.  New values
    can be assigned by Standards Action or IESG approval. </t>

    </section>

    <section title="Acknowledgement">
      <t>In writing this document, Yungui Wang contributed to early versions
      of this document and we have received reviews from many experts in the
      IETF, including Tom Taylor, Tena Zou, Tim Polk, Tan Zhang, Semyon
      Mizikovsky, Stephen Farrell, Radia Perlman, Miguel A. Garcia and Sujing Zhou. We apologize if we miss some of
      those who have helped us.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &rfc2119;

      &rfc5296;
      

      <reference anchor="RFC3315">
        <front>
          <title>Dynamic Host Configuration Protocol for IPv6 (DHCPv6)</title>

          <author fullname="R.Droms" initials="R." role="editor"
                  surname="Droms">
            <organization></organization>
          </author>

          <author fullname="J.Bound" initials="J." surname="Bound">
            <organization></organization>
          </author>

          <author fullname="B.Volz" initials="B." surname="Volz">
            <organization></organization>
          </author>

          <author fullname="T.Lemon" initials="T." surname="Lemon">
            <organization></organization>
          </author>

          <author fullname="C.Perkins" initials="C." surname="Perkins">
            <organization></organization>
          </author>

          <author fullname="M. Carney" initials="M." surname="Carney">
            <organization></organization>
          </author>

          <date month="July" year="2003" />
        </front>

        <seriesInfo name="RFC" value="3315" />

        <format target="http://www.rfc-editor.org/rfc/rfc3315.txt" type="TXT" />
      </reference>

      <reference anchor="RFC5295">
        <front>
          <title>Specification for the Derivation of Root Keys from an
          Extended Master Session Key (EMSK)</title>

          <author fullname="J. Salowey" initials="J." surname="Salowey">
            <organization></organization>
          </author>

          <author fullname="L. Dondeti" initials="L." surname="Dondeti">
            <organization></organization>
          </author>

          <author fullname="V. Narayanan" initials="V." surname="Narayanan">
            <organization></organization>
          </author>

          <author fullname="M. Nakhjiri" initials="M." surname="Nakhjiri">
            <organization></organization>
          </author>

          <date month="August" year="2008" />

          <abstract>
            <t>The Extensible Authentication Protocol (EAP) defined the
            Extended Master Session Key (EMSK) generation, but reserved it for
            unspecified future uses. This memo reserves the EMSK for the sole
            purpose of deriving root keys. Root keys are master keys that can
            be used for multiple purposes, identified by usage definitions.
            This document also specifies a mechanism for avoiding conflicts
            between root keys by deriving them in a manner that guarantees
            cryptographic separation. Finally, this document also defines one
            such root key usage: Domain-Specific Root Keys are root keys made
            available to and used within specific key management domains.
            [STANDARDS-TRACK]</t>
          </abstract>
        </front>
      </reference>
    </references>

    <references title="Informative References">
      &rfc5836;

      <reference anchor="RFC2104">
        <front>
          <title>HMAC: Keyed-Hashing for Message Authentication</title>

          <author fullname="H.Krawczyk" initials="H." surname="Krawczyk">
            <organization></organization>
          </author>

          <author fullname="M.Bellare" initials="M." surname="Bellare">
            <organization></organization>
          </author>

          <author fullname="R.Canetti" initials="R." surname="Canetti">
            <organization></organization>
          </author>

          <date month="February" year="1997" />
        </front>

        <seriesInfo name="RFC" value="2104" />

        <format target="http://www.rfc-editor.org/rfc/rfc2104.txt" type="TXT" />
      </reference>

      <reference anchor="RFC4868">
        <front>
          <title>Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with
          IPsec</title>

          <author fullname="S.Kelly" initials="S." surname="Kelly">
            <organization></organization>
          </author>

          <author fullname="S.Frankel" initials="S." surname="Frankel">
            <organization></organization>
          </author>

          <date month="May" year="2007" />
        </front>

        <seriesInfo name="RFC" value="4868" />

        <format target="http://www.rfc-editor.org/rfc/rfc4868.txt" type="TXT" />
      </reference>

      <reference anchor="RFC5890">
        <front>
          <title>Internationalized Domain Names for Applications (IDNA):
          Definitions and Document Framework</title>

          <author fullname="J.Klensin" initials="J." surname="Klensin">
            <organization></organization>
          </author>

          <date month="August" year="2010" />
        </front>

        <seriesInfo name="RFC" value="5890" />

        <format target="http://www.rfc-editor.org/rfc/rfc5890.txt" type="TXT" />
      </reference>

      &I-D.ietf-dime-local-keytran;

      &rfc3588;

      &rfc3748;

      &rfc4962;
    </references>
  </back>
</rfc>
