7 Network Working Group H. Haverinen, Ed.
8 Request for Comments: 4186 Nokia
9 Category: Informational J. Salowey, Ed.
14 Extensible Authentication Protocol Method for
15 Global System for Mobile Communications (GSM)
16 Subscriber Identity Modules (EAP-SIM)
20 This memo provides information for the Internet community. It does
21 not specify an Internet standard of any kind. Distribution of this
26 Copyright (C) The Internet Society (2006).
30 The EAP-SIM protocol was developed by 3GPP. The documentation of
31 EAP-SIM is provided as information to the Internet community. While
32 the EAP WG has verified that EAP-SIM is compatible with EAP, as
33 defined in RFC 3748, no other review has been done, including
34 validation of the security claims. The IETF has also not reviewed
35 the security of the cryptographic algorithms.
39 This document specifies an Extensible Authentication Protocol (EAP)
40 mechanism for authentication and session key distribution using the
41 Global System for Mobile Communications (GSM) Subscriber Identity
42 Module (SIM). GSM is a second generation mobile network standard.
43 The EAP-SIM mechanism specifies enhancements to GSM authentication
44 and key agreement whereby multiple authentication triplets can be
45 combined to create authentication responses and session keys of
46 greater strength than the individual GSM triplets. The mechanism
47 also includes network authentication, user anonymity support, result
48 indications, and a fast re-authentication procedure.
58 Haverinen & Salowey Informational [Page 1]
60 RFC 4186 EAP-SIM Authentication January 2006
65 1. Introduction ....................................................4
66 2. Terms ...........................................................5
67 3. Overview ........................................................8
68 4. Operation ......................................................10
69 4.1. Version Negotiation .......................................10
70 4.2. Identity Management .......................................11
71 4.2.1. Format, Generation and Usage of Peer Identities ....11
72 4.2.2. Communicating the Peer Identity to the Server ......17
73 4.2.3. Choice of Identity for the EAP-Response/Identity ...19
74 4.2.4. Server Operation in the Beginning of
75 EAP-SIM Exchange ...................................19
76 4.2.5. Processing of EAP-Request/SIM/Start by the Peer ....20
77 4.2.6. Attacks Against Identity Privacy ...................21
78 4.2.7. Processing of AT_IDENTITY by the Server ............22
79 4.3. Message Sequence Examples (Informative) ...................23
80 4.3.1. Full Authentication ................................24
81 4.3.2. Fast Re-authentication .............................25
82 4.3.3. Fall Back to Full Authentication ...................26
83 4.3.4. Requesting the Permanent Identity 1 ................27
84 4.3.5. Requesting the Permanent Identity 2 ................28
85 4.3.6. Three EAP-SIM/Start Roundtrips .....................28
86 5. Fast Re-Authentication .........................................30
87 5.1. General ...................................................30
88 5.2. Comparison to UMTS AKA ....................................31
89 5.3. Fast Re-authentication Identity ...........................31
90 5.4. Fast Re-authentication Procedure ..........................33
91 5.5. Fast Re-authentication Procedure when Counter Is
92 Too Small .................................................36
93 6. EAP-SIM Notifications ..........................................37
94 6.1. General ...................................................37
95 6.2. Result Indications ........................................39
96 6.3. Error Cases ...............................................40
97 6.3.1. Peer Operation .....................................40
98 6.3.2. Server Operation ...................................41
99 6.3.3. EAP-Failure ........................................42
100 6.3.4. EAP-Success ........................................42
101 7. Key Generation .................................................43
102 8. Message Format and Protocol Extensibility ......................45
103 8.1. Message Format ............................................45
104 8.2. Protocol Extensibility ....................................47
105 9. Messages .......................................................48
106 9.1. EAP-Request/SIM/Start .....................................48
107 9.2. EAP-Response/SIM/Start ....................................49
108 9.3. EAP-Request/SIM/Challenge .................................49
109 9.4. EAP-Response/SIM/Challenge ................................50
110 9.5. EAP-Request/SIM/Re-authentication .........................51
114 Haverinen & Salowey Informational [Page 2]
116 RFC 4186 EAP-SIM Authentication January 2006
119 9.6. EAP-Response/SIM/Re-authentication ........................51
120 9.7. EAP-Response/SIM/Client-Error .............................52
121 9.8. EAP-Request/SIM/Notification ..............................52
122 9.9. EAP-Response/SIM/Notification .............................53
123 10. Attributes ....................................................53
124 10.1. Table of Attributes ......................................53
125 10.2. AT_VERSION_LIST ..........................................54
126 10.3. AT_SELECTED_VERSION ......................................55
127 10.4. AT_NONCE_MT ..............................................55
128 10.5. AT_PERMANENT_ID_REQ ......................................56
129 10.6. AT_ANY_ID_REQ ............................................56
130 10.7. AT_FULLAUTH_ID_REQ .......................................57
131 10.8. AT_IDENTITY ..............................................57
132 10.9. AT_RAND ..................................................58
133 10.10. AT_NEXT_PSEUDONYM .......................................59
134 10.11. AT_NEXT_REAUTH_ID .......................................59
135 10.12. AT_IV, AT_ENCR_DATA, and AT_PADDING .....................60
136 10.13. AT_RESULT_IND ...........................................62
137 10.14. AT_MAC ..................................................62
138 10.15. AT_COUNTER ..............................................63
139 10.16. AT_COUNTER_TOO_SMALL ....................................63
140 10.17. AT_NONCE_S ..............................................64
141 10.18. AT_NOTIFICATION .........................................64
142 10.19. AT_CLIENT_ERROR_CODE ....................................65
143 11. IANA Considerations ...........................................66
144 12. Security Considerations .......................................66
145 12.1. A3 and A8 Algorithms .....................................66
146 12.2. Identity Protection ......................................66
147 12.3. Mutual Authentication and Triplet Exposure ...............67
148 12.4. Flooding the Authentication Centre .......................69
149 12.5. Key Derivation ...........................................69
150 12.6. Cryptographic Separation of Keys and Session
151 Independence .............................................70
152 12.7. Dictionary Attacks .......................................71
153 12.8. Credentials Re-use .......................................71
154 12.9. Integrity and Replay Protection, and Confidentiality .....72
155 12.10. Negotiation Attacks .....................................73
156 12.11. Protected Result Indications ............................73
157 12.12. Man-in-the-Middle Attacks ...............................74
158 12.13. Generating Random Numbers ...............................74
159 13. Security Claims ...............................................74
160 14. Acknowledgements and Contributions ............................75
161 14.1. Contributors .............................................75
162 14.2. Acknowledgements .........................................75
163 14.2.1. Contributors' Addresses ...........................77
164 15. References ....................................................78
165 15.1. Normative References .....................................78
166 15.2. Informative References ...................................79
170 Haverinen & Salowey Informational [Page 3]
172 RFC 4186 EAP-SIM Authentication January 2006
175 Appendix A. Test Vectors .........................................81
176 A.1. EAP-Request/Identity .....................................81
177 A.2. EAP-Response/Identity ....................................81
178 A.3. EAP-Request/SIM/Start ....................................82
179 A.4. EAP-Response/SIM/Start ...................................82
180 A.5. EAP-Request/SIM/Challenge ................................83
181 A.6. EAP-Response/SIM/Challenge ...............................86
182 A.7. EAP-Success ..............................................86
183 A.8. Fast Re-authentication ...................................86
184 A.9. EAP-Request/SIM/Re-authentication ........................87
185 A.10. EAP-Response/SIM/Re-authentication ......................89
186 Appendix B. Pseudo-Random Number Generator .......................90
190 This document specifies an Extensible Authentication Protocol (EAP)
191 [RFC3748] mechanism for authentication and session key distribution
192 using the Global System for Mobile Communications (GSM) Subscriber
193 Identity Module (SIM).
195 GSM is a second generation mobile network standard. Second
196 generation mobile networks and third generation mobile networks use
197 different authentication and key agreement mechanisms. EAP-AKA
198 [EAP-AKA] specifies an EAP method that is based on the Authentication
199 and Key Agreement (AKA) mechanism used in 3rd generation mobile
202 GSM authentication is based on a challenge-response mechanism. The
203 A3/A8 authentication and key derivation algorithms that run on the
204 SIM can be given a 128-bit random number (RAND) as a challenge. The
205 SIM runs operator-specific algorithms, which take the RAND and a
206 secret key Ki (stored on the SIM) as input, and produce a 32-bit
207 response (SRES) and a 64-bit long key Kc as output. The Kc key is
208 originally intended to be used as an encryption key over the air
209 interface, but in this protocol, it is used for deriving keying
210 material and is not directly used. Hence, the secrecy of Kc is
211 critical to the security of this protocol. For more information
212 about GSM authentication, see [GSM-03.20]. See Section 12.1 for more
213 discussion about the GSM algorithms used in EAP-SIM.
215 The lack of mutual authentication is a weakness in GSM
216 authentication. The derived 64-bit cipher key (Kc) is not strong
217 enough for data networks in which stronger and longer keys are
218 required. Hence, in EAP-SIM, several RAND challenges are used for
219 generating several 64-bit Kc keys, which are combined to constitute
220 stronger keying material. In EAP-SIM, the client issues a random
221 number NONCE_MT to the network in order to contribute to key
222 derivation, and to prevent replays of EAP-SIM requests from previous
226 Haverinen & Salowey Informational [Page 4]
228 RFC 4186 EAP-SIM Authentication January 2006
231 exchanges. The NONCE_MT can be conceived as the client's challenge
232 to the network. EAP-SIM also extends the combined RAND challenges
233 and other messages with a message authentication code in order to
234 provide message integrity protection along with mutual
237 EAP-SIM specifies optional support for protecting the privacy of
238 subscriber identity using the same concept as the GSM, which uses
239 pseudonyms/temporary identifiers. It also specifies an optional fast
240 re-authentication procedure.
242 The security of EAP-SIM builds on underlying GSM mechanisms. The
243 security properties of EAP-SIM are documented in Section 11 of this
244 document. Implementers and users of EAP-SIM are advised to carefully
245 study the security considerations in Section 11 in order to determine
246 whether the security properties are sufficient for the environment in
247 question, especially as the secrecy of Kc keys is essential to the
248 security of EAP-SIM. In brief, EAP-SIM is in no sense weaker than
249 the GSM mechanisms. In some cases EAP-SIM provides better security
250 properties than the underlying GSM mechanisms, particularly if the
251 SIM credentials are only used for EAP-SIM and are not re-used from
252 GSM/GPRS. Many of the security features of EAP-SIM rely upon the
253 secrecy of the Kc values in the SIM triplets, so protecting these
254 values is key to the security of the EAP-SIM protocol.
256 The 3rd Generation Partnership Project (3GPP) has specified an
257 enhanced Authentication and Key Agreement (AKA) architecture for the
258 Universal Mobile Telecommunications System (UMTS). The 3rd
259 generation AKA mechanism includes mutual authentication, replay
260 protection, and derivation of longer session keys. EAP-AKA [EAP-AKA]
261 specifies an EAP method that is based on the 3rd generation AKA.
262 EAP-AKA, which is a more secure protocol, may be used instead of
263 EAP-SIM, if 3rd generation identity modules and 3G network
264 infrastructures are available.
268 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
269 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
270 document are to be interpreted as described in [RFC2119].
272 The terms and abbreviations "authenticator", "backend authentication
273 server", "EAP server", "peer", "Silently Discard", "Master Session
274 Key (MSK)", and "Extended Master Session Key (EMSK)" in this document
275 are to be interpreted as described in [RFC3748].
282 Haverinen & Salowey Informational [Page 5]
284 RFC 4186 EAP-SIM Authentication January 2006
287 This document frequently uses the following terms and abbreviations:
291 Authentication, Authorization, and Accounting protocol
295 Authentication Centre. The GSM network element that provides
296 the authentication triplets for authenticating
299 Authentication vector
301 GSM triplets can be alternatively called authentication
306 Extensible Authentication Protocol
308 Fast re-authentication
310 An EAP-SIM authentication exchange that is based on keys
311 derived upon a preceding full authentication exchange.
312 The GSM authentication and key exchange algorithms are not
313 used in the fast re-authentication procedure.
315 Fast Re-authentication Identity
317 A fast re-authentication identity of the peer, including an NAI
318 realm portion in environments where a realm is used. Used on
319 fast re-authentication only.
321 Fast Re-authentication Username
323 The username portion of fast re-authentication identity,
324 i.e., not including any realm portions.
328 An EAP-SIM authentication exchange based on the GSM
329 authentication and key agreement algorithms.
333 Global System for Mobile communications.
338 Haverinen & Salowey Informational [Page 6]
340 RFC 4186 EAP-SIM Authentication January 2006
345 The tuple formed by the three GSM authentication values RAND,
350 International Mobile Subscriber Identifier, used in GSM to
351 identify subscribers.
355 Message Authentication Code
359 Network Access Identifier
363 A value that is used at most once or that is never repeated
364 within the same cryptographic context. In general, a nonce can
365 be predictable (e.g., a counter) or unpredictable (e.g., a
366 random value). Since some cryptographic properties may depend
367 on the randomness of the nonce, attention should be paid to
368 whether a nonce is required to be random or not. In this
369 document, the term nonce is only used to denote random nonces,
370 and it is not used to denote counters.
374 The permanent identity of the peer, including an NAI realm
375 portion in environments where a realm is used. The permanent
376 identity is usually based on the IMSI. Used on full
381 The username portion of permanent identity, i.e., not including
386 A pseudonym identity of the peer, including an NAI realm
387 portion in environments where a realm is used. Used on
388 full authentication only.
394 Haverinen & Salowey Informational [Page 7]
396 RFC 4186 EAP-SIM Authentication January 2006
401 The username portion of pseudonym identity, i.e., not including
406 Subscriber Identity Module. The SIM is traditionally a smart
407 card distributed by a GSM operator.
411 Figure 1 shows an overview of the EAP-SIM full authentication
412 procedure, wherein optional protected success indications are not
413 used. The authenticator typically communicates with an EAP server
414 that is located on a backend authentication server using an AAA
415 protocol. The authenticator shown in the figure is often simply
416 relaying EAP messages to and from the EAP server, but these backend
417 AAA communications are not shown.
420 | EAP-Request/Identity |
421 |<---------------------------------------------------------|
423 | EAP-Response/Identity |
424 |--------------------------------------------------------->|
426 | EAP-Request/SIM/Start (AT_VERSION_LIST) |
427 |<---------------------------------------------------------|
429 | EAP-Response/SIM/Start (AT_NONCE_MT, AT_SELECTED_VERSION)|
430 |--------------------------------------------------------->|
432 | EAP-Request/SIM/Challenge (AT_RAND, AT_MAC) |
433 |<---------------------------------------------------------|
434 +-------------------------------------+ |
435 | Peer runs GSM algorithms, verifies | |
436 | AT_MAC and derives session keys | |
437 +-------------------------------------+ |
438 | EAP-Response/SIM/Challenge (AT_MAC) |
439 |--------------------------------------------------------->|
442 |<---------------------------------------------------------|
445 Figure 1: EAP-SIM full authentication procedure
450 Haverinen & Salowey Informational [Page 8]
452 RFC 4186 EAP-SIM Authentication January 2006
455 The first EAP Request issued by the authenticator is
456 EAP-Request/Identity. On full authentication, the peer's response
457 includes either the user's International Mobile Subscriber Identity
458 (IMSI) or a temporary identity (pseudonym) if identity privacy is in
459 effect, as specified in Section 4.2.
461 Following the peer's EAP-Response/Identity packet, the peer receives
462 EAP Requests of Type 18 (SIM) from the EAP server and sends the
463 corresponding EAP Responses. The EAP packets that are of the Type
464 SIM also have a Subtype field. On full authentication, the first
465 EAP-Request/SIM packet is of the Subtype 10 (Start). EAP-SIM packets
466 encapsulate parameters in attributes, encoded in a Type, Length,
467 Value format. The packet format and the use of attributes are
468 specified in Section 8.
470 The EAP-Request/SIM/Start packet contains the list of EAP-SIM
471 versions supported by the EAP server in the AT_VERSION_LIST
472 attribute. This packet may also include attributes for requesting
473 the subscriber identity, as specified in Section 4.2.
475 The peer responds to a EAP-Request/SIM/Start with the
476 EAP-Response/SIM/Start packet, which includes the AT_NONCE_MT
477 attribute that contains a random number NONCE_MT, chosen by the peer,
478 and the AT_SELECTED_VERSION attribute that contains the version
479 number selected by the peer. The version negotiation is protected by
480 including the version list and the selected version in the
481 calculation of keying material (Section 7).
483 After receiving the EAP Response/SIM/Start, the EAP server obtains n
484 GSM triplets for use in authenticating the subscriber, where n = 2 or
485 n = 3. From the triplets, the EAP server derives the keying
486 material, as specified in Section 7. The triplets may be obtained by
487 contacting an Authentication Centre (AuC) on the GSM network; per GSM
488 specifications, between 1 and 5 triplets may be obtained at a time.
489 Triplets may be stored in the EAP server for use at a later time, but
490 triplets MUST NOT be re-used, except in some error cases that are
491 specified in Section 10.9.
493 The next EAP Request the EAP Server issues is of the type SIM and
494 subtype Challenge (11). It contains the RAND challenges and a
495 message authentication code attribute AT_MAC to cover the challenges.
496 The AT_MAC attribute is a general message authentication code
497 attribute that is used in many EAP-SIM messages.
499 On receipt of the EAP-Request/SIM/Challenge message, the peer runs
500 the GSM authentication algorithm and calculates a copy of the message
501 authentication code. The peer then verifies that the calculated MAC
502 equals the received MAC. If the MAC's do not match, then the peer
506 Haverinen & Salowey Informational [Page 9]
508 RFC 4186 EAP-SIM Authentication January 2006
511 sends the EAP-Response/SIM/Client-Error packet and the authentication
514 Since the RANDs given to a peer are accompanied by the message
515 authentication code AT_MAC, and since the peer's NONCE_MT value
516 contributes to AT_MAC, the peer is able to verify that the EAP-SIM
517 message is fresh (i.e., not a replay) and that the sender possesses
518 valid GSM triplets for the subscriber.
520 If all checks out, the peer responds with the
521 EAP-Response/SIM/Challenge, containing the AT_MAC attribute that
522 covers the peer's SRES response values (Section 9.4). The EAP server
523 verifies that the MAC is correct. Because protected success
524 indications are not used in this example, the EAP server sends the
525 EAP-Success packet, indicating that the authentication was
526 successful. (Protected success indications are discussed in
527 Section 6.2.) The EAP server may also include derived keying
528 material in the message it sends to the authenticator. The peer has
529 derived the same keying material, so the authenticator does not
530 forward the keying material to the peer along with EAP-Success.
532 EAP-SIM also includes a separate fast re-authentication procedure
533 that does not make use of the A3/A8 algorithms or the GSM
534 infrastructure. Fast re-authentication is based on keys derived on
535 full authentication. If the peer has maintained state information
536 for fast re-authentication and wants to use fast re-authentication,
537 then the peer indicates this by using a specific fast
538 re-authentication identity instead of the permanent identity or a
539 pseudonym identity. The fast re-authentication procedure is
540 described in Section 5.
544 4.1. Version Negotiation
546 EAP-SIM includes version negotiation so as to allow future
547 developments in the protocol. The version negotiation is performed
548 on full authentication and it uses two attributes, AT_VERSION_LIST,
549 which the server always includes in EAP-Request/SIM/Start, and
550 AT_SELECTED_VERSION, which the peer includes in
551 EAP-Response/SIM/Start on full authentication.
553 AT_VERSION_LIST includes the EAP-SIM versions supported by the
554 server. If AT_VERSION_LIST does not include a version that is
555 implemented by the peer and allowed in the peer's security policy,
556 then the peer MUST send the EAP-Response/SIM/Client-Error packet
557 (Section 9.7) to the server with the error code "unsupported
558 version". If a suitable version is included, then the peer includes
562 Haverinen & Salowey Informational [Page 10]
564 RFC 4186 EAP-SIM Authentication January 2006
567 the AT_SELECTED_VERSION attribute, containing the selected version in
568 the EAP-Response/SIM/Start packet. The peer MUST only indicate a
569 version that is included in the AT_VERSION_LIST. If several versions
570 are acceptable, then the peer SHOULD choose the version that occurs
571 first in the version list.
573 The version number list of AT_VERSION_LIST and the selected version
574 of AT_SELECTED_VERSION are included in the key derivation procedure
575 (Section 7). If an attacker modifies either one of these attributes,
576 then the peer and the server derive different keying material.
577 Because K_aut keys are different, the server and peer calculate
578 different AT_MAC values. Hence, the peer detects that AT_MAC,
579 included in EAP-Request/SIM/Challenge, is incorrect and sends the
580 EAP-Response/SIM/Client-Error packet. The authentication procedure
583 4.2. Identity Management
585 4.2.1. Format, Generation and Usage of Peer Identities
589 In the beginning of EAP authentication, the Authenticator or the EAP
590 server usually issues the EAP-Request/Identity packet to the peer.
591 The peer responds with the EAP-Response/Identity, which contains the
592 user's identity. The formats of these packets are specified in
595 GSM subscribers are identified with the International Mobile
596 Subscriber Identity (IMSI) [GSM-03.03]. The IMSI is a string of not
597 more than 15 digits. It is composed of a three digit Mobile Country
598 Code (MCC), a two or three digit Mobile Network Code (MNC), and a
599 Mobile Subscriber Identification Number (MSIN) of no more than 10
600 digits. MCC and MNC uniquely identify the GSM operator and help
601 identify the AuC from which the authentication vectors need to be
602 retrieved for this subscriber.
604 Internet AAA protocols identify users with the Network Access
605 Identifier (NAI) [RFC4282]. When used in a roaming environment, the
606 NAI is composed of a username and a realm, separated with "@"
607 (username@realm). The username portion identifies the subscriber
610 This section specifies the peer identity format used in EAP-SIM. In
611 this document, the term "identity" or "peer identity" refers to the
612 whole identity string that is used to identify the peer. The peer
618 Haverinen & Salowey Informational [Page 11]
620 RFC 4186 EAP-SIM Authentication January 2006
623 identity may include a realm portion. "Username" refers to the
624 portion of the peer identity that identifies the user, i.e., the
625 username does not include the realm portion.
627 4.2.1.2. Identity Privacy Support
629 EAP-SIM includes optional identity privacy (anonymity) support that
630 can be used to hide the cleartext permanent identity and thereby make
631 the subscriber's EAP exchanges untraceable to eavesdroppers. Because
632 the permanent identity never changes, revealing it would help
633 observers to track the user. The permanent identity is usually based
634 on the IMSI, which may further help the tracking, because the same
635 identifier may be used in other contexts as well. Identity privacy
636 is based on temporary identities, or pseudonyms, which are equivalent
637 to but separate from the Temporary Mobile Subscriber Identities
638 (TMSI) that are used on cellular networks. Please see Section 12.2
639 for security considerations regarding identity privacy.
641 4.2.1.3. Username Types in EAP-SIM identities
643 There are three types of usernames in EAP-SIM peer identities:
645 (1) Permanent usernames. For example,
646 1123456789098765@myoperator.com might be a valid permanent identity.
647 In this example, 1123456789098765 is the permanent username.
649 (2) Pseudonym usernames. For example, 3s7ah6n9q@myoperator.com might
650 be a valid pseudonym identity. In this example, 3s7ah6n9q is the
653 (3) Fast re-authentication usernames. For example,
654 53953754@myoperator.com might be a valid fast re-authentication
655 identity. In this case, 53953754 is the fast re-authentication
656 username. Unlike permanent usernames and pseudonym usernames, fast
657 re-authentication usernames are one-time identifiers, which are not
658 re-used across EAP exchanges.
660 The first two types of identities are used only on full
661 authentication and the last one only on fast re-authentication. When
662 the optional identity privacy support is not used, the non-pseudonym
663 permanent identity is used on full authentication. The fast
664 re-authentication exchange is specified in Section 5.
666 4.2.1.4. Username Decoration
668 In some environments, the peer may need to decorate the identity by
669 prepending or appending the username with a string, in order to
670 indicate supplementary AAA routing information in addition to the NAI
674 Haverinen & Salowey Informational [Page 12]
676 RFC 4186 EAP-SIM Authentication January 2006
679 realm. (The usage of an NAI realm portion is not considered
680 decoration.) Username decoration is out of the scope of this
681 document. However, it should be noted that username decoration might
682 prevent the server from recognizing a valid username. Hence,
683 although the peer MAY use username decoration in the identities that
684 the peer includes in EAP-Response/Identity, and although the EAP
685 server MAY accept a decorated peer username in this message, the peer
686 or the EAP server MUST NOT decorate any other peer identities that
687 are used in various EAP-SIM attributes. Only the identity used in
688 the EAP-Response/Identity may be decorated.
690 4.2.1.5. NAI Realm Portion
692 The peer MAY include a realm portion in the peer identity, as per the
693 NAI format. The use of a realm portion is not mandatory.
695 If a realm is used, the realm MAY be chosen by the subscriber's home
696 operator and it MAY be a configurable parameter in the EAP-SIM peer
697 implementation. In this case, the peer is typically configured with
698 the NAI realm of the home operator. Operators MAY reserve a specific
699 realm name for EAP-SIM users. This convention makes it easy to
700 recognize that the NAI identifies a GSM subscriber. Such a reserved
701 NAI realm may be a useful hint as to the first authentication method
702 to use during method negotiation. When the peer is using a pseudonym
703 username instead of the permanent username, the peer selects the
704 realm name portion similarly as it select the realm portion when
705 using the permanent username.
707 If no configured realm name is available, the peer MAY derive the
708 realm name from the MCC and MNC portions of the IMSI. A RECOMMENDED
709 way to derive the realm from the IMSI using the realm 3gppnetwork.org
710 is specified in [3GPP-TS-23.003].
712 Some old implementations derive the realm name from the IMSI by
713 concatenating "mnc", the MNC digits of IMSI, ".mcc", the MCC digits
714 of IMSI, and ".owlan.org". For example, if the IMSI is
715 123456789098765, and the MNC is three digits long, then the derived
716 realm name is "mnc456.mcc123.owlan.org". As there are no DNS servers
717 running at owlan.org, these realm names can only be used with
718 manually configured AAA routing. New implementations SHOULD use the
719 mechanism specified in [3GPP-TS-23.003] instead of owlan.org.
721 The IMSI is a string of digits without any explicit structure, so the
722 peer may not be able to determine the length of the MNC portion. If
723 the peer is not able to determine whether the MNC is two or three
724 digits long, the peer MAY use a 3-digit MNC. If the correct length
725 of the MNC is two, then the MNC used in the realm name includes the
726 first digit of the MSIN. Hence, when configuring AAA networks for
730 Haverinen & Salowey Informational [Page 13]
732 RFC 4186 EAP-SIM Authentication January 2006
735 operators that have 2-digit MNCs, the network SHOULD also be prepared
736 for realm names with incorrect, 3-digit MNCs.
738 4.2.1.6. Format of the Permanent Username
740 The non-pseudonym permanent username SHOULD be derived from the IMSI.
741 In this case, the permanent username MUST be of the format "1" |
742 IMSI, where the character "|" denotes concatenation. In other words,
743 the first character of the username is the digit one (ASCII value 31
744 hexadecimal), followed by the IMSI. The IMSI is encoded as an ASCII
745 string that consists of not more than 15 decimal digits (ASCII values
746 between 30 and 39 hexadecimal), one character per IMSI digit, in the
747 order specified in [GSM-03.03]. For example, a permanent username
748 derived from the IMSI 295023820005424 would be encoded as the ASCII
749 string "1295023820005424" (byte values in hexadecimal notation: 31 32
750 39 35 30 32 33 38 32 30 30 30 35 34 32 34).
752 The EAP server MAY use the leading "1" as a hint to try EAP-SIM as
753 the first authentication method during method negotiation, rather
754 than, for example EAP/AKA. The EAP-SIM server MAY propose EAP-SIM,
755 even if the leading character was not "1".
757 Alternatively, an implementation MAY choose a permanent username that
758 is not based on the IMSI. In this case, the selection of the
759 username, its format, and its processing is out of the scope of this
760 document. In this case, the peer implementation MUST NOT prepend any
761 leading characters to the username.
763 4.2.1.7. Generating Pseudonyms and Fast Re-authentication Identities by
766 Pseudonym usernames and fast re-authentication identities are
767 generated by the EAP server. The EAP server produces pseudonym
768 usernames and fast re-authentication identities in an
769 implementation-dependent manner. Only the EAP server needs to be
770 able to map the pseudonym username to the permanent identity, or to
771 recognize a fast re-authentication identity.
773 EAP-SIM includes no provisions to ensure that the same EAP server
774 that generated a pseudonym username will be used on the
775 authentication exchange when the pseudonym username is used. It is
776 recommended that the EAP servers implement some centralized mechanism
777 to allow all EAP servers of the home operator to map pseudonyms
778 generated by other severs to the permanent identity. If no such
779 mechanism is available, then the EAP server failing to understand a
780 pseudonym issued by another server can request the that peer send the
786 Haverinen & Salowey Informational [Page 14]
788 RFC 4186 EAP-SIM Authentication January 2006
791 When issuing a fast re-authentication identity, the EAP server may
792 include a realm name in the identity to make the fast
793 re-authentication request be forwarded to the same EAP server.
795 When generating fast re-authentication identities, the server SHOULD
796 choose a fresh, new fast re-authentication identity that is different
797 from the previous ones that were used after the same full
798 authentication exchange. A full authentication exchange and the
799 associated fast re-authentication exchanges are referred to here as
800 the same "full authentication context". The fast re-authentication
801 identity SHOULD include a random component. This random component
802 works as a full authentication context identifier. A
803 context-specific fast re-authentication identity can help the server
804 to detect whether its fast re-authentication state information
805 matches that of its peer (in other words, whether the state
806 information is from the same full authentication exchange). The
807 random component also makes the fast re-authentication identities
808 unpredictable, so an attacker cannot initiate a fast
809 re-authentication exchange to get the server's EAP-Request/SIM/
810 Re-authentication packet.
812 Transmitting pseudonyms and fast re-authentication identities from
813 the server to the peer is discussed in Section 4.2.1.8. The
814 pseudonym is transmitted as a username, without an NAI realm, and the
815 fast re-authentication identity is transmitted as a complete NAI,
816 including a realm portion if a realm is required. The realm is
817 included in the fast re-authentication identity to allow the server
818 to include a server-specific realm.
820 Regardless of the construction method, the pseudonym username MUST
821 conform to the grammar specified for the username portion of an NAI.
822 The fast re-authentication identity also MUST conform to the NAI
823 grammar. The EAP servers that the subscribers of an operator can use
824 MUST ensure that the pseudonym usernames and the username portions
825 used in fast re-authentication identities they generate are unique.
827 In any case, it is necessary that permanent usernames, pseudonym
828 usernames, and fast re-authentication usernames are separate and
829 recognizable from each other. It is also desirable that EAP-SIM and
830 EAP-AKA [EAP-AKA] usernames be distinguishable from each other as an
831 aid for the server on which method to offer.
833 In general, it is the task of the EAP server and the policies of its
834 administrator to ensure sufficient separation of the usernames.
835 Pseudonym usernames and fast re-authentication usernames are both
836 produced and used by the EAP server. The EAP server MUST compose
837 pseudonym usernames and fast re-authentication usernames so that it
838 can determine if an NAI username is an EAP-SIM pseudonym username or
842 Haverinen & Salowey Informational [Page 15]
844 RFC 4186 EAP-SIM Authentication January 2006
847 an EAP-SIM fast re-authentication username. For instance, when the
848 usernames have been derived from the IMSI, the server could use
849 different leading characters in the pseudonym usernames and fast
850 re-authentication usernames (e.g., the pseudonym could begin with a
851 leading "3" character). When mapping a fast re-authentication
852 identity to a permanent identity, the server SHOULD only examine the
853 username portion of the fast re-authentication identity and ignore
854 the realm portion of the identity.
856 Because the peer may fail to save a pseudonym username sent in an
857 EAP-Request/SIM/Challenge, for example due to malfunction, the EAP
858 server SHOULD maintain at least the most recently used pseudonym
859 username in addition to the most recently issued pseudonym username.
860 If the authentication exchange is not completed successfully, then
861 the server SHOULD NOT overwrite the pseudonym username that was
862 issued during the most recent successful authentication exchange.
864 4.2.1.8. Transmitting Pseudonyms and Fast Re-authentication Identities
867 The server transmits pseudonym usernames and fast re-authentication
868 identities to the peer in cipher, using the AT_ENCR_DATA attribute.
870 The EAP-Request/SIM/Challenge message MAY include an encrypted
871 pseudonym username and/or an encrypted fast re-authentication
872 identity in the value field of the AT_ENCR_DATA attribute. Because
873 identity privacy support and fast re-authentication are optional
874 implementations, the peer MAY ignore the AT_ENCR_DATA attribute and
875 always use the permanent identity. On fast re-authentication
876 (discussed in Section 5), the server MAY include a new, encrypted
877 fast re-authentication identity in the
878 EAP-Request/SIM/Re-authentication message.
880 On receipt of the EAP-Request/SIM/Challenge, the peer MAY decrypt the
881 encrypted data in AT_ENCR_DATA. If the authentication exchange is
882 successful, and the encrypted data includes a pseudonym username,
883 then the peer may use the obtained pseudonym username on the next
884 full authentication. If a fast re-authentication identity is
885 included, then the peer MAY save it together with other fast
886 re-authentication state information, as discussed in Section 5, for
887 the next fast re-authentication. If the authentication exchange does
888 not complete successfully, the peer MUST ignore the received
889 pseudonym username and the fast re-authentication identity.
891 If the peer does not receive a new pseudonym username in the
892 EAP-Request/SIM/Challenge message, the peer MAY use an old pseudonym
893 username instead of the permanent username on the next full
894 authentication. The username portions of fast re-authentication
898 Haverinen & Salowey Informational [Page 16]
900 RFC 4186 EAP-SIM Authentication January 2006
903 identities are one-time usernames, which the peer MUST NOT re-use.
904 When the peer uses a fast re-authentication identity in an EAP
905 exchange, the peer MUST discard the fast re-authentication identity
906 and not re-use it in another EAP authentication exchange, even if the
907 authentication exchange was not completed.
909 4.2.1.9. Usage of the Pseudonym by the Peer
911 When the optional identity privacy support is used on full
912 authentication, the peer MAY use a pseudonym username received as
913 part of a previous full authentication sequence as the username
914 portion of the NAI. The peer MUST NOT modify the pseudonym username
915 received in AT_NEXT_PSEUDONYM. However, as discussed above, the peer
916 MAY need to decorate the username in some environments by appending
917 or prepending the username with a string that indicates supplementary
918 AAA routing information.
920 When using a pseudonym username in an environment where a realm
921 portion is used, the peer concatenates the received pseudonym
922 username with the "@" character and an NAI realm portion. The
923 selection of the NAI realm is discussed above. The peer can select
924 the realm portion similarly, regardless of whether it uses the
925 permanent username or a pseudonym username.
927 4.2.1.10. Usage of the Fast Re-authentication Identity by the Peer
929 On fast re-authentication, the peer uses the fast re-authentication
930 identity that was received as part of the previous authentication
931 sequence. A new re-authentication identity may be delivered as part
932 of both full authentication and fast re-authentication. The peer
933 MUST NOT modify the username part of the fast re-authentication
934 identity received in AT_NEXT_REAUTH_ID, except in cases when username
935 decoration is required. Even in these cases, the "root" fast
936 re-authentication username must not be modified, but it may be
937 appended or prepended with another string.
939 4.2.2. Communicating the Peer Identity to the Server
943 The peer identity MAY be communicated to the server with the
944 EAP-Response/Identity message. This message MAY contain the
945 permanent identity, a pseudonym identity, or a fast re-authentication
946 identity. If the peer uses the permanent identity or a pseudonym
947 identity, which the server is able to map to the permanent identity,
948 then the authentication proceeds as discussed in the overview of
949 Section 3. If the peer uses a fast re-authentication identity, and
950 if the fast re-authentication identity matches with a valid fast
954 Haverinen & Salowey Informational [Page 17]
956 RFC 4186 EAP-SIM Authentication January 2006
959 re-authentication identity maintained by the server, and if the
960 server agrees to use fast re-authentication, then a fast
961 re-authentication exchange is performed, as described in Section 5.
963 The peer identity can also be transmitted from the peer to the server
964 using EAP-SIM messages instead of the EAP-Response/Identity. In this
965 case, the server includes an identity-requesting attribute
966 (AT_ANY_ID_REQ, AT_FULLAUTH_ID_REQ or AT_PERMANENT_ID_REQ) in the
967 EAP-Request/SIM/Start message, and the peer includes the AT_IDENTITY
968 attribute, which contains the peer's identity, in the
969 EAP-Response/SIM/Start message. The AT_ANY_ID_REQ attribute is a
970 general identity-requesting attribute, which the server uses if it
971 does not specify which kind of an identity the peer should return in
972 AT_IDENTITY. The server uses the AT_FULLAUTH_ID_REQ attribute to
973 request either the permanent identity or a pseudonym identity. The
974 server uses the AT_PERMANENT_ID_REQ attribute to request that the
975 peer send its permanent identity.
977 The identity format in the AT_IDENTITY attribute is the same as in
978 the EAP-Response/Identity packet (except that identity decoration is
979 not allowed). The AT_IDENTITY attribute contains a permanent
980 identity, a pseudonym identity, or a fast re-authentication identity.
982 Please note that the EAP-SIM peer and the EAP-SIM server only process
983 the AT_IDENTITY attribute; entities that only pass through EAP
984 packets do not process this attribute. Hence, the authenticator and
985 other intermediate AAA elements (such as possible AAA proxy servers)
986 will continue to refer to the peer with the original identity from
987 the EAP-Response/Identity packet unless the identity authenticated in
988 the AT_IDENTITY attribute is communicated to them in another way
989 within the AAA protocol.
991 4.2.2.2. Relying on EAP-Response/Identity Discouraged
993 The EAP-Response/Identity packet is not method-specific, so in many
994 implementations it may be handled by an EAP Framework. This
995 introduces an additional layer of processing between the EAP peer and
996 EAP server. The extra layer of processing may cache identity
997 responses or add decorations to the identity. A modification of the
998 identity response will cause the EAP peer and EAP server to use
999 different identities in the key derivation, which will cause the
1002 For this reason, it is RECOMMENDED that the EAP peer and server use
1003 the method-specific identity attributes in EAP-SIM, and the server is
1004 strongly discouraged from relying upon the EAP-Response/Identity.
1010 Haverinen & Salowey Informational [Page 18]
1012 RFC 4186 EAP-SIM Authentication January 2006
1015 In particular, if the EAP server receives a decorated identity in
1016 EAP-Response/Identity, then the EAP server MUST use the
1017 identity-requesting attributes to request that the peer send an
1018 unmodified and undecorated copy of the identity in AT_IDENTITY.
1020 4.2.3. Choice of Identity for the EAP-Response/Identity
1022 If EAP-SIM peer is started upon receiving an EAP-Request/Identity
1023 message, then the peer MAY use an EAP-SIM identity in the EAP-
1024 Response/Identity packet. In this case, the peer performs the
1027 If the peer has maintained fast re-authentication state information
1028 and wants to use fast re-authentication, then the peer transmits the
1029 fast re-authentication identity in EAP-Response/Identity.
1031 Else, if the peer has a pseudonym username available, then the peer
1032 transmits the pseudonym identity in EAP-Response/Identity.
1034 In other cases, the peer transmits the permanent identity in
1035 EAP-Response/Identity.
1037 4.2.4. Server Operation in the Beginning of EAP-SIM Exchange
1039 As discussed in Section 4.2.2.2, the server SHOULD NOT rely on an
1040 identity string received in EAP-Response/Identity. Therefore, the
1041 RECOMMENDED way to start an EAP-SIM exchange is to ignore any
1042 received identity strings. The server SHOULD begin the EAP-SIM
1043 exchange by issuing the EAP-Request/SIM/Start packet with an
1044 identity-requesting attribute to indicate that the server wants the
1045 peer to include an identity in the AT_IDENTITY attribute of the EAP-
1046 Response/SIM/Start message. Three methods to request an identity
1047 from the peer are discussed below.
1049 If the server chooses not to ignore the contents of EAP-
1050 Response/Identity, then the server may have already received an EAP-
1051 SIM identity in this packet. However, if the EAP server has not
1052 received any EAP-SIM peer identity (permanent identity, pseudonym
1053 identity, or fast re-authentication identity) from the peer when
1054 sending the first EAP-SIM request, or if the EAP server has received
1055 an EAP-Response/Identity packet but the contents do not appear to be
1056 a valid permanent identity, pseudonym identity or a re-authentication
1057 identity, then the server MUST request an identity from the peer
1058 using one of the methods below.
1060 The server sends the EAP-Request/SIM/Start message with the
1061 AT_PERMANENT_ID_REQ attribute to indicate that the server wants the
1062 peer to include the permanent identity in the AT_IDENTITY attribute
1066 Haverinen & Salowey Informational [Page 19]
1068 RFC 4186 EAP-SIM Authentication January 2006
1071 of the EAP-Response/SIM/Start message. This is done in the following
1074 o The server does not support fast re-authentication or identity
1077 o The server decided to process a received identity, and the server
1078 recognizes the received identity as a pseudonym identity but the
1079 server is not able to map the pseudonym identity to a permanent
1082 The server issues the EAP-Request/SIM/Start packet with the
1083 AT_FULLAUTH_ID_REQ attribute to indicate that the server wants the
1084 peer to include a full authentication identity (pseudonym identity or
1085 permanent identity) in the AT_IDENTITY attribute of the
1086 EAP-Response/SIM/Start message. This is done in the following cases:
1088 o The server does not support fast re-authentication and the server
1089 supports identity privacy.
1091 o The server decided to process a received identity, and the server
1092 recognizes the received identity as a re-authentication identity
1093 but the server is not able to map the re-authentication identity
1094 to a permanent identity.
1096 The server issues the EAP-Request/SIM/Start packet with the
1097 AT_ANY_ID_REQ attribute to indicate that the server wants the peer to
1098 include an identity in the AT_IDENTITY attribute of the
1099 EAP-Response/SIM/Start message, and the server does not indicate any
1100 preferred type for the identity. This is done in other cases, such
1101 as when the server ignores a received EAP-Response/Identity, the
1102 server does not have any identity, or the server does not recognize
1103 the format of a received identity.
1105 4.2.5. Processing of EAP-Request/SIM/Start by the Peer
1107 Upon receipt of an EAP-Request/SIM/Start message, the peer MUST
1108 perform the following steps.
1110 If the EAP-Request/SIM/Start does not include an identity request
1111 attribute, then the peer responds with EAP-Response/SIM/Start without
1112 AT_IDENTITY. The peer includes the AT_SELECTED_VERSION and
1113 AT_NONCE_MT attributes, because the exchange is a full authentication
1116 If the EAP-Request/SIM/Start includes AT_PERMANENT_ID_REQ, and if the
1117 peer does not have a pseudonym available, then the peer MUST respond
1118 with EAP-Response/SIM/Start and include the permanent identity in
1122 Haverinen & Salowey Informational [Page 20]
1124 RFC 4186 EAP-SIM Authentication January 2006
1127 AT_IDENTITY. If the peer has a pseudonym available, then the peer
1128 MAY refuse to send the permanent identity; hence, in this case the
1129 peer MUST either respond with EAP-Response/SIM/Start and include the
1130 permanent identity in AT_IDENTITY or respond with EAP-Response/SIM/
1131 Client-Error packet with the code "unable to process packet".
1133 If the EAP-Request/SIM/Start includes AT_FULL_AUTH_ID_REQ, and if the
1134 peer has a pseudonym available, then the peer SHOULD respond with
1135 EAP-Response/SIM/Start and include the pseudonym identity in
1136 AT_IDENTITY. If the peer does not have a pseudonym when it receives
1137 this message, then the peer MUST respond with EAP-Response/SIM/Start
1138 and include the permanent identity in AT_IDENTITY. The Peer MUST NOT
1139 use a re-authentication identity in the AT_IDENTITY attribute.
1141 If the EAP-Request/SIM/Start includes AT_ANY_ID_REQ, and if the peer
1142 has maintained fast re-authentication state information and the peer
1143 wants to use fast re-authentication, then the peer responds with
1144 EAP-Response/SIM/Start and includes the fast re-authentication
1145 identity in AT_IDENTITY. Else, if the peer has a pseudonym identity
1146 available, then the peer responds with EAP-Response/SIM/Start and
1147 includes the pseudonym identity in AT_IDENTITY. Else, the peer
1148 responds with EAP-Response/SIM/Start and includes the permanent
1149 identity in AT_IDENTITY.
1151 An EAP-SIM exchange may include several EAP/SIM/Start rounds. The
1152 server may issue a second EAP-Request/SIM/Start if it was not able to
1153 recognize the identity that the peer used in the previous AT_IDENTITY
1154 attribute. At most, three EAP/SIM/Start rounds can be used, so the
1155 peer MUST NOT respond to more than three EAP-Request/SIM/Start
1156 messages within an EAP exchange. The peer MUST verify that the
1157 sequence of EAP-Request/SIM/Start packets that the peer receives
1158 comply with the sequencing rules defined in this document. That is,
1159 AT_ANY_ID_REQ can only be used in the first EAP-Request/SIM/Start; in
1160 other words, AT_ANY_ID_REQ MUST NOT be used in the second or third
1161 EAP-Request/SIM/Start. AT_FULLAUTH_ID_REQ MUST NOT be used if the
1162 previous EAP-Request/SIM/Start included AT_PERMANENT_ID_REQ. The
1163 peer operation, in cases when it receives an unexpected attribute or
1164 an unexpected message, is specified in Section 6.3.1.
1166 4.2.6. Attacks Against Identity Privacy
1168 The section above specifies two possible ways the peer can operate
1169 upon receipt of AT_PERMANENT_ID_REQ. This is because a received
1170 AT_PERMANENT_ID_REQ does not necessarily originate from the valid
1171 network, but an active attacker may transmit an EAP-Request/SIM/
1172 Start packet with an AT_PERMANENT_ID_REQ attribute to the peer, in an
1173 effort to find out the true identity of the user. If the peer does
1174 not want to reveal its permanent identity, then the peer sends the
1178 Haverinen & Salowey Informational [Page 21]
1180 RFC 4186 EAP-SIM Authentication January 2006
1183 EAP-Response/SIM/Client-Error packet with the error code "unable to
1184 process packet", and the authentication exchange terminates.
1186 Basically, there are two different policies that the peer can employ
1187 with regard to AT_PERMANENT_ID_REQ. A "conservative" peer assumes
1188 that the network is able to maintain pseudonyms robustly. Therefore,
1189 if a conservative peer has a pseudonym username, the peer responds
1190 with EAP-Response/SIM/Client-Error to the EAP packet with
1191 AT_PERMANENT_ID_REQ, because the peer believes that the valid network
1192 is able to map the pseudonym identity to the peer's permanent
1193 identity. (Alternatively, the conservative peer may accept
1194 AT_PERMANENT_ID_REQ in certain circumstances, for example, if the
1195 pseudonym was received a long time ago.) The benefit of this policy
1196 is that it protects the peer against active attacks on anonymity. On
1197 the other hand, a "liberal" peer always accepts the
1198 AT_PERMANENT_ID_REQ and responds with the permanent identity. The
1199 benefit of this policy is that it works even if the valid network
1200 sometimes loses pseudonyms and is not able to map them to the
1203 4.2.7. Processing of AT_IDENTITY by the Server
1205 When the server receives an EAP-Response/SIM/Start message with the
1206 AT_IDENTITY (in response to the server's identity requesting
1207 attribute), the server MUST operate as follows.
1209 If the server used AT_PERMANENT_ID_REQ, and if the AT_IDENTITY does
1210 not contain a valid permanent identity, then the server sends
1211 EAP-Request/SIM/Notification with AT_NOTIFICATION code "General
1212 failure" (16384), and the EAP exchange terminates. If the server
1213 recognizes the permanent identity and is able to continue, then the
1214 server proceeds with full authentication by sending EAP-Request/SIM/
1217 If the server used AT_FULLAUTH_ID_REQ, and if AT_IDENTITY contains a
1218 valid permanent identity or a pseudonym identity that the server can
1219 map to a valid permanent identity, then the server proceeds with full
1220 authentication by sending EAP-Request/SIM/Challenge. If AT_IDENTITY
1221 contains a pseudonym identity that the server is not able to map to a
1222 valid permanent identity, or an identity that the server is not able
1223 to recognize or classify, then the server sends EAP-Request/SIM/Start
1224 with AT_PERMANENT_ID_REQ.
1226 If the server used AT_ANY_ID_REQ, and if the AT_IDENTITY contains a
1227 valid permanent identity or a pseudonym identity that the server can
1228 map to a valid permanent identity, then the server proceeds with full
1229 authentication by sending EAP-Request/SIM/Challenge.
1234 Haverinen & Salowey Informational [Page 22]
1236 RFC 4186 EAP-SIM Authentication January 2006
1239 If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
1240 fast re-authentication identity and the server agrees on using
1241 re-authentication, then the server proceeds with fast
1242 re-authentication by sending EAP-Request/SIM/Re-authentication
1245 If the server used AT_ANY_ID_REQ, and if the peer sent an
1246 EAP-Response/SIM/Start with only AT_IDENTITY (indicating
1247 re-authentication), but the server is not able to map the identity to
1248 a permanent identity, then the server sends EAP-Request/SIM/Start
1249 with AT_FULLAUTH_ID_REQ.
1251 If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
1252 fast re-authentication identity that the server is able to map to a
1253 permanent identity, and if the server does not want to use fast
1254 re-authentication, then the server sends EAP-Request/SIM/Start
1255 without any identity requesting attributes.
1257 If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
1258 identity that the server recognizes as a pseudonym identity but the
1259 server is not able to map the pseudonym identity to a permanent
1260 identity, then the server sends EAP-Request/SIM/Start with
1261 AT_PERMANENT_ID_REQ.
1263 If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
1264 identity that the server is not able to recognize or classify, then
1265 the server sends EAP-Request/SIM/Start with AT_FULLAUTH_ID_REQ.
1267 4.3. Message Sequence Examples (Informative)
1269 This section contains non-normative message sequence examples to
1270 illustrate how the peer identity can be communicated to the server.
1290 Haverinen & Salowey Informational [Page 23]
1292 RFC 4186 EAP-SIM Authentication January 2006
1295 4.3.1. Full Authentication
1297 This case for full authentication is illustrated below in Figure 2.
1298 In this case, AT_IDENTITY contains either the permanent identity or a
1299 pseudonym identity. The same sequence is also used in case the
1300 server uses the AT_FULLAUTH_ID_REQ in EAP-Request/SIM/Start.
1304 | +------------------------------+
1305 | | Server does not have a |
1306 | | Subscriber identity available|
1307 | | When starting EAP-SIM |
1308 | +------------------------------+
1310 | EAP-Request/SIM/Start |
1311 | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
1312 |<------------------------------------------------------|
1315 | EAP-Response/SIM/Start |
1316 | (AT_IDENTITY, AT_NONCE_MT, |
1317 | AT_SELECTED_VERSION) |
1318 |------------------------------------------------------>|
1321 Figure 2: Requesting any identity, full authentication
1323 If the peer uses its full authentication identity and the AT_IDENTITY
1324 attribute contains a valid permanent identity or a valid pseudonym
1325 identity that the EAP server is able to map to the permanent
1326 identity, then the full authentication sequence proceeds as usual
1327 with the EAP Server issuing the EAP-Request/SIM/Challenge message.
1346 Haverinen & Salowey Informational [Page 24]
1348 RFC 4186 EAP-SIM Authentication January 2006
1351 4.3.2. Fast Re-authentication
1353 The case when the server uses the AT_ANY_ID_REQ and the peer wants to
1354 perform fast re-authentication is illustrated below in Figure 3.
1358 | +------------------------------+
1359 | | Server does not have a |
1360 | | Subscriber identity available|
1361 | | When starting EAP-SIM |
1362 | +------------------------------+
1364 | EAP-Request/SIM/Start |
1365 | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
1366 |<------------------------------------------------------|
1369 | EAP-Response/SIM/Start |
1370 | (AT_IDENTITY containing a fast re-auth. identity) |
1371 |------------------------------------------------------>|
1374 Figure 3: Requesting any identity, fast re-authentication
1376 On fast re-authentication, if the AT_IDENTITY attribute contains a
1377 valid fast re-authentication identity and the server agrees on using
1378 fast re-authentication, then the server proceeds with the fast
1379 re-authentication sequence and issues the EAP-Request/SIM/
1380 Re-authentication packet, as specified in Section 5.
1402 Haverinen & Salowey Informational [Page 25]
1404 RFC 4186 EAP-SIM Authentication January 2006
1407 4.3.3. Fall Back to Full Authentication
1409 Figure 4 illustrates cases in which the server does not recognize the
1410 fast re-authentication identity the peer used in AT_IDENTITY, and
1411 issues a second EAP-Request/SIM/Start message.
1415 | +------------------------------+
1416 | | Server does not have a |
1417 | | Subscriber identity available|
1418 | | When starting EAP-SIM |
1419 | +------------------------------+
1421 | EAP-Request/SIM/Start |
1422 | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
1423 |<------------------------------------------------------|
1426 | EAP-Response/SIM/Start |
1427 | (AT_IDENTITY containing a fast re-auth. identity) |
1428 |------------------------------------------------------>|
1430 | +------------------------------+
1431 | | Server does not recognize |
1432 | | The fast re-auth. |
1434 | +------------------------------+
1436 | EAP-Request/SIM/Start |
1437 | (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST) |
1438 |<------------------------------------------------------|
1441 | EAP-Response/SIM/Start |
1442 | (AT_IDENTITY with a full-auth. identity, AT_NONCE_MT, |
1443 | AT_SELECTED_VERSION) |
1444 |------------------------------------------------------>|
1447 Figure 4: Fall back to full authentication
1458 Haverinen & Salowey Informational [Page 26]
1460 RFC 4186 EAP-SIM Authentication January 2006
1463 4.3.4. Requesting the Permanent Identity 1
1465 Figure 5 illustrates the case in which the EAP server fails to map
1466 the pseudonym identity included in the EAP-Response/Identity packet
1467 to a valid permanent identity.
1471 | EAP-Request/Identity |
1472 |<------------------------------------------------------|
1474 | EAP-Response/Identity |
1475 | (Includes a pseudonym) |
1476 |------------------------------------------------------>|
1478 | +------------------------------+
1479 | | Server fails to map the |
1480 | | Pseudonym to a permanent id. |
1481 | +------------------------------+
1482 | EAP-Request/SIM/Start |
1483 | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
1484 |<------------------------------------------------------|
1486 | EAP-Response/SIM/Start |
1487 | (AT_IDENTITY with permanent identity, AT_NONCE_MT, |
1488 | AT_SELECTED_VERSION) |
1489 |------------------------------------------------------>|
1492 Figure 5: Requesting the permanent identity
1494 If the server recognizes the permanent identity, then the
1495 authentication sequence proceeds as usual with the EAP Server issuing
1496 the EAP-Request/SIM/Challenge message.
1514 Haverinen & Salowey Informational [Page 27]
1516 RFC 4186 EAP-SIM Authentication January 2006
1519 4.3.5. Requesting the Permanent Identity 2
1521 Figure 6 illustrates the case in which the EAP server fails to map
1522 the pseudonym included in the AT_IDENTITY attribute to a valid
1527 | +------------------------------+
1528 | | Server does not have a |
1529 | | Subscriber identity available|
1530 | | When starting EAP-SIM |
1531 | +------------------------------+
1532 | EAP-Request/SIM/Start |
1533 | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
1534 |<------------------------------------------------------|
1536 |EAP-Response/SIM/Start |
1537 |(AT_IDENTITY with a pseudonym identity, AT_NONCE_MT, |
1538 | AT_SELECTED_VERSION) |
1539 |------------------------------------------------------>|
1540 | +-------------------------------+
1541 | | Server fails to map the |
1542 | | Pseudonym in AT_IDENTITY |
1543 | | to a valid permanent identity |
1544 | +-------------------------------+
1546 | EAP-Request/SIM/Start |
1547 | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
1548 |<------------------------------------------------------|
1550 | EAP-Response/SIM/Start |
1551 | (AT_IDENTITY with permanent identity, |
1552 | AT_NONCE_MT, AT_SELECTED_VERSION) |
1553 |------------------------------------------------------>|
1556 Figure 6: Requesting a permanent identity (two EAP-SIM Start rounds)
1558 4.3.6. Three EAP-SIM/Start Roundtrips
1560 In the worst case, there are three EAP/SIM/Start round trips before
1561 the server obtains an acceptable identity. This case is illustrated
1570 Haverinen & Salowey Informational [Page 28]
1572 RFC 4186 EAP-SIM Authentication January 2006
1577 | +------------------------------+
1578 | | Server does not have a |
1579 | | Subscriber identity available|
1580 | | When starting EAP-SIM |
1581 | +------------------------------+
1582 | EAP-Request/SIM/Start |
1583 | (Includes AT_ANY_ID_REQ, AT_VERSION_LIST) |
1584 |<------------------------------------------------------|
1586 | EAP-Response/SIM/Start |
1587 | (AT_IDENTITY with fast re-auth. identity) |
1588 |------------------------------------------------------>|
1590 | +------------------------------+
1591 | | Server does not accept |
1592 | | The fast re-auth. |
1594 | +------------------------------+
1595 | EAP-Request/SIM/Start |
1596 | (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST) |
1597 |<------------------------------------------------------|
1603 |EAP-Response/SIM/Start |
1604 |(AT_IDENTITY with a pseudonym identity, AT_NONCE_MT, |
1605 | AT_SELECTED_VERSION) |
1606 |------------------------------------------------------>|
1608 | +-------------------------------+
1609 | | Server fails to map the |
1610 | | Pseudonym in AT_IDENTITY |
1611 | | to a valid permanent identity |
1612 | +-------------------------------+
1613 | EAP-Request/SIM/Start |
1614 | (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
1615 |<------------------------------------------------------|
1617 | EAP-Response/SIM/Start |
1618 | (AT_IDENTITY with permanent identity, AT_NONCE_MT, |
1619 | AT_SELECTED_VERSION) |
1620 |------------------------------------------------------>|
1622 Figure 7: Three EAP-SIM Start rounds
1626 Haverinen & Salowey Informational [Page 29]
1628 RFC 4186 EAP-SIM Authentication January 2006
1631 After the last EAP-Response/SIM/Start message, the full
1632 authentication sequence proceeds as usual. If the EAP Server
1633 recognizes the permanent identity and is able to proceed, the server
1634 issues the EAP-Request/SIM/Challenge message.
1636 5. Fast Re-Authentication
1640 In some environments, EAP authentication may be performed frequently.
1641 Because the EAP-SIM full authentication procedure makes use of the
1642 GSM SIM A3/A8 algorithms, and therefore requires 2 or 3 fresh
1643 triplets from the Authentication Centre, the full authentication
1644 procedure is not very well suited for frequent use. Therefore,
1645 EAP-SIM includes a more inexpensive fast re-authentication procedure
1646 that does not make use of the SIM A3/A8 algorithms and does not need
1647 new triplets from the Authentication Centre. Re-authentication can
1648 be performed in fewer roundtrips than the full authentication.
1650 Fast re-authentication is optional to implement for both the EAP-SIM
1651 server and peer. On each EAP authentication, either one of the
1652 entities may also fall back on full authentication if it does not
1653 want to use fast re-authentication.
1655 Fast re-authentication is based on the keys derived on the preceding
1656 full authentication. The same K_aut and K_encr keys that were used
1657 in full authentication are used to protect EAP-SIM packets and
1658 attributes, and the original Master Key from full authentication is
1659 used to generate a fresh Master Session Key, as specified in Section
1662 The fast re-authentication exchange makes use of an unsigned 16-bit
1663 counter, included in the AT_COUNTER attribute. The counter has three
1664 goals: 1) it can be used to limit the number of successive
1665 reauthentication exchanges without full authentication 2) it
1666 contributes to the keying material, and 3) it protects the peer and
1667 the server from replays. On full authentication, both the server and
1668 the peer initialize the counter to one. The counter value of at
1669 least one is used on the first fast re-authentication. On subsequent
1670 fast re-authentications, the counter MUST be greater than on any of
1671 the previous re-authentications. For example, on the second fast
1672 re-authentication, the counter value is two or greater. The
1673 AT_COUNTER attribute is encrypted.
1675 Both the peer and the EAP server maintain a copy of the counter. The
1676 EAP server sends its counter value to the peer in the fast
1677 re-authentication request. The peer MUST verify that its counter
1678 value is less than or equal to the value sent by the EAP server.
1682 Haverinen & Salowey Informational [Page 30]
1684 RFC 4186 EAP-SIM Authentication January 2006
1687 The server includes an encrypted server random nonce (AT_NONCE_S) in
1688 the fast re-authentication request. The AT_MAC attribute in the
1689 peer's response is calculated over NONCE_S to provide a
1690 challenge/response authentication scheme. The NONCE_S also
1691 contributes to the new Master Session Key.
1693 Both the peer and the server SHOULD have an upper limit for the
1694 number of subsequent fast re-authentications allowed before a full
1695 authentication needs to be performed. Because a 16-bit counter is
1696 used in fast re-authentication, the theoretical maximum number of
1697 re-authentications is reached when the counter value reaches FFFF
1700 In order to use fast re-authentication, the peer and the EAP server
1701 need to store the following values: Master Key, latest counter value
1702 and the next fast re-authentication identity. K_aut, K_encr may
1703 either be stored or derived again from MK. The server may also need
1704 to store the permanent identity of the user.
1706 5.2. Comparison to UMTS AKA
1708 When analyzing the fast re-authentication exchange, it may be helpful
1709 to compare it with the UMTS Authentication and Key Agreement (AKA)
1710 exchange, which it resembles closely. The counter corresponds to the
1711 UMTS AKA sequence number, NONCE_S corresponds to RAND, AT_MAC in
1712 EAP-Request/SIM/Re-authentication corresponds to AUTN, the AT_MAC in
1713 EAP-Response/SIM/Re-authentication corresponds to RES,
1714 AT_COUNTER_TOO_SMALL corresponds to AUTS, and encrypting the counter
1715 corresponds to the usage of the Anonymity Key. Also, the key
1716 generation on fast re-authentication, with regard to random or fresh
1717 material, is similar to UMTS AKA -- the server generates the NONCE_S
1718 and counter values, and the peer only verifies that the counter value
1721 It should also be noted that encrypting the AT_NONCE_S, AT_COUNTER,
1722 or AT_COUNTER_TOO_SMALL attributes is not important to the security
1723 of the fast re-authentication exchange.
1725 5.3. Fast Re-authentication Identity
1727 The fast re-authentication procedure makes use of separate
1728 re-authentication user identities. Pseudonyms and the permanent
1729 identity are reserved for full authentication only. If a
1730 re-authentication identity is lost and the network does not recognize
1731 it, the EAP server can fall back on full authentication.
1738 Haverinen & Salowey Informational [Page 31]
1740 RFC 4186 EAP-SIM Authentication January 2006
1743 If the EAP server supports fast re-authentication, it MAY include the
1744 skippable AT_NEXT_REAUTH_ID attribute in the encrypted data of
1745 EAP-Request/SIM/Challenge message (Section 9.3). This attribute
1746 contains a new fast re-authentication identity for the next fast
1747 re-authentication. The attribute also works as a capability flag
1748 that, indicating that the server supports fast re-authentication, and
1749 that the server wants to continue using fast re-authentication within
1750 the current context. The peer MAY ignore this attribute, in which
1751 case it MUST use full authentication next time. If the peer wants to
1752 use re-authentication, it uses this fast re-authentication identity
1753 on next authentication. Even if the peer has a fast
1754 re-authentication identity, the peer MAY discard the fast
1755 re-authentication identity and use a pseudonym or the permanent
1756 identity instead, in which case full authentication MUST be
1757 performed. If the EAP server does not include the AT_NEXT_REAUTH_ID
1758 in the encrypted data of EAP-Request/SIM/Challenge or
1759 EAP-Request/SIM/ Re-authentication, then the peer MUST discard its
1760 current fast re-authentication state information and perform a full
1761 authentication next time.
1763 In environments where a realm portion is needed in the peer identity,
1764 the fast re-authentication identity received in AT_NEXT_REAUTH_ID
1765 MUST contain both a username portion and a realm portion, as per the
1766 NAI format. The EAP Server can choose an appropriate realm part in
1767 order to have the AAA infrastructure route subsequent fast
1768 re-authentication related requests to the same AAA server. For
1769 example, the realm part MAY include a portion that is specific to the
1770 AAA server. Hence, it is sufficient to store the context required
1771 for fast re-authentication in the AAA server that performed the full
1774 The peer MAY use the fast re-authentication identity in the
1775 EAP-Response/Identity packet or, in response to the server's
1776 AT_ANY_ID_REQ attribute, the peer MAY use the fast re-authentication
1777 identity in the AT_IDENTITY attribute of the EAP-Response/SIM/Start
1780 The peer MUST NOT modify the username portion of the fast
1781 re-authentication identity, but the peer MAY modify the realm portion
1782 or replace it with another realm portion. The peer might need to
1783 modify the realm in order to influence the AAA routing, for example,
1784 to make sure that the correct server is reached. It should be noted
1785 that sharing the same fast re-authentication key among several
1786 servers may have security risks, so changing the realm portion of the
1787 NAI in order to change the EAP server is not desirable.
1794 Haverinen & Salowey Informational [Page 32]
1796 RFC 4186 EAP-SIM Authentication January 2006
1799 Even if the peer uses a fast re-authentication identity, the server
1800 may want to fall back on full authentication, for example because the
1801 server does not recognize the fast re-authentication identity or does
1802 not want to use fast re-authentication. In this case, the server
1803 starts the full authentication procedure by issuing an
1804 EAP-Request/SIM/Start packet. This packet always starts a full
1805 authentication sequence if it does not include the AT_ANY_ID_REQ
1806 attribute. If the server was not able to recover the peer's identity
1807 from the fast re-authentication identity, the server includes either
1808 the AT_FULLAUTH_ID_REQ or the AT_PERMANENT_ID_REQ attribute in this
1811 5.4. Fast Re-authentication Procedure
1813 Figure 8 illustrates the fast re-authentication procedure. In this
1814 example, the optional protected success indication is not used.
1815 Encrypted attributes are denoted with '*'. The peer uses its
1816 re-authentication identity in the EAP-Response/Identity packet. As
1817 discussed above, an alternative way to communicate the
1818 re-authentication identity to the server is for the peer to use the
1819 AT_IDENTITY attribute in the EAP-Response/SIM/Start message. This
1820 latter case is not illustrated in the figure below, and it is only
1821 possible when the server requests that the peer send its identity by
1822 including the AT_ANY_ID_REQ attribute in the EAP-Request/SIM/Start
1825 If the server recognizes the identity as a valid fast
1826 re-authentication identity, and if the server agrees to use fast
1827 re-authentication, then the server sends the EAP-Request/SIM/
1828 Re-authentication packet to the peer. This packet MUST include the
1829 encrypted AT_COUNTER attribute, with a fresh counter value, the
1830 encrypted AT_NONCE_S attribute that contains a random number chosen
1831 by the server, the AT_ENCR_DATA and the AT_IV attributes used for
1832 encryption, and the AT_MAC attribute that contains a message
1833 authentication code over the packet. The packet MAY also include an
1834 encrypted AT_NEXT_REAUTH_ID attribute that contains the next fast
1835 re-authentication identity.
1837 Fast re-authentication identities are one-time identities. If the
1838 peer does not receive a new fast re-authentication identity, it MUST
1839 use either the permanent identity or a pseudonym identity on the next
1840 authentication to initiate full authentication.
1842 The peer verifies that AT_MAC is correct, and that the counter value
1843 is fresh (greater than any previously used value). The peer MAY save
1844 the next fast re-authentication identity from the encrypted
1845 AT_NEXT_REAUTH_ID for next time. If all checks are successful, the
1846 peer responds with the EAP-Response/SIM/Re-authentication packet,
1850 Haverinen & Salowey Informational [Page 33]
1852 RFC 4186 EAP-SIM Authentication January 2006
1855 including the AT_COUNTER attribute with the same counter value and
1858 The server verifies the AT_MAC attribute and also verifies that the
1859 counter value is the same that it used in the EAP-Request/SIM/
1860 Re-authentication packet. If these checks are successful, the
1861 re-authentication has succeeded and the server sends the EAP-Success
1864 If protected success indications (Section 6.2) were used, the
1865 EAP-Success packet would be preceded by an EAP-SIM notification
1906 Haverinen & Salowey Informational [Page 34]
1908 RFC 4186 EAP-SIM Authentication January 2006
1913 | EAP-Request/Identity |
1914 |<------------------------------------------------------|
1916 | EAP-Response/Identity |
1917 | (Includes a fast re-authentication identity) |
1918 |------------------------------------------------------>|
1920 | +--------------------------------+
1921 | | Server recognizes the identity |
1922 | | and agrees to use fast |
1923 | | re-authentication |
1924 | +--------------------------------+
1930 | EAP-Request/SIM/Re-authentication |
1931 | (AT_IV, AT_ENCR_DATA, *AT_COUNTER, |
1932 | *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC) |
1933 |<------------------------------------------------------|
1935 +-----------------------------------------------+ |
1936 | Peer verifies AT_MAC and the freshness of | |
1937 | the counter. Peer MAY store the new fast re- | |
1938 | authentication identity for next re-auth. | |
1939 +-----------------------------------------------+ |
1941 | EAP-Response/SIM/Re-authentication |
1942 | (AT_IV, AT_ENCR_DATA, *AT_COUNTER with same value, |
1944 |------------------------------------------------------>|
1945 | +--------------------------------+
1946 | | Server verifies AT_MAC and |
1948 | +--------------------------------+
1951 |<------------------------------------------------------|
1954 Figure 8: Fast Re-authentication
1962 Haverinen & Salowey Informational [Page 35]
1964 RFC 4186 EAP-SIM Authentication January 2006
1967 5.5. Fast Re-authentication Procedure when Counter Is Too Small
1969 If the peer does not accept the counter value of EAP-Request/SIM/
1970 Re-authentication, it indicates the counter synchronization problem
1971 by including the encrypted AT_COUNTER_TOO_SMALL in EAP-Response/SIM/
1972 Re-authentication. The server responds with EAP-Request/SIM/Start to
1973 initiate a normal full authentication procedure. This is illustrated
1974 in Figure 9. Encrypted attributes are denoted with '*'.
1977 | EAP-Request/SIM/Start |
1978 | (AT_ANY_ID_REQ, AT_VERSION_LIST) |
1979 |<------------------------------------------------------|
1981 | EAP-Response/SIM/Start |
1983 | (Includes a fast re-authentication identity) |
1984 |------------------------------------------------------>|
1986 | EAP-Request/SIM/Re-authentication |
1987 | (AT_IV, AT_ENCR_DATA, *AT_COUNTER, |
1988 | *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC) |
1989 |<------------------------------------------------------|
1990 +-----------------------------------------------+ |
1991 | AT_MAC is valid but the counter is not fresh. | |
1992 +-----------------------------------------------+ |
1994 | EAP-Response/SIM/Re-authentication |
1995 | (AT_IV, AT_ENCR_DATA, *AT_COUNTER_TOO_SMALL, |
1996 | *AT_COUNTER, AT_MAC) |
1997 |------------------------------------------------------>|
1998 | +----------------------------------------------+
1999 | | Server verifies AT_MAC but detects |
2000 | | That peer has included AT_COUNTER_TOO_SMALL |
2001 | +----------------------------------------------+
2003 | EAP-Request/SIM/Start |
2004 | (AT_VERSION_LIST) |
2005 |<------------------------------------------------------|
2006 +---------------------------------------------------------------+
2007 | Normal full authentication follows. |
2008 +---------------------------------------------------------------+
2011 Figure 9: Fast Re-authentication, counter is not fresh
2018 Haverinen & Salowey Informational [Page 36]
2020 RFC 4186 EAP-SIM Authentication January 2006
2023 In the figure above, the first three messages are similar to the
2024 basic fast re-authentication case. When the peer detects that the
2025 counter value is not fresh, it includes the AT_COUNTER_TOO_SMALL
2026 attribute in EAP-Response/SIM/Re-authentication. This attribute
2027 doesn't contain any data, but it is a request for the server to
2028 initiate full authentication. In this case, the peer MUST ignore the
2029 contents of the server's AT_NEXT_REAUTH_ID attribute.
2031 On receipt of AT_COUNTER_TOO_SMALL, the server verifies AT_MAC and
2032 verifies that AT_COUNTER contains the same counter value as in the
2033 EAP-Request/SIM/Re-authentication packet. If not, the server
2034 terminates the authentication exchange by sending the
2035 EAP-Request/SIM/Notification with AT_NOTIFICATION code "General
2036 failure" (16384). If all checks on the packet are successful, the
2037 server transmits a new EAP-Request/SIM/Start packet and the full
2038 authentication procedure is performed as usual. Since the server
2039 already knows the subscriber identity, it MUST NOT include
2040 AT_ANY_ID_REQ, AT_FULLAUTH_ID_REQ, or AT_PERMANENT_ID_REQ in the
2041 EAP-Request/SIM/Start.
2043 It should be noted that in this case, peer identity is only
2044 transmitted in the AT_IDENTITY attribute at the beginning of the
2045 whole EAP exchange. The fast re-authentication identity used in this
2046 AT_IDENTITY attribute will be used in key derivation (see Section 7).
2048 6. EAP-SIM Notifications
2052 EAP-SIM does not prohibit the use of the EAP Notifications as
2053 specified in [RFC3748]. EAP Notifications can be used at any time in
2054 the EAP-SIM exchange. It should be noted that EAP-SIM does not
2055 protect EAP Notifications. EAP-SIM also specifies method-specific
2056 EAP-SIM notifications that are protected in some cases.
2058 The EAP server can use EAP-SIM notifications to convey notifications
2059 and result indications (Section 6.2) to the peer.
2061 The server MUST use notifications in cases discussed in
2062 Section 6.3.2. When the EAP server issues an
2063 EAP-Request/SIM/Notification packet to the peer, the peer MUST
2064 process the notification packet. The peer MAY show a notification
2065 message to the user and the peer MUST respond to the EAP server with
2066 an EAP-Response/SIM/Notification packet, even if the peer did not
2067 recognize the notification code.
2074 Haverinen & Salowey Informational [Page 37]
2076 RFC 4186 EAP-SIM Authentication January 2006
2079 An EAP-SIM full authentication exchange or a fast re-authentication
2080 exchange MUST NOT include more than one EAP-SIM notification round.
2082 The notification code is a 16-bit number. The most significant bit
2083 is called the Success bit (S bit). The S bit specifies whether the
2084 notification implies failure. The code values with the S bit set to
2085 zero (code values 0...32767) are used on unsuccessful cases. The
2086 receipt of a notification code from this range implies a failed EAP
2087 exchange, so the peer can use the notification as a failure
2088 indication. After receiving the EAP-Response/SIM/Notification for
2089 these notification codes, the server MUST send the EAP-Failure
2092 The receipt of a notification code with the S bit set to one (values
2093 32768...65536) does not imply failure. Notification code "Success"
2094 (32768) has been reserved as a general notification code to indicate
2095 successful authentication.
2097 The second most significant bit of the notification code is called
2098 the Phase bit (P bit). It specifies at which phase of the EAP-SIM
2099 exchange the notification can be used. If the P bit is set to zero,
2100 the notification can only be used after a successful
2101 EAP/SIM/Challenge round in full authentication or a successful
2102 EAP/SIM/Re-authentication round in reauthentication. A
2103 re-authentication round is considered successful only if the peer has
2104 successfully verified AT_MAC and AT_COUNTER attributes, and does not
2105 include the AT_COUNTER_TOO_SMALL attribute in
2106 EAP-Response/SIM/Re-authentication.
2108 If the P bit is set to one, the notification can only by used before
2109 the EAP/SIM/Challenge round in full authentication, or before the
2110 EAP/SIM/Re-authentication round in reauthentication. These
2111 notifications can only be used to indicate various failure cases. In
2112 other words, if the P bit is set to one, then the S bit MUST be set
2115 Section 9.8 and Section 9.9 specify what other attributes must be
2116 included in the notification packets.
2118 Some of the notification codes are authorization related and, hence,
2119 are not usually considered part of the responsibility of an EAP
2120 method. However, they are included as part of EAP-SIM because there
2121 are currently no other ways to convey this information to the user in
2122 a localizable way, and the information is potentially useful for the
2123 user. An EAP-SIM server implementation may decide never to send
2124 these EAP-SIM notifications.
2130 Haverinen & Salowey Informational [Page 38]
2132 RFC 4186 EAP-SIM Authentication January 2006
2135 6.2. Result Indications
2137 As discussed in Section 6.3, the server and the peer use explicit
2138 error messages in all error cases. If the server detects an error
2139 after successful authentication, the server uses an EAP-SIM
2140 notification to indicate failure to the peer. In this case, the
2141 result indication is integrity and replay protected.
2143 By sending an EAP-Response/SIM/Challenge packet or an
2144 EAP-Response/SIM/Re-authentication packet (without
2145 AT_COUNTER_TOO_SMALL), the peer indicates that it has successfully
2146 authenticated the server and that the peer's local policy accepts the
2147 EAP exchange. In other words, these packets are implicit success
2148 indications from the peer to the server.
2150 EAP-SIM also supports optional protected success indications from the
2151 server to the peer. If the EAP server wants to use protected success
2152 indications, it includes the AT_RESULT_IND attribute in the
2153 EAP-Request/SIM/Challenge or the EAP-Request/SIM/Re-authentication
2154 packet. This attribute indicates that the EAP server would like to
2155 use result indications in both successful and unsuccessful cases. If
2156 the peer also wants this, the peer includes AT_RESULT_IND in
2157 EAP-Response/SIM/Challenge or EAP-Response/SIM/Re-authentication.
2158 The peer MUST NOT include AT_RESULT_IND if it did not receive
2159 AT_RESULT_IND from the server. If both the peer and the server used
2160 AT_RESULT_IND, then the EAP exchange is not complete yet, but an
2161 EAP-SIM notification round will follow. The following EAP-SIM
2162 notification may indicate either failure or success.
2164 Success indications with the AT_NOTIFICATION code "Success" (32768)
2165 can only be used if both the server and the peer indicate they want
2166 to use them with AT_RESULT_IND. If the server did not include
2167 AT_RESULT_IND in the EAP-Request/SIM/Challenge or
2168 EAP-Request/SIM/Re-authentication packet, or if the peer did not
2169 include AT_RESULT_IND in the corresponding response packet, then the
2170 server MUST NOT use protected success indications.
2172 Because the server uses the AT_NOTIFICATION code "Success" (32768) to
2173 indicate that the EAP exchange has completed successfully, the EAP
2174 exchange cannot fail when the server processes the EAP-SIM response
2175 to this notification. Hence, the server MUST ignore the contents of
2176 the EAP-SIM response it receives from the
2177 EAP-Request/SIM/Notification with this code. Regardless of the
2178 contents of the EAP-SIM response, the server MUST send EAP-Success as
2186 Haverinen & Salowey Informational [Page 39]
2188 RFC 4186 EAP-SIM Authentication January 2006
2193 This section specifies the operation of the peer and the server in
2194 error cases. The subsections below require the EAP-SIM peer and
2195 server to send an error packet (EAP-Response/SIM/Client-Error from
2196 the peer or EAP-Request/SIM/Notification from the server) in error
2197 cases. However, implementations SHOULD NOT rely upon the correct
2198 error reporting behavior of the peer, authenticator, or the server.
2199 It is possible for error and other messages to be lost in transit or
2200 for a malicious participant to attempt to consume resources by not
2201 issuing error messages. Both the peer and the EAP server SHOULD have
2202 a mechanism to clean up state, even if an error message or
2203 EAP-Success is not received after a timeout period.
2205 6.3.1. Peer Operation
2207 In general, if an EAP-SIM peer detects an error in a received EAP-SIM
2208 packet, the EAP-SIM implementation responds with the
2209 EAP-Response/SIM/Client-Error packet. In response to the
2210 EAP-Response/SIM/Client-Error, the EAP server MUST issue the
2211 EAP-Failure packet and the authentication exchange terminates.
2213 By default, the peer uses the client error code 0, "unable to process
2214 packet". This error code is used in the following cases:
2216 o EAP exchange is not acceptable according to the peer's local
2219 o the peer is not able to parse the EAP request, i.e., the EAP
2220 request is malformed.
2222 o the peer encountered a malformed attribute.
2224 o wrong attribute types or duplicate attributes have been included
2227 o a mandatory attribute is missing.
2229 o unrecognized, non-skippable attribute.
2231 o unrecognized or unexpected EAP-SIM Subtype in the EAP request.
2233 o A RAND challenge repeated in AT_RAND.
2235 o invalid AT_MAC. The peer SHOULD log this event.
2237 o invalid pad bytes in AT_PADDING.
2242 Haverinen & Salowey Informational [Page 40]
2244 RFC 4186 EAP-SIM Authentication January 2006
2247 o the peer does not want to process AT_PERMANENT_ID_REQ.
2249 Separate error codes have been defined for the following error cases
2252 As specified in Section 4.1, when processing the AT_VERSION_LIST
2253 attribute, which lists the EAP-SIM versions supported by the server,
2254 if the attribute does not include a version that is implemented by
2255 the peer and allowed in the peer's security policy, then the peer
2256 MUST send the EAP-Response/SIM/Client-Error packet with the error
2257 code "unsupported version".
2259 If the number of RAND challenges is smaller than what is required by
2260 peer's local policy when processing the AT_RAND attribute, the peer
2261 MUST send the EAP-Response/SIM/Client-Error packet with the error
2262 code "insufficient number of challenges".
2264 If the peer believes that the RAND challenges included in AT_RAND are
2265 not fresh e.g., because it is capable of remembering some previously
2266 used RANDs, the peer MUST send the EAP-Response/SIM/Client-Error
2267 packet with the error code "RANDs are not fresh".
2269 6.3.2. Server Operation
2271 If an EAP-SIM server detects an error in a received EAP-SIM response,
2272 the server MUST issue the EAP-Request/SIM/Notification packet with an
2273 AT_NOTIFICATION code that implies failure. By default, the server
2274 uses one of the general failure codes ("General failure after
2275 authentication" (0), or "General failure" (16384)). The choice
2276 between these two codes depends on the phase of the EAP-SIM exchange,
2277 see Section 6. When the server issues an EAP-
2278 Request/SIM/Notification that implies failure, the error cases
2279 include the following:
2281 o the server is not able to parse the peer's EAP response
2283 o the server encounters a malformed attribute, a non-recognized
2284 non-skippable attribute, or a duplicate attribute
2286 o a mandatory attribute is missing or an invalid attribute was
2289 o unrecognized or unexpected EAP-SIM Subtype in the EAP Response
2291 o invalid AT_MAC. The server SHOULD log this event.
2293 o invalid AT_COUNTER
2298 Haverinen & Salowey Informational [Page 41]
2300 RFC 4186 EAP-SIM Authentication January 2006
2305 The EAP-SIM server sends EAP-Failure in two cases:
2307 1) In response to an EAP-Response/SIM/Client-Error packet the server
2308 has received from the peer, or
2310 2) Following an EAP-SIM notification round, when the AT_NOTIFICATION
2311 code implies failure.
2313 The EAP-SIM server MUST NOT send EAP-Failure in cases other than
2314 these two. However, it should be noted that even though the EAP-SIM
2315 server would not send an EAP-Failure, an authorization decision that
2316 happens outside EAP-SIM, such as in the AAA server or in an
2317 intermediate AAA proxy, may result in a failed exchange.
2319 The peer MUST accept the EAP-Failure packet in case 1) and case 2),
2320 above. The peer SHOULD silently discard the EAP-Failure packet in
2325 On full authentication, the server can only send EAP-Success after
2326 the EAP/SIM/Challenge round. The peer MUST silently discard any
2327 EAP-Success packets if they are received before the peer has
2328 successfully authenticated the server and sent the
2329 EAP-Response/SIM/Challenge packet.
2331 If the peer did not indicate that it wants to use protected success
2332 indications with AT_RESULT_IND (as discussed in Section 6.2) on full
2333 authentication, then the peer MUST accept EAP-Success after a
2334 successful EAP/SIM/Challenge round.
2336 If the peer indicated that it wants to use protected success
2337 indications with AT_RESULT_IND (as discussed in Section 6.2), then
2338 the peer MUST NOT accept EAP-Success after a successful
2339 EAP/SIM/Challenge round. In this case, the peer MUST only accept
2340 EAP-Success after receiving an EAP-SIM Notification with the
2341 AT_NOTIFICATION code "Success" (32768).
2343 On fast re-authentication, EAP-Success can only be sent after the
2344 EAP/SIM/Re-authentication round. The peer MUST silently discard any
2345 EAP-Success packets if they are received before the peer has
2346 successfully authenticated the server and sent the
2347 EAP-Response/SIM/Re-authentication packet.
2349 If the peer did not indicate that it wants to use protected success
2350 indications with AT_RESULT_IND (as discussed in Section 6.2) on fast
2354 Haverinen & Salowey Informational [Page 42]
2356 RFC 4186 EAP-SIM Authentication January 2006
2359 re-authentication, then the peer MUST accept EAP-Success after a
2360 successful EAP/SIM/Re-authentication round.
2362 If the peer indicated that it wants to use protected success
2363 indications with AT_RESULT_IND (as discussed in Section 6.2), then
2364 the peer MUST NOT accept EAP-Success after a successful EAP/SIM/Re-
2365 authentication round. In this case, the peer MUST only accept
2366 EAP-Success after receiving an EAP-SIM Notification with the
2367 AT_NOTIFICATION code "Success" (32768).
2369 If the peer receives an EAP-SIM notification (Section 6) that
2370 indicates failure, then the peer MUST no longer accept the
2371 EAP-Success packet, even if the server authentication was
2372 successfully completed.
2376 This section specifies how keying material is generated.
2378 On EAP-SIM full authentication, a Master Key (MK) is derived from the
2379 underlying GSM authentication values (Kc keys), the NONCE_MT, and
2380 other relevant context as follows.
2382 MK = SHA1(Identity|n*Kc| NONCE_MT| Version List| Selected Version)
2384 In the formula above, the "|" character denotes concatenation.
2385 "Identity" denotes the peer identity string without any terminating
2386 null characters. It is the identity from the last AT_IDENTITY
2387 attribute sent by the peer in this exchange, or, if AT_IDENTITY was
2388 not used, it is the identity from the EAP-Response/Identity packet.
2389 The identity string is included as-is, without any changes. As
2390 discussed in Section 4.2.2.2, relying on EAP-Response/Identity for
2391 conveying the EAP-SIM peer identity is discouraged, and the server
2392 SHOULD use the EAP-SIM method-specific identity attributes.
2394 The notation n*Kc in the formula above denotes the n Kc values
2395 concatenated. The Kc keys are used in the same order as the RAND
2396 challenges in AT_RAND attribute. NONCE_MT denotes the NONCE_MT value
2397 (not the AT_NONCE_MT attribute, but only the nonce value). The
2398 Version List includes the 2-byte-supported version numbers from
2399 AT_VERSION_LIST, in the same order as in the attribute. The Selected
2400 Version is the 2-byte selected version from AT_SELECTED_VERSION.
2401 Network byte order is used, just as in the attributes. The hash
2402 function SHA-1 is specified in [SHA-1]. If several EAP/SIM/Start
2403 roundtrips are used in an EAP-SIM exchange, then the NONCE_MT,
2404 Version List and Selected version from the last EAP/SIM/Start round
2405 are used, and the previous EAP/SIM/Start rounds are ignored.
2410 Haverinen & Salowey Informational [Page 43]
2412 RFC 4186 EAP-SIM Authentication January 2006
2415 The Master Key is fed into a Pseudo-Random number Function (PRF)
2416 which generates separate Transient EAP Keys (TEKs) for protecting
2417 EAP-SIM packets, as well as a Master Session Key (MSK) for link layer
2418 security, and an Extended Master Session Key (EMSK) for other
2419 purposes. On fast re-authentication, the same TEKs MUST be used for
2420 protecting EAP packets, but a new MSK and a new EMSK MUST be derived
2421 from the original MK and from new values exchanged in the fast
2424 EAP-SIM requires two TEKs for its own purposes; the authentication
2425 key K_aut is to be used with the AT_MAC attribute, and the encryption
2426 key K_encr is to be used with the AT_ENCR_DATA attribute. The same
2427 K_aut and K_encr keys are used in full authentication and subsequent
2428 fast re-authentications.
2430 Key derivation is based on the random number generation specified in
2431 NIST Federal Information Processing Standards (FIPS) Publication
2432 186-2 [PRF]. The pseudo-random number generator is specified in the
2433 change notice 1 (2001 October 5) of [PRF] (Algorithm 1). As
2434 specified in the change notice (page 74), when Algorithm 1 is used as
2435 a general-purpose pseudo-random number generator, the "mod q" term in
2436 step 3.3 is omitted. The function G used in the algorithm is
2437 constructed via the Secure Hash Standard, as specified in Appendix
2438 3.3 of the standard. It should be noted that the function G is very
2439 similar to SHA-1, but the message padding is different. Please refer
2440 to [PRF] for full details. For convenience, the random number
2441 algorithm with the correct modification is cited in Appendix B.
2443 160-bit XKEY and XVAL values are used, so b = 160. On each full
2444 authentication, the Master Key is used as the initial secret seed-key
2445 XKEY. The optional user input values (XSEED_j) in step 3.1 are set
2448 On full authentication, the resulting 320-bit random numbers (x_0,
2449 x_1, ..., x_m-1) are concatenated and partitioned into suitable-sized
2450 chunks and used as keys in the following order: K_encr (128 bits),
2451 K_aut (128 bits), Master Session Key (64 bytes), Extended Master
2452 Session Key (64 bytes).
2454 On fast re-authentication, the same pseudo-random number generator
2455 can be used to generate a new Master Session Key and a new Extended
2456 Master Session Key. The seed value XKEY' is calculated as follows:
2458 XKEY' = SHA1(Identity|counter|NONCE_S| MK)
2460 In the formula above, the Identity denotes the fast re-authentication
2461 identity, without any terminating null characters, from the
2462 AT_IDENTITY attribute of the EAP-Response/SIM/Start packet, or, if
2466 Haverinen & Salowey Informational [Page 44]
2468 RFC 4186 EAP-SIM Authentication January 2006
2471 EAP-Response/SIM/Start was not used on fast re-authentication, it
2472 denotes the identity string from the EAP-Response/Identity packet.
2473 The counter denotes the counter value from the AT_COUNTER attribute
2474 used in the EAP-Response/SIM/Re-authentication packet. The counter
2475 is used in network byte order. NONCE_S denotes the 16-byte NONCE_S
2476 value from the AT_NONCE_S attribute used in the
2477 EAP-Request/SIM/Re-authentication packet. The MK is the Master Key
2478 derived on the preceding full authentication.
2480 On fast re-authentication, the pseudo-random number generator is run
2481 with the new seed value XKEY', and the resulting 320-bit random
2482 numbers (x_0, x_1, ..., x_m-1) are concatenated and partitioned into
2483 two 64-byte chunks and used as the new 64-byte Master Session Key and
2484 the new 64-byte Extended Master Session Key. Note that because
2485 K_encr and K_aut are not derived on fast re-authentication, the
2486 Master Session Key and the Extended Master Session key are obtained
2487 from the beginning of the key stream (x_0, x_1, ...).
2489 The first 32 bytes of the MSK can be used as the Pairwise Master Key
2490 (PMK) for IEEE 802.11i.
2492 When the RADIUS attributes specified in [RFC2548] are used to
2493 transport keying material, then the first 32 bytes of the MSK
2494 correspond to MS-MPPE-RECV-KEY and the second 32 bytes to
2495 MS-MPPE-SEND-KEY. In this case, only 64 bytes of keying material
2498 When generating the initial Master Key, the hash function is used as
2499 a mixing function to combine several session keys (Kc's) generated by
2500 the GSM authentication procedure and the random number NONCE_MT into
2501 a single session key. There are several reasons for this. The
2502 current GSM session keys are, at most, 64 bits, so two or more of
2503 them are needed to generate a longer key. By using a one-way
2504 function to combine the keys, we are assured that, even if an
2505 attacker managed to learn one of the EAP-SIM session keys, it
2506 wouldn't help him in learning the original GSM Kc's. In addition,
2507 since we include the random number NONCE_MT in the calculation, the
2508 peer is able to verify that the EAP-SIM packets it receives from the
2509 network are fresh and not replays (also see Section 11).
2511 8. Message Format and Protocol Extensibility
2515 As specified in [RFC3748], EAP packets begin with the Code,
2516 Identifiers, Length, and Type fields, which are followed by EAP-
2517 method-specific Type-Data. The Code field in the EAP header is set
2518 to 1 for EAP requests, and to 2 for EAP Responses. The usage of the
2522 Haverinen & Salowey Informational [Page 45]
2524 RFC 4186 EAP-SIM Authentication January 2006
2527 Length and Identifier fields in the EAP header are also specified in
2528 [RFC3748]. In EAP-SIM, the Type field is set to 18.
2530 In EAP-SIM, the Type-Data begins with an EAP-SIM header that consists
2531 of a 1-octet Subtype field and a 2-octet reserved field. The Subtype
2532 values used in EAP-SIM are defined in the IANA considerations section
2533 of the EAP-AKA specification [EAP-AKA]. The formats of the EAP
2534 header and the EAP-SIM header are shown below.
2537 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
2538 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2539 | Code | Identifier | Length |
2540 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2541 | Type | Subtype | Reserved |
2542 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2544 The rest of the Type-Data that immediately follows the EAP-SIM header
2545 consists of attributes that are encoded in Type, Length, Value
2546 format. The figure below shows the generic format of an attribute.
2549 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
2550 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2551 | Type | Length | Value...
2552 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2557 Indicates the particular type of attribute. The attribute type
2558 values are listed in the IANA considerations section of the
2559 EAP-AKA specification [EAP-AKA].
2563 Indicates the length of this attribute in multiples of four
2564 bytes. The maximum length of an attribute is 1024 bytes. The
2565 length includes the Attribute Type and Length bytes.
2569 The particular data associated with this attribute. This field
2570 is always included and it may be two or more bytes in length.
2571 The type and length fields determine the format and length
2578 Haverinen & Salowey Informational [Page 46]
2580 RFC 4186 EAP-SIM Authentication January 2006
2583 Attributes numbered within the range 0 through 127 are called
2584 non-skippable attributes. When an EAP-SIM peer encounters a
2585 non-skippable attribute that the peer does not recognize, the peer
2586 MUST send the EAP-Response/SIM/Client-Error packet, which terminates
2587 the authentication exchange. If an EAP-SIM server encounters a
2588 non-skippable attribute that the server does not recognize, then the
2589 server sends the EAP-Request/SIM/Notification packet with an
2590 AT_NOTIFICATION code, which implies general failure ("General failure
2591 after authentication" (0), or "General failure" (16384), depending on
2592 the phase of the exchange), which terminates the authentication
2595 Attributes within the range of 128 through 255 are called skippable
2596 attributes. When a skippable attribute is encountered and is not
2597 recognized, it is ignored. The rest of the attributes and message
2598 data MUST still be processed. The Length field of the attribute is
2599 used to skip the attribute value in searching for the next attribute.
2601 Unless otherwise specified, the order of the attributes in an EAP-SIM
2602 message is insignificant and an EAP-SIM implementation should not
2603 assume a certain order to be used.
2605 Attributes can be encapsulated within other attributes. In other
2606 words, the value field of an attribute type can be specified to
2607 contain other attributes.
2609 8.2. Protocol Extensibility
2611 EAP-SIM can be extended by specifying new attribute types. If
2612 skippable attributes are used, it is possible to extend the protocol
2613 without breaking old implementations.
2615 However, any new attributes added to the EAP-Request/SIM/Start or
2616 EAP-Response/SIM/Start packets would not be integrity-protected.
2617 Therefore, these messages MUST NOT be extended in the current version
2618 of EAP-SIM. If the list of supported EAP-SIM versions in the
2619 AT_VERSION_LIST does not include versions other than 1, then the
2620 server MUST NOT include attributes other than those specified in this
2621 document in the EAP-Request/SIM/Start message. Note that future
2622 versions of this protocol might specify new attributes for
2623 EAP-Request/SIM/Start and still support version 1 of the protocol.
2624 In this case, the server might send an EAP-Request/SIM/Start message
2625 that includes new attributes and indicates support for protocol
2626 version 1 and other versions in the AT_VERSION_LIST attribute. If
2627 the peer selects version 1, then the peer MUST ignore any other
2628 attributes included in EAP-Request/SIM/Start, other than those
2629 specified in this document. If the selected EAP-SIM version in
2630 peer's AT_SELECTED_VERSION is 1, then the peer MUST NOT include other
2634 Haverinen & Salowey Informational [Page 47]
2636 RFC 4186 EAP-SIM Authentication January 2006
2639 attributes aside from those specified in this document in the
2640 EAP-Response/SIM/Start message.
2642 When specifying new attributes, it should be noted that EAP-SIM does
2643 not support message fragmentation. Hence, the sizes of the new
2644 extensions MUST be limited so that the maximum transfer unit (MTU) of
2645 the underlying lower layer is not exceeded. According to [RFC3748],
2646 lower layers must provide an EAP MTU of 1020 bytes or greater, so any
2647 extensions to EAP-SIM SHOULD NOT exceed the EAP MTU of 1020 bytes.
2649 Because EAP-SIM supports version negotiation, new versions of the
2650 protocol can also be specified by using a new version number.
2654 This section specifies the messages used in EAP-SIM. It specifies
2655 when a message may be transmitted or accepted, which attributes are
2656 allowed in a message, which attributes are required in a message, and
2657 other message-specific details. The general message format is
2658 specified in Section 8.1.
2660 9.1. EAP-Request/SIM/Start
2662 In full authentication the first SIM-specific EAP Request is
2663 EAP-Request/SIM/Start. The EAP/SIM/Start roundtrip is used for two
2664 purposes. In full authentication this packet is used to request the
2665 peer to send the AT_NONCE_MT attribute to the server. In addition,
2666 as specified in Section 4.2, the Start round trip may be used by the
2667 server for obtaining the peer identity. As discussed in Section 4.2,
2668 several Start rounds may be required to obtain a valid peer identity.
2670 The server MUST always include the AT_VERSION_LIST attribute.
2672 The server MAY include one of the following identity-requesting
2673 attributes: AT_PERMANENT_ID_REQ, AT_FULLAUTH_ID_REQ, or
2674 AT_ANY_ID_REQ. These three attributes are mutually exclusive, so the
2675 server MUST NOT include more than one of the attributes.
2677 If the server has received a response from the peer, it MUST NOT
2678 issue a new EAP-Request/SIM/Start packet if it has previously issued
2679 an EAP-Request/SIM/Start message either without any identity
2680 requesting attributes or with the AT_PERMANENT_ID_REQ attribute.
2682 If the server has received a response from the peer, it MUST NOT
2683 issue a new EAP-Request/SIM/Start packet with the AT_ANY_ID_REQ or
2684 AT_FULLAUTH_ID_REQ attributes if it has previously issued an
2685 EAP-Request/SIM/Start message with the AT_FULLAUTH_ID_REQ attribute.
2690 Haverinen & Salowey Informational [Page 48]
2692 RFC 4186 EAP-SIM Authentication January 2006
2695 If the server has received a response from the peer, it MUST NOT
2696 issue a new EAP-Request/SIM/Start packet with the AT_ANY_ID_REQ
2697 attribute if the server has previously issued an
2698 EAP-Request/SIM/Start message with the AT_ANY_ID_REQ attribute.
2700 This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
2702 9.2. EAP-Response/SIM/Start
2704 The peer sends EAP-Response/SIM/Start in response to a valid
2705 EAP-Request/SIM/Start from the server.
2707 If and only if the server's EAP-Request/SIM/Start includes one of the
2708 identity-requesting attributes, then the peer MUST include the
2709 AT_IDENTITY attribute. The usage of AT_IDENTITY is defined in
2712 The AT_NONCE_MT attribute MUST NOT be included if the AT_IDENTITY
2713 with a fast re-authentication identity is present for fast
2714 re-authentication. AT_NONCE_MT MUST be included in all other cases
2715 (full authentication).
2717 The AT_SELECTED_VERSION attribute MUST NOT be included if the
2718 AT_IDENTITY attribute with a fast re-authentication identity is
2719 present for fast re-authentication. In all other cases,
2720 AT_SELECTED_VERSION MUST be included (full authentication). This
2721 attribute is used in version negotiation, as specified in
2724 This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
2726 9.3. EAP-Request/SIM/Challenge
2728 The server sends the EAP-Request/SIM/Challenge after receiving a
2729 valid EAP-Response/SIM/Start that contains AT_NONCE_MT and
2730 AT_SELECTED_VERSION, and after successfully obtaining the subscriber
2733 The AT_RAND attribute MUST be included.
2735 The AT_RESULT_IND attribute MAY be included. The usage of this
2736 attribute is discussed in Section 6.2.
2738 The AT_MAC attribute MUST be included. For
2739 EAP-Request/SIM/Challenge, the MAC code is calculated over the
2742 EAP packet| NONCE_MT
2746 Haverinen & Salowey Informational [Page 49]
2748 RFC 4186 EAP-SIM Authentication January 2006
2751 The EAP packet is represented as specified in Section 8.1. It is
2752 followed by the 16-byte NONCE_MT value from the peer's AT_NONCE_MT
2755 The EAP-Request/SIM/Challenge packet MAY include encrypted attributes
2756 for identity privacy and for communicating the next fast
2757 re-authentication identity. In this case, the AT_IV and AT_ENCR_DATA
2758 attributes are included (Section 10.12).
2760 The plaintext of the AT_ENCR_DATA value field consists of nested
2761 attributes. The nested attributes MAY include AT_PADDING (as
2762 specified in Section 10.12). If the server supports identity privacy
2763 and wants to communicate a pseudonym to the peer for the next full
2764 authentication, then the nested encrypted attributes include the
2765 AT_NEXT_PSEUDONYM attribute. If the server supports
2766 re-authentication and wants to communicate a fast re-authentication
2767 identity to the peer, then the nested encrypted attributes include
2768 the AT_NEXT_REAUTH_ID attribute.
2770 When processing this message, the peer MUST process AT_RAND before
2771 processing other attributes. Only if AT_RAND is verified to be
2772 valid, the peer derives keys and verifies AT_MAC. The operation in
2773 case an error occurs is specified in Section 6.3.1.
2775 9.4. EAP-Response/SIM/Challenge
2777 The peer sends EAP-Response/SIM/Challenge in response to a valid
2778 EAP-Request/SIM/Challenge.
2780 Sending this packet indicates that the peer has successfully
2781 authenticated the server and that the EAP exchange will be accepted
2782 by the peer's local policy. Hence, if these conditions are not met,
2783 then the peer MUST NOT send EAP-Response/SIM/Challenge, but the peer
2784 MUST send EAP-Response/SIM/Client-Error.
2786 The AT_MAC attribute MUST be included. For EAP-
2787 Response/SIM/Challenge, the MAC code is calculated over the following
2792 The EAP packet is represented as specified in Section 8.1. The EAP
2793 packet bytes are immediately followed by the two or three SRES values
2794 concatenated, denoted above with the notation n*SRES. The SRES
2795 values are used in the same order as the corresponding RAND
2796 challenges in the server's AT_RAND attribute.
2802 Haverinen & Salowey Informational [Page 50]
2804 RFC 4186 EAP-SIM Authentication January 2006
2807 The AT_RESULT_IND attribute MAY be included if it was included in
2808 EAP-Request/SIM/Challenge. The usage of this attribute is discussed
2811 Later versions of this protocol MAY make use of the AT_ENCR_DATA and
2812 AT_IV attributes in this message to include encrypted (skippable)
2813 attributes. The EAP server MUST process EAP-Response/SIM/Challenge
2814 messages that include these attributes even if the server did not
2815 implement these optional attributes.
2817 9.5. EAP-Request/SIM/Re-authentication
2819 The server sends the EAP-Request/SIM/Re-authentication message if it
2820 wants to use fast re-authentication, and if it has received a valid
2821 fast re-authentication identity in EAP-Response/Identity or
2822 EAP-Response/SIM/Start.
2824 AT_MAC MUST be included. No message-specific data is included in the
2825 MAC calculation. See Section 10.14.
2827 The AT_RESULT_IND attribute MAY be included. The usage of this
2828 attribute is discussed in Section 6.2.
2830 The AT_IV and AT_ENCR_DATA attributes MUST be included. The
2831 plaintext consists of the following nested encrypted attributes,
2832 which MUST be included: AT_COUNTER and AT_NONCE_S. In addition, the
2833 nested encrypted attributes MAY include the following attributes:
2834 AT_NEXT_REAUTH_ID and AT_PADDING.
2836 9.6. EAP-Response/SIM/Re-authentication
2838 The client sends the EAP-Response/SIM/Re-authentication packet in
2839 response to a valid EAP-Request/SIM/Re-authentication.
2841 The AT_MAC attribute MUST be included. For
2842 EAP-Response/SIM/Re-authentication, the MAC code is calculated over
2847 The EAP packet is represented as specified in Section 8.1. It is
2848 followed by the 16-byte NONCE_S value from the server's AT_NONCE_S
2851 The AT_IV and AT_ENCR_DATA attributes MUST be included. The nested
2852 encrypted attributes MUST include the AT_COUNTER attribute. The
2853 AT_COUNTER_TOO_SMALL attribute MAY be included in the nested
2858 Haverinen & Salowey Informational [Page 51]
2860 RFC 4186 EAP-SIM Authentication January 2006
2863 encrypted attributes, and it is included in cases specified in
2864 Section 5. The AT_PADDING attribute MAY be included.
2866 The AT_RESULT_IND attribute MAY be included if it was included in
2867 EAP-Request/SIM/Re-authentication. The usage of this attribute is
2868 discussed in Section 6.2.
2870 Sending this packet without AT_COUNTER_TOO_SMALL indicates that the
2871 peer has successfully authenticated the server and that the EAP
2872 exchange will be accepted by the peer's local policy. Hence, if
2873 these conditions are not met, then the peer MUST NOT send
2874 EAP-Response/SIM/Re-authentication, but the peer MUST send
2875 EAP-Response/SIM/Client-Error.
2877 9.7. EAP-Response/SIM/Client-Error
2879 The peer sends EAP-Response/SIM/Client-Error in error cases, as
2880 specified in Section 6.3.1.
2882 The AT_CLIENT_ERROR_CODE attribute MUST be included.
2884 The AT_MAC, AT_IV, or AT_ENCR_DATA attributes MUST NOT be used with
2887 9.8. EAP-Request/SIM/Notification
2889 The usage of this message is specified in Section 6. The
2890 AT_NOTIFICATION attribute MUST be included.
2892 The AT_MAC attribute MUST be included if the P bit of the
2893 notification code in AT_NOTIFICATION is set to zero, and MUST NOT be
2894 included in cases when the P bit is set to one. The P bit is
2895 discussed in Section 6.
2897 No message-specific data is included in the MAC calculation. See
2900 If EAP-Request/SIM/Notification is used on a fast re-authentication
2901 exchange, and if the P bit in AT_NOTIFICATION is set to zero, then
2902 AT_COUNTER is used for replay protection. In this case, the
2903 AT_ENCR_DATA and AT_IV attributes MUST be included, and the
2904 encapsulated plaintext attributes MUST include the AT_COUNTER
2905 attribute. The counter value included in AT_COUNTER MUST be the same
2906 as in the EAP-Request/SIM/Re-authentication packet on the same fast
2907 re-authentication exchange.
2914 Haverinen & Salowey Informational [Page 52]
2916 RFC 4186 EAP-SIM Authentication January 2006
2919 9.9. EAP-Response/SIM/Notification
2921 The usage of this message is specified in Section 6. This packet is
2922 an acknowledgement of EAP-Request/SIM/Notification.
2924 The AT_MAC attribute MUST be included in cases when the P bit of the
2925 notification code in AT_NOTIFICATION of EAP-Request/SIM/Notification
2926 is set to zero, and MUST NOT be included in cases when the P bit is
2927 set to one. The P bit is discussed in Section 6.
2929 No message-specific data is included in the MAC calculation, see
2932 If EAP-Request/SIM/Notification is used on a fast re-authentication
2933 exchange, and if the P bit in AT_NOTIFICATION is set to zero, then
2934 AT_COUNTER is used for replay protection. In this case, the
2935 AT_ENCR_DATA and AT_IV attributes MUST be included, and the
2936 encapsulated plaintext attributes MUST include the AT_COUNTER
2937 attribute. The counter value included in AT_COUNTER MUST be the same
2938 as in the EAP-Request/SIM/Re-authentication packet on the same fast
2939 re-authentication exchange.
2943 This section specifies the format of message attributes. The
2944 attribute type numbers are specified in the IANA considerations
2945 section of the EAP-AKA specification [EAP-AKA].
2947 10.1. Table of Attributes
2949 The following table provides a guide to which attributes may be found
2950 in which kinds of messages, and in what quantity. Messages are
2951 denoted with numbers in parentheses as follows: (1)
2952 EAP-Request/SIM/Start, (2) EAP-Response/SIM/Start, (3)
2953 EAP-Request/SIM/Challenge, (4) EAP-Response/SIM/Challenge, (5)
2954 EAP-Request/SIM/Notification, (6) EAP-Response/SIM/Notification, (7)
2955 EAP-Response/SIM/Client-Error, (8) EAP-Request/SIM/Re-authentication,
2956 and (9) EAP-Response/SIM/Re-authentication. The column denoted with
2957 "Encr" indicates whether the attribute is a nested attribute that
2958 MUST be included within AT_ENCR_DATA, and the column denoted with
2959 "Skip" indicates whether the attribute is a skippable attribute.
2961 "0" indicates that the attribute MUST NOT be included in the message,
2962 "1" indicates that the attribute MUST be included in the message,
2963 "0-1" indicates that the attribute is sometimes included in the
2964 message, and "0*" indicates that the attribute is not included in the
2965 message in cases specified in this document, but MAY be included in
2966 future versions of the protocol.
2970 Haverinen & Salowey Informational [Page 53]
2972 RFC 4186 EAP-SIM Authentication January 2006
2975 Attribute (1) (2) (3) (4) (5) (6) (7) (8) (9) Encr Skip
2976 AT_VERSION_LIST 1 0 0 0 0 0 0 0 0 N N
2977 AT_SELECTED_VERSION 0 0-1 0 0 0 0 0 0 0 N N
2978 AT_NONCE_MT 0 0-1 0 0 0 0 0 0 0 N N
2979 AT_PERMANENT_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
2980 AT_ANY_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
2981 AT_FULLAUTH_ID_REQ 0-1 0 0 0 0 0 0 0 0 N N
2982 AT_IDENTITY 0 0-1 0 0 0 0 0 0 0 N N
2983 AT_RAND 0 0 1 0 0 0 0 0 0 N N
2984 AT_NEXT_PSEUDONYM 0 0 0-1 0 0 0 0 0 0 Y Y
2985 AT_NEXT_REAUTH_ID 0 0 0-1 0 0 0 0 0-1 0 Y Y
2986 AT_IV 0 0 0-1 0* 0-1 0-1 0 1 1 N Y
2987 AT_ENCR_DATA 0 0 0-1 0* 0-1 0-1 0 1 1 N Y
2988 AT_PADDING 0 0 0-1 0* 0-1 0-1 0 0-1 0-1 Y N
2989 AT_RESULT_IND 0 0 0-1 0-1 0 0 0 0-1 0-1 N Y
2990 AT_MAC 0 0 1 1 0-1 0-1 0 1 1 N N
2991 AT_COUNTER 0 0 0 0 0-1 0-1 0 1 1 Y N
2992 AT_COUNTER_TOO_SMALL 0 0 0 0 0 0 0 0 0-1 Y N
2993 AT_NONCE_S 0 0 0 0 0 0 0 1 0 Y N
2994 AT_NOTIFICATION 0 0 0 0 1 0 0 0 0 N N
2995 AT_CLIENT_ERROR_CODE 0 0 0 0 0 0 1 0 0 N N
2997 It should be noted that attributes AT_PERMANENT_ID_REQ,
2998 AT_ANY_ID_REQ, and AT_FULLAUTH_ID_REQ are mutually exclusive; only
2999 one of them can be included at the same time. If one of the
3000 attributes AT_IV and AT_ENCR_DATA is included, then both of the
3001 attributes MUST be included.
3003 10.2. AT_VERSION_LIST
3005 The format of the AT_VERSION_LIST attribute is shown below.
3008 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
3009 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3010 | AT_VERSION_L..| Length | Actual Version List Length |
3011 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3012 | Supported Version 1 | Supported Version 2 |
3013 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3016 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3017 | Supported Version N | Padding |
3018 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3020 This attribute is used in version negotiation, as specified in
3021 Section 4.1. The attribute contains the version numbers supported by
3022 the EAP-SIM server. The server MUST only include versions that it
3026 Haverinen & Salowey Informational [Page 54]
3028 RFC 4186 EAP-SIM Authentication January 2006
3031 implements and that are allowed in its security policy. The server
3032 SHOULD list the versions in the order of preference, with the most
3033 preferred versions listed first. At least one version number MUST be
3034 included. The version number for the protocol described in this
3035 document is one (0001 hexadecimal).
3037 The value field of this attribute begins with 2-byte Actual Version
3038 List Length, which specifies the length of the Version List in bytes,
3039 not including the Actual Version List Length attribute length. This
3040 field is followed by the list of the versions supported by the
3041 server, which each have a length of 2 bytes. For example, if there
3042 is only one supported version, then the Actual Version List Length is
3043 2. Because the length of the attribute must be a multiple of 4
3044 bytes, the sender pads the value field with zero bytes when
3047 10.3. AT_SELECTED_VERSION
3049 The format of the AT_SELECTED_VERSION attribute is shown below.
3052 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
3053 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3054 | AT_SELECTED...| Length = 1 | Selected Version |
3055 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3057 This attribute is used in version negotiation, as specified in
3058 Section 4.1. The value field of this attribute contains a two-byte
3059 version number, which indicates the EAP-SIM version that the peer
3064 The format of the AT_NONCE_MT attribute is shown below.
3067 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
3068 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3069 |AT_NONCE_MT | Length = 5 | Reserved |
3070 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3075 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3082 Haverinen & Salowey Informational [Page 55]
3084 RFC 4186 EAP-SIM Authentication January 2006
3087 The value field of the NONCE_MT attribute contains two reserved bytes
3088 followed by a random number freshly generated by the peer (16 bytes
3089 long) for this EAP-SIM authentication exchange. The random number is
3090 used as a seed value for the new keying material. The reserved bytes
3091 are set to zero upon sending and ignored upon reception.
3093 The peer MUST NOT re-use the NONCE_MT value from a previous EAP-SIM
3094 authentication exchange. If an EAP-SIM exchange includes several
3095 EAP/SIM/Start rounds, then the peer SHOULD use the same NONCE_MT
3096 value in all EAP-Response/SIM/Start packets. The peer SHOULD use a
3097 good source of randomness to generate NONCE_MT. Please see [RFC4086]
3098 for more information about generating random numbers for security
3101 10.5. AT_PERMANENT_ID_REQ
3103 The format of the AT_PERMANENT_ID_REQ attribute is shown below.
3106 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
3107 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3108 |AT_PERM..._REQ | Length = 1 | Reserved |
3109 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3111 The use of the AT_PERMANENT_ID_REQ is defined in Section 4.2. The
3112 value field contains only two reserved bytes, which are set to zero
3113 on sending and ignored on reception.
3117 The format of the AT_ANY_ID_REQ attribute is shown below.
3120 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
3121 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3122 |AT_ANY_ID_REQ | Length = 1 | Reserved |
3123 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3125 The use of the AT_ANY_ID_REQ is defined in Section 4.2. The value
3126 field contains only two reserved bytes, which are set to zero on
3127 sending and ignored on reception.
3138 Haverinen & Salowey Informational [Page 56]
3140 RFC 4186 EAP-SIM Authentication January 2006
3143 10.7. AT_FULLAUTH_ID_REQ
3145 The format of the AT_FULLAUTH_ID_REQ attribute is shown below.
3148 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
3149 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3150 |AT_FULLAUTH_...| Length = 1 | Reserved |
3151 +---------------+---------------+-------------------------------+
3153 The use of the AT_FULLAUTH_ID_REQ is defined in Section 4.2. The
3154 value field contains only two reserved bytes, which are set to zero
3155 on sending and ignored on reception.
3159 The format of the AT_IDENTITY attribute is shown below.
3162 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
3163 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3164 | AT_IDENTITY | Length | Actual Identity Length |
3165 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3167 . Identity (optional) .
3170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3172 The use of the AT_IDENTITY is defined in Section 4.2. The value
3173 field of this attribute begins with a 2-byte actual identity length,
3174 which specifies the length of the identity in bytes. This field is
3175 followed by the subscriber identity of the indicated actual length.
3176 The identity is the permanent identity, a pseudonym identity, or a
3177 fast re-authentication identity. The identity format is specified in
3178 Section 4.2.1. The same identity format is used in the AT_IDENTITY
3179 attribute and the EAP-Response/Identity packet, with the exception
3180 that the peer MUST NOT decorate the identity it includes in
3181 AT_IDENTITY. The identity does not include any terminating null
3182 characters. Because the length of the attribute must be a multiple
3183 of 4 bytes, the sender pads the identity with zero bytes when
3194 Haverinen & Salowey Informational [Page 57]
3196 RFC 4186 EAP-SIM Authentication January 2006
3201 The format of the AT_RAND attribute is shown below.
3204 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
3205 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3206 | AT_RAND | Length | Reserved |
3207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3214 The value field of this attribute contains two reserved bytes
3215 followed by n GSM RANDs, each 16 bytes long. The value of n can be
3216 determined by the attribute length. The reserved bytes are set to
3217 zero upon sending and ignored upon reception.
3219 The number of RAND challenges (n) MUST be two or three. The peer
3220 MUST verify that the number of RAND challenges is sufficient
3221 according to the peer's policy. The server MUST use different RAND
3222 values. In other words, a RAND value can only be included once in
3223 AT_RAND. When processing the AT_RAND attribute, the peer MUST check
3224 that the RANDs are different.
3226 The EAP server MUST obtain fresh RANDs for each EAP-SIM full
3227 authentication exchange. More specifically, the server MUST consider
3228 RANDs it included in AT_RAND to be consumed if the server receives an
3229 EAP-Response/SIM/Challenge packet with a valid AT_MAC, or an
3230 EAP-Response/SIM/Client-Error with the code "insufficient number of
3231 challenges" or "RANDs are not fresh". However, in other cases (if
3232 the server does not receive a response to its
3233 EAP-Request/SIM/Challenge packet, or if the server receives a
3234 response other than the cases listed above), the server does not need
3235 to consider the RANDs to be consumed, and the server MAY re-use the
3236 RANDs in the AT_RAND attribute of the next full authentication
3250 Haverinen & Salowey Informational [Page 58]
3252 RFC 4186 EAP-SIM Authentication January 2006
3255 10.10. AT_NEXT_PSEUDONYM
3257 The format of the AT_NEXT_PSEUDONYM attribute is shown below.
3260 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
3261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3262 | AT_NEXT_PSEU..| Length | Actual Pseudonym Length |
3263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3268 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3270 The value field of this attribute begins with the 2-byte actual
3271 pseudonym length, which specifies the length of the following
3272 pseudonym in bytes. This field is followed by a pseudonym username
3273 that the peer can use in the next authentication. The username MUST
3274 NOT include any realm portion. The username does not include any
3275 terminating null characters. Because the length of the attribute
3276 must be a multiple of 4 bytes, the sender pads the pseudonym with
3277 zero bytes when necessary. The username encoding MUST follow the
3278 UTF-8 transformation format [RFC3629]. This attribute MUST always be
3279 encrypted by encapsulating it within the AT_ENCR_DATA attribute.
3281 10.11. AT_NEXT_REAUTH_ID
3283 The format of the AT_NEXT_REAUTH_ID attribute is shown below.
3286 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
3287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3288 | AT_NEXT_REAU..| Length | Actual Re-Auth Identity Length|
3289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3291 . Next Fast Re-authentication Username .
3294 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3296 The value field of this attribute begins with the 2-byte actual
3297 re-authentication identity length which specifies the length of the
3298 following fast re-authentication identity in bytes. This field is
3299 followed by a fast re-authentication identity that the peer can use
3300 in the next fast re-authentication, as described in Section 5. In
3301 environments where a realm portion is required, the fast
3302 re-authentication identity includes both a username portion and a
3306 Haverinen & Salowey Informational [Page 59]
3308 RFC 4186 EAP-SIM Authentication January 2006
3311 realm name portion. The fast re-authentication identity does not
3312 include any terminating null characters. Because the length of the
3313 attribute must be a multiple of 4 bytes, the sender pads the fast
3314 re-authentication identity with zero bytes when necessary. The
3315 identity encoding MUST follow the UTF-8 transformation format
3316 [RFC3629]. This attribute MUST always be encrypted by encapsulating
3317 it within the AT_ENCR_DATA attribute.
3319 10.12. AT_IV, AT_ENCR_DATA, and AT_PADDING
3321 AT_IV and AT_ENCR_DATA attributes can be used to transmit encrypted
3322 information between the EAP-SIM peer and server.
3324 The value field of AT_IV contains two reserved bytes followed by a
3325 16-byte initialization vector required by the AT_ENCR_DATA attribute.
3326 The reserved bytes are set to zero when sending and ignored on
3327 reception. The AT_IV attribute MUST be included if and only if the
3328 AT_ENCR_DATA is included. Section 6.3 specifies the operation if a
3329 packet that does not meet this condition is encountered.
3331 The sender of the AT_IV attribute chooses the initialization vector
3332 at random. The sender MUST NOT re-use the initialization vector
3333 value from previous EAP-SIM packets. The sender SHOULD use a good
3334 source of randomness to generate the initialization vector. Please
3335 see [RFC4086] for more information about generating random numbers
3336 for security applications. The format of AT_IV is shown below.
3339 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
3340 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3341 | AT_IV | Length = 5 | Reserved |
3342 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3344 | Initialization Vector |
3347 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3349 The value field of the AT_ENCR_DATA attribute consists of two
3350 reserved bytes followed by cipher text bytes encrypted using the
3351 Advanced Encryption Standard (AES) [AES] with a 128-bit key in the
3352 Cipher Block Chaining (CBC) mode of operation using the
3353 initialization vector from the AT_IV attribute. The reserved bytes
3354 are set to zero when sending and ignored on reception. Please see
3355 [CBC] for a description of the CBC mode. The format of the
3356 AT_ENCR_DATA attribute is shown below.
3362 Haverinen & Salowey Informational [Page 60]
3364 RFC 4186 EAP-SIM Authentication January 2006
3368 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
3369 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3370 | AT_ENCR_DATA | Length | Reserved |
3371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3376 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3378 The derivation of the encryption key (K_encr) is specified in Section
3381 The plaintext consists of nested EAP-SIM attributes.
3383 The encryption algorithm requires the length of the plaintext to be a
3384 multiple of 16 bytes. The sender may need to include the AT_PADDING
3385 attribute as the last attribute within AT_ENCR_DATA. The AT_PADDING
3386 attribute is not included if the total length of other nested
3387 attributes within the AT_ENCR_DATA attribute is a multiple of 16
3388 bytes. As usual, the Length of the Padding attribute includes the
3389 Attribute Type and Attribute Length fields. The length of the
3390 Padding attribute is 4, 8, or 12 bytes. It is chosen so that the
3391 length of the value field of the AT_ENCR_DATA attribute becomes a
3392 multiple of 16 bytes. The actual pad bytes in the value field are
3393 set to zero (00 hexadecimal) on sending. The recipient of the
3394 message MUST verify that the pad bytes are set to zero. If this
3395 verification fails on the peer, then it MUST send the
3396 EAP-Response/SIM/Client-Error packet with the error code "unable to
3397 process packet" to terminate the authentication exchange. If this
3398 verification fails on the server, then the server sends the peer the
3399 EAP-Request/SIM/Notification packet with an AT_NOTIFICATION code that
3400 implies failure to terminate the authentication exchange. The format
3401 of the AT_PADDING attribute is shown below.
3404 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
3405 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3406 | AT_PADDING | Length | Padding... |
3407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
3410 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3418 Haverinen & Salowey Informational [Page 61]
3420 RFC 4186 EAP-SIM Authentication January 2006
3423 10.13. AT_RESULT_IND
3425 The format of the AT_RESULT_IND attribute is shown below.
3428 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
3429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3430 | AT_RESULT_...| Length = 1 | Reserved |
3431 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3433 The value field of this attribute consists of two reserved bytes,
3434 which are set to zero upon sending and ignored upon reception. This
3435 attribute is always sent unencrypted, so it MUST NOT be encapsulated
3436 within the AT_ENCR_DATA attribute.
3440 The AT_MAC attribute is used for EAP-SIM message authentication.
3441 Section 8 specifies in which messages AT_MAC MUST be included.
3443 The value field of the AT_MAC attribute contains two reserved bytes
3444 followed by a keyed message authentication code (MAC). The MAC is
3445 calculated over the whole EAP packet and concatenated with optional
3446 message-specific data, with the exception that the value field of the
3447 MAC attribute is set to zero when calculating the MAC. The EAP
3448 packet includes the EAP header that begins with the Code field, the
3449 EAP-SIM header that begins with the Subtype field, and all the
3450 attributes, as specified in Section 8.1. The reserved bytes in
3451 AT_MAC are set to zero when sending and ignored on reception. The
3452 contents of the message-specific data that may be included in the MAC
3453 calculation are specified separately for each EAP-SIM message in
3456 The format of the AT_MAC attribute is shown below.
3459 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
3460 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3461 | AT_MAC | Length = 5 | Reserved |
3462 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3467 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3474 Haverinen & Salowey Informational [Page 62]
3476 RFC 4186 EAP-SIM Authentication January 2006
3479 The MAC algorithm is an HMAC-SHA1-128 [RFC2104] keyed hash value.
3480 (The HMAC-SHA1-128 value is obtained from the 20-byte HMAC-SHA1 value
3481 by truncating the output to the first 16 bytes. Hence, the length of
3482 the MAC is 16 bytes. The derivation of the authentication key
3483 (K_aut) used in the calculation of the MAC is specified in Section 7.
3485 When the AT_MAC attribute is included in an EAP-SIM message, the
3486 recipient MUST process the AT_MAC attribute before looking at any
3487 other attributes, except when processing EAP-Request/SIM/Challenge.
3488 The processing of EAP-Request/SIM/Challenge is specified in Section
3489 9.3. If the message authentication code is invalid, then the
3490 recipient MUST ignore all other attributes in the message and operate
3491 as specified in Section 6.3.
3495 The format of the AT_COUNTER attribute is shown below.
3498 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
3499 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3500 | AT_COUNTER | Length = 1 | Counter |
3501 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3503 The value field of the AT_COUNTER attribute consists of a 16-bit
3504 unsigned integer counter value, represented in network byte order.
3505 This attribute MUST always be encrypted by encapsulating it within
3506 the AT_ENCR_DATA attribute.
3508 10.16. AT_COUNTER_TOO_SMALL
3510 The format of the AT_COUNTER_TOO_SMALL attribute is shown below.
3513 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
3514 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3515 | AT_COUNTER...| Length = 1 | Reserved |
3516 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3518 The value field of this attribute consists of two reserved bytes,
3519 which are set to zero upon sending and ignored upon reception. This
3520 attribute MUST always be encrypted by encapsulating it within the
3521 AT_ENCR_DATA attribute.
3530 Haverinen & Salowey Informational [Page 63]
3532 RFC 4186 EAP-SIM Authentication January 2006
3537 The format of the AT_NONCE_S attribute is shown below.
3540 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
3541 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3542 | AT_NONCE_S | Length = 5 | Reserved |
3543 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3551 The value field of the AT_NONCE_S attribute contains two reserved
3552 bytes followed by a random number freshly generated by the server (16
3553 bytes) for this EAP-SIM fast re-authentication. The random number is
3554 used as a challenge for the peer and also as a seed value for the new
3555 keying material. The reserved bytes are set to zero upon sending and
3556 ignored upon reception. This attribute MUST always be encrypted by
3557 encapsulating it within the AT_ENCR_DATA attribute.
3559 The server MUST NOT re-use the NONCE_S value from any previous
3560 EAP-SIM fast re-authentication exchange. The server SHOULD use a
3561 good source of randomness to generate NONCE_S. Please see [RFC4086]
3562 for more information about generating random numbers for security
3565 10.18. AT_NOTIFICATION
3567 The format of the AT_NOTIFICATION attribute is shown below.
3570 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
3571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3572 |AT_NOTIFICATION| Length = 1 |S|P| Notification Code |
3573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3575 The value field of this attribute contains a two-byte notification
3576 code. The first and second bit (S and P) of the notification code
3577 are interpreted as described in Section 6.
3579 The notification code values listed below have been reserved. The
3580 descriptions below illustrate the semantics of the notifications.
3586 Haverinen & Salowey Informational [Page 64]
3588 RFC 4186 EAP-SIM Authentication January 2006
3591 The peer implementation MAY use different wordings when presenting
3592 the notifications to the user. The "requested service" depends on
3593 the environment where EAP-SIM is applied.
3595 0 - General failure after authentication. (Implies failure, used
3596 after successful authentication.)
3598 16384 - General failure. (Implies failure, used before
3601 32768 - Success. User has been successfully authenticated. (Does
3602 not imply failure, used after successful authentication). The usage
3603 of this code is discussed in Section 6.2.
3605 1026 - User has been temporarily denied access to the requested
3606 service. (Implies failure, used after successful authentication.)
3608 1031 - User has not subscribed to the requested service. (Implies
3609 failure, used after successful authentication.)
3611 10.19. AT_CLIENT_ERROR_CODE
3613 The format of the AT_CLIENT_ERROR_CODE attribute is shown below.
3616 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
3617 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3618 |AT_CLIENT_ERR..| Length = 1 | Client Error Code |
3619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3621 The value field of this attribute contains a two-byte client error
3622 code. The following error code values have been reserved.
3625 0 "unable to process packet": a general error code
3627 1 "unsupported version": the peer does not support any of
3628 the versions listed in AT_VERSION_LIST
3630 2 "insufficient number of challenges": the peer's policy
3631 requires more triplets than the server included in AT_RAND
3633 3 "RANDs are not fresh": the peer believes that the RAND
3634 challenges included in AT_RAND were not fresh
3642 Haverinen & Salowey Informational [Page 65]
3644 RFC 4186 EAP-SIM Authentication January 2006
3647 11. IANA Considerations
3649 IANA has assigned the EAP type number 18 for this protocol.
3651 EAP-SIM shares most of the protocol design, such as attributes and
3652 message Subtypes, with EAP-AKA [EAP-AKA]. EAP-SIM protocol numbers
3653 should be administered in the same IANA registry as EAP-AKA. The
3654 initial values are listed in [EAP-AKA] for both protocols, so this
3655 document does not require any new registries or parameter allocation.
3656 As a common registry is used for EAP-SIM and EAP-AKA, the protocol
3657 number allocation policy for both protocols is specified in
3660 12. Security Considerations
3662 The EAP specification [RFC3748] describes the security
3663 vulnerabilities of EAP, which does not include its own security
3664 mechanisms. This section discusses the claimed security properties
3665 of EAP-SIM, as well as vulnerabilities and security recommendations.
3667 12.1. A3 and A8 Algorithms
3669 The GSM A3 and A8 algorithms are used in EAP-SIM. [GSM-03.20]
3670 specifies the general GSM authentication procedure and the external
3671 interface (inputs and outputs) of the A3 and A8 algorithms. The
3672 operation of these functions falls completely within the domain of an
3673 individual operator, and therefore, the functions are specified by
3674 each operator rather than being fully standardised. The GSM-MILENAGE
3675 algorithm, specified publicly in [3GPP-TS-55.205], is an example
3676 algorithm set for A3 and A8 algorithms.
3678 The security of the A3 and A8 algorithms is important to the security
3679 of EAP-SIM. Some A3/A8 algorithms have been compromised; see [GSM-
3680 Cloning] for discussion about the security of COMP-128 version 1.
3681 Note that several revised versions of the COMP-128 A3/A8 algorithm
3682 have been devised after the publication of these weaknesses and that
3683 the publicly specified GSM-MILENAGE algorithm is not vulnerable to
3686 12.2. Identity Protection
3688 EAP-SIM includes optional identity privacy support that protects the
3689 privacy of the subscriber identity against passive eavesdropping.
3690 This document only specifies a mechanism to deliver pseudonyms from
3691 the server to the peer as part of an EAP-SIM exchange. Hence, a peer
3692 that has not yet performed any EAP-SIM exchanges does not typically
3693 have a pseudonym available. If the peer does not have a pseudonym
3694 available, then the privacy mechanism cannot be used, but the
3698 Haverinen & Salowey Informational [Page 66]
3700 RFC 4186 EAP-SIM Authentication January 2006
3703 permanent identity will have to be sent in the clear. The terminal
3704 SHOULD store the pseudonym in a non-volatile memory so that it can be
3705 maintained across reboots. An active attacker that impersonates the
3706 network may use the AT_PERMANENT_ID_REQ attribute to attempt to learn
3707 the subscriber's permanent identity. However, as discussed in
3708 Section 4.2.2, the terminal can refuse to send the cleartext
3709 permanent identity if it believes that the network should be able to
3710 recognize the pseudonym.
3712 If the peer and server cannot guarantee that the pseudonym will be
3713 maintained reliably, and identity privacy is required, then
3714 additional protection from an external security mechanism (such as
3715 Protected Extensible Authentication Protocol (PEAP) [PEAP]) may be
3716 used. If an external security mechanism is in use, the identity
3717 privacy features of EAP-SIM may not be useful. The security
3718 considerations of using an external security mechanism with EAP-SIM
3719 are beyond the scope of this document.
3721 12.3. Mutual Authentication and Triplet Exposure
3723 EAP-SIM provides mutual authentication. The peer believes that the
3724 network is authentic because the network can calculate a correct
3725 AT_MAC value in the EAP-Request/SIM/Challenge packet. To calculate
3726 AT_MAC it is sufficient to know the RAND and Kc values from the GSM
3727 triplets (RAND, SRES, Kc) used in the authentication. Because the
3728 network selects the RAND challenges and the triplets, an attacker
3729 that knows n (2 or 3) GSM triplets for the subscriber is able to
3730 impersonate a valid network to the peer. (Some peers MAY employ an
3731 implementation-specific counter-measure against impersonating a valid
3732 network by re-using a previously used RAND; see below.) In other
3733 words, the security of EAP-SIM is based on the secrecy of Kc keys,
3734 which are considered secret intermediate results in the EAP-SIM
3735 cryptographic calculations.
3737 Given physical access to the SIM card, it is easy to obtain any
3738 number of GSM triplets.
3740 Another way to obtain triplets is to mount an attack on the peer
3741 platform via a virus or other malicious piece of software. The peer
3742 SHOULD be protected against triplet querying attacks by malicious
3743 software. Care should be taken not to expose Kc keys to attackers
3744 when they are stored or handled by the peer, or transmitted between
3745 subsystems of the peer. Steps should be taken to limit the
3746 transport, storage, and handling of these values outside a protected
3747 environment within the peer. However, the virus protection of the
3748 peer and the security capabilities of the peer's operating system are
3749 outside the scope of this document.
3754 Haverinen & Salowey Informational [Page 67]
3756 RFC 4186 EAP-SIM Authentication January 2006
3759 The EAP-SIM server typically obtains the triplets from the Home
3760 Location Register (HLR). An attacker might try to obtain triplets by
3761 attacking against the network used between the EAP-SIM server and the
3762 HLR. Care should be taken not to expose Kc keys to attackers when
3763 they are stored or handled by the EAP-SIM server, or transmitted
3764 between the EAP server and the HLR. Steps should be taken to limit
3765 the transport, storage, and handling of these values outside a
3766 protected environment. However, the protection of the communications
3767 between the EAP-SIM server and the HLR is outside the scope of this
3770 If the same SIM credentials are also used for GSM traffic, the
3771 triplets could be revealed in the GSM network; see Section 12.8.
3773 In GSM, the network is allowed to re-use the RAND challenge in
3774 consecutive authentication exchanges. This is not allowed in
3775 EAP-SIM. The EAP-SIM server is mandated to use fresh triplets (RAND
3776 challenges) in consecutive authentication exchanges, as specified in
3777 Section 3. EAP-SIM does not mandate any means for the peer to check
3778 if the RANDs are fresh, so the security of the scheme leans on the
3779 secrecy of the triplets. However, the peer MAY employ
3780 implementation-specific mechanisms to remember some of the previously
3781 used RANDs, and the peer MAY check the freshness of the server's
3782 RANDs. The operation in cases when the peer detects that the RANDs
3783 are not fresh is specified in Section 6.3.1.
3785 Preventing the re-use of authentication vectors has been taken into
3786 account in the design of the UMTS Authentication and Key Agreement
3787 (AKA), which is used in EAP-AKA [EAP-AKA]. In cases when the triplet
3788 re-use properties of EAP-SIM are not considered sufficient, it is
3789 advised to use EAP-AKA.
3791 Note that EAP-SIM mutual authentication is done with the EAP server.
3792 In general, EAP methods do not authenticate the identity or services
3793 provided by the EAP authenticator (if distinct from the EAP server)
3794 unless they provide the so-called channel bindings property. The
3795 vulnerabilities related to this have been discussed in [RFC3748],
3796 [EAP-Keying], [Service-Identity].
3798 EAP-SIM does not provide the channel bindings property, so it only
3799 authenticates the EAP server. However, ongoing work such as
3800 [Service-Identity] may provide such support as an extension to
3801 popular EAP methods such as EAP-TLS, EAP-SIM, or EAP-AKA.
3810 Haverinen & Salowey Informational [Page 68]
3812 RFC 4186 EAP-SIM Authentication January 2006
3815 12.4. Flooding the Authentication Centre
3817 The EAP-SIM server typically obtains authentication vectors from the
3818 Authentication Centre (AuC). EAP-SIM introduces a new usage for the
3819 AuC. The protocols between the EAP-SIM server and the AuC are out of
3820 the scope of this document. However, it should be noted that a
3821 malicious EAP-SIM peer may generate a lot of protocol requests to
3822 mount a denial of service attack. The EAP-SIM server implementation
3823 SHOULD take this into account and SHOULD take steps to limit the
3824 traffic that it generates towards the AuC, preventing the attacker
3825 from flooding the AuC and from extending the denial of service attack
3826 from EAP-SIM to other users of the AuC.
3828 12.5. Key Derivation
3830 EAP-SIM supports key derivation. The key hierarchy is specified in
3831 Section 7. EAP-SIM combines several GSM triplets in order to
3832 generate stronger keying material and stronger AT_MAC values. The
3833 actual strength of the resulting keys depends, among other things, on
3834 operator-specific parameters including authentication algorithms, the
3835 strength of the Ki key, and the quality of the RAND challenges. For
3836 example, some SIM cards generate Kc keys with 10 bits set to zero.
3837 Such restrictions may prevent the concatenation technique from
3838 yielding strong session keys. Because the strength of the Ki key is
3839 128 bits, the ultimate strength of any derived secret key material is
3840 never more than 128 bits.
3842 It should also be noted that a security policy that allows n=2 to be
3843 used may compromise the security of a future policy that requires
3844 three triplets, because adversaries may be able to exploit the
3845 messages exchanged when the weaker policy is applied.
3847 There is no known way to obtain complete GSM triplets by mounting an
3848 attack against EAP-SIM. A passive eavesdropper can learn n*RAND and
3849 AT_MAC and may be able to link this information to the subscriber
3850 identity. An active attacker that impersonates a GSM subscriber can
3851 easily obtain n*RAND and AT_MAC values from the EAP server for any
3852 given subscriber identity. However, calculating the Kc and SRES
3853 values from AT_MAC would require the attacker to reverse the keyed
3854 message authentication code function HMAC-SHA1-128.
3856 As EAP-SIM does not expose any values calculated from an individual
3857 GSM Kc keys, it is not possible to mount a brute force attack on only
3858 one of the Kc keys in EAP-SIM. Therefore, when considering brute
3859 force attacks on the values exposed in EAP-SIM, the effective length
3860 of EAP-SIM session keys is not compromised by the fact that they are
3866 Haverinen & Salowey Informational [Page 69]
3868 RFC 4186 EAP-SIM Authentication January 2006
3871 combined from several shorter keys, i.e., the effective length of 128
3872 bits may be achieved. For additional considerations, see Section
3875 12.6. Cryptographic Separation of Keys and Session Independence
3877 The EAP Transient Keys used to protect EAP-SIM packets (K_encr,
3878 K_aut), the Master Session Key, and the Extended Master Session Key
3879 are cryptographically separate in EAP-SIM. An attacker cannot derive
3880 any non-trivial information about any of these keys based on the
3881 other keys. An attacker also cannot calculate the pre-shared secret
3882 (Ki) from the GSM Kc keys, from EAP-SIM K_encr, from EAP-SIM K_aut,
3883 from the Master Session Key, or from the Extended Master Session Key.
3885 Each EAP-SIM exchange generates fresh keying material, and the keying
3886 material exported from the method upon separate EAP-SIM exchanges is
3887 cryptographically separate. The EAP-SIM peer contributes to the
3888 keying material with the NONCE_MT parameter, which must be chosen
3889 freshly for each full authentication exchange. The EAP server is
3890 mandated to choose the RAND challenges freshly for each full
3891 authentication exchange. If either the server or the peer chooses
3892 its random value (NONCE_MT or RAND challenges) freshly, even if the
3893 other entity re-used its value from a previous exchange, then the EAP
3894 Transient Keys, the Master Session Key, and the Extended Master
3895 Session Key will be different and cryptographically separate from the
3896 corresponding values derived upon the previous full authentication
3899 On fast re-authentication, freshness of the Master Session Key and
3900 the Extended Master Session Key is provided with a counter
3901 (AT_COUNTER). The same EAP Transient Keys (K_encr, K_aut) that were
3902 used in the full authentication exchange are used to protect the EAP
3903 negotiation. However, replay and integrity protection across all the
3904 fast re-authentication exchanges that use the same EAP Transient Keys
3905 is provided with AT_COUNTER.
3907 [RFC3748] defines session independence as the "demonstration that
3908 passive attacks (such as capture of the EAP conversation) or active
3909 attacks (including compromise of the MSK or EMSK) do not enable
3910 compromise of subsequent or prior MSKs or EMSKs". Because the MSKs
3911 and EMSKs are separate between EAP exchanges, EAP-SIM supports this
3914 It should be noted that [Patel-2003], which predates [RFC3748], uses
3915 a slightly different meaning for session independence. The EAP-SIM
3916 protocol does not allow the peer to ensure that different Kc key
3917 values would be used in different exchanges. Only the server is able
3918 to ensure that fresh RANDs, and therefore, fresh Kc keys are used.
3922 Haverinen & Salowey Informational [Page 70]
3924 RFC 4186 EAP-SIM Authentication January 2006
3927 Hence, the peer cannot guarantee EAP-SIM sessions to be independent
3928 with regard to the internal Kc values. However, in EAP-SIM, the Kc
3929 keys are considered to be secret intermediate results, which are not
3930 exported outside the method. See Section 12.3 for more information
3933 12.7. Dictionary Attacks
3935 Because EAP-SIM is not a password protocol, it is not vulnerable to
3936 dictionary attacks. (The pre-shared symmetric secret stored on the
3937 SIM card is not a passphrase, nor is it derived from a passphrase.)
3939 12.8. Credentials Re-use
3941 EAP-SIM cannot prevent attacks over the GSM or GPRS radio networks.
3942 If the same SIM credentials are also used in GSM or GPRS, it is
3943 possible to mount attacks over the cellular interface.
3945 A passive attacker can eavesdrop GSM or GPRS traffic and obtain RAND,
3946 SRES pairs. He can then use a brute force attack or other
3947 cryptanalysis techniques to obtain the 64-bit Kc keys used to encrypt
3948 the GSM or GPRS data. This makes it possible to attack each 64-bit
3951 An active attacker can mount a "rogue GSM/GPRS base station attack",
3952 replaying previously seen RAND challenges to obtain SRES values. He
3953 can then use a brute force attack to obtain the Kc keys. If
3954 successful, the attacker can impersonate a valid network or decrypt
3955 previously seen traffic, because EAP-SIM does not provide perfect
3956 forward secrecy (PFS).
3958 Due to several weaknesses in the GSM encryption algorithms, the
3959 effective key strength of the Kc keys is much less than the expected
3960 64 bits (no more than 40 bits if the A5/1 GSM encryption algorithm is
3961 used; as documented in [Barkan-2003], an active attacker can force
3962 the peer to use the weaker A5/2 algorithm that can be broken in less
3965 Because the A5 encryption algorithm is not used in EAP-SIM, and
3966 because EAP-SIM does not expose any values calculated from individual
3967 Kc keys, it should be noted that these attacks are not possible if
3968 the SIM credentials used in EAP-SIM are not shared in GSM/GPRS.
3970 At the time this document was written, the 3rd Generation Partnership
3971 Project (3GPP) has started to work on fixes to these A5
3972 vulnerabilities. One of the solution proposals discussed in 3GPP is
3973 integrity-protected A5 version negotiation, which would require the
3974 base station to prove knowledge of the Kc key before the terminal
3978 Haverinen & Salowey Informational [Page 71]
3980 RFC 4186 EAP-SIM Authentication January 2006
3983 sends any values calculated from the Kc to the network. Another
3984 proposal is so-called special RANDs, where some bits of the RAND
3985 challenge would be used for cryptographic separation by indicating
3986 the allowed use of the triplet, such as the allowed A5 algorithm in
3987 GSM or the fact that the triplet is intended for EAP-SIM. This is
3988 currently a work in progress, and the mechanisms have not been
3991 12.9. Integrity and Replay Protection, and Confidentiality
3993 AT_MAC, AT_IV, AT_ENCR_DATA, and AT_COUNTER attributes are used to
3994 provide integrity, replay and confidentiality protection for EAP-SIM
3995 requests and responses. Integrity protection with AT_MAC includes
3996 the EAP header. These attributes cannot be used during the
3997 EAP/SIM/Start roundtrip. However, the protocol values (user identity
3998 string, NONCE_MT, and version negotiation parameters) are
3999 (implicitly) protected by later EAP-SIM messages by including them in
4002 Integrity protection (AT_MAC) is based on a keyed message
4003 authentication code. Confidentiality (AT_ENCR_DATA and AT_IV) is
4004 based on a block cipher.
4006 Confidentiality protection is applied only to a part of the protocol
4007 fields. The table of attributes in Section 10.1 summarizes which
4008 fields are confidentiality-protected. It should be noted that the
4009 error and notification code attributes AT_CLIENT_ERROR_CODE and
4010 AT_NOTIFICATION are not confidential, but they are transmitted in the
4011 clear. Identity protection is discussed in Section 12.2.
4013 On full authentication, replay protection of the EAP exchange is
4014 provided by the RAND values from the underlying GSM authentication
4015 scheme and the use of the NONCE_MT value. Protection against replays
4016 of EAP-SIM messages is also based on the fact that messages that can
4017 include AT_MAC can only be sent once with a certain EAP-SIM Subtype,
4018 and on the fact that a different K_aut key will be used for
4019 calculating AT_MAC in each full authentication exchange.
4021 On fast re-authentication, a counter included in AT_COUNTER and a
4022 server random nonce is used to provide replay protection. The
4023 AT_COUNTER attribute is also included in EAP-SIM notifications if it
4024 is used after successful authentication in order to provide replay
4025 protection between re-authentication exchanges.
4027 Because EAP-SIM is not a tunneling method, EAP-Request/Notification,
4028 EAP-Response/Notification, EAP-Success, or EAP-Failure packets are
4029 not confidential, integrity-protected, or replay-protected in
4030 EAP-SIM. On physically insecure networks, this may enable an
4034 Haverinen & Salowey Informational [Page 72]
4036 RFC 4186 EAP-SIM Authentication January 2006
4039 attacker to send false notifications to the peer and to mount denial
4040 of service attacks by spoofing these packets. As discussed in
4041 Section 6.3, the peer will only accept EAP-Success after the peer
4042 successfully authenticates the server. Hence, the attacker cannot
4043 force the peer to believe successful mutual authentication has
4044 occurred until the peer successfully authenticates the server or
4045 after the peer fails to authenticate the server.
4047 The security considerations of EAP-SIM result indications are covered
4050 An eavesdropper will see the EAP-Request/Notification,
4051 EAP-Response/Notification, EAP-Success, and EAP-Failure packets sent
4052 in the clear. With EAP-SIM, confidential information MUST NOT be
4053 transmitted in EAP Notification packets.
4055 12.10. Negotiation Attacks
4057 EAP-SIM does not protect the EAP-Response/Nak packet. Because
4058 EAP-SIM does not protect the EAP method negotiation, EAP method
4059 downgrading attacks may be possible, especially if the user uses the
4060 same identity with EAP-SIM and other EAP methods.
4062 EAP-SIM includes a version negotiation procedure. In EAP-SIM the
4063 keying material derivation includes the version list and selected
4064 version to ensure that the protocol cannot be downgraded and that the
4065 peer and server use the same version of EAP-SIM.
4067 EAP-SIM does not support ciphersuite negotiation.
4069 12.11. Protected Result Indications
4071 EAP-SIM supports optional protected success indications and
4072 acknowledged failure indications. If a failure occurs after
4073 successful authentication, then the EAP-SIM failure indication is
4074 integrity- and replay-protected.
4076 Even if an EAP-Failure packet is lost when using EAP-SIM over an
4077 unreliable medium, then the EAP-SIM failure indications will help
4078 ensure that the peer and EAP server will know the other party's
4079 authentication decision. If protected success indications are used,
4080 then the loss of Success packet will also be addressed by the
4081 acknowledged, integrity- and replay-protected EAP-SIM success
4082 indication. If the optional success indications are not used, then
4083 the peer may end up believing that the server succeeded
4084 authentication, when it actually failed. Since access will not be
4090 Haverinen & Salowey Informational [Page 73]
4092 RFC 4186 EAP-SIM Authentication January 2006
4095 granted in this case, protected result indications are not needed
4096 unless the client is not able to realize it does not have access for
4097 an extended period of time.
4099 12.12. Man-in-the-Middle Attacks
4101 In order to avoid man-in-the-middle attacks and session hijacking,
4102 user data SHOULD be integrity-protected on physically insecure
4103 networks. The EAP-SIM Master Session Key, or keys derived from it,
4104 MAY be used as the integrity protection keys, or, if an external
4105 security mechanism such as PEAP is used, then the link integrity
4106 protection keys MAY be derived by the external security mechanism.
4108 There are man-in-the-middle attacks associated with the use of any
4109 EAP method within a tunneled protocol. For instance, an early
4110 version of PEAP [PEAP-02] was vulnerable to this attack. This
4111 specification does not address these attacks. If EAP-SIM is used
4112 with a tunneling protocol, there should be cryptographic binding
4113 provided between the protocol and EAP-SIM to prevent
4114 man-in-the-middle attacks through rogue authenticators being able to
4115 setup one-way authenticated tunnels. For example, newer versions of
4116 PEAP include such cryptographic binding. The EAP-SIM Master Session
4117 Key MAY be used to provide the cryptographic binding. However, the
4118 mechanism by which the binding is provided depends on the tunneling
4119 protocol and is beyond the scope of this document.
4121 12.13. Generating Random Numbers
4123 An EAP-SIM implementation SHOULD use a good source of randomness to
4124 generate the random numbers required in the protocol. Please see
4125 [RFC4086] for more information on generating random numbers for
4126 security applications.
4130 This section provides the security claims required by [RFC3748].
4132 Auth. mechanism: EAP-SIM is based on the GSM SIM mechanism, which is
4133 a challenge/response authentication and key agreement mechanism based
4134 on a symmetric 128-bit pre-shared secret. EAP-SIM also makes use of
4135 a peer challenge to provide mutual authentication.
4137 Ciphersuite negotiation: No
4139 Mutual authentication: Yes (Section 12.3)
4141 Integrity protection: Yes (Section 12.9)
4146 Haverinen & Salowey Informational [Page 74]
4148 RFC 4186 EAP-SIM Authentication January 2006
4151 Replay protection: Yes (Section 12.9)
4153 Confidentiality: Yes, except method-specific success and failure
4154 indications (Section 12.2, Section 12.9)
4158 Key strength: EAP-SIM supports key derivation with 128-bit effective
4159 key strength (Section 12.5). However, as discussed in Section 11, if
4160 the same credentials are used in GSM/GPRS and in EAP-SIM, then the
4161 key strength may be reduced considerably, basically to the same level
4162 as in GSM, by mounting attacks over GSM/GPRS. For example an active
4163 attack using a false GSM/GPRS base station reduces the effective key
4164 strength to almost zero.
4166 Description of key hierarchy: Please see Section 7.
4168 Dictionary attack protection: N/A (Section 12.7)
4172 Cryptographic binding: N/A
4174 Session independence: Yes (Section 12.6)
4180 Indication of vulnerabilities: Vulnerabilities are discussed in
4183 14. Acknowledgements and Contributions
4187 In addition to the editors, Nora Dabbous, Jose Puthenkulam, and
4188 Prasanna Satarasinghe were significant contributors to this document.
4190 Pasi Eronen and Jukka-Pekka Honkanen contributed Appendix A.
4192 14.2. Acknowledgements
4194 Juha Ala-Laurila, N. Asokan, Jan-Erik Ekberg, Patrik Flykt,
4195 Jukka-Pekka Honkanen, Antti Kuikka, Jukka Latva, Lassi Lehtinen, Jyri
4196 Rinnemaa, Timo Takamaki, and Raimo Vuonnala contributed many original
4197 ideas and concepts to this protocol.
4202 Haverinen & Salowey Informational [Page 75]
4204 RFC 4186 EAP-SIM Authentication January 2006
4207 N. Asokan, Pasi Eronen, and Jukka-Pekka Honkanen contributed and
4208 helped in innumerable ways during the development of the protocol.
4210 Valtteri Niemi and Kaisa Nyberg contributed substantially to the
4211 design of the key derivation and the fast re-authentication
4212 procedure, and have also provided their cryptographic expertise in
4213 many discussions related to this protocol.
4215 Simon Blake-Wilson provided very helpful comments on key derivation
4216 and version negotiation.
4218 Thanks to Greg Rose for his very valuable comments to an early
4219 version of this specification [S3-020125], and for reviewing and
4220 providing very useful comments on version 12.
4222 Thanks to Bernard Aboba, Vladimir Alperovich, Florent Bersani,
4223 Jacques Caron, Gopal Dommety, Augustin Farrugia, Mark Grayson, Max de
4224 Groot, Prakash Iyer, Nishi Kant, Victor Lortz, Jouni Malinen, Sarvar
4225 Patel, Tom Porcher, Michael Richardson, Stefan Schroeder, Uma
4226 Shankar, Jesse Walker, and Thomas Wieland for their contributions and
4227 critiques. Special thanks to Max for proposing improvements to the
4230 Thanks to Glen Zorn for reviewing this document and for providing
4231 very useful comments on the protocol.
4233 Thanks to Sarvar Patel for his review of the protocol [Patel-2003].
4235 Thanks to Bernard Aboba for reviewing this document for RFC 3748
4238 The identity privacy support is based on the identity privacy support
4239 of [EAP-SRP]. The attribute format is based on the extension format
4240 of Mobile IPv4 [RFC3344].
4242 This protocol has been partly developed in parallel with EAP-AKA
4243 [EAP-AKA], and hence this specification incorporates many ideas from
4258 Haverinen & Salowey Informational [Page 76]
4260 RFC 4186 EAP-SIM Authentication January 2006
4263 14.2.1. Contributors' Addresses
4268 92447 Issy les Moulineaux
4271 Phone: +33 1 4648 2000
4272 EMail: nora.dabbous@gemplus.com
4277 2111 NE 25th Avenue, JF2-58
4281 Phone: +1 503 264 6121
4282 EMail: jose.p.puthenkulam@intel.com
4285 Prasanna Satarasinghe
4286 Transat Technologies
4287 180 State Street, Suite 240
4291 Phone: + 1 817 4814412
4292 EMail: prasannas@transat-tech.com
4314 Haverinen & Salowey Informational [Page 77]
4316 RFC 4186 EAP-SIM Authentication January 2006
4321 15.1. Normative References
4323 [GSM-03.20] European Telecommunications Standards Institute,
4324 "GSM Technical Specification GSM 03.20 (ETS 300
4325 534): "Digital cellular telecommunication system
4326 (Phase 2); Security related network functions"",
4329 [RFC2119] Bradner, S., "Key words for use in RFCs to
4330 Indicate Requirement Levels", BCP 14, RFC 2119,
4333 [GSM-03.03] European Telecommunications Standards Institute,
4334 "GSM Technical Specification GSM 03.03 (ETS 300
4335 523): "Digital cellular telecommunication system
4336 (Phase 2); Numbering, addressing and
4337 identification"", April 1997.
4339 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC:
4340 Keyed-Hashing for Message Authentication", RFC
4341 2104, February 1997.
4343 [RFC4282] Aboba, B., Beadles, M., Arkko, J., and P. Eronen,
4344 "The Network Access Identifier", RFC 4282,
4347 [AES] National Institute of Standards and Technology,
4348 "Federal Information Processing Standards (FIPS)
4349 Publication 197, "Advanced Encryption Standard
4350 (AES)"", November 2001.
4351 http://csrc.nist.gov/publications/fips/fips197/
4354 [CBC] National Institute of Standards and Technology,
4355 "NIST Special Publication 800-38A, "Recommendation
4356 for Block Cipher Modes of Operation - Methods and
4357 Techniques"", December 2001.
4358 http://csrc.nist.gov/publications/nistpubs/
4359 800-38a/sp800-38a.pdf
4361 [SHA-1] National Institute of Standards and Technology,
4362 U.S. Department of Commerce, "Federal Information
4363 Processing Standard (FIPS) Publication 180-1,
4364 "Secure Hash Standard"", April 1995.
4370 Haverinen & Salowey Informational [Page 78]
4372 RFC 4186 EAP-SIM Authentication January 2006
4375 [PRF] National Institute of Standards and Technology,
4376 "Federal Information Processing Standards (FIPS)
4377 Publication 186-2 (with change notice); Digital
4378 Signature Standard (DSS)", January 2000.
4379 Available on-line at:
4380 http://csrc.nist.gov/publications/
4381 fips/fips186-2/fips186-2-change1.pdf
4383 [RFC3629] Yergeau, F., "UTF-8, a transformation format of
4384 ISO 10646", STD 63, RFC 3629, November 2003.
4386 [RFC3748] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J.,
4387 and H. Levkowetz, "Extensible Authentication
4388 Protocol (EAP)", RFC 3748, June 2004.
4390 [EAP-AKA] Arkko, J. and H. Haverinen, "Extensible
4391 Authentication Protocol Method for 3rd Generation
4392 Authentication and Key Agreement (EAP-AKA)", RFC
4395 15.2. Informative References
4397 [3GPP-TS-23.003] 3rd Generation Partnership Project, "3GPP
4398 Technical Specification 3GPP TS 23.003 V6.8.0:
4399 "3rd Generation Parnership Project; Technical
4400 Specification Group Core Network; Numbering,
4401 addressing and identification (Release 6)"",
4404 [3GPP-TS-55.205] 3rd Generation Partnership Project, "3GPP
4405 Technical Specification 3GPP TS 55.205 V 6.0.0:
4406 "3rd Generation Partnership Project; Technical
4407 Specification Group Services and System Aspects;
4408 Specification of the GSM-MILENAGE Algorithms: An
4409 example algorithm set for the GSM Authentication
4410 and Key Generation functions A3 and A8 (Release
4411 6)"", December 2002.
4413 [PEAP] Palekar, A., Simon, D., Zorn, G., Salowey, J.,
4414 Zhou, H., and S. Josefsson, "Protected EAP
4415 Protocol (PEAP) Version 2", Work in Progress,
4418 [PEAP-02] Anderson, H., Josefsson, S., Zorn, G., Simon, D.,
4419 and A. Palekar, "Protected EAP Protocol (PEAP)",
4420 Work in Progress, February 2002.
4426 Haverinen & Salowey Informational [Page 79]
4428 RFC 4186 EAP-SIM Authentication January 2006
4431 [EAP-Keying] Aboba, B., Simon, D., Arkko, J., Eronen, P., and
4432 H. Levkowetz, "Extensible Authentication Protocol
4433 (EAP) Key Management Framework", Work in Progress,
4436 [Service-Identity] Arkko, J. and P. Eronen, "Authenticated Service
4437 Information for the Extensible Authentication
4438 Protocol (EAP)", Work in Progress, October 2004.
4440 [RFC4086] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
4441 "Randomness Requirements for Security", BCP 106,
4442 RFC 4086, June 2005.
4444 [S3-020125] Qualcomm, "Comments on draft EAP/SIM, 3rd
4445 Generation Partnership Project document 3GPP TSG
4446 SA WG3 Security S3#22, S3-020125", February 2002.
4448 [RFC3344] Perkins, C., "IP Mobility Support for IPv4", RFC
4451 [RFC2548] Zorn, G., "Microsoft Vendor-specific RADIUS
4452 Attributes ", RFC 2548, March 1999.
4454 [EAP-SRP] Carlson, J., Aboba, B., and H. Haverinen, "EAP
4455 SRP-SHA1 Authentication Protocol", Work in
4456 Progress, July 2001.
4458 [GSM-Cloning] Wagner, D., "GSM Cloning". Web page about
4459 COMP-128 version 1 vulnerabilities, available at
4460 http://www.isaac.cs.berkeley.edu/isaac/gsm.html
4462 [Barkan-2003] Barkan, E., Biham, E., and N. Keller, "Instant
4463 Ciphertext-Only Cryptanalysis of GSM Encrypted
4464 Communications". available on-line at
4465 http://cryptome.org/gsm-crack-bbk.pdf
4467 [Patel-2003] Patel, S., "Analysis of EAP-SIM Session Key
4468 Agreement". Posted to the EAP mailing list 29
4470 mail.frascone.com/pipermail/public/eap/2003-May/
4482 Haverinen & Salowey Informational [Page 80]
4484 RFC 4186 EAP-SIM Authentication January 2006
4487 Appendix A. Test Vectors
4489 Test vectors for the NIST FIPS 186-2 pseudo-random number generator
4490 [PRF] are available at the following URL:
4491 http://csrc.nist.gov/encryption/dss/Examples-1024bit.pdf
4493 The following examples show the contents of EAP-SIM packets on full
4494 authentication and fast re-authentication.
4496 A.1. EAP-Request/Identity
4498 The first packet is a plain Identity Request:
4502 00 05 ; Length: 5 octets
4505 A.2. EAP-Response/Identity
4507 The client's identity is "1244070100000001@eapsim.foo", so it
4508 responds with the following packet:
4512 00 20 ; Length: 32 octets
4514 31 32 34 34 ; "1244070100000001@eapsim.foo"
4538 Haverinen & Salowey Informational [Page 81]
4540 RFC 4186 EAP-SIM Authentication January 2006
4543 A.3. EAP-Request/SIM/Start
4545 The server's first packet looks like this:
4549 00 10 ; Length: 16 octets
4551 0a ; EAP-SIM subtype: Start
4553 0f ; Attribute type: AT_VERSION_LIST
4554 02 ; Attribute length: 8 octets (2*4)
4555 00 02 ; Actual version list length: 2 octets
4557 00 00 ; (attribute padding)
4559 A.4. EAP-Response/SIM/Start
4561 The client selects a nonce and responds with the following packet:
4565 00 20 ; Length: 32 octets
4567 0a ; EAP-SIM subtype: Start
4569 07 ; Attribute type: AT_NONCE_MT
4570 05 ; Attribute length: 20 octets (5*4)
4572 01 23 45 67 ; NONCE_MT value
4576 10 ; Attribute type: AT_SELECTED_VERSION
4577 01 ; Attribute length: 4 octets (1*4)
4594 Haverinen & Salowey Informational [Page 82]
4596 RFC 4186 EAP-SIM Authentication January 2006
4599 A.5. EAP-Request/SIM/Challenge
4601 Next, the server selects three authentication triplets
4603 (RAND1,SRES1,Kc1) = (10111213 14151617 18191a1b 1c1d1e1f,
4606 (RAND2,SRES2,Kc2) = (20212223 24252627 28292a2b 2c2d2e2f,
4609 (RAND3,SRES3,Kc3) = (30313233 34353637 38393a3b 3c3d3e3f,
4613 Next, the MK is calculated as specified in Section 7*.
4615 MK = e576d5ca 332e9930 018bf1ba ee2763c7 95b3c712
4617 And the other keys are derived using the PRNG:
4619 K_encr = 536e5ebc 4465582a a6a8ec99 86ebb620
4620 K_aut = 25af1942 efcbf4bc 72b39434 21f2a974
4621 MSK = 39d45aea f4e30601 983e972b 6cfd46d1
4622 c3637733 65690d09 cd44976b 525f47d3
4623 a60a985e 955c53b0 90b2e4b7 3719196a
4624 40254296 8fd14a88 8f46b9a7 886e4488
4625 EMSK = 5949eab0 fff69d52 315c6c63 4fd14a7f
4626 0d52023d 56f79698 fa6596ab eed4f93f
4627 bb48eb53 4d985414 ceed0d9a 8ed33c38
4628 7c9dfdab 92ffbdf2 40fcecf6 5a2c93b9
4630 Next, the server selects a pseudonym and a fast re-authentication
4631 identity (in this case, "w8w49PexCazWJ&xCIARmxuMKht5S1sxR
4632 DqXSEFBEg3DcZP9cIxTe5J4OyIwNGVzxeJOU1G" and
4633 "Y24fNSrz8BP274jOJaF17WfxI8YO7QX0
4634 0pMXk9XMMVOw7broaNhTczuFq53aEpOkk3L0dm@eapsim.foo", respectively).
4650 Haverinen & Salowey Informational [Page 83]
4652 RFC 4186 EAP-SIM Authentication January 2006
4655 The following plaintext will be encrypted and stored in the
4656 AT_ENCR_DATA attribute:
4658 84 ; Attribute type: AT_NEXT_PSEUDONYM
4659 13 ; Attribute length: 76 octets (19*4)
4660 00 46 ; Actual pseudonym length: 70 octets
4661 77 38 77 34 39 50 65 78 43 61 7a 57 4a 26 78 43
4662 49 41 52 6d 78 75 4d 4b 68 74 35 53 31 73 78 52
4663 44 71 58 53 45 46 42 45 67 33 44 63 5a 50 39 63
4664 49 78 54 65 35 4a 34 4f 79 49 77 4e 47 56 7a 78
4666 00 00 ; (attribute padding)
4667 85 ; Attribute type: AT_NEXT_REAUTH_ID
4668 16 ; Attribute length: 88 octets (22*4)
4669 00 51 ; Actual re-auth identity length: 81 octets
4670 59 32 34 66 4e 53 72 7a 38 42 50 32 37 34 6a 4f
4671 4a 61 46 31 37 57 66 78 49 38 59 4f 37 51 58 30
4672 30 70 4d 58 6b 39 58 4d 4d 56 4f 77 37 62 72 6f
4673 61 4e 68 54 63 7a 75 46 71 35 33 61 45 70 4f 6b
4674 6b 33 4c 30 64 6d 40 65 61 70 73 69 6d 2e 66 6f
4676 00 00 00 ; (attribute padding)
4677 06 ; Attribute type: AT_PADDING
4678 03 ; Attribute length: 12 octets (3*4)
4683 The EAP packet looks like this:
4687 01 18 ; Length: 280 octets
4689 0b ; EAP-SIM subtype: Challenge
4691 01 ; Attribute type: AT_RAND
4692 0d ; Attribute length: 52 octets (13*4)
4694 10 11 12 13 ; first RAND
4698 20 21 22 23 ; second RAND
4706 Haverinen & Salowey Informational [Page 84]
4708 RFC 4186 EAP-SIM Authentication January 2006
4711 30 31 32 33 ; third RAND
4715 81 ; Attribute type: AT_IV
4716 05 ; Attribute length: 20 octets (5*4)
4718 9e 18 b0 c2 ; IV value
4722 82 ; Attribute type: AT_ENCR_DATA
4723 2d ; Attribute length: 180 octets (45*4)
4725 55 f2 93 9b bd b1 b1 9e a1 b4 7f c0 b3 e0 be 4c
4726 ab 2c f7 37 2d 98 e3 02 3c 6b b9 24 15 72 3d 58
4727 ba d6 6c e0 84 e1 01 b6 0f 53 58 35 4b d4 21 82
4728 78 ae a7 bf 2c ba ce 33 10 6a ed dc 62 5b 0c 1d
4729 5a a6 7a 41 73 9a e5 b5 79 50 97 3f c7 ff 83 01
4730 07 3c 6f 95 31 50 fc 30 3e a1 52 d1 e1 0a 2d 1f
4731 4f 52 26 da a1 ee 90 05 47 22 52 bd b3 b7 1d 6f
4732 0c 3a 34 90 31 6c 46 92 98 71 bd 45 cd fd bc a6
4733 11 2f 07 f8 be 71 79 90 d2 5f 6d d7 f2 b7 b3 20
4734 bf 4d 5a 99 2e 88 03 31 d7 29 94 5a ec 75 ae 5d
4735 43 c8 ed a5 fe 62 33 fc ac 49 4e e6 7a 0d 50 4d
4736 0b ; Attribute type: AT_MAC
4737 05 ; Attribute length: 20 octets (5*4)
4739 fe f3 24 ac ; MAC value
4744 The MAC is calculated over the EAP packet above (with MAC value set
4745 to zero), followed by the NONCE_MT value (a total of 296 bytes).
4762 Haverinen & Salowey Informational [Page 85]
4764 RFC 4186 EAP-SIM Authentication January 2006
4767 A.6. EAP-Response/SIM/Challenge
4769 The client's response looks like this:
4773 00 1c ; Length: 28 octets
4775 0b ; EAP-SIM subtype: Challenge
4777 0b ; Attribute type: AT_MAC
4778 05 ; Attribute length: 20 octets (5*4)
4780 f5 6d 64 33 ; MAC value
4785 The MAC is calculated over the EAP packet above (with MAC value set
4786 to zero), followed by the SRES values (a total of 40 bytes).
4790 The last packet is an EAP-Success:
4794 00 04 ; Length: 4 octets
4796 A.8. Fast Re-authentication
4798 When performing fast re-authentication, the EAP-Request/Identity
4799 packet is the same as usual. The EAP-Response/Identity contains the
4800 fast re-authentication identity (from AT_ENCR_DATA attribute above):
4804 00 56 ; Length: 86 octets
4806 59 32 34 66 4e 53 72 7a 38 42 50 32 37 34 6a 4f
4807 4a 61 46 31 37 57 66 78 49 38 59 4f 37 51 58 30
4808 30 70 4d 58 6b 39 58 4d 4d 56 4f 77 37 62 72 6f
4809 61 4e 68 54 63 7a 75 46 71 35 33 61 45 70 4f 6b
4810 6b 33 4c 30 64 6d 40 65 61 70 73 69 6d 2e 66 6f
4818 Haverinen & Salowey Informational [Page 86]
4820 RFC 4186 EAP-SIM Authentication January 2006
4823 A.9. EAP-Request/SIM/Re-authentication
4825 The server recognizes the reauthentication identity, so it will
4826 respond with EAP-Request/SIM/Re-authentication. It retrieves the
4827 associated counter value, generates a nonce, and picks a new
4828 reauthentication identity (in this case,
4829 "uta0M0iyIsMwWp5TTdSdnOLvg2XDVf21OYt1vnfiMcs5dnIDHOIFVavIRzMR
4830 yzW6vFzdHW@eapsim.foo").
4832 The following plaintext will be encrypted and stored in the
4833 AT_ENCR_DATA attribute. Note that AT_PADDING is not used because the
4834 length of the plaintext is a multiple of 16 bytes.
4836 13 ; Attribute type: AT_COUNTER
4837 01 ; Attribute length: 4 octets (1*4)
4838 00 01 ; Counter value
4839 15 ; Attribute type: AT_NONCE_S
4840 05 ; Attribute length: 20 octets (5*4)
4842 01 23 45 67 ; NONCE_S value
4846 85 ; Attribute type: AT_NEXT_REAUTH_ID
4847 16 ; Attribute length: 88 octets (22*4)
4848 00 51 ; Actual re-auth identity length: 81 octets
4849 75 74 61 30 4d 30 69 79 49 73 4d 77 57 70 35 54
4850 54 64 53 64 6e 4f 4c 76 67 32 58 44 56 66 32 31
4851 4f 59 74 31 76 6e 66 69 4d 63 73 35 64 6e 49 44
4852 48 4f 49 46 56 61 76 49 52 7a 4d 52 79 7a 57 36
4853 76 46 7a 64 48 57 40 65 61 70 73 69 6d 2e 66 6f
4855 00 00 00 ; (attribute padding)
4874 Haverinen & Salowey Informational [Page 87]
4876 RFC 4186 EAP-SIM Authentication January 2006
4879 The EAP packet looks like this:
4883 00 a4 ; Length: 164 octets
4885 0d ; EAP-SIM subtype: Re-authentication
4887 81 ; Attribute type: AT_IV
4888 05 ; Attribute length: 20 octets (5*4)
4890 d5 85 ac 77 ; IV value
4894 82 ; Attribute type: AT_ENCR_DATA
4895 1d ; Attribute length: 116 octets (29*4)
4897 68 62 91 a9 d2 ab c5 8c aa 32 94 b6 e8 5b 44 84
4898 6c 44 e5 dc b2 de 8b 9e 80 d6 9d 49 85 8a 5d b8
4899 4c dc 1c 9b c9 5c 01 b9 6b 6e ca 31 34 74 ae a6
4900 d3 14 16 e1 9d aa 9d f7 0f 05 00 88 41 ca 80 14
4901 96 4d 3b 30 a4 9b cf 43 e4 d3 f1 8e 86 29 5a 4a
4902 2b 38 d9 6c 97 05 c2 bb b0 5c 4a ac e9 7d 5e af
4903 f5 64 04 6c 8b d3 0b c3 9b e5 e1 7a ce 2b 10 a6
4904 0b ; Attribute type: AT_MAC
4905 05 ; Attribute length: 20 octets (5*4)
4907 48 3a 17 99 ; MAC value
4912 The MAC is calculated over the EAP packet above (with MAC value set
4913 to zero; a total of 164 bytes).
4915 Finally, the server derives new keys. The XKEY' is calculated as
4916 described in Section 7*:
4918 XKEY' = 863dc120 32e08343 c1a2308d b48377f6 801f58d4
4930 Haverinen & Salowey Informational [Page 88]
4932 RFC 4186 EAP-SIM Authentication January 2006
4935 The new MSK and EMSK are derived using the PRNG (note that K_encr and
4936 K_aut stay the same).
4938 MSK = 6263f614 973895e1 335f7e30 cff028ee
4939 2176f519 002c9abe 732fe0ef 00cf167c
4940 756d9e4c ed6d5ed6 40eb3fe3 8565ca07
4941 6e7fb8a8 17cfe8d9 adbce441 d47c4f5e
4942 EMSK = 3d8ff786 3a630b2b 06e2cf20 9684c13f
4943 6b82f992 f2b06f1b 54bf51ef 237f2a40
4944 1ef5e0d7 e098a34c 533eaebf 34578854
4945 b7721526 20a777f0 e0340884 a294fb73
4947 A.10. EAP-Response/SIM/Re-authentication
4949 The client's response includes the counter as well. The following
4950 plaintext will be encrypted and stored in the AT_ENCR_DATA attribute:
4952 13 ; Attribute type: AT_COUNTER
4953 01 ; Attribute length: 4 octets (1*4)
4954 00 01 ; Counter value
4955 06 ; Attribute type: AT_PADDING
4956 03 ; Attribute length: 12 octets (3*4)
4961 The EAP packet looks like this:
4965 00 44 ; Length: 68 octets
4967 0d ; EAP-SIM subtype: Re-authentication
4969 81 ; Attribute type: AT_IV
4970 05 ; Attribute length: 20 octets (5*4)
4972 cd f7 ff a6 ; IV value
4976 82 ; Attribute type: AT_ENCR_DATA
4977 05 ; Attribute length: 20 octets (5*4)
4986 Haverinen & Salowey Informational [Page 89]
4988 RFC 4186 EAP-SIM Authentication January 2006
4991 0b ; Attribute type: AT_MAC
4992 05 ; Attribute length: 20 octets (5*4)
4994 fa f7 6b 71 ; MAC value
4999 The MAC is calculated over the EAP packet above (with MAC value set
5000 to zero), followed by the NONCE_S value (a total of 84 bytes).
5002 The next packet will be EAP-Success:
5006 00 04 ; Length: 4 octets
5008 Appendix B. Pseudo-Random Number Generator
5010 The "|" character denotes concatenation, and "^" denotes
5013 Step 1: Choose a new, secret value for the seed-key, XKEY
5015 Step 2: In hexadecimal notation let
5016 t = 67452301 EFCDAB89 98BADCFE 10325476 C3D2E1F0
5017 This is the initial value for H0|H1|H2|H3|H4
5018 in the FIPS SHS [SHA-1]
5020 Step 3: For j = 0 to m - 1 do
5021 3.1 XSEED_j = 0 /* no optional user input */
5022 3.2 For i = 0 to 1 do
5023 a. XVAL = (XKEY + XSEED_j) mod 2^b
5025 c. XKEY = (1 + XKEY + w_i) mod 2^b
5042 Haverinen & Salowey Informational [Page 90]
5044 RFC 4186 EAP-SIM Authentication January 2006
5049 Henry Haverinen (editor)
5050 Nokia Enterprise Solutions
5055 EMail: henry.haverinen@nokia.com
5058 Joseph Salowey (editor)
5064 Phone: +1 206 256 3380
5065 EMail: jsalowey@cisco.com
5098 Haverinen & Salowey Informational [Page 91]
5100 RFC 4186 EAP-SIM Authentication January 2006
5103 Full Copyright Statement
5105 Copyright (C) The Internet Society (2006).
5107 This document is subject to the rights, licenses and restrictions
5108 contained in BCP 78, and except as set forth therein, the authors
5109 retain all their rights.
5111 This document and the information contained herein are provided on an
5112 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
5113 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
5114 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
5115 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
5116 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
5117 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
5119 Intellectual Property
5121 The IETF takes no position regarding the validity or scope of any
5122 Intellectual Property Rights or other rights that might be claimed to
5123 pertain to the implementation or use of the technology described in
5124 this document or the extent to which any license under such rights
5125 might or might not be available; nor does it represent that it has
5126 made any independent effort to identify any such rights. Information
5127 on the procedures with respect to rights in RFC documents can be
5128 found in BCP 78 and BCP 79.
5130 Copies of IPR disclosures made to the IETF Secretariat and any
5131 assurances of licenses to be made available, or the result of an
5132 attempt made to obtain a general license or permission for the use of
5133 such proprietary rights by implementers or users of this
5134 specification can be obtained from the IETF on-line IPR repository at
5135 http://www.ietf.org/ipr.
5137 The IETF invites any interested party to bring to its attention any
5138 copyrights, patents or patent applications, or other proprietary
5139 rights that may cover technology that may be required to implement
5140 this standard. Please address the information to the IETF at
5145 Funding for the RFC Editor function is provided by the IETF
5146 Administrative Support Activity (IASA).
5154 Haverinen & Salowey Informational [Page 92]