RFC 9048
Improved Extensible Authentication Protocol Method for 3GPP Mobile Network Authentication and Key Agreement (EAP-AKA')
1. Introduction โจ
okay bestie, so this is part 1 of the RFC 9048 glow-up ๐ and we are starting with the title block, which is basically the RFC's little ID card ๐
- Who wrote it: J. Arkko, V. Lehtovirta, V. Torvinen, and P. Eronen. Three of them are from Ericsson ๐ฆ and Eronen is listed as Independent ๐
- Category: Informational ๐ This means it is not an Internet Standards Track spec, it's just published for info ๐ซถ
- Date: October 2021 ๐
- Status: ISSN 2070-1721, and it came out of the IETF with the blessing of the IESG ๐
- What it updates: RFC 4187 and RFC 5448 ๐ธ
Now the big picture: EAP-AKA' is the most recent spec for this method, and it covers both 4G and 5G deployments โจ Before this, the earlier version only covered 4G ๐ This doc doesn't obsolete RFC 5448, but it's the newest and fully backwards-compatible version, so it's the one to read ๐
Quick context so you're not lost: 3GPP AKA is the authentication mechanism mobile devices use to get onto mobile networks ๐ฑ RFC 4187 (EAP-AKA) made that work inside the Extensible Authentication Protocol (EAP) framework ๐ง
The main glow-up for EAP-AKA' is the key derivation function, which binds the derived keys to the name of the access network ๐ฅ That limits the damage if an access network node or key gets compromised, which is so smart ๐ญ It also swaps SHA-1 / HMAC-SHA-1 (from EAP-AKA) for SHA-256 / HMAC-SHA-256 ๐
1. Introduction ๐ฆ
Okay so the 3GPP AKA thing is the auth mechanism for devices that want into mobile networks ๐ฑ RFC 4187 (EAP-AKA) made it work within EAP [RFC3748] ๐
EAP-AKA' is the improved version. RFC 5448 [RFC5448] defined it, and it updated EAP-AKA [RFC4187] โจ
This document is the newest spec for EAP-AKA', and it includes details and references for running it in 5G networks ๐ It does not obsolete RFC 5448, but it is the most recent and fully backwards-compatible spec ๐
EAP-AKA' is commonly built into phones and network gear ๐ฑ๐ง It works for network access over Wireless LAN, and with 5G it can also go straight to mobile networks ๐ธ
Here's the main difference from EAP-AKA: it uses a different key derivation function, and that function binds the derived keys to the access network's name ๐ This limits the effects of compromised access network nodes and keys ๐ It also updates the hash function algorithm ๐ฅ
EAP-AKA' uses the derived keys CK' and IK' from the 3GPP specification [TS-3GPP.33.402] and changes the hash function to SHA-256 [FIPS.180-4], with HMAC going to HMAC-SHA-256 ๐ Otherwise it's the same as EAP-AKA ๐ซถ Since EAP-AKA' has a different EAP method Type value, peers can negotiate a mutually supported method using the standard EAP mechanisms [RFC3748] โจ
Note that any change of the key derivation must be unambiguous to both sides in the protocol. That is, it must not be possible to accidentally connect old equipment to new equipment and get the key derivation wrong or to attempt to use incorrect keys without getting a proper error message. See Appendix C for further information. Note also that choices in authentication protocols should be secure against bidding down attacks that attempt to force the participants to use the least secure function. See Section 4 for further information. ๐
Here's what this spec changes from RFC 5448 ๐
- Updates the reference for how the Network Name field is built, so EAP-AKA' works with 5G ๐ก RFC 5448 pointed at the Release 8 version of [TS-3GPP.24.302], and this doc points at the first 5G version, Release 16 ๐
- Specifies how EAP and EAP-AKA' use identifiers in 5G ๐ชช Extra identifiers show up in 5G, and for interop the right ones have to be the inputs to key derivation ๐ For identity privacy, when 5G's privacy-friendly identifiers are used, no trackable, permanent identifiers get passed in EAP-AKA' either ๐
- Specifies session identifiers and other exported parameters ๐งพ RFC 5448 didn't do this even though [RFC5247] asked it to ๐ญ RFC 5247 covered session IDs for EAP-AKA, but only for full authentication, not fast re-authentication ๐
- Updates the rules for generating pseudonym usernames and fast re-authentication identities so identity privacy holds up ๐ซถ
- Describes what's been learned about vulnerabilities in AKA or EAP-AKA' ๐ฅ
- Describes the privacy and pervasive monitoring considerations for EAP-AKA' ๐
- Adds summaries of the attributes ๐
Some of these updates are small. The reference update to [TS-3GPP.24.302] doesn't change the spec number, only the version ๐ธ But that reference matters a lot for calculating the keys that come out of EAP-AKA', so updating it to the newest version was warranted ๐
Note: Any further 3GPP updates that affect things like key derivation are something EAP-AKA' implementations need to account for. When that happens, both this spec and the implementations will need updating ๐ง
This spec explicitly does not add any other technical changes, new features, or other changes ๐ซ The EAP-AKA' base protocol is stable and needs to stay that way ๐ Extensions or variants have to be proposed as standalone extensions, or even as different authentication methods ๐
Roadmap time ๐บ๏ธ Section 3 defines the EAP-AKA' method. Section 4 adds support to EAP-AKA for preventing bidding down attacks from EAP-AKA'. Section 5 covers requirements for peer identities, including how 5G identifiers are used in EAP-AKA'. Section 6 specifies which parameters EAP-AKA' exports. Section 7 explains the security differences between EAP-AKA and EAP-AKA'. Section 8 is the IANA considerations. Appendix A and Appendix B explain the updates to RFC 5448 (EAP-AKA') and RFC 4187 (EAP-AKA). Appendix C covers the design rationale for EAP-AKA'. Appendix D has the test vectors ๐งโจ
2. Requirements Language ๐
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here ๐ซถ
Part 1 of 10 is done, bestie ๐ Next up is Part 2 and it's where the actual EAP-AKA' method gets into it ๐ฅ
3. EAP-AKA' โจ
okay bestie, EAP-AKA' is basically EAP-AKA with a glow-up ๐ฆ It follows the EAP-AKA spec [RFC4187] in all respects EXCEPT these five things:
- It uses the Type code
0x32, not0x17(which is used by EAP-AKA). ๐ - It carries the
AT_KDF_INPUTattribute, as defined in Section 3.1, so both the peer and server know the name of the access network. ๐ก - It supports key derivation function negotiation via the
AT_KDFattribute (Section 3.2) so it can take future extensions. ๐ฎ - It calculates keys as defined in Section 3.3, not as defined in EAP-AKA. ๐
- It employs SHA-256 / HMAC-SHA-256 [FIPS.180-4], not SHA-1 / HMAC-SHA-1 [RFC2104] (see Section 3.4). ๐ฅ
Figure 1 shows the authentication process. Each message like AKA'-Challenge and so on matches the EAP-AKA message, just with the EAP-AKA' Type code. The definitions of those messages, plus the attributes AT_RAND, AT_AUTN, AT_MAC, and AT_RES, are in [RFC4187]. ๐
Peer Server
| EAP-Request/Identity |
|<-------------------------------------------------------|
| |
| EAP-Response/Identity |
| (Includes user's Network Access Identifier, NAI) |
|------------------------------------------------------->|
| +--------------------------------------------------+
| | Server determines the network name and ensures |
| | that the given access network is authorized to |
| | use the claimed name. The server then runs the |
| | AKA' algorithms generating RAND and AUTN, and |
| | derives session keys from CK' and IK'. RAND and |
| | AUTN are sent as AT_RAND and AT_AUTN attributes, |
| | whereas the network name is transported in the |
| | AT_KDF_INPUT attribute. AT_KDF signals the used |
| | key derivation function. The session keys are |
| | used in creating the AT_MAC attribute. |
| +--------------------------------------------------+
| EAP-Request/AKA'-Challenge |
| (AT_RAND, AT_AUTN, AT_KDF, AT_KDF_INPUT, AT_MAC)|
|<-------------------------------------------------------|
+------------------------------------------------------+ |
| The peer determines what the network name should be, | |
| based on, e.g., what access technology it is using. | |
| The peer also retrieves the network name sent by | |
| the network from the AT_KDF_INPUT attribute. The | |
| two names are compared for discrepancies, and if | |
| necessary, the authentication is aborted. Otherwise,| |
| the network name from AT_KDF_INPUT attribute is | |
| used in running the AKA' algorithms, verifying AUTN | |
| from AT_AUTN and MAC from AT_MAC attributes. The | |
| peer then generates RES. The peer also derives | |
| session keys from CK'/IK'. The AT_RES and AT_MAC | |
| attributes are constructed. | |
+------------------------------------------------------+ |
| EAP-Response/AKA'-Challenge |
| (AT_RES, AT_MAC) |
|------------------------------------------------------->|
| +--------------------------------------------------+
| | Server checks the RES and MAC values received |
| | in AT_RES and AT_MAC, respectively. Success |
| | requires both to be found correct. |
| +--------------------------------------------------+
| EAP-Success |
|<-------------------------------------------------------|
Figure 1: EAP-AKA' Authentication Process
EAP-AKA' can run on the same credentials as EAP-AKA and use the same identities. ๐ซถ BUT, EAP-AKA' uses different leading characters than EAP-AKA for the conventions in Section 4.1.1 of [RFC4187] for usernames based on International Mobile Subscriber Identifier (IMSI). Super important: for 4G networks, EAP-AKA' MUST use the leading character "6" (ASCII 36 hexadecimal) instead of "0" for IMSI-based permanent usernames. For 5G networks, the leading character "6" is not used for IMSI-based permanent usernames. Identifier usage in 5G is specified in Section 5.3. ๐
Everything else about leading characters, usernames, and identities works exactly like EAP-AKA [RFC4187]. For example, pseudonym and fast re-authentication usernames need to be built so the server can recognize them. A pseudonym could begin with a leading "7" character (ASCII 37 hexadecimal), and a fast re-authentication username could begin with "8" (ASCII 38 hexadecimal). ๐ง
Heads up though: a server that only implements EAP-AKA may not recognize these leading characters. According to Section 4.1.4 of [RFC4187], that server will re-request the identity via the EAP-Request/AKA-Identity message, which makes it obvious to the peer that EAP-AKA and its identity are expected. ๐ญ
3.1. AT_KDF_INPUT โจ
Okay, here's the layout of the AT_KDF_INPUT attribute. Get ready, it's giving structure ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AT_KDF_INPUT | Length | Actual Network Name Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. Network Name .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Here's what each field means:
AT_KDF_INPUT: This is set to 23. ๐Length: The length of the attribute, calculated as defined in [RFC4187], Section 8.1. ๐Actual Network Name Length: This is a 2-byte actual length field. It's needed because the previous field has to be expressed in multiples of 4 bytes, per the usual EAP-AKA rules. This field gives the length of the network name in bytes. ๐ขNetwork Name: This field contains the network name of the access network the authentication is being done for. The name does not include any terminating null characters. Because the whole attribute must be a multiple of 4 bytes, the sender pads the name with 1, 2, or 3 bytes of all zero bits when needed. ๐ซง
Only the server sends the AT_KDF_INPUT attribute. The value is sent as specified in [TS-3GPP.24.302] for both non-3GPP access networks and for 5G access networks. Per [TS-3GPP.33.402], the server always verifies that a given access network is authorized to use a particular name before sending it to the peer over EAP-AKA'. The value of the AT_KDF_INPUT attribute from the server MUST be non-empty, with a greater than zero length in the Actual Network Name Length field. If the AT_KDF_INPUT attribute is empty, the peer behaves as if AUTN had been incorrect, and authentication fails. See Section 3 and Figure 3 of [RFC4187] for an overview of how authentication failures are handled. ๐จ
Empty AT_KDF_INPUT = authentication fails. No exceptions, bestie. ๐
The peer MAY also check the received value against its own understanding of the network name. If it spots a discrepancy, the peer either warns the user and continues, or fails the authentication process. More specifically, the peer SHOULD have a configurable policy it can follow in these situations. If the policy says it can continue, the peer SHOULD log a warning message or display it to the user. If the peer decides to proceed, it MUST use the network name as received in the AT_KDF_INPUT attribute. If the policy says authentication should fail, the peer behaves as if AUTN had been incorrect, and authentication fails. ๐ง
The Network Name field contains a UTF-8 string. This string MUST be constructed as specified in [TS-3GPP.24.302] for "Access Network Identity". The string is made of fields separated by colons (:). The algorithms and mechanisms used to build the identity string depend on the access technology in use. ๐
On the network side, building the network name is a configuration issue in an access network and an authorization check in the authentication server. On the peer, the network name is built from local observations. For instance, the peer knows which access technology it's using on the link, it can see information in a link-layer beacon, and so on. The construction rules specify how this information maps to an access network name. Typically, the network name is the name of the access technology, or the name of the access technology followed by some operator identifier that was advertised in a link-layer beacon. In all cases, [TS-3GPP.24.302] is the normative specification for the construction on both the network and peer sides. If the peer policy allows running EAP-AKA' over an access technology that the specification gives no network name construction rules for, the peer SHOULD rely only on the information from the AT_KDF_INPUT attribute and NOT perform a comparison. โจ
Wait, careful: that last sentence was my own spice. The original says: the peer SHOULD rely only on the information from the AT_KDF_INPUT attribute and not perform a comparison. Here is the faithful version of that sentence:
If the peer policy allows running EAP-AKA' over an access technology for which that specification does not provide network name construction rules, the peer SHOULD rely only on the information from the AT_KDF_INPUT attribute and not perform a comparison. ๐ซถ
If the peer compares the locally determined network name with the one received over EAP-AKA', the comparison MUST be done as follows. ๐ First, each name is broken down into the fields separated by colons. If one of the names has more colons and fields than the other, the additional fields are ignored. The remaining sequences of fields are compared, and they match only if they are equal character by character. This algorithm allows a prefix match, where the peer would be able to match "", "FOO", and "FOO:BAR" against the value "FOO:BAR" received from the server. This capability matters because it allows possible updates to the specifications that dictate how network names are constructed. For instance, if a peer knows it's running on access technology "FOO", it can use the string "FOO" even if the server uses an additional, more accurate description, e.g., "FOO:BAR", that contains more information. ๐ฆ
The allocation procedures in [TS-3GPP.24.302] make sure that conflicts potentially arising from using the same name in different types of networks are avoided. The specification also has detailed rules for how a client can work these out from information it has available, such as the type of protocol used to attach to the network, beacons sent out by the network, and so on. Information the client cannot directly observe (such as the type or version of the home network) is NOT used by this algorithm. ๐
The AT_KDF_INPUT attribute MUST be sent and processed as explained above when the AT_KDF attribute has the value 1. Future definitions of new AT_KDF values MUST define how this attribute is sent and processed. ๐ธ
3.2. AT_KDF ๐
okay so AT_KDF is the attribute the server uses to point at one specific key derivation function ๐
It's basically a negotiation tool, and that's so useful for future evolution of KDFs, because new ones can slot in later without breaking everything โจ
The format of the AT_KDF attribute looks like this ๐ฆ
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AT_KDF | Length | Key Derivation Function |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Here's the breakdown of the fields ๐
AT_KDF This is set to 24.
Length The length of the attribute, calculated as defined in [RFC4187], Section 8.1. For AT_KDF, the Length field MUST be set to 1. no cap, this one is non-negotiable ๐ซถ
Key Derivation Function An enumerated value representing the key derivation function that the server (or peer) wishes to use. Value 1 represents the default key derivation function for EAP-AKA', i.e., employing CK' and IK' as defined in Section 3.3. this is the main character ๐
Servers MUST send one or more AT_KDF attributes in the EAP-Request/AKA'-Challenge message. These attributes represent the desired functions ordered by preference, with the most preferred function being the first attribute. so the first one is the top pick, bestie ๐ธ
Now here's the negotiation flow, and it's giving drama ๐ญ Upon receiving a set of these attributes, if the peer supports and is willing to use the key derivation function indicated by the first attribute, the function is taken into use without any further negotiation. easy mode โจ However, if the peer does not support this function or is unwilling to use it, it does not process the received EAP-Request/AKA'-Challenge in any way except by responding with the EAP-Response/AKA'-Challenge message that contains only one attribute, AT_KDF with the value set to the selected alternative. If there is no suitable alternative, the peer behaves as if AUTN had been incorrect and authentication fails (see Figure 3 of [RFC4187]). The peer fails the authentication also if there are any duplicate values within the list of AT_KDF attributes (except where the duplication is due to a request to change the key derivation function; see below for further information). ngl the duplicate rule is a whole mood ๐
Upon receiving an EAP-Response/AKA'-Challenge with AT_KDF from the peer, the server checks that the suggested AT_KDF value was one of the alternatives in its offer. The first AT_KDF value in the message from the server is not a valid alternative, since the peer should have accepted it without further negotiation. If the peer has replied with the first AT_KDF value, the server behaves as if AT_MAC of the response had been incorrect and fails the authentication. For an overview of the failed authentication process on the server side, see Section 3 and Figure 2 of [RFC4187]. Otherwise, the server re-sends the EAP-Response/AKA'-Challenge message, but adds the selected alternative to the beginning of the list of AT_KDF attributes and retains the entire list following it. Note that this means the selected alternative appears twice in the set of AT_KDF values ๐ Responding to the peer's request to change the key derivation function is the only legal situation where such duplication may occur. the only exception, periodt ๐
When the peer receives the new EAP-Request/AKA'-Challenge message, it MUST check that the requested change, and only the requested change, occurred in the list of AT_KDF attributes. If so, it continues with processing the received EAP-Request/AKA'-Challenge as specified in [RFC4187] and Section 3.1 of this document. If not, it behaves as if AT_MAC had been incorrect and fails the authentication. If the peer receives multiple EAP-Request/AKA'-Challenge messages with differing AT_KDF attributes without having requested negotiation, the peer MUST behave as if AT_MAC had been incorrect and fail the authentication. not the vibe, so it gets rejected ๐ซ
Heads up, bestie: this next bit is the sequence number resynchronization timing, and it's super specific, so read it twice ๐ง
Note that the peer may also request sequence number resynchronization [RFC4187]. This happens after AT_KDF negotiation has already completed. That is, the EAP-Request/AKA'-Challenge and, possibly, the EAP-Response/AKA'-Challenge messages are exchanged first to determine a mutually acceptable key derivation function, and only then is the possible AKA'-Synchronization-Failure message sent. The AKA'-Synchronization-Failure message is sent as a response to the newly received EAP-Request/AKA'-Challenge, which is the last message of the AT_KDF negotiation. Note that if the first proposed KDF is acceptable, then the first EAP-Request/AKA'-Challenge message is also the last message. The AKA'-Synchronization-Failure message MUST contain the AUTS parameter as specified in [RFC4187] and a copy of the AT_KDF attributes as they appeared in the last message of the AT_KDF negotiation. If the AT_KDF attributes are found to differ from their earlier values, the peer and server MUST behave as if AT_MAC had been incorrect and fail the authentication. the order matters so much, iykyk ๐
3.3. Key Derivation ๐ธ
Both the peer and server MUST derive the keys as follows. this is the core glow-up โจ
AT_KDF parameter has the value 1 In this case, MK is derived and used as follows:
MK = PRF'(IK'|CK',"EAP-AKA'"|Identity)
K_encr = MK[0..127]
K_aut = MK[128..383]
K_re = MK[384..639]
MSK = MK[640..1151]
EMSK = MK[1152..1663]
Here [n..m] denotes the substring from bit n to m, including bits n and m. PRF' is a new pseudorandom function specified in Section 3.4. The first 1664 bits from its output are used for K_encr (encryption key, 128 bits), K_aut (authentication key, 256 bits), K_re (re-authentication key, 256 bits), MSK (Master Session Key, 512 bits), and EMSK (Extended Master Session Key, 512 bits). These keys are used by the subsequent EAP-AKA' process. K_encr is used by the AT_ENCR_DATA attribute, and K_aut by the AT_MAC attribute. K_re is used later in this section. MSK and EMSK are outputs from a successful EAP method run [RFC3748]. the output lineup is so organized ๐
IK' and CK' are derived as specified in [TS-3GPP.33.402]. The functions that derive IK' and CK' take the following parameters: CK and IK produced by the AKA algorithm, and the value of the Network Name field, which comes from the AT_KDF_INPUT attribute (without length or padding).
The value "EAP-AKA'" is an eight-characters-long ASCII string. It is used as is, without any trailing NUL characters. literally just the bytes, no extras ๐
Identity is the peer identity as specified in Section 7 of [RFC4187] and in Section 5.3.2 of in this document for the 5G cases.
When the server creates an AKA challenge and corresponding AUTN, CK, CK', IK, and IK' values, it MUST set the Authentication Management Field (AMF) separation bit to 1 in the AKA algorithm [TS-3GPP.33.102]. Similarly, the peer MUST check that the AMF separation bit is set to 1. If the bit is not set to 1, the peer behaves as if the AUTN had been incorrect and fails the authentication. the bit check is serious business, no cap ๐ฅ
On fast re-authentication, the following keys are calculated:
MK = PRF'(K_re,"EAP-AKA' re-auth"|Identity|counter|NONCE_S)
MSK = MK[0..511]
EMSK = MK[512..1023]
MSK and EMSK are the resulting 512-bit keys, taking the first 1024 bits from the result of PRF'. Note that K_encr and K_aut are not re-derived on fast re-authentication. K_re is the re-authentication key from the preceding full authentication and stays unchanged over any fast re-authentication(s) that may happen based on it. The value "EAP-AKA' re-auth" is a sixteen-characters-long ASCII string, again represented without any trailing NUL characters. Identity is the fast re-authentication identity, counter is the value from the AT_COUNTER attribute, and NONCE_S is the nonce value from the AT_NONCE_S attribute, all as specified in Section 7 of [RFC4187]. To prevent the use of compromised keys in other places, it is forbidden to change the network name when going from the full to the fast re-authentication process. The peer SHOULD NOT attempt fast re-authentication when it knows that the network name in the current access network is different from the one in the initial, full authentication. Upon seeing a re-authentication request with a changed network name, the server SHOULD behave as if the re-authentication identifier had been unrecognized, and fall back to full authentication. The server observes the change in the name by comparing where the fast re-authentication and full authentication EAP transactions were received at the Authentication, Authorization, and Accounting (AAA) protocol level. the network name is basically locked in, so don't switch it mid-game ๐ฆ
AT_KDF has any other value Future variations of key derivation functions may be defined, and they will be represented by new values of AT_KDF. If the peer does not recognize the value, it cannot calculate the keys and behaves as explained in Section 3.2. ๐ง
AT_KDF is missing The peer behaves as if the AUTN had been incorrect and MUST fail the authentication. no AT_KDF, no entry ๐ช
If the peer supports a given key derivation function but is unwilling to perform it for policy reasons, it refuses to calculate the keys and behaves as explained in Section 3.2. policy says no, so it's a no ๐
3.4. Hash Functions ๐
EAP-AKA' uses SHA-256 / HMAC-SHA-256, not SHA-1 / HMAC-SHA-1 (see [FIPS.180-4] and [RFC2104]) as in EAP-AKA. This requires a change to the pseudorandom function (PRF) as well as the AT_MAC and AT_CHECKCODE attributes. the upgrade is lowkey iconic ๐
3.4.1. PRF'
The PRF' construction is the same one IKEv2 uses (see Section 2.13 of [RFC7296]; the definition of this function has not changed since [RFC4306], which was referenced by [RFC5448]). The function takes two arguments. K is a 256-bit value and S is a byte string of arbitrary length. PRF' is defined as follows:
PRF'(K,S) = T1 | T2 | T3 | T4 | ...
where:
T1 = HMAC-SHA-256 (K, S | 0x01)
T2 = HMAC-SHA-256 (K, T1 | S | 0x02)
T3 = HMAC-SHA-256 (K, T2 | S | 0x03)
T4 = HMAC-SHA-256 (K, T3 | S | 0x04)
...
PRF' produces as many bits of output as is needed. HMAC-SHA-256 is the application of HMAC [RFC2104] to SHA-256. it's a chain of HMACs, each block feeding the next ๐
3.4.2. AT_MAC
When used within EAP-AKA', the AT_MAC attribute is changed as follows. The MAC algorithm is HMAC-SHA-256-128, a keyed hash value. The HMAC-SHA-256-128 value is obtained from the 32-byte HMAC-SHA-256 value by truncating the output to the first 16 bytes. Hence, the length of the MAC is 16 bytes. short and sweet, 16 bytes, slay ๐
Otherwise, the use of AT_MAC in EAP-AKA' follows Section 10.15 of [RFC4187]. everything else sticks to the EAP-AKA rules ๐ซถ
3.4.3. AT_CHECKCODE ๐งฎ
Okay so, when AT_CHECKCODE gets used inside EAP-AKA', it gets a glow-up ๐ . First, the attribute needs a 32-byte value so it can fit a 256-bit hash output โจ:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AT_CHECKCODE | Length | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Checkcode (0 or 32 bytes) |
| |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Second, the checkcode is a hash value ๐ฅ. It's calculated with SHA-256 [FIPS.180-4], and the data it covers is the data specified in Section 10.13 of [RFC4187] ๐ซถ.
3.5. Summary of Attributes for EAP-AKA' ๐
Okay bestie, this part is the attribute cheat sheet ๐. Table 1 tells you which attributes can show up in which kinds of messages, and how many of each you're allowed to have.
First, the messages get numbers:
1 EAP-Request/AKA-Identity
2 EAP-Response/AKA-Identity
3 EAP-Request/AKA-Challenge
4 EAP-Response/AKA-Challenge
5 EAP-Request/AKA-Notification
6 EAP-Response/AKA-Notification
7 EAP-Response/AKA-Client-Error
8 EAP-Request/AKA-Reauthentication
9 EAP-Response/AKA-Reauthentication
10 EAP-Response/AKA-Authentication-Reject
11 EAP-Response/AKA-Synchronization-Failure
The column marked "E" tells you if the attribute is a nested one that MUST be included within AT_ENCR_DATA ๐.
The numbered columns tell you how many of that attribute can be in the message ๐ข:
"0"Indicates that the attribute MUST NOT be included in the message."1"Indicates that the attribute MUST be included in the message."0-1"Indicates that the attribute is sometimes included in the message."0+"Indicates that zero or more copies of the attribute MAY be included in the message."1+"Indicates that there MUST be at least one attribute in the message, but more than one MAY be included in the message."0*"Indicates that the attribute is not included in the message in cases specified in this document, but MAY be included in future versions of the protocol.
The table is basically the same as the EAP-AKA attribute table ([RFC4187], Section 10.1) ๐ฏ. The one difference is how many times AT_MAC may appear in an EAP-Response/AKA'-Challenge message. It doesn't show up there in EAP-AKA, because AT_KDF has to be sent from the peer to the server in AKA'. The table also adds the AT_KDF and AT_KDF_INPUT attributes โจ.
+======================+===+===+===+===+===+===+=+====+=====+==+==+=+
| Attribute |1 |2 |3 |4 |5 |6 |7|8 | 9 |10|11|E|
+======================+===+===+===+===+===+===+=+====+=====+==+==+=+
| AT_PERMANENT_ID_REQ |0-1|0 |0 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_ANY_ID_REQ |0-1|0 |0 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_FULLAUTH_ID_REQ |0-1|0 |0 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_IDENTITY |0 |0-1|0 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_RAND |0 |0 |1 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_AUTN |0 |0 |1 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_RES |0 |0 |0 |1 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_AUTS |0 |0 |0 |0 |0 |0 |0|0 | 0 |0 |1 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_NEXT_PSEUDONYM |0 |0 |0-1|0 |0 |0 |0|0 | 0 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_NEXT_REAUTH_ID |0 |0 |0-1|0 |0 |0 |0|0-1 | 0 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_IV |0 |0 |0-1|0* |0-1|0-1|0|1 | 1 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_ENCR_DATA |0 |0 |0-1|0* |0-1|0-1|0|1 | 1 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_PADDING |0 |0 |0-1|0* |0-1|0-1|0|0-1 | 0-1 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_CHECKCODE |0 |0 |0-1|0-1|0 |0 |0|0-1 | 0-1 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_RESULT_IND |0 |0 |0-1|0-1|0 |0 |0|0-1 | 0-1 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_MAC |0 |0 |1 |0-1|0-1|0-1|0|1 | 1 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_COUNTER |0 |0 |0 |0 |0-1|0-1|0|1 | 1 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_COUNTER_TOO_SMALL |0 |0 |0 |0 |0 |0 |0|0 | 0-1 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_NONCE_S |0 |0 |0 |0 |0 |0 |0|1 | 0 |0 |0 |Y|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_NOTIFICATION |0 |0 |0 |0 |1 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_CLIENT_ERROR_CODE |0 |0 |0 |0 |0 |0 |1|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_KDF |0 |0 |1+ |0+ |0 |0 |0|0 | 0 |0 |1+|N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
| AT_KDF_INPUT |0 |0 |1 |0 |0 |0 |0|0 | 0 |0 |0 |N|
+----------------------+---+---+---+---+---+---+-+----+-----+--+--+-+
Table 1: The Attribute Table
4. Bidding Down Prevention for EAP-AKA ๐ก๏ธ
Okay, so, as [RFC3748] talks about, negotiating methods inside EAP is insecure ๐ญ. A man-in-the-middle attacker can totally trick the endpoints into using a method that isn't the strongest one they both support. That's a big problem, because we expect EAP-AKA and EAP-AKA' to be negotiated through EAP ๐.
To stop that kind of attack, this RFC gives EAP-AKA a mechanism that lets the endpoints securely find out what each other can do ๐ต๏ธโโ๏ธ. The mechanism is the AT_BIDDING attribute. It lets both endpoints say they want EAP-AKA' and that they support it while they're exchanging EAP-AKA messages. AT_BIDDING doesn't go in EAP-AKA' messages at all. It only shows up in EAP-AKA messages, which are protected with AT_MAC ๐. This whole approach assumes EAP-AKA' is always the better choice (see Section 7) ๐. If the endpoints find out during an EAP-AKA run that they both could have used EAP-AKA', the authentication process SHOULD be aborted, because a bidding down attack may have happened ๐จ.
Here's what the AT_BIDDING format looks like ๐:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AT_BIDDING | Length |D| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Here's what each field means ๐:
- AT_BIDDING: This is set to 136.
- Length: The length of the attribute, calculated as defined in [RFC4187], Section 8.1. For AT_BIDDING, the Length MUST be set to 1.
- D: This bit is set to 1 if the sender supports EAP-AKA', is willing to use it, and prefers it over EAP-AKA. Otherwise, it should be set to zero.
- Reserved: This field MUST be set to zero when sent and ignored on receipt.
The server sends this attribute in the EAP-Request/AKA-Challenge message ๐จ. If the peer supports EAP-AKA', it compares the value it receives with its own capabilities. If both the server and the peer would have been able to use EAP-AKA' and preferred it over EAP-AKA, the peer acts as if AUTN had been incorrect and fails the authentication (see Figure 3 of [RFC4187]) ๐ฅ. A peer that doesn't support EAP-AKA' just ignores this attribute ๐. In every case, the attribute is protected by the integrity mechanisms of EAP-AKA, so a man-in-the-middle attacker can't remove it ๐.
Heads up: this spec assumes (Section 7) that EAP-AKA' is always stronger than EAP-AKA. Because of that, it doesn't protect against bidding "down" attacks in the other direction, where attackers force the endpoints to use EAP-AKA' ๐.
4.1. Summary of Attributes for EAP-AKA ๐
Here's where AT_BIDDING shows up in EAP-AKA exchanges. This uses the notation from Section 3.5 ๐:
+============+===+===+===+===+===+===+===+===+===+====+====+===+
| Attribute | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | E |
+============+===+===+===+===+===+===+===+===+===+====+====+===+
| AT_BIDDING | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | N |
+------------+---+---+---+---+---+---+---+---+---+----+----+---+
Table 2: AT_BIDDING Attribute Appearance
5. Peer Identities ๐ชช
EAP-AKA' peer identities follow [RFC4187], Section 4.1, plus a few extra requirements that this section adds ๐.
EAP-AKA' has optional identity privacy support ๐ซฃ. It can hide the cleartext permanent identity, which makes the subscriber's EAP exchanges untraceable to eavesdroppers โจ. EAP-AKA' can also use the privacy-friendly identifiers that are specified for 5G networks ๐ง.
The permanent identity is usually based on the IMSI. Exposing the IMSI is a bad idea ๐ โโ๏ธ, since a permanent identity is super easy to track. Plus, IMSIs can get used in other contexts too, which gives trackers even more chances ๐.
In EAP-AKA', identity privacy is based on temporary usernames or pseudonym usernames ๐ฆ. They're similar to the Temporary Mobile Subscriber Identities (TMSI) used on cellular networks, but they're a separate thing ๐.
5. Peer Identities
5.1. Username Types in EAP-AKA' Identities ๐
Okay so, [RFC4187] Section 4.1.1.3 says there are three kinds of usernames: permanent, pseudonym, and fast re-authentication. This spec glows it up to four types โจ and splits the first one into sub-categories. Let's go ๐
- Regular usernames. These are the external names that EAP-AKA' peers are known by, and they come in two flavours:
- (a) Permanent usernames, like IMSI-based usernames ๐
- (b) Privacy-friendly temporary usernames, like the 5G GUTI (5G Globally Unique Temporary Identifier) or 5G privacy identifiers (see Section 5.3.2) such as SUCI (Subscription Concealed Identifier) ๐ฆ
- EAP-AKA' pseudonym usernames. For example,
2s7ah6n9q@example.comcould be a valid pseudonym identity. Here the pseudonym username is2s7ah6n9q๐ธ - EAP-AKA' fast re-authentication usernames. For example,
43953754@example.comcould be a valid fast re-authentication identity, with43953754as the fast re-authentication username ๐ง
Here's the tea: permanent, privacy-friendly temporary, and pseudonym usernames are only used for full authentication, and fast re-authentication usernames are only used for fast re-authentication ๐. Privacy-friendly temporary usernames and fast re-authentication usernames are one-time identifiers, meaning they don't get reused across EAP exchanges. Permanent and pseudonym usernames don't have that rule. Iconic behaviour from the identifiers, honestly โจ
5.2. Generating Pseudonyms and Fast Re-Authentication Identities ๐
This section is extra guidance for implementations on how to make secure pseudonyms and fast re-authentication identities ๐ซถ. It doesn't break backwards compatibility, because each server only consumes the identities it generated itself. But following this guidance gets you a much better security glow-up ๐
As [RFC4187] Section 4.1.1.7 says, pseudonym usernames and fast re-authentication identities are generated by the EAP server in an implementation-dependent way ๐คทโโ๏ธ. RFC 4187 already gives some general requirements on how these identities get transported, how they map to the NAI syntax, how they're told apart from each other, and so on.
Privacy is the vibe here, so some extra requirements get added on top ๐
The pseudonym usernames and fast re-authentication identities MUST be generated in a cryptographically secure way, so that it is computationally infeasible for an attacker to tell whether two identities belong to the same user or to two different users ๐ญ. One way to do this is random or pseudorandom identifiers, like random byte strings or ciphertexts. See also [RFC4086] for guidance on random number generation ๐ฒ.
Also, the pseudonym and fast re-authentication usernames MUST NOT include substrings that can be used to link the username to a particular entity or a particular permanent identity ๐ซ. For example, the usernames can't include any subscriber-identifying part of an IMSI or other permanent identifier. Similarly, no part of the username can come from a fixed mapping that stays the same across multiple different pseudonyms or fast re-authentication identities for the same subscriber. Not allowed, bestie ๐
Here's the important bit: when the identifier used to identify a subscriber in an EAP-AKA' authentication exchange is a privacy-friendly identifier that's only used once, the EAP-AKA' peer MUST NOT use a pseudonym provided in that authentication exchange in subsequent exchanges more than once. To make sure this doesn't happen, the EAP-AKA' server MAY decline to provide a pseudonym in such authentication exchanges. The big case where these privacy-friendly identifiers show up is 5G networks (see Section 5.3) ๐กโจ
5.3. Identifier Usage in 5G ๐ฑ
In EAP-AKA', the peer identity can be communicated to the server in one of three ways:
- As part of link-layer establishment procedures, outside of EAP ๐
- With the EAP-Response/Identity message at the very start of the EAP exchange, but before EAP-AKA' gets selected ๐ฌ
- Sent from the peer to the server using EAP-AKA' messages instead of EAP-Response/Identity. In this case, the server includes an identity-requesting attribute (
AT_ANY_ID_REQ,AT_FULLAUTH_ID_REQ, orAT_PERMANENT_ID_REQ) in the EAP-Request/AKA-Identity message, and the peer includes theAT_IDENTITYattribute, which holds the peer's identity, in the EAP-Response/AKA-Identity message ๐
The identity carried in any of these may be a permanent identity, a privacy-friendly identity, a pseudonym identity, or a fast re-authentication identity, as defined in Section 5.1 ๐ธ
5G supports the concept of privacy identifiers, and for interoperability it's really important that the right type of identifier gets used ๐
5G defines the SUbscription Permanent Identifier (SUPI) and SUbscription Concealed Identifier (SUCI) [TS-3GPP.23.501] [TS-3GPP.33.501] [TS-3GPP.23.003]. SUPI is globally unique and allocated to each subscriber. But it's only used internally inside the 5G network, and it's privacy sensitive ๐. SUCI is the privacy-preserving one: it contains the concealed SUPI, using public key cryptography to encrypt the SUPI ๐
So when you've got a choice between these two types of identifiers, EAP-AKA' keeps interoperability on lock like this ๐:
- Where identifiers are used within EAP-AKA' (such as in key derivation), they determine the exact values of the identity to be used, so nothing is ambiguous (see Section 5.3.1) ๐ง
- Where identifiers are carried within EAP-AKA' packets (such as in the AT_IDENTITY attribute), they determine which identifiers should be filled in (see Section 5.3.2) ๐ฆ
In 5G, the normal mode is that identifiers are only sent outside of EAP. But in a system with terminals from many generations and several connectivity options through 5G and other mechanisms, implementations and the EAP-AKA' spec both need to get ready for lots of different situations, including having to communicate identities within EAP. Chaotic, but we prepare ๐ช๏ธ
The following sections clarify which identifiers are used and how ๐
5.3.1. Key Derivation ๐
In EAP-AKA', the peer identity is used in the key derivation formula found in Section 3.3 โจ
The identity has to be represented in exactly the correct format, or the key derivation formula won't produce correct results ๐ค
If the AT_KDF_INPUT parameter contains the prefix "5G:", the AT_KDF parameter has the value 1, and this authentication is not a fast re-authentication, then the peer identity used in the key derivation MUST be as specified in Annex F.3 of [TS-3GPP.33.501] and Clause 2.2 of [TS-3GPP.23.003]. This is different from [RFC5448], which uses the identity as communicated in EAP and represented as a NAI. Also, unlike [RFC5448], 5G EAP-AKA' does not use the "0" nor the "6" prefix in front of the identifier ๐
โโ๏ธ
For an example of the identity format, see Clause 2.2 of [TS-3GPP.23.003] ๐
In all other cases, the following applies:
The identity used in the key derivation formula MUST be exactly the one sent in the EAP-AKA' AT_IDENTITY attribute, if one was sent, regardless of what kind of identity it was. If no AT_IDENTITY was sent, the identity MUST be exactly the one sent in the generic EAP Identity exchange, if one was made.
If no identity was communicated inside EAP, then the identity is the one communicated outside EAP in link-layer messaging.
In this case, the used identity MUST be the identity most recently communicated by the peer to the network, again regardless of what type of identity it was ๐ซ
5.3.2. EAP Identity Response and EAP-AKA' AT_IDENTITY Attribute ๐ชช
The EAP authentication option is only available in 5G when the new 5G core network is also in use. In other networks, though, an EAP-AKA' peer might be connecting to other types of networks and older equipment ๐ฐ๏ธ
When the EAP server is in a 5G network, the 5G procedures for EAP-AKA' apply. [TS-3GPP.33.501] specifies when the EAP server counts as being in a 5G network ๐บ๏ธ
Note: Right now, these conditions are specified: when the EAP peer uses the 5G Non-Access Stratum (NAS) protocol [TS-3GPP.24.501], or when the EAP peer attaches to a network that advertises 5G connectivity without NAS [TS-3GPP.23.501]. 3GPP might specify more conditions in the future too ๐
When the 5G procedures for EAP-AKA' apply, EAP identity exchanges are generally skipped, because the identity has already been shared in earlier link-layer exchanges ๐
In this situation, the EAP Identity Response and the EAP-AKA' AT_IDENTITY attribute are handled as specified in Annex F.2 of [TS-3GPP.33.501] ๐
When used in EAP-AKA', the format of the SUCI MUST be as specified in [TS-3GPP.23.003], Section 28.7.3, with the semantics defined in [TS-3GPP.23.003], Section 2.2B. Also, unlike [RFC5448], 5G EAP-AKA' does not use the "0" nor the "6" prefix in front of the identifier ๐
For an example of an IMSI in NAI format, see [TS-3GPP.23.003], Section 28.7.3 ๐ง
Otherwise, the peer SHOULD employ an IMSI, SUPI, or NAI [RFC7542] as it is configured to use ๐ธ
6. Exported Parameters ๐ฆ
When fast re-authentication isn't being used, the EAP-AKA' Session-Id is the EAP-AKA' Type value (0x32, one byte) concatenated 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 = 0x32 || RAND || AUTN
When fast re-authentication is being used, the EAP-AKA' Session-Id is the EAP-AKA' Type value (0x32) concatenated 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 in the EAP-Request/AKA-Reauthentication:
Session-Id = 0x32 || NONCE_S || MAC
The Peer-Id is the contents of the Identity field from the AT_IDENTITY attribute, using only the Actual Identity Length bytes from the beginning. Note that the contents are used exactly as they were transmitted, whether the identity was a permanent, pseudonym, or fast EAP re-authentication identity ๐ซถ. If no AT_IDENTITY attribute was exchanged, the exported Peer-Id is the identity provided in the EAP Identity Response packet. If no EAP Identity Response was provided either, the exported Peer-Id is the null string (zero length) ๐ซฅ
The Server-Id is the null string (zero length) โจ
7. Security Considerations โจ
okay bestie, this is the security section and it's SO good ๐๐ quick recap: EAP-AKA' is basically EAP-AKA's glow-up, and it's "very similar" to EAP-AKA. the whole vibe depends on one assumption, called the SHA-256 assumption. we assume HMAC SHA-256 is at least as secure as HMAC SHA-1 (see also [RFC6194]). if that holds, EAP-AKA' is at least as secure as EAP-AKA. so the rest of this section is basically "if the SHA-256 assumption is true, here's how things look" ๐ฆ
If the AT_KDF attribute has value 1, then here are the security properties of EAP-AKA' ๐
Protected ciphersuite negotiation EAP-AKA' has no ciphersuite negotiation mechanisms ๐
โโ๏ธ but it does have a negotiation mechanism for picking the key derivation functions ๐ and this one is secure against bidding down attacks from EAP-AKA' to EAP-AKA โจ the negotiation mechanism lets the offered key derivation function change, BUT the change is visible in the final EAP-Request/AKA'-Challenge message that the server sends to the peer ๐ that message is authenticated via the AT_MAC attribute and carries both the chosen alternative and the initially offered list. the peer refuses to accept a change it did not start ๐ซ so both parties know a change happened and what the original offer was. no sneaky stuff, periodt ๐
per the assumptions in Section 4, there is no protection against bidding down attacks from EAP-AKA to EAP-AKA' should EAP-AKA' somehow be considered less secure some day than EAP-AKA ๐ฌ that protection wasn't provided in RFC 5448 implementations, so this spec doesn't provide it either. if that support is ever needed, it would have to be added as a separate new feature ๐ ๏ธ
in general, the current negotiation capabilities in EAP-AKA' are expected to be enough for some kinds of extensions, like adding Perfect Forward Secrecy [EMU-AKA-PFS] and maybe others ๐ but some bigger changes might need a brand new EAP method type, which is literally how EAP-AKA' itself came to be ๐ฆ one example of that kind of change would be introducing new algorithms ๐งช
Mutual authentication under the SHA-256 assumption, the properties of EAP-AKA' are at least as good as EAP-AKA's in this respect ๐ค refer to [RFC4187], Section 12, for further details ๐
Integrity protection under the SHA-256 assumption, the properties of EAP-AKA' are at least as good (most likely better) as EAP-AKA's in this respect ๐ refer to [RFC4187], Section 12, for further details. the only difference is that a stronger hash algorithm and keyed MAC, SHA-256 / HMAC-SHA-256, is used instead of SHA-1 / HMAC-SHA-1 ๐ฅ
Replay protection under the SHA-256 assumption, the properties of EAP-AKA' are at least as good as EAP-AKA's in this respect ๐ refer to [RFC4187], Section 12, for further details.
Confidentiality the properties of EAP-AKA' are exactly the same as EAP-AKA's in this respect ๐คซ refer to [RFC4187], Section 12, for further details.
Key derivation EAP-AKA' supports key derivation with an effective key strength against brute-force attacks equal to the minimum of the length of the derived keys and the length of the AKA base key, i.e., 128 bits or more ๐ช the key hierarchy is specified in Section 3.3 ๐๏ธ
the Transient EAP Keys used to protect EAP-AKA packets (K_encr, K_aut, K_re), the MSK, and the EMSK are cryptographically separate ๐งฉ if we assume SHA-256 behaves as a pseudorandom function, an attacker is incapable of deriving any non-trivial information about any of these keys based on the other keys ๐ค an attacker also cannot calculate the pre-shared secret from IK, CK, IK', CK', K_encr, K_aut, K_re, MSK, or EMSK by any practically feasible means ๐ซ๐
EAP-AKA' adds an additional layer of key derivation functions within itself to protect against the use of compromised keys ๐ก๏ธ this is discussed further in Section 7.4 ๐
EAP-AKA' uses a pseudorandom function modeled after the one used in IKEv2 [RFC7296] together with SHA-256 ๐ง
Key strength see above โ๏ธ
Dictionary attack resistance under the SHA-256 assumption, the properties of EAP-AKA' are at least as good as EAP-AKA's in this respect ๐ฐ refer to [RFC4187], Section 12, for further details.
Fast reconnect under the SHA-256 assumption, the properties of EAP-AKA' are at least as good as EAP-AKA's in this respect โก refer to [RFC4187], Section 12, for further details. note that implementations MUST prevent performing a fast reconnect across method types ๐จ no crossing wires, bestie ๐ โโ๏ธ
Cryptographic binding note that this term refers to a very specific form of binding, something that is performed between two layers of authentication ๐ง it is not the same as the binding to a particular network name ๐ the properties of EAP-AKA' are exactly the same as EAP-AKA's in this respect, i.e., as it is not a tunnel method, this property is not applicable to it ๐คทโโ๏ธ refer to [RFC4187], Section 12, for further details.
Session independence the properties of EAP-AKA' are exactly the same as EAP-AKA's in this respect ๐ฆ refer to [RFC4187], Section 12, for further details.
Fragmentation the properties of EAP-AKA' are exactly the same as EAP-AKA's in this respect ๐งฉ refer to [RFC4187], Section 12, for further details.
Channel binding EAP-AKA', like EAP-AKA, does not provide channel bindings as they're defined in [RFC3748] and [RFC5247] ๐ โโ๏ธ new skippable attributes can be used to add channel binding support in the future, if required ๐ฎ
however, including the Network Name field in the AKA' algorithms (which are also used for other purposes than EAP-AKA') provides a form of cryptographic separation between different network names, which kinda resembles channel bindings ๐ฅน the network name doesn't typically identify the EAP (pass-through) authenticator though, so see Section 7.4 for more discussion ๐
7.1. Privacy ๐ซฃ๐
[RFC6973] suggests that the privacy considerations of IETF protocols be documented ๐ so here we go, bestie ๐
the confidentiality properties of EAP-AKA' itself were already discussed above under "Confidentiality" (Section 7) ๐คซ
EAP-AKA' uses several different types of identifiers to identify the authenticating peer ๐ชช it is strongly RECOMMENDED to use the privacy-friendly temporary or hidden identifiers, i.e., the 5G GUTI or SUCI, pseudonym usernames, and fast re-authentication usernames ๐ธ the use of permanent identifiers such as the IMSI or SUPI may lead to an ability to track the peer and/or user associated with the peer ๐ the use of permanent identifiers such as the IMSI or SUPI is strongly NOT RECOMMENDED ๐ซ main character energy for privacy, fr fr ๐
as discussed in Section 5.3, when authenticating to a 5G network, only the SUCI identifier is normally used ๐ก the use of EAP-AKA' pseudonyms in this situation is at best limited, because the SUCI already provides a stronger mechanism ๐ช in fact, reusing the same pseudonym multiple times will result in a tracking opportunity for observers that see the pseudonym pass by ๐ญ to avoid this, the peer and server need to follow the guidelines given in Section 5.2 ๐
when authenticating to a 5G network, per Section 5.3.1, both the EAP-AKA' peer and server need to employ the permanent identifier SUPI as an input to key derivation ๐งฎ however, this use of the SUPI is only internal ๐ค so the SUPI doesn't need to be communicated in EAP messages ๐ therefore, SUPI MUST NOT be communicated in EAP-AKA' when authenticating to a 5G network ๐จ absolutely not, bestie ๐ โโ๏ธ
while the use of SUCI in 5G networks generally provides identity privacy, this is not true if the null-scheme encryption is used to construct the SUCI (see [TS-3GPP.33.501], Annex C) ๐ฌ the use of this scheme makes the use of SUCI equivalent to the use of SUPI or IMSI, which is giving "exposed" ๐ the use of the null scheme is NOT RECOMMENDED where identity privacy is important โ
the use of fast re-authentication identities when authenticating to a 5G network does not have the same problems as the use of pseudonyms, as long as the 5G authentication server generates the fast re-authentication identifiers in the proper manner specified in Section 5.2 ๐
outside 5G, the peer can freely choose between the use of permanent, pseudonym, or fast re-authentication identifiers ๐ฆ
- A peer that has not yet performed any EAP-AKA' exchanges does not typically have a pseudonym available ๐ฅบ if the peer doesn't have a pseudonym available, then the privacy mechanism can't be used, and the permanent identity will have to be sent in the clear ๐ฉ
The terminal SHOULD store the pseudonym in nonvolatile memory so that it can be maintained across reboots ๐พ an active attacker that impersonates the network may use the AT_PERMANENT_ID_REQ attribute ([RFC4187], Section 4.1.2) to learn the subscriber's IMSI ๐ฑ however, as discussed in [RFC4187], Section 4.1.2, the terminal can refuse to send the cleartext permanent identity if it believes that the network should be able to recognize the pseudonym ๐ก๏ธ go terminal, protect yourself ๐ซถ
- When pseudonyms and fast re-authentication identities are used, the peer relies on the properly created identifiers by the server ๐ง
it is essential that an attacker cannot link a privacy-friendly identifier to the user in any way, or determine that two identifiers belong to the same user, as outlined in Section 5.2 ๐ the pseudonym usernames and fast re-authentication identities MUST NOT be used for other purposes (e.g., in other protocols) ๐ซ they're for EAP-AKA' only, bestie ๐
if the peer and server cannot guarantee that SUCI can be used, or that pseudonyms will be available, generated properly, and maintained reliably, and identity privacy is required, then additional protection from an external security mechanism may be used, such as tunneled EAP methods like Tunneled Transport Layer Security (TTLS) [RFC5281] or Tunnel Extensible Authentication Protocol (TEAP) [RFC7170] ๐ the benefits and the security considerations of using an external security mechanism with EAP-AKA are beyond the scope of this document ๐ฆ
finally, as with other EAP methods, even when privacy-friendly identifiers or EAP tunneling is used, typically the domain part of an identifier (e.g., the home operator) is visible to external parties ๐ so the domain part is kinda out there, even when everything else is hidden ๐
7.2. Discovered Vulnerabilities
okay bestie, let's talk about the juicy stuff ๐ there have been no published attacks that break the primary secrecy or authentication properties AKA was designed to have under the originally assumed trust model โจ and the same is true for EAP-AKA' ๐ฆ
BUT ngl ๐ there have been attacks when a different trust model is in use, or when the protocol is doing things it wasn't originally designed for, or when participants leak info to outsiders on purpose. and yeah, there have been some privacy-related attacks too ๐ญ
for example, the original AKA protocol doesn't stop an insider from handing keys over to a third party ๐ Mjรธlsnes and Tsay describe this in [MT2012], where a serving network lets an authentication run succeed, and then misuses the session keys to send traffic on the authenticated user's behalf. honestly this one isn't that different from any on-path entity (like a router) pretending to send traffic, but insider attacks are still a problem, especially in a big group of collaborating operators ๐ซถ
another category is tunneling traffic from one place to another ๐ Zhang and Fang do this in [ZF2005] to exploit security policy differences between operator networks, for instance. to actually gain anything, the attacker has to trick the user into believing it's somewhere else ๐ and if the policies between locations differ (say, payload traffic isn't required to be encrypted in some location), the attacker might trick the user into opening a vulnerability ๐จ as an authentication mechanism, EAP-AKA' isn't directly affected by most of these attacks โจ EAP-AKA' network name binding can also help alleviate some of them ๐ either way, it's recommended that EAP-AKA' configuration not depend on the location of the request origin, unless that location information can be cryptographically confirmed (e.g., with the network name binding) ๐
Zhang and Fang also looked at denial-of-service attacks [ZF2005] ๐ค a serving network can request huge numbers of authentication runs for a particular subscriber from a home network. resynchronization can help recover from this, but eventually it's possible to exhaust the sequence number space and render the subscriber's card unusable ๐ this attack is possible for both original AKA and EAP-AKA'. however, it needs a serving network to actually collaborate in the attack ๐ it's recommended that EAP-AKA' implementations provide the means to track, detect, and limit excessive authentication attempts to combat this problem ๐ก๏ธ
there have also been attacks related to using AKA without the generated session keys (e.g., [BT2013]) ๐ค some of those relate to HTTP Digest AKAv1 [RFC3310], which was originally vulnerable to man-in-the-middle attacks. this has since been corrected in [RFC4169] โ EAP-AKA' uses session keys and provides channel binding, so it's resistant to the above attacks, except where protocol participants leak information to outsiders ๐ซถ
Basin, et al. [Basin2018] did formal analysis and concluded that the AKA protocol would have benefited from additional security requirements, such as key confirmation ๐ง
in the context of pervasive monitoring revelations, there were also reports of compromised long-term pre-shared keys used in SIM and AKA [Heist2015] ๐ญ no protocol can survive the theft of key material tied to its credentials, but there are some things that help soften the impact in those situations. we dig into those in Section 7.3 ๐ฅ
Arapinis, et al. [Arapinis2012] describe an attack that uses the AKA resynchronization protocol to try to detect whether a particular subscriber is in a given area ๐ this attack depends on the attacker setting up a false base station in that area, and on the subscriber performing at least one authentication between the time the attack is set up and when it runs ๐ก
Borgaonkar, et al. found that the AKA resynchronization protocol can also be used to predict a subscriber's authentication frequency if a non-time-based sequence number (SQN) generation scheme is used [Borgaonkar2018] ๐ณ the attacker can force reuse of the keystream that protects the SQN in the AKA resynchronization protocol. then they guess the authentication frequency from the lowest bits of two XORed SQNs ๐งฎ the researchers were worried this would reveal info about phone usage behavior, like how many phone calls were made or how many SMS messages were sent ๐ฑ there are a number of possible triggers for authentication, so the leak isn't direct, but it can still be a concern ๐คทโโ๏ธ how bad the attack is depends on whether the SQN generation scheme is time-based or not โฐ
similar attacks are possible outside AKA, in cellular paging protocols ๐ the attacker can just send application-layer data, send short messages, or make phone calls to the intended victim and observe the air interface (e.g., [Kune2012] and [Shaik2016]) ๐๏ธ Hussain, et al. showed a slightly fancier version that exploits the fact that the 4G paging protocol uses the IMSI to calculate the paging timeslot [Hussain2019] ๐คฏ since this attack is outside AKA, it doesn't impact EAP-AKA' ๐
finally, bad implementations of EAP-AKA' might not produce pseudonym usernames or fast re-authentication identities securely enough ๐ฌ it's not a problem with the protocol itself, but following the recommendations in Section 5.2 can mitigate this concern ๐
7.3. Pervasive Monitoring
as [RFC7258] requires, work on IETF protocols needs to consider the effects of pervasive monitoring and mitigate them when possible ๐
like we covered in Section 7.2, after RFC 5448 was published, new info came to light about pervasive monitoring techniques being used against many security technologies, including AKA-based authentication ๐ณ
for AKA, these attacks relate to theft of the long-term, shared-secret key material stored on the cards ๐ชช that's conceivable during the card manufacturing process, through coercion of card manufacturers, or during the transfer of cards and associated info to an operator ๐ฆ since those reports came out, manufacturing and provisioning processes have gotten way more scrutiny and have improved โจ
it's super crucial that manufacturers limit access to the secret info and the cards to only necessary systems and personnel ๐ it's also crucial that secure mechanisms be used to store and communicate the secrets between the manufacturer and the operator that adopts those cards for their customers ๐
beyond those operational things, there are also technical ways to boost resistance to these attacks ๐ ๏ธ one approach is to provide Perfect Forward Secrecy (PFS) ๐ธ this would prevent any passive attacks that are based merely on the long-term secrets and observation of traffic ๐ such a mechanism can be defined as a backwards-compatible extension of EAP-AKA' and is being pursued separately from this specification [EMU-AKA-PFS] ๐ alternatively, EAP-AKA' authentication can be run inside a PFS-capable, tunneled authentication method ๐ง either way, using some PFS-capable mechanism is recommended ๐
7.4. Security Properties of Binding Network Names
the ability of EAP-AKA' to bind the network name into the keys it uses gives some extra protection against key leakage to the wrong parties ๐ the keys in the protocol are specific to a particular network name. if key leakage happens because of an accident, access node compromise, or some other attack, the leaked keys are only useful when providing access under that name ๐ฏ for instance, a malicious access point can't claim to be network Y if it stole keys from network X ๐ โโ๏ธ obviously, if an access point is compromised, the malicious node can still represent the compromised node ๐ฉ so neither EAP-AKA' nor any other extension can prevent those attacks. still, binding to a particular name limits the attacker's choices, allows better tracking of attacks, makes it possible to identify compromised networks, and applies good cryptographic hygiene ๐งผ
the server receives the EAP transaction from a given access network and checks that the claim from that access network matches the name it should be using ๐ it becomes impossible for an access network to claim over AAA that it's some other access network ๐ซ and if the peer checks that the info it received locally over the network-access link layer matches what the server gave it via EAP-AKA', it becomes impossible for the access network to tell one story to the AAA network and another to the peer ๐ these checks prevent some "lying NAS" (Network Access Server) attacks ๐คฅ for example, a roaming partner, R, might claim to be the home network H to lure peers into connecting to itself ๐ชค that would help the roaming partner if it attracts more users, and it would hurt users if their access costs in R are higher than in other alternative networks, such as H ๐ธ
any attacker who gets hold of the keys CK and IK, produced by the AKA algorithm, can compute the keys CK' and IK' and therefore the Master Key (MK) using the rules in Section 3.3 ๐ then the attacker could act as a lying NAS ๐ญ in 3GPP systems in general, the keys CK and IK have been distributed to nodes in, for instance, a visited access network, where they may be vulnerable ๐ฅบ to reduce this risk, the AKA algorithm MUST be computed with the AMF separation bit set to 1, and the peer MUST check that this is indeed the case whenever it runs EAP-AKA' ๐ furthermore, [TS-3GPP.33.402] requires that no CK or IK keys computed this way ever leave the home subscriber system ๐
the extra security benefits from binding obviously depend on how names are assigned to different access networks โ ๏ธ that's specified in [TS-3GPP.24.302], and see also [TS-3GPP.23.003] ๐ ideally, the names allow separating each access technology, each access network, and each NAS within a domain ๐งฉ if that's not possible, the full benefits may not be achieved ๐ for example, if the names identify just an access technology, use of compromised keys in a different technology can be prevented, but it's not possible to stop their use by other domains or devices using the same technology ๐
8. IANA Considerations
IANA has updated the "Extensible Authentication Protocol (EAP) Registry" and the "EAP-AKA and EAP-SIM Parameters" registry so that entries that pointed to RFC 5448 now point to this RFC instead ๐โจ
8.1. Type Value
IANA has updated the reference for EAP-AKA' (0x32) in the "Method Types" subregistry under the "Extensible Authentication Protocol (EAP) Registry" to point to this document ๐ per Section 6.2 of [RFC3748], this allocation can be made with Specification Required [RFC8126] ๐
8.2. Attribute Type Values ๐
okay so EAP-AKA' shares its whole attribute space and its subtypes with EAP-SIM [RFC4186] and EAP-AKA [RFC4187] ๐ซถ which means no new registries are needed!! we're good, bestie ๐
IANA has updated the reference for AT_KDF_INPUT (23) and AT_KDF (24) in the "Attribute Types (Non-Skippable Attributes 0-127)" subregistry under the "EAP-AKA and EAP-SIM Parameters" registry so it points to this document โจ AT_KDF_INPUT and AT_KDF are defined in Sections 3.1 and 3.2, respectively, of this document.
IANA also updated the reference for AT_BIDDING (136) in the "Attribute Types (Skippable Attributes 128-255)" subregistry of the "EAP-AKA and EAP-SIM Parameters" registry to point here too ๐ฆ AT_BIDDING is defined in Section 4.
8.3. Key Derivation Function Namespace ๐ฅ
IANA updated the reference for the "EAP-AKA' AT_KDF Key Derivation Function Values" subregistry, which lives under the "EAP-AKA and EAP-SIM Parameters" registry, so it points to this document ๐ the references for the following entries got updated to point here as well. new values can be created through the Specification Required policy [RFC8126] ๐
+=======+=======================+===========+
| Value | Description | Reference |
+=======+=======================+===========+
| 0 | Reserved | RFC 9048 |
+-------+-----------------------+-----------+
| 1 | EAP-AKA' with CK'/IK' | RFC 9048 |
+-------+-----------------------+-----------+
Table 3: EAP-AKA' AT_KDF Key Derivation
Function Values
9. References ๐
9.1. Normative References ๐ธ
- [FIPS.180-4] National Institute of Standards and Technology, "Secure Hash Standard", FIPS PUB 180-4, DOI 10.6028/NIST.FIPS.180-4, August 2015,
https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf. - [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997,
https://www.rfc-editor.org/info/rfc2104. - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
https://www.rfc-editor.org/info/rfc2119. - [RFC3748] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. Levkowetz, Ed., "Extensible Authentication Protocol (EAP)", RFC 3748, DOI 10.17487/RFC3748, June 2004,
https://www.rfc-editor.org/info/rfc3748. - [RFC4187] Arkko, J. and H. Haverinen, "Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA)", RFC 4187, DOI 10.17487/RFC4187, January 2006,
https://www.rfc-editor.org/info/rfc4187. - [RFC7542] DeKok, A., "The Network Access Identifier", RFC 7542, DOI 10.17487/RFC7542, May 2015,
https://www.rfc-editor.org/info/rfc7542. - [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017,
https://www.rfc-editor.org/info/rfc8126. - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
https://www.rfc-editor.org/info/rfc8174. - [TS-3GPP.23.003] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Core Network and Terminals; Numbering, addressing and identification (Release 16)", Version 16.7.0, 3GPP Technical Specification 23.003, June 2021.
- [TS-3GPP.23.501] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; System architecture for the 5G System (5GS); (Release 16)", Version 16.9.0, 3GPP Technical Specification 23.501, June 2021.
- [TS-3GPP.24.302] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Core Network and Terminals; Access to the 3GPP Evolved Packet Core (EPC) via non-3GPP access networks; Stage 3; (Release 16)", Version 16.4.0, 3GPP Technical Specification 24.302, July 2020.
- [TS-3GPP.24.501] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Core Network and Terminals; Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3; (Release 16)", Version 16.9.0, 3GPP Draft Technical Specification 24.501, June 2021.
- [TS-3GPP.33.102] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; 3G Security; Security architecture (Release 16)", Version 16.0.0, 3GPP Technical Specification 33.102, July 2020.
- [TS-3GPP.33.402] 3GPP, "3GPP System Architecture Evolution (SAE); Security aspects of non-3GPP accesses (Release 16)", Version 16.0.0, 3GPP Technical Specification 33.402, July 2020.
- [TS-3GPP.33.501] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; 3G Security; Security architecture and procedures for 5G System (Release 16)", Version 16.7.1, 3GPP Technical Specification 33.501, July 2021.
9.2. Informative References โจ
okay so the informative refs are the receipts ๐งพ๐ they're not required reading to implement this, but they're the papers and specs the whole vibe is built on, bestie. every single one is listed below, exactly as it appears in the original ๐ซถ
[Arapinis2012] Arapinis, M., Mancini, L., Ritter, E., Ryan, M., Golde, N., Redon, R., and R. Borgaonkar, "New Privacy Issues in Mobile Telephony: Fix and Verification", in CCS '12: Proceedings of the 2012 ACM Conference on Computer and Communications Security, Raleigh, North Carolina, USA, DOI 10.1145/2382196.2382221, October 2012, <https://doi.org/10.1145/2382196.2382221>. ๐ฑ๐
[Basin2018] Basin, D., Dreier, J., Hirschi, L., Radomiroviฤ, S., Sasse, R., and V. Stettler, "A Formal Analysis of 5G Authentication", arXiv:1806.10360, DOI 10.1145/3243734.3243846, August 2018, <https://doi.org/10.1145/3243734.3243846>. ๐ง โจ
[Borgaonkar2018] Borgaonkar, R., Hirschi, L., Park, S., and A. Shaik, "New Privacy Threat on 3G, 4G, and Upcoming 5G AKA Protocols", in IACR Cryptology ePrint Archive, 2018. ๐ต๏ธโโ๏ธ
[BT2013] Beekman, J. G. and C. Thompson, "Breaking Cell Phone Authentication: Vulnerabilities in AKA, IMS and Android", in 7th USENIX Workshop on Offensive Technologies, WOOT '13, August 2013. ๐ lowkey iconic title
[EMU-AKA-PFS] Arkko, J., Norrman, K., and V. Torvinen, "Perfect-Forward Secrecy for the Extensible Authentication Protocol Method for Authentication and Key Agreement (EAP-AKA' PFS)", Work in Progress, Internet-Draft, draft-ietf-emu-aka-pfs-05, 30 October 2020, <https://datatracker.ietf.org/doc/html/draft-ietf-emu-aka-pfs-05>. ๐ง
[FIPS.180-1] National Institute of Standards and Technology, "Secure Hash Standard", FIPS PUB 180-1, DOI 10.6028/NIST.FIPS.180-1, April 1995, <https://csrc.nist.gov/publications/detail/fips/180/1/archive/1995-04-17>. ๐
[FIPS.180-2] National Institute of Standards and Technology, "Secure Hash Standard", FIPS PUB 180-2, August 2002, <https://csrc.nist.gov/publications/detail/fips/180/2/archive/2002-08-01>. ๐ the upgrade era ๐
[Heist2015] Scahill, J. and J. Begley, "How Spies Stole the Keys to the Encryption Castle", February 2015, <https://firstlook.org/theintercept/2015/02/19/great-sim-heist/>. ๐ฟ this one is a full plot twist, ngl
[Hussain2019] Hussain, S., Echeverria, M., Chowdhury, O., Li, N., and E. Bertino, "Privacy Attacks to the 4G and 5G Cellular Paging Protocols Using Side Channel Information", in the proceedings of NDSS '19, held 24-27 February, 2019, San Diego, California, 2019. ๐
[Kune2012] Kune, D., Koelndorfer, J., Hopper, N., and Y. Kim, "Location Leaks on the GSM Air Interface", in the proceedings of NDSS '12, held 5-8 February, 2012, San Diego, California, 2012. ๐ location leaks are not it, bestie
[MT2012] Mjรธlsnes, S. F. and J-K. Tsay, "A Vulnerability in the UMTS and LTE Authentication and Key Agreement Protocols", in Computer Network Security, Proceedings of the 6th International Conference on Mathematical Methods, Models and Architectures for Computer Network Security, Lecture Notes in Computer Science, Vol. 7531, pp. 65-76, DOI 10.1007/978-3-642-33704-8_6, October 2012, <https://doi.org/10.1007/978-3-642-33704-8_6>. ๐งฉ
[RFC3310] Niemi, A., Arkko, J., and V. Torvinen, "Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA)", RFC 3310, DOI 10.17487/RFC3310, September 2002, <https://www.rfc-editor.org/info/rfc3310>. ๐ธ
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, <https://www.rfc-editor.org/info/rfc4086>. ๐ฒ randomness is everything, periodt
[RFC4169] Torvinen, V., Arkko, J., and M. Naslund, "Hypertext Transfer Protocol (HTTP) Digest Authentication Using Authentication and Key Agreement (AKA) Version-2", RFC 4169, DOI 10.17487/RFC4169, November 2005, <https://www.rfc-editor.org/info/rfc4169>. ๐ง
[RFC4186] Haverinen, H., Ed. and J. Salowey, Ed., "Extensible Authentication Protocol Method for Global System for Mobile Communications (GSM) Subscriber Identity Modules (EAP-SIM)", RFC 4186, DOI 10.17487/RFC4186, January 2006, <https://www.rfc-editor.org/info/rfc4186>. ๐ถ
[RFC4284] Adrangi, F., Lortz, V., Bari, F., and P. Eronen, "Identity Selection Hints for the Extensible Authentication Protocol (EAP)", RFC 4284, DOI 10.17487/RFC4284, January 2006, <https://www.rfc-editor.org/info/rfc4284>. ๐ช
[RFC4306] Kaufman, C., Ed., "Internet Key Exchange (IKEv2) Protocol", RFC 4306, DOI 10.17487/RFC4306, December 2005, <https://www.rfc-editor.org/info/rfc4306>. ๐๏ธ
[RFC5113] Arkko, J., Aboba, B., Korhonen, J., Ed., and F. Bari, "Network Discovery and Selection Problem", RFC 5113, DOI 10.17487/RFC5113, January 2008, <https://www.rfc-editor.org/info/rfc5113>. ๐ฐ๏ธ
[RFC5247] Aboba, B., Simon, D., and P. Eronen, "Extensible Authentication Protocol (EAP) Key Management Framework", RFC 5247, DOI 10.17487/RFC5247, August 2008, <https://www.rfc-editor.org/info/rfc5247>. ๐๏ธ
[RFC5281] Funk, P. and S. Blake-Wilson, "Extensible Authentication Protocol Tunneled Transport Layer Security Authenticated Protocol Version 0 (EAP-TTLSv0)", RFC 5281, DOI 10.17487/RFC5281, August 2008, <https://www.rfc-editor.org/info/rfc5281>. ๐
[RFC5448] Arkko, J., Lehtovirta, V., and P. Eronen, "Improved Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA')", RFC 5448, DOI 10.17487/RFC5448, May 2009, <https://www.rfc-editor.org/info/rfc5448>. ๐ the predecessor, main character of the appendix below
[RFC6194] Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011, <https://www.rfc-editor.org/info/rfc6194>. ๐จ
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., Morris, J., Hansen, M., and R. Smith, "Privacy Considerations for Internet Protocols", RFC 6973, DOI 10.17487/RFC6973, July 2013, <https://www.rfc-editor.org/info/rfc6973>. ๐ซฃ privacy era
[RFC7170] Zhou, H., Cam-Winget, N., Salowey, J., and S. Hanna, "Tunnel Extensible Authentication Protocol (TEAP) Version 1", RFC 7170, DOI 10.17487/RFC7170, May 2014, <https://www.rfc-editor.org/info/rfc7170>. ๐
[RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 2014, <https://www.rfc-editor.org/info/rfc7258>. ๐๏ธ the whole mood of Section 7.3, no cap
[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. Kivinen, "Internet Key Exchange Protocol Version 2 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 2014, <https://www.rfc-editor.org/info/rfc7296>. ๐
[Shaik2016] Shaik, A., Seifert, J., Borgaonkar, R., Asokan, N., and V. Niemi, "Practical attacks against Privacy and Availability in 4G/LTE Mobile Communication Systems", in the proceedings of NDSS '16 held 21-24 February, 2016, San Diego, California, 2012. ๐ก
[TS-3GPP.35.208] 3GPP, "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; 3G Security; Specification of the MILENAGE Algorithm Set: An example algorithm set for the 3GPP authentication and key generation functions f1, f1*, f2, f3, f4, f5 and f5*; Document 4: Design Conformance Test Data (Release 14)", Version 16.0.0, 3GPP Technical Specification 35.208, July 2020. ๐งช test data is so satisfying
[ZF2005] Zhang, M. and Y. Fang, "Security analysis and enhancements of 3GPP authentication and key agreement protocol", IEEE Transactions on Wireless Communications, Vol. 4, No. 2, DOI 10.1109/TWC.2004.842941, March 2005, <https://doi.org/10.1109/TWC.2004.842941>. ๐ฌ
Appendix A. Changes from RFC 5448 ๐ฆ
okay so this appendix is the glow-up story ๐ชโจ the big change from RFC 5448 is that this one points at a newer version of [TS-3GPP.24.302]. it also brings an updated definition of the Network Name field, now with 5G in it ๐ถ
identifier usage for 5G gets spelled out in Section 5.3 ๐ and the rules for making pseudonym usernames and fast re-authentication identities got an upgrade too. the old version pointed at RFC 4187, and this one has its own updated take. go to Section 5 for the tea โ
the exported parameters for EAP-AKA' are now defined in Section 6, as [RFC5247] requires ๐ฆ. that includes the parameters for both full authentication and fast re-authentication, so everything is covered, bestie ๐ซถ
the security, privacy, and pervasive monitoring considerations got updated or added. they're all in Section 7 ๐ฅ we love to see it
the references to [RFC2119], [RFC4306], [RFC7296], [FIPS.180-1] and [FIPS.180-2] were updated to their newest versions, and the wording in this document changed to match. BUT (and this is important ๐) these are just reference updates to newer specs. the actual protocol functions are exactly the same as in the earlier RFCs. no vibe shift on the protocol itself.
same energy for the 3GPP technical specs: they got bumped to their 5G versions (Release 16), or to the most recent version whenever there wasn't a 5G-related update ๐ง
last but not least, a bunch of clarifications were made, including a summary of where attributes may appear. literally so helpful ๐
Appendix B. Changes to RFC 4187 ๐ง
so this document doesn't just do EAP-AKA'. it also mandates a change to another EAP method, EAP-AKA, which was defined in RFC 4187 ๐ซฃ this change was already mandated in RFC 5448, but it got repeated here so the latest EAP-AKA' spec has the instructions for the bidding down prevention feature in EAP-AKA too. double coverage, iconic ๐
the changes to RFC 4187 only relate to the bidding down prevention support defined in Section 4. the Master Key (MK) calculation and every other part of EAP-AKA are NOT changed by this document ๐ โโ๏ธ sorry, I'm shouting, it's just that important. the provisions in this specification for EAP-AKA' do not apply to EAP-AKA, outside of Section 4. so keep those two lanes separate, bestie ๐ฃ๏ธ๐
Appendix C. Importance of Explicit Negotiation ๐
Picking between the traditional and revised AKA key derivation functions is easy peasy when the choice is tied to one specific radio network, like Long Term Evolution (LTE) from 3GPP or evolved High Rate Packet Data (eHRPD) from 3GPP2. If that radio is always paired with new protocols that can't mix with the old ones, there's no real chance of interop drama, because clients always know whether they're on the old system or the new one. ๐ซถ
But using the new key derivation functions over EAP adds several layers of separation, and that makes choosing the right ones so much harder ๐ญ. Tons of different networks use EAP, and most of them have no way to carry info about what the authentication process is expected to do. EAP itself is super limited when it comes to carrying extra info, as noted in [RFC4284] and [RFC5113]. And even if those networks or EAP got an upgrade, it still wouldn't touch the millions of access networks and clients already out there in the wild.
Just changing the key derivation functions that EAP-AKA [RFC4187] uses would cause interop problems with every existing implementation, which is a no-go ๐ โโ๏ธ. Maybe you could split things up with strict separation into domain names, so only the new clients and networks use the new key derivation function. That can work for specific cases, but it's an extremely brittle mechanism ๐ฅด. It's ripe for problems whenever client configuration, routing of authentication requests, or server configuration doesn't match what people expect. It also doesn't help to assume the EAP client and server are running a particular release of 3GPP network specifications, because network vendors often ship features from future releases early or skip some features from the current release. Plus, there are tons of EAP implementations, and even some EAP-AKA ones, that aren't bundled with the 3GPP network offerings at all. Overall, these approaches are expected to lead to hard-to-diagnose problems and more support calls, and nobody wants that bestie ๐.
Appendix D. Test Vectors ๐งช
Test vectors are provided below for four different cases, and they're super useful for testing implementations ๐ฅ. For the first two cases, we use the MILENAGE algorithm and the algorithm configuration parameters (the subscriber key K and operator algorithm variant configuration value OP) from test set 19 in [TS-3GPP.35.208].
The last two cases use artificial values as the output of AKA. These are only useful for testing the computation of values within EAP-AKA', not AKA itself, so don't get confused ๐.
Case 1 ๐ฆ
The parameters for the AKA run are as follows:
Identity: "0555444333222111"
Network name: "WLAN"
RAND: 81e9 2b6c 0ee0 e12e bceb a8d9 2a99 dfa5
AUTN: bb52 e91c 747a c3ab 2a5c 23d1 5ee3 51d5
IK: 9744 871a d32b f9bb d1dd 5ce5 4e3e 2e5a
CK: 5349 fbe0 9864 9f94 8f5d 2e97 3a81 c00f
RES: 28d7 b0f2 a2ec 3de5
Then the derived keys are generated as follows:
CK': 0093 962d 0dd8 4aa5 684b 045c 9edf fa04
IK': ccfc 230c a74f cc96 c0a5 d611 64f5 a76c
K_encr: 766f a0a6 c317 174b 812d 52fb cd11 a179
K_aut: 0842 ea72 2ff6 835b fa20 3249 9fc3 ec23
c2f0 e388 b4f0 7543 ffc6 77f1 696d 71ea
K_re: cf83 aa8b c7e0 aced 892a cc98 e76a 9b20
95b5 58c7 795c 7094 715c b339 3aa7 d17a
MSK: 67c4 2d9a a56c 1b79 e295 e345 9fc3 d187
d42b e0bf 818d 3070 e362 c5e9 67a4 d544
e8ec fe19 358a b303 9aff 03b7 c930 588c
055b abee 58a0 2650 b067 ec4e 9347 c75a
EMSK: f861 703c d775 590e 16c7 679e a387 4ada
8663 11de 2907 64d7 60cf 76df 647e a01c
313f 6992 4bdd 7650 ca9b ac14 1ea0 75c4
ef9e 8029 c0e2 90cd bad5 638b 63bc 23fb
Case 2 ๐ธ
The parameters for the AKA run are as follows:
Identity: "0555444333222111"
Network name: "HRPD"
RAND: 81e9 2b6c 0ee0 e12e bceb a8d9 2a99 dfa5
AUTN: bb52 e91c 747a c3ab 2a5c 23d1 5ee3 51d5
IK: 9744 871a d32b f9bb d1dd 5ce5 4e3e 2e5a
CK: 5349 fbe0 9864 9f94 8f5d 2e97 3a81 c00f
RES: 28d7 b0f2 a2ec 3de5
Then the derived keys are generated as follows:
CK': 3820 f027 7fa5 f777 32b1 fb1d 90c1 a0da
IK': db94 a0ab 557e f6c9 ab48 619c a05b 9a9f
K_encr: 05ad 73ac 915f ce89 ac77 e152 0d82 187b
K_aut: 5b4a caef 62c6 ebb8 882b 2f3d 534c 4b35
2773 37a0 0184 f20f f25d 224c 04be 2afd
K_re: 3f90 bf5c 6e5e f325 ff04 eb5e f653 9fa8
cca8 3981 94fb d00b e425 b3f4 0dba 10ac
MSK: 87b3 2157 0117 cd6c 95ab 6c43 6fb5 073f
f15c f855 05d2 bc5b b735 5fc2 1ea8 a757
57e8 f86a 2b13 8002 e057 5291 3bb4 3b82
f868 a961 17e9 1a2d 95f5 2667 7d57 2900
EMSK: c891 d5f2 0f14 8a10 0755 3e2d ea55 5c9c
b672 e967 5f4a 66b4 bafa 0273 79f9 3aee
539a 5979 d0a0 042b 9d2a e28b ed3b 17a3
1dc8 ab75 072b 80bd 0c1d a612 466e 402c
Case 3 ๐
The parameters for the AKA run are as follows:
Identity: "0555444333222111"
Network name: "WLAN"
RAND: e0e0 e0e0 e0e0 e0e0 e0e0 e0e0 e0e0 e0e0
AUTN: a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0
IK: b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b0b0
CK: c0c0 c0c0 c0c0 c0c0 c0c0 c0c0 c0c0 c0c0
RES: d0d0 d0d0 d0d0 d0d0 d0d0 d0d0 d0d0 d0d0
Then the derived keys are generated as follows:
CK': cd4c 8e5c 68f5 7dd1 d7d7 dfd0 c538 e577
IK': 3ece 6b70 5dbb f7df c459 a112 80c6 5524
K_encr: 897d 302f a284 7416 488c 28e2 0dcb 7be4
K_aut: c407 00e7 7224 83ae 3dc7 139e b0b8 8bb5
58cb 3081 eccd 057f 9207 d128 6ee7 dd53
K_re: 0a59 1a22 dd8b 5b1c f29e 3d50 8c91 dbbd
b4ae e230 5189 2c42 b6a2 de66 ea50 4473
MSK: 9f7d ca9e 37bb 2202 9ed9 86e7 cd09 d4a7
0d1a c76d 9553 5c5c ac40 a750 4699 bb89
61a2 9ef6 f3e9 0f18 3de5 861a d1be dc81
ce99 1639 1b40 1aa0 06c9 8785 a575 6df7
EMSK: 724d e00b db9e 5681 87be 3fe7 4611 4557
d501 8779 537e e37f 4d3c 6c73 8cb9 7b9d
c651 bc19 bfad c344 ffe2 b52c a78b d831
6b51 dacc 5f2b 1440 cb95 1552 1cc7 ba23
Case 4 ๐ง
The parameters for the AKA run are as follows:
Identity: "0555444333222111"
Network name: "HRPD"
RAND: e0e0 e0e0 e0e0 e0e0 e0e0 e0e0 e0e0 e0e0
AUTN: a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0
IK: b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b0b0
CK: c0c0 c0c0 c0c0 c0c0 c0c0 c0c0 c0c0 c0c0
RES: d0d0 d0d0 d0d0 d0d0 d0d0 d0d0 d0d0 d0d0
Then the derived keys are generated as follows:
CK': 8310 a71c e6f7 5488 9613 da8f 64d5 fb46
IK': 5adf 1436 0ae8 3819 2db2 3f6f cb7f 8c76
K_encr: 745e 7439 ba23 8f50 fcac 4d15 d47c d1d9
K_aut: 3e1d 2aa4 e677 025c fd86 2a4b e183 61a1
3a64 5765 5714 63df 833a 9759 e809 9879
K_re: 99da 835e 2ae8 2462 576f e651 6fad 1f80
2f0f a119 1655 dd0a 273d a96d 04e0 fcd3
MSK: c6d3 a6e0 ceea 951e b20d 74f3 2c30 61d0
680a 04b0 b086 ee87 00ac e3e0 b95f a026
83c2 87be ee44 4322 94ff 98af 26d2 cc78
3bac e75c 4b0a f7fd feb5 511b a8e4 cbd0
EMSK: 7fb5 6813 838a dafa 99d1 40c2 f198 f6da
cebf b6af ee44 4961 1054 02b5 08c7 f363
352c b291 9644 b504 63e6 a693 5415 0147
ae09 cbc5 4b8a 651d 8787 a689 3ed8 536d
Acknowledgments ๐ซถ
The authors would like to thank Guenther Horn, Joe Salowey, Mats Naslund, Adrian Escott, Brian Rosenberg, Laksminath Dondeti, Ahmad Muhanna, Stefan Rommer, Miguel Garcia, Jan Kall, Ankur Agarwal, Jouni Malinen, John Mattsson, Jesus De Gregorio, Brian Weis, Russ Housley, Alfred Hoenes, Anand Palanigounder, Michael Richardson, Roman Danyliw, Dan Romascanu, Kyle Rose, Benjamin Kaduk, Alissa Cooper, Erik Kline, Murray Kucherawy, Robert Wilton, Warren Kumari, Andreas Kunz, Marcus Wong, Kalle Jarvinen, Daniel Migault, and Mohit Sethi for their in-depth reviews and interesting discussions in this problem space. Iconic group, no notes ๐โจ.
Contributors ๐
The test vectors in Appendix D were provided by Yogendra Pal and Jouni Malinen, based on two independent implementations of this specification. Absolutely legendary work ๐ฅ.
Jouni Malinen provided suggested text for Section 6. John Mattsson provided much of the text for Section 7.1. Karl Norrman was the source of much of the information in Section 7.2. ๐
Authors' Addresses ๐ฌ
Jari Arkko
Ericsson
FI-02420 Jorvas
Finland
Email: jari.arkko@piuha.net
Vesa Lehtovirta
Ericsson
FI-02420 Jorvas
Finland
Email: vesa.lehtovirta@ericsson.com
Vesa Torvinen
Ericsson
FI-02420 Jorvas
Finland
Email: vesa.torvinen@ericsson.com
Pasi Eronen
Independent
Finland
Email: pe@iki.fi
๐ฆ where this page comes from
- ietf: rfc9048 2021-10
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms