Extensible Authentication Protocol (EAP) Session-Id Derivation for EAP Subscriber Identity Module (EAP-SIM), EAP Authentication and Key Agreement (EAP-AKA), and Protected EAP (PEAP)
RFC 8940
Alan DeKok
The FreeRADIUS Server Project
aland@freeradius.org
October 2020
EAP
PEAP
EAP-AKA
EAP-SIM
ERP
FILS
Session-ID
fast reconnect
TLS
RFC 5247 is updated to define and clarify EAP Session-Id derivation for multiple Extensible Authentication Protocol (EAP) methods. The derivation of Session-Id was not given for EAP Subscriber Identity Module (EAP-SIM) or EAP Authentication and Key Agreement (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 derivation of Session-Id for Protected EAP (PEAP) is also given. The definition for PEAP follows the definition for other TLS-based EAP methods.
Introduction
EAP [RFC3748] Session-Id derivation has not been defined for EAP-SIM and EAP-AKA when using the fast reconnect exchange instead of full authentication. [RFC5247] 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 [I-D.ietf-emu-rfc5448bis] now defines it, along with other updates. As such, the definition for EAP-AKA' is not included here.
Further, the derivation of Session-Id for full authentication is clarified, as the text in [RFC5247] is ambiguous.
The IEEE has defined Fast Initial Link Setup (FILS) authentication [FILS], which needs the EAP Session-Id in order for the EAP Re-authentication Protocol (ERP) [RFC6696] to work. It is therefore important to address the existing deficiencies in the definition of EAP Session-Id.
Finally, [RFC5247] did not define Session-Id for PEAP [MS-PEAP] [I-D.josefsson-pppext-eap-tls-eap]. We correct these deficiencies here by updating [RFC5247] with the Session-Id derivation during fast-reconnect exchange for EAP-SIM and EAP-AKA; clarifying 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.
Updates to RFC 5247, Appendix A
This section updates [RFC5247], Appendix A to define Session-Id for fast reconnect exchange for EAP-AKA and EAP-SIM.
EAP-AKA
For EAP-AKA, [RFC5247], Appendix A says:
EAP-AKA
EAP-AKA is defined in [RFC4187]. 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:

   Session-Id = 0x17 || RAND || AUTN

It should say:
EAP-AKA
EAP-AKA is defined in [RFC4187]. 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:

   Session-Id = 0x17 || RAND || AUTN

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:

   Session-Id = 0x17 || NONCE_S || MAC

EAP-SIM
Similarly for EAP-SIM, [RFC5247], Appendix A says:
EAP-SIM
EAP-SIM is defined in [RFC4186]. 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:

   Session-Id = 0x12 || RAND || NONCE_MT

It should say:
EAP-SIM
EAP-SIM is defined in [RFC4186]. 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 the EAP server should obtain "n" GSM triplets where "n=2" or "n=3".
For "n=2", the Session-Id is therefore defined as

   Session-Id = 0x12 || RAND1 || RAND2 || NONCE_MT

which is 49 octets in length.
For "n=3", the Session-Id is therefore defined as

   Session-Id = 0x12 || RAND1 || RAND2 || RAND3 || NONCE_MT

which is 65 octets in length.
RAND1, RAND2, and RAND3 correspond to the RAND value from the first, second, and third GSM triplet, respectively.
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:

   Session-Id = 0x12 || NONCE_S || MAC

which is 33 octets in length.
Rationale for EAP-AKA and EAP-SIM Updates
Appendix A of [RFC5247] was supposed to define exported parameters for existing EAP methods. 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 [RFC4187], Section 5.2 and similar text in [RFC4186], 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.
This derivation is done via a random value created by the server, along with a secret key and the peer's identity. We believe that this derivation is secure, though no formal analysis has been done.
Session-Id for PEAP
[RFC5247] did not define Session-Id for Microsoft's Protected EAP (PEAP). For consistency with the EAP-TLS definition given in [RFC5216], Section 2.3, we define it as:

   Session-Id = 0x19 || client.random || server.random

This definition is that same for both full authentication and for fast reconnect.
This definition is already in widespread use in all known PEAP implementations.
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 [I-D.ietf-emu-tls-eap-types].
Security Considerations
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.
The Session-Id definitions given here are unique per session, unforgeable, and unguessable by an outside party, as per the requirements of [RFC5247], Section 10.
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.
These updates do not modify the security considerations outlined in [RFC5247].
IANA Considerations
This document has no IANA actions.
References
Normative References
[FILS]

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
IEEE
December 2016
DOI 10.1109/IEEESTD.2016.7792308
IEEE Std 802.11ai-2016
Informative References
[MS-PEAP]

[MS-PEAP]: Protected Extensible Authentication Protocol (PEAP)
Microsoft
[Err5011]

Erratum ID 5011
RFC Errata
RFC 5247
[RFC3748]
[RFC5247]
[I-D.ietf-emu-rfc5448bis]
[RFC6696]
[I-D.josefsson-pppext-eap-tls-eap]
[RFC4187]
[RFC4186]
[RFC5216]
[I-D.ietf-emu-tls-eap-types]
Acknowledgments
The issue corrected in this specification was first reported by Jouni Malinen in a technical erratum for RFC 5247 [Err5011].
The text in this document follows Jouni's suggestions.