<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-emu-eap-session-id-07.txt" category="std" updates="5247" ipr="trust200902" obsoletes="" xml:lang="en" symRefs="true" sortRefs="true" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.0.0 -->
  <!-- Generated by id2xml 1.5.0 on 2020-09-08T23:13:04Z -->
	<front>
    <title abbrev="EAP Session-Id Derivation">EAP Session-Id Derivation for EAP-SIM, EAP-AKA, and PEAP</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-emu-eap-session-id-07.txt"/>
    <author initials="A." surname="DeKok" fullname="Alan DeKok">
      <organization abbrev="FreeRADIUS">The FreeRADIUS Server Project</organization>
      <address>
        <email>aland@freeradius.org</email>
      </address>
    </author>
    <date year="2020" month="September"/>
    <abstract>
      <t>
   RFC 5247 is updated to define and clarity EAP Session-Id derivation
   for multiple EAP methods.  The derivation of Session-Id was not given
   for EAP-SIM or EAP-AKA when using the fast reconnect exchange instead
   of full authentication.  The derivation of Session-Id for full
   authentication is clarified for both EAP-SIM and EAP-AKA.  The
   deriviation of Session-Id for PEAP is also given.  The definition for
   PEAP follows the definition for other TLS-based EAP methods.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   EAP <xref target="RFC3748" format="default"/> Session-Id derivation has not been defined for
   EAP-SIM and EAP-AKA when using the fast reconnect exchange instead of full
   authentication.  <xref target="RFC5247" format="default"/> defines the Session-Id for these
   EAP methods, but that derivation is only applicable for the full
   authentication case.  The Session-Id derivation was not defined for
   EAP-AKA', but <xref target="I-D.ietf-emu-rfc5448bis" format="default"/> now defines it,
   along with other updates.  As such, the definition for EAP-AKA' is not
   included here.</t>
      <t>
   Further, the deriviation of Session-Id for full authentication is
   clarified, as the text in <xref target="RFC5247" format="default"/> is ambiguousl</t>
      <t>
   The IEEE has defined Fast Initial Link Setup (FILS) authentication <xref target="FILS" format="default"/>, which needs the EAP Session-Id in order for the EAP
   Re-authentication Protocol (ERP) <xref target="RFC6696" format="default"/> to work.  It is
   therefore important to address the existing deficiencies in the definition
   of EAP Session-Id.</t>
      <t>
   Finally, <xref target="RFC5247" format="default"/> did not define Session-Id for PEAP <xref target="MS-PEAP" format="default"/>, <xref target="I-D.josefsson-pppext-eap-tls-eap" format="default"/>. We
   correct these deficiencies here by updating <xref target="RFC5247" format="default"/> with
   the Session-Id derivation during fast-reconnect exchange for EAP-SIM and
   EAP-AKA; clarfying the Session-Id derivation during full authentication for
   EAP-SIM and EAP-AKA; and defining the Session-Id derivation for PEAP which
   is the same for both full authentication and fast reconnect.</t>
      <section anchor="sect-1.1" numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP 14
   <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only when, they
   appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Updates to RFC 5247 Appendix A</name>
      <t>
   This section updates <xref target="RFC5247" format="default"/> Appendix A to define Session-Id for
   fast reconnect exchange for EAP-AKA and EAP-SIM.</t>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>EAP-AKA</name>
        <t>
   For EAP-AKA, <xref target="RFC5247" format="default"/> Appendix A says:</t>
        <t>EAP-AKA

        </t>
        <ul empty="true" spacing="normal">
          <li> EAP-AKA is defined in <xref target="RFC4187" format="default"/>.  The EAP-AKA
	Session-Id is the concatenation of the EAP Type Code (0x17) with the
	contents of the RAND field from the AT_RAND attribute, followed by the
	contents of the AUTN field in the AT_AUTN attribute:</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x17 || RAND || AUTN
]]></artwork>
        <t>It should say:</t>
        <t>EAP-AKA

        </t>
        <ul empty="true" spacing="normal">
          <li>EAP-AKA is defined in <xref target="RFC4187" format="default"/>.  When using full
      authentication, the EAP-AKA Session-Id is the concatenation of the EAP
      Type Code (0x17) with the contents of the RAND field from the AT_RAND
      attribute, followed by the contents of the AUTN field in the AT_AUTN
      attribute:</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x17 || RAND || AUTN
]]></artwork>
        <ul empty="true" spacing="normal">
          <li>When using fast reconnect, the EAP-AKA Session-Id is the
      	concatenation of the EAP Type Code (0x17) with the contents of the
      	NONCE_S field from the AT_NONCE_S attribute, followed by the contents
      	of the MAC field from the AT_MAC attribute from
      	EAP-Request/AKA-Reauthentication:</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x17 || NONCE_S || MAC
]]></artwork>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="default">
        <name>EAP-SIM</name>
        <t>
   Similarly for EAP-SIM, <xref target="RFC5247" format="default"/> Appendix A says:</t>
        <t>EAP-SIM

        </t>
        <ul empty="true" spacing="normal">
          <li>EAP-SIM is defined in <xref target="RFC4186" format="default"/>.  The EAP-SIM
	Session-Id is the concatenation of the EAP Type Code (0x12) with the
	contents of the RAND field from the AT_RAND attribute, followed by the
	contents of the NONCE_MT field in the AT_NONCE_MT attribute:</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x12 || RAND || NONCE_MT
]]></artwork>
        <t>It should say:</t>
        <t>EAP-SIM

        </t>
        <ul empty="true" spacing="normal">
          <li>EAP-SIM is defined in <xref target="RFC4186" format="default"/>.  When using full
	  authentication, the EAP-SIM Session-Id is the concatenation of the
	  EAP Type Code (0x12) with the contents of the RAND field from the
	  AT_RAND attribute, followed by the contents of the NONCE_MT field in
	  the AT_NONCE_MT attribute.  RFC 4186 says that EAP server should
	  obtain "n" GSM triplets where "n=2" or "n=3".</li>
          <li>For "n=2", the Session-Id is therefore defined as</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x12 || RAND1 || RAND2 || NONCE_MT
]]></artwork>
        <ul empty="true" spacing="normal">
          <li>which is 49 octets in length.</li>
          <li>For "n=3", the Session-Id is therefore defined as</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x12 || RAND1 || RAND2 || RAND3 || NONCE_MT
]]></artwork>
        <ul empty="true" spacing="normal">
          <li>which is 65 octets in length.</li>
          <li>Where RAND1, RAND2 and RAND3 correspond to the RAND value from the
	first, second and third GSM triplet respectively.</li>
          <li>When using fast reconnect, the EAP-SIM Session-Id is the
	concatenation of the EAP Type Code (0x12) with the contents of the
	NONCE_S field from the AT_NONCE_S attribute, followed by the contents
	of the MAC field from the AT_MAC attribute from
	EAP-Request/SIM/Reauthentication:</li>
        </ul>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x12 || NONCE_S || MAC
]]></artwork>
        <ul empty="true" spacing="normal">
          <li>which is 33 octets in length.</li>
        </ul>
      </section>
      <section anchor="sect-2.3" numbered="true" toc="default">
        <name>Rationale for EAP-AKA and EAP-SIM updates</name>
        <t>
   <xref target="RFC5247" format="default"/> was supposed to define exported parameters for
   existing EAP methods in Appendix A. The way Session-Id was defined for
   EAP-AKA and EAP-SIM works only for the full authentication case, i.e., it
   cannot be used when the optional fast reconnect case is used since the used
   parameters (RAND, AUTN, NONCE_MT) are not used in the fast reconnect
   case. Based on <xref target="RFC4187" format="default"/> Section 5.2, and similar text in
   <xref target="RFC4186" format="default"/> Section 5.2, NONCE_S corresponds to RAND and MAC
   in EAP-Request/AKA-Reauthentication and EAP-Request/SIM/Reauthentication
   corresponds to AUTN. That would seem to imply that the Session-Id could be
   defined using NONCE_S and MAC instead of RAND and AUTN/NONCE_MT.</t>
        <t>
   This deriviation is done via a random value created by the server,
   along with a secret key and the peer's identity.  We believe that
   this deriviation is secure, though no formal analysis has been done.</t>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Session-Id for PEAP</name>
      <t>
   <xref target="RFC5247" format="default"/> did not define Session-Id for Microsoft's
   Protected EAP (PEAP).  For consistency with the EAP-TLS definition given in
   <xref target="RFC5216" format="default"/> <xref target="sect-2.3" format="default"/>, we define it as:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
   Session-Id = 0x19 || client.random || server.random
]]></artwork>
      <t>
   This definition is that same for both full authentication, and for
   fast reconnect.</t>
      <t>
   This definition is already in wide-spread use in all known PEAP
   implementations.</t>
      <t>
   Note that this definition for Session-Id only applies when TLS 1.2 or
   earlier is used.  A different derivation is defined for TLS 1.3 in
   <xref target="I-D.dekok-emu-tls-eap-types" format="default"/>.</t>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   This specification defines EAP Session-Ids for ERP with EAP-SIM and
   EAP-AKA.  It therefore enables ERP key hierarchy establishment using
   fast reconnect with EAP-SIM and EAP-AKA.</t>
      <t>
   The Session-Id definitions given here are unique per session and
   unforgeable and unguessable by an outside party, as per the
   requirements of <xref target="RFC5247" format="default"/> Section 10.</t>
      <t>    
   The definitions used here have been widely deployed for years, in
   all major EAP implementations.  However, we acknowledge that very
   little security analysis has been done for these definitions.  As a
   result, any security issues would result in serious issues for the
   Internet as a whole.	</t>
      <t>
   These updates do not modify the Security Considerations outlined in
   RFC5247.</t>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   There are no actions for IANA.  RFC EDITOR: This section may be
   removed before publication.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3748.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5216.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5247.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <reference anchor="FILS">
          <front>
            <title>IEEE Standard for Information technology--Telecommunications and information exchange between systems Local and metropolitan area networks--Specific requirements - Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications - Amendment 1: Fast Initial Link Setup</title>
            <author>
	</author>
            <date year="2016"/>
          </front>
          <seriesInfo name="IEEE" value="Std 802.11ai-2016"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4186.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4187.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6696.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-emu-rfc5448bis-07.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-dekok-emu-tls-eap-types-02.xml"/>
        <reference anchor="MS-PEAP" target="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-peap/5308642b-90c9-4cc4-beec-fb367325c0f9">
          <front>
            <title>[MS-PEAP]: Protected Extensible Authentication Protocol (PEAP)</title>
            <author>
              <organization>Microsoft</organization>
            </author>
            <date/>
          </front>
        </reference>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-josefsson-pppext-eap-tls-eap-10.xml"/>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <artwork name="" type="" align="left" alt=""><![CDATA[
The issue corrected in this specification was first reported by Jouni
Malinen in a technical errata at
https://www.rfc-editor.org/errata_search.php?rfc=5247

The text in this document follows Jouni's suggestions.
]]></artwork>
    </section>
  </back>
</rfc>
