~ubuntu-branches/ubuntu/utopic/strongswan/utopic

« back to all changes in this revision

Viewing changes to doc/standards/rfc4186.txt

  • Committer: Package Import Robot
  • Author(s): Jonathan Davies
  • Date: 2014-01-20 19:00:59 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140120190059-z8e4dl3g8cd09yi5
Tags: 5.1.2~dr3+git20130120-0ubuntu1
* Upstream Git snapshot for build fixes with regards to entropy.
* debian/rules:
  - Enforcing DEB_BUILD_OPTIONS=nostrip for library integrity checking.
  - Set TESTS_REDUCED_KEYLENGTHS to one generate smallest key-lengths in
    tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
 
 
4
 
 
5
 
 
6
 
 
7
Network Working Group                                  H. Haverinen, Ed.
 
8
Request for Comments: 4186                                         Nokia
 
9
Category: Informational                                  J. Salowey, Ed.
 
10
                                                           Cisco Systems
 
11
                                                            January 2006
 
12
 
 
13
 
 
14
             Extensible Authentication Protocol Method for
 
15
             Global System for Mobile Communications (GSM)
 
16
                 Subscriber Identity Modules (EAP-SIM)
 
17
 
 
18
Status of This Memo
 
19
 
 
20
   This memo provides information for the Internet community.  It does
 
21
   not specify an Internet standard of any kind.  Distribution of this
 
22
   memo is unlimited.
 
23
 
 
24
Copyright Notice
 
25
 
 
26
   Copyright (C) The Internet Society (2006).
 
27
 
 
28
IESG Note
 
29
 
 
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.
 
36
 
 
37
Abstract
 
38
 
 
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.
 
49
 
 
50
 
 
51
 
 
52
 
 
53
 
 
54
 
 
55
 
 
56
 
 
57
 
 
58
Haverinen & Salowey          Informational                      [Page 1]
 
59
 
 
60
RFC 4186                 EAP-SIM Authentication             January 2006
 
61
 
 
62
 
 
63
Table of Contents
 
64
 
 
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
 
111
 
 
112
 
 
113
 
 
114
Haverinen & Salowey          Informational                      [Page 2]
 
115
 
 
116
RFC 4186                 EAP-SIM Authentication             January 2006
 
117
 
 
118
 
 
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
 
167
 
 
168
 
 
169
 
 
170
Haverinen & Salowey          Informational                      [Page 3]
 
171
 
 
172
RFC 4186                 EAP-SIM Authentication             January 2006
 
173
 
 
174
 
 
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
 
187
 
 
188
1.  Introduction
 
189
 
 
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).
 
194
 
 
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
 
200
   networks.
 
201
 
 
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.
 
214
 
 
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
 
223
 
 
224
 
 
225
 
 
226
Haverinen & Salowey          Informational                      [Page 4]
 
227
 
 
228
RFC 4186                 EAP-SIM Authentication             January 2006
 
229
 
 
230
 
 
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
 
235
   authentication.
 
236
 
 
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.
 
241
 
 
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.
 
255
 
 
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.
 
265
 
 
266
2.  Terms
 
267
 
 
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].
 
271
 
 
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].
 
276
 
 
277
 
 
278
 
 
279
 
 
280
 
 
281
 
 
282
Haverinen & Salowey          Informational                      [Page 5]
 
283
 
 
284
RFC 4186                 EAP-SIM Authentication             January 2006
 
285
 
 
286
 
 
287
   This document frequently uses the following terms and abbreviations:
 
288
 
 
289
   AAA protocol
 
290
 
 
291
         Authentication, Authorization, and Accounting protocol
 
292
 
 
293
   AuC
 
294
 
 
295
         Authentication Centre.  The GSM network element that provides
 
296
         the authentication triplets for authenticating
 
297
         the subscriber.
 
298
 
 
299
   Authentication vector
 
300
 
 
301
         GSM triplets can be alternatively called authentication
 
302
         vectors.
 
303
 
 
304
   EAP
 
305
 
 
306
         Extensible Authentication Protocol
 
307
 
 
308
   Fast re-authentication
 
309
 
 
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.
 
314
 
 
315
   Fast Re-authentication Identity
 
316
 
 
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.
 
320
 
 
321
   Fast Re-authentication Username
 
322
 
 
323
         The username portion of fast re-authentication identity,
 
324
         i.e., not including any realm portions.
 
325
 
 
326
   Full authentication
 
327
 
 
328
         An EAP-SIM authentication exchange based on the GSM
 
329
         authentication and key agreement algorithms.
 
330
 
 
331
   GSM
 
332
 
 
333
         Global System for Mobile communications.
 
334
 
 
335
 
 
336
 
 
337
 
 
338
Haverinen & Salowey          Informational                      [Page 6]
 
339
 
 
340
RFC 4186                 EAP-SIM Authentication             January 2006
 
341
 
 
342
 
 
343
   GSM Triplet
 
344
 
 
345
         The tuple formed by the three GSM authentication values RAND,
 
346
         Kc, and SRES.
 
347
 
 
348
   IMSI
 
349
 
 
350
         International Mobile Subscriber Identifier, used in GSM to
 
351
         identify subscribers.
 
352
 
 
353
   MAC
 
354
 
 
355
         Message Authentication Code
 
356
 
 
357
   NAI
 
358
 
 
359
         Network Access Identifier
 
360
 
 
361
   Nonce
 
362
 
 
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.
 
371
 
 
372
   Permanent Identity
 
373
 
 
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
 
377
         authentication only.
 
378
 
 
379
   Permanent Username
 
380
 
 
381
         The username portion of permanent identity, i.e., not including
 
382
         any realm portions.
 
383
 
 
384
   Pseudonym Identity
 
385
 
 
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.
 
389
 
 
390
 
 
391
 
 
392
 
 
393
 
 
394
Haverinen & Salowey          Informational                      [Page 7]
 
395
 
 
396
RFC 4186                 EAP-SIM Authentication             January 2006
 
397
 
 
398
 
 
399
   Pseudonym Username
 
400
 
 
401
         The username portion of pseudonym identity, i.e., not including
 
402
         any realm portions.
 
403
 
 
404
   SIM
 
405
 
 
406
         Subscriber Identity Module.  The SIM is traditionally a smart
 
407
         card distributed by a GSM operator.
 
408
 
 
409
3.  Overview
 
410
 
 
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.
 
418
 
 
419
     Peer                                               Authenticator
 
420
       |                               EAP-Request/Identity       |
 
421
       |<---------------------------------------------------------|
 
422
       |                                                          |
 
423
       | EAP-Response/Identity                                    |
 
424
       |--------------------------------------------------------->|
 
425
       |                                                          |
 
426
       |                  EAP-Request/SIM/Start (AT_VERSION_LIST) |
 
427
       |<---------------------------------------------------------|
 
428
       |                                                          |
 
429
       | EAP-Response/SIM/Start (AT_NONCE_MT, AT_SELECTED_VERSION)|
 
430
       |--------------------------------------------------------->|
 
431
       |                                                          |
 
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
       |--------------------------------------------------------->|
 
440
       |                                                          |
 
441
       |                                             EAP-Success  |
 
442
       |<---------------------------------------------------------|
 
443
       |                                                          |
 
444
 
 
445
            Figure 1: EAP-SIM full authentication procedure
 
446
 
 
447
 
 
448
 
 
449
 
 
450
Haverinen & Salowey          Informational                      [Page 8]
 
451
 
 
452
RFC 4186                 EAP-SIM Authentication             January 2006
 
453
 
 
454
 
 
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.
 
460
 
 
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.
 
469
 
 
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.
 
474
 
 
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).
 
482
 
 
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.
 
492
 
 
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.
 
498
 
 
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
 
503
 
 
504
 
 
505
 
 
506
Haverinen & Salowey          Informational                      [Page 9]
 
507
 
 
508
RFC 4186                 EAP-SIM Authentication             January 2006
 
509
 
 
510
 
 
511
   sends the EAP-Response/SIM/Client-Error packet and the authentication
 
512
   exchange terminates.
 
513
 
 
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.
 
519
 
 
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.
 
531
 
 
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.
 
541
 
 
542
4.  Operation
 
543
 
 
544
4.1.  Version Negotiation
 
545
 
 
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.
 
552
 
 
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
 
559
 
 
560
 
 
561
 
 
562
Haverinen & Salowey          Informational                     [Page 10]
 
563
 
 
564
RFC 4186                 EAP-SIM Authentication             January 2006
 
565
 
 
566
 
 
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.
 
572
 
 
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
 
581
   terminates.
 
582
 
 
583
4.2.  Identity Management
 
584
 
 
585
4.2.1.  Format, Generation and Usage of Peer Identities
 
586
 
 
587
4.2.1.1.  General
 
588
 
 
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
 
593
   [RFC3748].
 
594
 
 
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.
 
603
 
 
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
 
608
   within the realm.
 
609
 
 
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
 
613
 
 
614
 
 
615
 
 
616
 
 
617
 
 
618
Haverinen & Salowey          Informational                     [Page 11]
 
619
 
 
620
RFC 4186                 EAP-SIM Authentication             January 2006
 
621
 
 
622
 
 
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.
 
626
 
 
627
4.2.1.2.  Identity Privacy Support
 
628
 
 
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.
 
640
 
 
641
4.2.1.3.  Username Types in EAP-SIM identities
 
642
 
 
643
   There are three types of usernames in EAP-SIM peer identities:
 
644
 
 
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.
 
648
 
 
649
   (2) Pseudonym usernames.  For example, 3s7ah6n9q@myoperator.com might
 
650
   be a valid pseudonym identity.  In this example, 3s7ah6n9q is the
 
651
   pseudonym username.
 
652
 
 
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.
 
659
 
 
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.
 
665
 
 
666
4.2.1.4.  Username Decoration
 
667
 
 
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
 
671
 
 
672
 
 
673
 
 
674
Haverinen & Salowey          Informational                     [Page 12]
 
675
 
 
676
RFC 4186                 EAP-SIM Authentication             January 2006
 
677
 
 
678
 
 
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.
 
689
 
 
690
4.2.1.5.  NAI Realm Portion
 
691
 
 
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.
 
694
 
 
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.
 
706
 
 
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].
 
711
 
 
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.
 
720
 
 
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
 
727
 
 
728
 
 
729
 
 
730
Haverinen & Salowey          Informational                     [Page 13]
 
731
 
 
732
RFC 4186                 EAP-SIM Authentication             January 2006
 
733
 
 
734
 
 
735
   operators that have 2-digit MNCs, the network SHOULD also be prepared
 
736
   for realm names with incorrect, 3-digit MNCs.
 
737
 
 
738
4.2.1.6.  Format of the Permanent Username
 
739
 
 
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).
 
751
 
 
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".
 
756
 
 
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.
 
762
 
 
763
4.2.1.7.  Generating Pseudonyms and Fast Re-authentication Identities by
 
764
          the Server
 
765
 
 
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.
 
772
 
 
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
 
781
   permanent identity.
 
782
 
 
783
 
 
784
 
 
785
 
 
786
Haverinen & Salowey          Informational                     [Page 14]
 
787
 
 
788
RFC 4186                 EAP-SIM Authentication             January 2006
 
789
 
 
790
 
 
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.
 
794
 
 
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.
 
811
 
 
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.
 
819
 
 
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.
 
826
 
 
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.
 
832
 
 
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
 
839
 
 
840
 
 
841
 
 
842
Haverinen & Salowey          Informational                     [Page 15]
 
843
 
 
844
RFC 4186                 EAP-SIM Authentication             January 2006
 
845
 
 
846
 
 
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.
 
855
 
 
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.
 
863
 
 
864
4.2.1.8.  Transmitting Pseudonyms and Fast Re-authentication Identities
 
865
          to the Peer
 
866
 
 
867
   The server transmits pseudonym usernames and fast re-authentication
 
868
   identities to the peer in cipher, using the AT_ENCR_DATA attribute.
 
869
 
 
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.
 
879
 
 
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.
 
890
 
 
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
 
895
 
 
896
 
 
897
 
 
898
Haverinen & Salowey          Informational                     [Page 16]
 
899
 
 
900
RFC 4186                 EAP-SIM Authentication             January 2006
 
901
 
 
902
 
 
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.
 
908
 
 
909
4.2.1.9.  Usage of the Pseudonym by the Peer
 
910
 
 
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.
 
919
 
 
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.
 
926
 
 
927
4.2.1.10.  Usage of the Fast Re-authentication Identity by the Peer
 
928
 
 
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.
 
938
 
 
939
4.2.2.  Communicating the Peer Identity to the Server
 
940
 
 
941
4.2.2.1.  General
 
942
 
 
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
 
951
 
 
952
 
 
953
 
 
954
Haverinen & Salowey          Informational                     [Page 17]
 
955
 
 
956
RFC 4186                 EAP-SIM Authentication             January 2006
 
957
 
 
958
 
 
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.
 
962
 
 
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.
 
976
 
 
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.
 
981
 
 
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.
 
990
 
 
991
4.2.2.2.  Relying on EAP-Response/Identity Discouraged
 
992
 
 
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
 
1000
   protocol to fail.
 
1001
 
 
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.
 
1005
 
 
1006
 
 
1007
 
 
1008
 
 
1009
 
 
1010
Haverinen & Salowey          Informational                     [Page 18]
 
1011
 
 
1012
RFC 4186                 EAP-SIM Authentication             January 2006
 
1013
 
 
1014
 
 
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.
 
1019
 
 
1020
4.2.3.  Choice of Identity for the EAP-Response/Identity
 
1021
 
 
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
 
1025
   following steps.
 
1026
 
 
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.
 
1030
 
 
1031
   Else, if the peer has a pseudonym username available, then the peer
 
1032
   transmits the pseudonym identity in EAP-Response/Identity.
 
1033
 
 
1034
   In other cases, the peer transmits the permanent identity in
 
1035
   EAP-Response/Identity.
 
1036
 
 
1037
4.2.4.  Server Operation in the Beginning of EAP-SIM Exchange
 
1038
 
 
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.
 
1048
 
 
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.
 
1059
 
 
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
 
1063
 
 
1064
 
 
1065
 
 
1066
Haverinen & Salowey          Informational                     [Page 19]
 
1067
 
 
1068
RFC 4186                 EAP-SIM Authentication             January 2006
 
1069
 
 
1070
 
 
1071
   of the EAP-Response/SIM/Start message.  This is done in the following
 
1072
   cases:
 
1073
 
 
1074
   o  The server does not support fast re-authentication or identity
 
1075
      privacy.
 
1076
 
 
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
 
1080
      identity.
 
1081
 
 
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:
 
1087
 
 
1088
   o  The server does not support fast re-authentication and the server
 
1089
      supports identity privacy.
 
1090
 
 
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.
 
1095
 
 
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.
 
1104
 
 
1105
4.2.5.  Processing of EAP-Request/SIM/Start by the Peer
 
1106
 
 
1107
   Upon receipt of an EAP-Request/SIM/Start message, the peer MUST
 
1108
   perform the following steps.
 
1109
 
 
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
 
1114
   exchange.
 
1115
 
 
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
 
1119
 
 
1120
 
 
1121
 
 
1122
Haverinen & Salowey          Informational                     [Page 20]
 
1123
 
 
1124
RFC 4186                 EAP-SIM Authentication             January 2006
 
1125
 
 
1126
 
 
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".
 
1132
 
 
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.
 
1140
 
 
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.
 
1150
 
 
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.
 
1165
 
 
1166
4.2.6.  Attacks Against Identity Privacy
 
1167
 
 
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
 
1175
 
 
1176
 
 
1177
 
 
1178
Haverinen & Salowey          Informational                     [Page 21]
 
1179
 
 
1180
RFC 4186                 EAP-SIM Authentication             January 2006
 
1181
 
 
1182
 
 
1183
   EAP-Response/SIM/Client-Error packet with the error code "unable to
 
1184
   process packet", and the authentication exchange terminates.
 
1185
 
 
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
 
1201
   permanent identity.
 
1202
 
 
1203
4.2.7.  Processing of AT_IDENTITY by the Server
 
1204
 
 
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.
 
1208
 
 
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/
 
1215
   Challenge.
 
1216
 
 
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.
 
1225
 
 
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.
 
1230
 
 
1231
 
 
1232
 
 
1233
 
 
1234
Haverinen & Salowey          Informational                     [Page 22]
 
1235
 
 
1236
RFC 4186                 EAP-SIM Authentication             January 2006
 
1237
 
 
1238
 
 
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
 
1243
   (Section 5).
 
1244
 
 
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.
 
1250
 
 
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.
 
1256
 
 
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.
 
1262
 
 
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.
 
1266
 
 
1267
4.3.  Message Sequence Examples (Informative)
 
1268
 
 
1269
   This section contains non-normative message sequence examples to
 
1270
   illustrate how the peer identity can be communicated to the server.
 
1271
 
 
1272
 
 
1273
 
 
1274
 
 
1275
 
 
1276
 
 
1277
 
 
1278
 
 
1279
 
 
1280
 
 
1281
 
 
1282
 
 
1283
 
 
1284
 
 
1285
 
 
1286
 
 
1287
 
 
1288
 
 
1289
 
 
1290
Haverinen & Salowey          Informational                     [Page 23]
 
1291
 
 
1292
RFC 4186                 EAP-SIM Authentication             January 2006
 
1293
 
 
1294
 
 
1295
4.3.1.  Full Authentication
 
1296
 
 
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.
 
1301
 
 
1302
      Peer                                             Authenticator
 
1303
        |                                                       |
 
1304
        |                            +------------------------------+
 
1305
        |                            | Server does not have a       |
 
1306
        |                            | Subscriber identity available|
 
1307
        |                            | When starting EAP-SIM        |
 
1308
        |                            +------------------------------+
 
1309
        |                                                       |
 
1310
        |          EAP-Request/SIM/Start                        |
 
1311
        |          (AT_ANY_ID_REQ, AT_VERSION_LIST)             |
 
1312
        |<------------------------------------------------------|
 
1313
        |                                                       |
 
1314
        |                                                       |
 
1315
        | EAP-Response/SIM/Start                                |
 
1316
        | (AT_IDENTITY, AT_NONCE_MT,                            |
 
1317
        |  AT_SELECTED_VERSION)                                 |
 
1318
        |------------------------------------------------------>|
 
1319
        |                                                       |
 
1320
 
 
1321
         Figure 2: Requesting any identity, full authentication
 
1322
 
 
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.
 
1328
 
 
1329
 
 
1330
 
 
1331
 
 
1332
 
 
1333
 
 
1334
 
 
1335
 
 
1336
 
 
1337
 
 
1338
 
 
1339
 
 
1340
 
 
1341
 
 
1342
 
 
1343
 
 
1344
 
 
1345
 
 
1346
Haverinen & Salowey          Informational                     [Page 24]
 
1347
 
 
1348
RFC 4186                 EAP-SIM Authentication             January 2006
 
1349
 
 
1350
 
 
1351
4.3.2.  Fast Re-authentication
 
1352
 
 
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.
 
1355
 
 
1356
      Peer                                             Authenticator
 
1357
        |                                                       |
 
1358
        |                            +------------------------------+
 
1359
        |                            | Server does not have a       |
 
1360
        |                            | Subscriber identity available|
 
1361
        |                            | When starting EAP-SIM        |
 
1362
        |                            +------------------------------+
 
1363
        |                                                       |
 
1364
        |        EAP-Request/SIM/Start                          |
 
1365
        |        (AT_ANY_ID_REQ, AT_VERSION_LIST)               |
 
1366
        |<------------------------------------------------------|
 
1367
        |                                                       |
 
1368
        |                                                       |
 
1369
        | EAP-Response/SIM/Start                                |
 
1370
        | (AT_IDENTITY containing a fast re-auth. identity)     |
 
1371
        |------------------------------------------------------>|
 
1372
        |                                                       |
 
1373
 
 
1374
       Figure 3: Requesting any identity, fast re-authentication
 
1375
 
 
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.
 
1381
 
 
1382
 
 
1383
 
 
1384
 
 
1385
 
 
1386
 
 
1387
 
 
1388
 
 
1389
 
 
1390
 
 
1391
 
 
1392
 
 
1393
 
 
1394
 
 
1395
 
 
1396
 
 
1397
 
 
1398
 
 
1399
 
 
1400
 
 
1401
 
 
1402
Haverinen & Salowey          Informational                     [Page 25]
 
1403
 
 
1404
RFC 4186                 EAP-SIM Authentication             January 2006
 
1405
 
 
1406
 
 
1407
4.3.3.  Fall Back to Full Authentication
 
1408
 
 
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.
 
1412
 
 
1413
      Peer                                             Authenticator
 
1414
        |                                                       |
 
1415
        |                            +------------------------------+
 
1416
        |                            | Server does not have a       |
 
1417
        |                            | Subscriber identity available|
 
1418
        |                            | When starting EAP-SIM        |
 
1419
        |                            +------------------------------+
 
1420
        |                                                       |
 
1421
        |        EAP-Request/SIM/Start                          |
 
1422
        |        (AT_ANY_ID_REQ, AT_VERSION_LIST)               |
 
1423
        |<------------------------------------------------------|
 
1424
        |                                                       |
 
1425
        |                                                       |
 
1426
        | EAP-Response/SIM/Start                                |
 
1427
        | (AT_IDENTITY containing a fast re-auth. identity)     |
 
1428
        |------------------------------------------------------>|
 
1429
        |                                                       |
 
1430
        |                            +------------------------------+
 
1431
        |                            | Server does not recognize    |
 
1432
        |                            | The fast re-auth.            |
 
1433
        |                            | Identity                     |
 
1434
        |                            +------------------------------+
 
1435
        |                                                       |
 
1436
        |     EAP-Request/SIM/Start                             |
 
1437
        |     (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST)             |
 
1438
        |<------------------------------------------------------|
 
1439
        |                                                       |
 
1440
        |                                                       |
 
1441
        | EAP-Response/SIM/Start                                |
 
1442
        | (AT_IDENTITY with a full-auth. identity, AT_NONCE_MT, |
 
1443
        |  AT_SELECTED_VERSION)                                 |
 
1444
        |------------------------------------------------------>|
 
1445
        |                                                       |
 
1446
 
 
1447
              Figure 4: Fall back to full authentication
 
1448
 
 
1449
 
 
1450
 
 
1451
 
 
1452
 
 
1453
 
 
1454
 
 
1455
 
 
1456
 
 
1457
 
 
1458
Haverinen & Salowey          Informational                     [Page 26]
 
1459
 
 
1460
RFC 4186                 EAP-SIM Authentication             January 2006
 
1461
 
 
1462
 
 
1463
4.3.4.  Requesting the Permanent Identity 1
 
1464
 
 
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.
 
1468
 
 
1469
      Peer                                             Authenticator
 
1470
         |                                                       |
 
1471
         |                               EAP-Request/Identity    |
 
1472
         |<------------------------------------------------------|
 
1473
         |                                                       |
 
1474
         | EAP-Response/Identity                                 |
 
1475
         | (Includes a pseudonym)                                |
 
1476
         |------------------------------------------------------>|
 
1477
         |                                                       |
 
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
         |<------------------------------------------------------|
 
1485
         |                                                       |
 
1486
         | EAP-Response/SIM/Start                                |
 
1487
         | (AT_IDENTITY with permanent identity, AT_NONCE_MT,    |
 
1488
         |  AT_SELECTED_VERSION)                                 |
 
1489
         |------------------------------------------------------>|
 
1490
         |                                                       |
 
1491
 
 
1492
              Figure 5: Requesting the permanent identity
 
1493
 
 
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.
 
1497
 
 
1498
 
 
1499
 
 
1500
 
 
1501
 
 
1502
 
 
1503
 
 
1504
 
 
1505
 
 
1506
 
 
1507
 
 
1508
 
 
1509
 
 
1510
 
 
1511
 
 
1512
 
 
1513
 
 
1514
Haverinen & Salowey          Informational                     [Page 27]
 
1515
 
 
1516
RFC 4186                 EAP-SIM Authentication             January 2006
 
1517
 
 
1518
 
 
1519
4.3.5.  Requesting the Permanent Identity 2
 
1520
 
 
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
 
1523
   permanent identity.
 
1524
 
 
1525
      Peer                                             Authenticator
 
1526
         |                                                       |
 
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
         |<------------------------------------------------------|
 
1535
         |                                                       |
 
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
         |                           +-------------------------------+
 
1545
         |                                                       |
 
1546
         |                EAP-Request/SIM/Start                  |
 
1547
         |                (AT_PERMANENT_ID_REQ, AT_VERSION_LIST) |
 
1548
         |<------------------------------------------------------|
 
1549
         |                                                       |
 
1550
         | EAP-Response/SIM/Start                                |
 
1551
         | (AT_IDENTITY with permanent identity,                 |
 
1552
         |  AT_NONCE_MT, AT_SELECTED_VERSION)                    |
 
1553
         |------------------------------------------------------>|
 
1554
         |                                                       |
 
1555
 
 
1556
   Figure 6: Requesting a permanent identity (two EAP-SIM Start rounds)
 
1557
 
 
1558
4.3.6.  Three EAP-SIM/Start Roundtrips
 
1559
 
 
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
 
1562
   in Figure 7.
 
1563
 
 
1564
 
 
1565
 
 
1566
 
 
1567
 
 
1568
 
 
1569
 
 
1570
Haverinen & Salowey          Informational                     [Page 28]
 
1571
 
 
1572
RFC 4186                 EAP-SIM Authentication             January 2006
 
1573
 
 
1574
 
 
1575
      Peer                                             Authenticator
 
1576
       |                                                       |
 
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
       |<------------------------------------------------------|
 
1585
       |                                                       |
 
1586
       | EAP-Response/SIM/Start                                |
 
1587
       | (AT_IDENTITY with fast re-auth. identity)             |
 
1588
       |------------------------------------------------------>|
 
1589
       |                                                       |
 
1590
       |                            +------------------------------+
 
1591
       |                            | Server does not accept       |
 
1592
       |                            | The fast re-auth.            |
 
1593
       |                            | Identity                     |
 
1594
       |                            +------------------------------+
 
1595
       |     EAP-Request/SIM/Start                             |
 
1596
       |     (AT_FULLAUTH_ID_REQ, AT_VERSION_LIST)             |
 
1597
       |<------------------------------------------------------|
 
1598
       |                                                       |
 
1599
       :                                                       :
 
1600
       :                                                       :
 
1601
       :                                                       :
 
1602
       :                                                       :
 
1603
       |EAP-Response/SIM/Start                                 |
 
1604
       |(AT_IDENTITY with a pseudonym identity, AT_NONCE_MT,   |
 
1605
       | AT_SELECTED_VERSION)                                  |
 
1606
       |------------------------------------------------------>|
 
1607
       |                                                       |
 
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
       |<------------------------------------------------------|
 
1616
       |                                                       |
 
1617
       | EAP-Response/SIM/Start                                |
 
1618
       | (AT_IDENTITY with permanent identity, AT_NONCE_MT,    |
 
1619
       |  AT_SELECTED_VERSION)                                 |
 
1620
       |------------------------------------------------------>|
 
1621
       |                                                       |
 
1622
                Figure 7: Three EAP-SIM Start rounds
 
1623
 
 
1624
 
 
1625
 
 
1626
Haverinen & Salowey          Informational                     [Page 29]
 
1627
 
 
1628
RFC 4186                 EAP-SIM Authentication             January 2006
 
1629
 
 
1630
 
 
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.
 
1635
 
 
1636
5.  Fast Re-Authentication
 
1637
 
 
1638
5.1.  General
 
1639
 
 
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.
 
1649
 
 
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.
 
1654
 
 
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
 
1660
   7.
 
1661
 
 
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.
 
1674
 
 
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.
 
1679
 
 
1680
 
 
1681
 
 
1682
Haverinen & Salowey          Informational                     [Page 30]
 
1683
 
 
1684
RFC 4186                 EAP-SIM Authentication             January 2006
 
1685
 
 
1686
 
 
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.
 
1692
 
 
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
 
1698
   hexadecimal.
 
1699
 
 
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.
 
1705
 
 
1706
5.2.  Comparison to UMTS AKA
 
1707
 
 
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
 
1719
   is fresh.
 
1720
 
 
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.
 
1724
 
 
1725
5.3.  Fast Re-authentication Identity
 
1726
 
 
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.
 
1732
 
 
1733
 
 
1734
 
 
1735
 
 
1736
 
 
1737
 
 
1738
Haverinen & Salowey          Informational                     [Page 31]
 
1739
 
 
1740
RFC 4186                 EAP-SIM Authentication             January 2006
 
1741
 
 
1742
 
 
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.
 
1762
 
 
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
 
1772
   authentication.
 
1773
 
 
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
 
1778
   packet.
 
1779
 
 
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.
 
1788
 
 
1789
 
 
1790
 
 
1791
 
 
1792
 
 
1793
 
 
1794
Haverinen & Salowey          Informational                     [Page 32]
 
1795
 
 
1796
RFC 4186                 EAP-SIM Authentication             January 2006
 
1797
 
 
1798
 
 
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
 
1809
   EAP request.
 
1810
 
 
1811
5.4.  Fast Re-authentication Procedure
 
1812
 
 
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
 
1823
   packet.
 
1824
 
 
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.
 
1836
 
 
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.
 
1841
 
 
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,
 
1847
 
 
1848
 
 
1849
 
 
1850
Haverinen & Salowey          Informational                     [Page 33]
 
1851
 
 
1852
RFC 4186                 EAP-SIM Authentication             January 2006
 
1853
 
 
1854
 
 
1855
   including the AT_COUNTER attribute with the same counter value and
 
1856
   AT_MAC attribute.
 
1857
 
 
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
 
1862
   packet to the peer.
 
1863
 
 
1864
   If protected success indications (Section 6.2) were used, the
 
1865
   EAP-Success packet would be preceded by an EAP-SIM notification
 
1866
   round.
 
1867
 
 
1868
 
 
1869
 
 
1870
 
 
1871
 
 
1872
 
 
1873
 
 
1874
 
 
1875
 
 
1876
 
 
1877
 
 
1878
 
 
1879
 
 
1880
 
 
1881
 
 
1882
 
 
1883
 
 
1884
 
 
1885
 
 
1886
 
 
1887
 
 
1888
 
 
1889
 
 
1890
 
 
1891
 
 
1892
 
 
1893
 
 
1894
 
 
1895
 
 
1896
 
 
1897
 
 
1898
 
 
1899
 
 
1900
 
 
1901
 
 
1902
 
 
1903
 
 
1904
 
 
1905
 
 
1906
Haverinen & Salowey          Informational                     [Page 34]
 
1907
 
 
1908
RFC 4186                 EAP-SIM Authentication             January 2006
 
1909
 
 
1910
 
 
1911
       Peer                                             Authenticator
 
1912
          |                                                       |
 
1913
          |                               EAP-Request/Identity    |
 
1914
          |<------------------------------------------------------|
 
1915
          |                                                       |
 
1916
          | EAP-Response/Identity                                 |
 
1917
          | (Includes a fast re-authentication identity)          |
 
1918
          |------------------------------------------------------>|
 
1919
          |                                                       |
 
1920
          |                          +--------------------------------+
 
1921
          |                          | Server recognizes the identity |
 
1922
          |                          | and agrees to use fast         |
 
1923
          |                          | re-authentication              |
 
1924
          |                          +--------------------------------+
 
1925
          |                                                       |
 
1926
          :                                                       :
 
1927
          :                                                       :
 
1928
          :                                                       :
 
1929
          :                                                       :
 
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
          |<------------------------------------------------------|
 
1934
          |                                                       |
 
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
     +-----------------------------------------------+            |
 
1940
          |                                                       |
 
1941
          | EAP-Response/SIM/Re-authentication                    |
 
1942
          | (AT_IV, AT_ENCR_DATA, *AT_COUNTER with same value,    |
 
1943
          |  AT_MAC)                                              |
 
1944
          |------------------------------------------------------>|
 
1945
          |                          +--------------------------------+
 
1946
          |                          | Server verifies AT_MAC and     |
 
1947
          |                          | the counter                    |
 
1948
          |                          +--------------------------------+
 
1949
          |                                                       |
 
1950
          |                                          EAP-Success  |
 
1951
          |<------------------------------------------------------|
 
1952
          |                                                       |
 
1953
 
 
1954
                    Figure 8: Fast Re-authentication
 
1955
 
 
1956
 
 
1957
 
 
1958
 
 
1959
 
 
1960
 
 
1961
 
 
1962
Haverinen & Salowey          Informational                     [Page 35]
 
1963
 
 
1964
RFC 4186                 EAP-SIM Authentication             January 2006
 
1965
 
 
1966
 
 
1967
5.5.  Fast Re-authentication Procedure when Counter Is Too Small
 
1968
 
 
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 '*'.
 
1975
 
 
1976
       Peer                                             Authenticator
 
1977
          |          EAP-Request/SIM/Start                        |
 
1978
          |          (AT_ANY_ID_REQ, AT_VERSION_LIST)             |
 
1979
          |<------------------------------------------------------|
 
1980
          |                                                       |
 
1981
          | EAP-Response/SIM/Start                                |
 
1982
          | (AT_IDENTITY)                                         |
 
1983
          | (Includes a fast re-authentication identity)          |
 
1984
          |------------------------------------------------------>|
 
1985
          |                                                       |
 
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
     +-----------------------------------------------+            |
 
1993
          |                                                       |
 
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
          |            +----------------------------------------------+
 
2002
          |                                                       |
 
2003
          |                        EAP-Request/SIM/Start          |
 
2004
          |                        (AT_VERSION_LIST)              |
 
2005
          |<------------------------------------------------------|
 
2006
     +---------------------------------------------------------------+
 
2007
     |                Normal full authentication follows.            |
 
2008
     +---------------------------------------------------------------+
 
2009
          |                                                       |
 
2010
 
 
2011
          Figure 9: Fast Re-authentication, counter is not fresh
 
2012
 
 
2013
 
 
2014
 
 
2015
 
 
2016
 
 
2017
 
 
2018
Haverinen & Salowey          Informational                     [Page 36]
 
2019
 
 
2020
RFC 4186                 EAP-SIM Authentication             January 2006
 
2021
 
 
2022
 
 
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.
 
2030
 
 
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.
 
2042
 
 
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).
 
2047
 
 
2048
6.  EAP-SIM Notifications
 
2049
 
 
2050
6.1.  General
 
2051
 
 
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.
 
2057
 
 
2058
   The EAP server can use EAP-SIM notifications to convey notifications
 
2059
   and result indications (Section 6.2) to the peer.
 
2060
 
 
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.
 
2068
 
 
2069
 
 
2070
 
 
2071
 
 
2072
 
 
2073
 
 
2074
Haverinen & Salowey          Informational                     [Page 37]
 
2075
 
 
2076
RFC 4186                 EAP-SIM Authentication             January 2006
 
2077
 
 
2078
 
 
2079
   An EAP-SIM full authentication exchange or a fast re-authentication
 
2080
   exchange MUST NOT include more than one EAP-SIM notification round.
 
2081
 
 
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
 
2090
   packet.
 
2091
 
 
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.
 
2096
 
 
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.
 
2107
 
 
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
 
2113
   to zero.
 
2114
 
 
2115
   Section 9.8 and Section 9.9 specify what other attributes must be
 
2116
   included in the notification packets.
 
2117
 
 
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.
 
2125
 
 
2126
 
 
2127
 
 
2128
 
 
2129
 
 
2130
Haverinen & Salowey          Informational                     [Page 38]
 
2131
 
 
2132
RFC 4186                 EAP-SIM Authentication             January 2006
 
2133
 
 
2134
 
 
2135
6.2.  Result Indications
 
2136
 
 
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.
 
2142
 
 
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.
 
2149
 
 
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.
 
2163
 
 
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.
 
2171
 
 
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
 
2179
   the next packet.
 
2180
 
 
2181
 
 
2182
 
 
2183
 
 
2184
 
 
2185
 
 
2186
Haverinen & Salowey          Informational                     [Page 39]
 
2187
 
 
2188
RFC 4186                 EAP-SIM Authentication             January 2006
 
2189
 
 
2190
 
 
2191
6.3.  Error Cases
 
2192
 
 
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.
 
2204
 
 
2205
6.3.1.  Peer Operation
 
2206
 
 
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.
 
2212
 
 
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:
 
2215
 
 
2216
   o  EAP exchange is not acceptable according to the peer's local
 
2217
      policy.
 
2218
 
 
2219
   o  the peer is not able to parse the EAP request, i.e., the EAP
 
2220
      request is malformed.
 
2221
 
 
2222
   o  the peer encountered a malformed attribute.
 
2223
 
 
2224
   o  wrong attribute types or duplicate attributes have been included
 
2225
      in the EAP request.
 
2226
 
 
2227
   o  a mandatory attribute is missing.
 
2228
 
 
2229
   o  unrecognized, non-skippable attribute.
 
2230
 
 
2231
   o  unrecognized or unexpected EAP-SIM Subtype in the EAP request.
 
2232
 
 
2233
   o  A RAND challenge repeated in AT_RAND.
 
2234
 
 
2235
   o  invalid AT_MAC.  The peer SHOULD log this event.
 
2236
 
 
2237
   o  invalid pad bytes in AT_PADDING.
 
2238
 
 
2239
 
 
2240
 
 
2241
 
 
2242
Haverinen & Salowey          Informational                     [Page 40]
 
2243
 
 
2244
RFC 4186                 EAP-SIM Authentication             January 2006
 
2245
 
 
2246
 
 
2247
   o  the peer does not want to process AT_PERMANENT_ID_REQ.
 
2248
 
 
2249
   Separate error codes have been defined for the following error cases
 
2250
   in Section 10.19:
 
2251
 
 
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".
 
2258
 
 
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".
 
2263
 
 
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".
 
2268
 
 
2269
6.3.2.  Server Operation
 
2270
 
 
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:
 
2280
 
 
2281
   o  the server is not able to parse the peer's EAP response
 
2282
 
 
2283
   o  the server encounters a malformed attribute, a non-recognized
 
2284
      non-skippable attribute, or a duplicate attribute
 
2285
 
 
2286
   o  a mandatory attribute is missing or an invalid attribute was
 
2287
      included
 
2288
 
 
2289
   o  unrecognized or unexpected EAP-SIM Subtype in the EAP Response
 
2290
 
 
2291
   o  invalid AT_MAC.  The server SHOULD log this event.
 
2292
 
 
2293
   o  invalid AT_COUNTER
 
2294
 
 
2295
 
 
2296
 
 
2297
 
 
2298
Haverinen & Salowey          Informational                     [Page 41]
 
2299
 
 
2300
RFC 4186                 EAP-SIM Authentication             January 2006
 
2301
 
 
2302
 
 
2303
6.3.3.  EAP-Failure
 
2304
 
 
2305
   The EAP-SIM server sends EAP-Failure in two cases:
 
2306
 
 
2307
   1) In response to an EAP-Response/SIM/Client-Error packet the server
 
2308
      has received from the peer, or
 
2309
 
 
2310
   2) Following an EAP-SIM notification round, when the AT_NOTIFICATION
 
2311
      code implies failure.
 
2312
 
 
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.
 
2318
 
 
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
 
2321
   other cases.
 
2322
 
 
2323
6.3.4.  EAP-Success
 
2324
 
 
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.
 
2330
 
 
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.
 
2335
 
 
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).
 
2342
 
 
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.
 
2348
 
 
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
 
2351
 
 
2352
 
 
2353
 
 
2354
Haverinen & Salowey          Informational                     [Page 42]
 
2355
 
 
2356
RFC 4186                 EAP-SIM Authentication             January 2006
 
2357
 
 
2358
 
 
2359
   re-authentication, then the peer MUST accept EAP-Success after a
 
2360
   successful EAP/SIM/Re-authentication round.
 
2361
 
 
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).
 
2368
 
 
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.
 
2373
 
 
2374
7.  Key Generation
 
2375
 
 
2376
   This section specifies how keying material is generated.
 
2377
 
 
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.
 
2381
 
 
2382
   MK = SHA1(Identity|n*Kc| NONCE_MT| Version List| Selected Version)
 
2383
 
 
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.
 
2393
 
 
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.
 
2406
 
 
2407
 
 
2408
 
 
2409
 
 
2410
Haverinen & Salowey          Informational                     [Page 43]
 
2411
 
 
2412
RFC 4186                 EAP-SIM Authentication             January 2006
 
2413
 
 
2414
 
 
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
 
2422
   re-authentication.
 
2423
 
 
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.
 
2429
 
 
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.
 
2442
 
 
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
 
2446
   to zero.
 
2447
 
 
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).
 
2453
 
 
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:
 
2457
 
 
2458
   XKEY' = SHA1(Identity|counter|NONCE_S| MK)
 
2459
 
 
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
 
2463
 
 
2464
 
 
2465
 
 
2466
Haverinen & Salowey          Informational                     [Page 44]
 
2467
 
 
2468
RFC 4186                 EAP-SIM Authentication             January 2006
 
2469
 
 
2470
 
 
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.
 
2479
 
 
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, ...).
 
2488
 
 
2489
   The first 32 bytes of the MSK can be used as the Pairwise Master Key
 
2490
   (PMK) for IEEE 802.11i.
 
2491
 
 
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
 
2496
   (the MSK) are used.
 
2497
 
 
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).
 
2510
 
 
2511
8.  Message Format and Protocol Extensibility
 
2512
 
 
2513
8.1.  Message Format
 
2514
 
 
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
 
2519
 
 
2520
 
 
2521
 
 
2522
Haverinen & Salowey          Informational                     [Page 45]
 
2523
 
 
2524
RFC 4186                 EAP-SIM Authentication             January 2006
 
2525
 
 
2526
 
 
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.
 
2529
 
 
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.
 
2535
 
 
2536
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
2543
 
 
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.
 
2547
 
 
2548
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
2553
 
 
2554
 
 
2555
   Attribute Type
 
2556
 
 
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].
 
2560
 
 
2561
   Length
 
2562
 
 
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.
 
2566
 
 
2567
   Value
 
2568
 
 
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
 
2572
         of the value field.
 
2573
 
 
2574
 
 
2575
 
 
2576
 
 
2577
 
 
2578
Haverinen & Salowey          Informational                     [Page 46]
 
2579
 
 
2580
RFC 4186                 EAP-SIM Authentication             January 2006
 
2581
 
 
2582
 
 
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
 
2593
   exchange.
 
2594
 
 
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.
 
2600
 
 
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.
 
2604
 
 
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.
 
2608
 
 
2609
8.2.  Protocol Extensibility
 
2610
 
 
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.
 
2614
 
 
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
 
2631
 
 
2632
 
 
2633
 
 
2634
Haverinen & Salowey          Informational                     [Page 47]
 
2635
 
 
2636
RFC 4186                 EAP-SIM Authentication             January 2006
 
2637
 
 
2638
 
 
2639
   attributes aside from those specified in this document in the
 
2640
   EAP-Response/SIM/Start message.
 
2641
 
 
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.
 
2648
 
 
2649
   Because EAP-SIM supports version negotiation, new versions of the
 
2650
   protocol can also be specified by using a new version number.
 
2651
 
 
2652
9.  Messages
 
2653
 
 
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.
 
2659
 
 
2660
9.1.  EAP-Request/SIM/Start
 
2661
 
 
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.
 
2669
 
 
2670
   The server MUST always include the AT_VERSION_LIST attribute.
 
2671
 
 
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.
 
2676
 
 
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.
 
2681
 
 
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.
 
2686
 
 
2687
 
 
2688
 
 
2689
 
 
2690
Haverinen & Salowey          Informational                     [Page 48]
 
2691
 
 
2692
RFC 4186                 EAP-SIM Authentication             January 2006
 
2693
 
 
2694
 
 
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.
 
2699
 
 
2700
   This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
 
2701
 
 
2702
9.2.  EAP-Response/SIM/Start
 
2703
 
 
2704
   The peer sends EAP-Response/SIM/Start in response to a valid
 
2705
   EAP-Request/SIM/Start from the server.
 
2706
 
 
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
 
2710
   Section 4.2.
 
2711
 
 
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).
 
2716
 
 
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
 
2722
   Section 4.1.
 
2723
 
 
2724
   This message MUST NOT include AT_MAC, AT_IV, or AT_ENCR_DATA.
 
2725
 
 
2726
9.3.  EAP-Request/SIM/Challenge
 
2727
 
 
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
 
2731
   identity.
 
2732
 
 
2733
   The AT_RAND attribute MUST be included.
 
2734
 
 
2735
   The AT_RESULT_IND attribute MAY be included.  The usage of this
 
2736
   attribute is discussed in Section 6.2.
 
2737
 
 
2738
   The AT_MAC attribute MUST be included.  For
 
2739
   EAP-Request/SIM/Challenge, the MAC code is calculated over the
 
2740
   following data:
 
2741
 
 
2742
   EAP packet| NONCE_MT
 
2743
 
 
2744
 
 
2745
 
 
2746
Haverinen & Salowey          Informational                     [Page 49]
 
2747
 
 
2748
RFC 4186                 EAP-SIM Authentication             January 2006
 
2749
 
 
2750
 
 
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
 
2753
   attribute.
 
2754
 
 
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).
 
2759
 
 
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.
 
2769
 
 
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.
 
2774
 
 
2775
9.4.  EAP-Response/SIM/Challenge
 
2776
 
 
2777
   The peer sends EAP-Response/SIM/Challenge in response to a valid
 
2778
   EAP-Request/SIM/Challenge.
 
2779
 
 
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.
 
2785
 
 
2786
   The AT_MAC attribute MUST be included.  For EAP-
 
2787
   Response/SIM/Challenge, the MAC code is calculated over the following
 
2788
   data:
 
2789
 
 
2790
   EAP packet| n*SRES
 
2791
 
 
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.
 
2797
 
 
2798
 
 
2799
 
 
2800
 
 
2801
 
 
2802
Haverinen & Salowey          Informational                     [Page 50]
 
2803
 
 
2804
RFC 4186                 EAP-SIM Authentication             January 2006
 
2805
 
 
2806
 
 
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
 
2809
   in Section 6.2.
 
2810
 
 
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.
 
2816
 
 
2817
9.5.  EAP-Request/SIM/Re-authentication
 
2818
 
 
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.
 
2823
 
 
2824
   AT_MAC MUST be included.  No message-specific data is included in the
 
2825
   MAC calculation.  See Section 10.14.
 
2826
 
 
2827
   The AT_RESULT_IND attribute MAY be included.  The usage of this
 
2828
   attribute is discussed in Section 6.2.
 
2829
 
 
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.
 
2835
 
 
2836
9.6.  EAP-Response/SIM/Re-authentication
 
2837
 
 
2838
   The client sends the EAP-Response/SIM/Re-authentication packet in
 
2839
   response to a valid EAP-Request/SIM/Re-authentication.
 
2840
 
 
2841
   The AT_MAC attribute MUST be included.  For
 
2842
   EAP-Response/SIM/Re-authentication, the MAC code is calculated over
 
2843
   the following data:
 
2844
 
 
2845
   EAP packet| NONCE_S
 
2846
 
 
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
 
2849
   attribute.
 
2850
 
 
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
 
2854
 
 
2855
 
 
2856
 
 
2857
 
 
2858
Haverinen & Salowey          Informational                     [Page 51]
 
2859
 
 
2860
RFC 4186                 EAP-SIM Authentication             January 2006
 
2861
 
 
2862
 
 
2863
   encrypted attributes, and it is included in cases specified in
 
2864
   Section 5.  The AT_PADDING attribute MAY be included.
 
2865
 
 
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.
 
2869
 
 
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.
 
2876
 
 
2877
9.7.  EAP-Response/SIM/Client-Error
 
2878
 
 
2879
   The peer sends EAP-Response/SIM/Client-Error in error cases, as
 
2880
   specified in Section 6.3.1.
 
2881
 
 
2882
   The AT_CLIENT_ERROR_CODE attribute MUST be included.
 
2883
 
 
2884
   The AT_MAC, AT_IV, or AT_ENCR_DATA attributes MUST NOT be used with
 
2885
   this packet.
 
2886
 
 
2887
9.8.  EAP-Request/SIM/Notification
 
2888
 
 
2889
   The usage of this message is specified in Section 6.  The
 
2890
   AT_NOTIFICATION attribute MUST be included.
 
2891
 
 
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.
 
2896
 
 
2897
   No message-specific data is included in the MAC calculation.  See
 
2898
   Section 10.14.
 
2899
 
 
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.
 
2908
 
 
2909
 
 
2910
 
 
2911
 
 
2912
 
 
2913
 
 
2914
Haverinen & Salowey          Informational                     [Page 52]
 
2915
 
 
2916
RFC 4186                 EAP-SIM Authentication             January 2006
 
2917
 
 
2918
 
 
2919
9.9.  EAP-Response/SIM/Notification
 
2920
 
 
2921
   The usage of this message is specified in Section 6.  This packet is
 
2922
   an acknowledgement of EAP-Request/SIM/Notification.
 
2923
 
 
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.
 
2928
 
 
2929
   No message-specific data is included in the MAC calculation, see
 
2930
   Section 10.14.
 
2931
 
 
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.
 
2940
 
 
2941
10.  Attributes
 
2942
 
 
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].
 
2946
 
 
2947
10.1.  Table of Attributes
 
2948
 
 
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.
 
2960
 
 
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.
 
2967
 
 
2968
 
 
2969
 
 
2970
Haverinen & Salowey          Informational                     [Page 53]
 
2971
 
 
2972
RFC 4186                 EAP-SIM Authentication             January 2006
 
2973
 
 
2974
 
 
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
 
2996
 
 
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.
 
3002
 
 
3003
10.2.  AT_VERSION_LIST
 
3004
 
 
3005
   The format of the AT_VERSION_LIST attribute is shown below.
 
3006
 
 
3007
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3014
    .                                                               .
 
3015
    .                                                               .
 
3016
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3017
    | Supported Version N           |     Padding                   |
 
3018
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3019
 
 
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
 
3023
 
 
3024
 
 
3025
 
 
3026
Haverinen & Salowey          Informational                     [Page 54]
 
3027
 
 
3028
RFC 4186                 EAP-SIM Authentication             January 2006
 
3029
 
 
3030
 
 
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).
 
3036
 
 
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
 
3045
   necessary.
 
3046
 
 
3047
10.3.  AT_SELECTED_VERSION
 
3048
 
 
3049
   The format of the AT_SELECTED_VERSION attribute is shown below.
 
3050
 
 
3051
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3056
 
 
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
 
3060
   wants to use.
 
3061
 
 
3062
10.4.  AT_NONCE_MT
 
3063
 
 
3064
   The format of the AT_NONCE_MT attribute is shown below.
 
3065
 
 
3066
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3071
    |                                                               |
 
3072
    |                           NONCE_MT                            |
 
3073
    |                                                               |
 
3074
    |                                                               |
 
3075
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3076
 
 
3077
 
 
3078
 
 
3079
 
 
3080
 
 
3081
 
 
3082
Haverinen & Salowey          Informational                     [Page 55]
 
3083
 
 
3084
RFC 4186                 EAP-SIM Authentication             January 2006
 
3085
 
 
3086
 
 
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.
 
3092
 
 
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
 
3099
   applications.
 
3100
 
 
3101
10.5.  AT_PERMANENT_ID_REQ
 
3102
 
 
3103
   The format of the AT_PERMANENT_ID_REQ attribute is shown below.
 
3104
 
 
3105
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3110
 
 
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.
 
3114
 
 
3115
10.6.  AT_ANY_ID_REQ
 
3116
 
 
3117
   The format of the AT_ANY_ID_REQ attribute is shown below.
 
3118
 
 
3119
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3124
 
 
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.
 
3128
 
 
3129
 
 
3130
 
 
3131
 
 
3132
 
 
3133
 
 
3134
 
 
3135
 
 
3136
 
 
3137
 
 
3138
Haverinen & Salowey          Informational                     [Page 56]
 
3139
 
 
3140
RFC 4186                 EAP-SIM Authentication             January 2006
 
3141
 
 
3142
 
 
3143
10.7.  AT_FULLAUTH_ID_REQ
 
3144
 
 
3145
   The format of the AT_FULLAUTH_ID_REQ attribute is shown below.
 
3146
 
 
3147
     0                   1                   2                   3
 
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
    +---------------+---------------+-------------------------------+
 
3152
 
 
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.
 
3156
 
 
3157
10.8.  AT_IDENTITY
 
3158
 
 
3159
   The format of the AT_IDENTITY attribute is shown below.
 
3160
 
 
3161
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3166
    |                                                               |
 
3167
    .                       Identity (optional)                     .
 
3168
    .                                                               .
 
3169
    |                                                               |
 
3170
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3171
 
 
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
 
3184
   necessary.
 
3185
 
 
3186
 
 
3187
 
 
3188
 
 
3189
 
 
3190
 
 
3191
 
 
3192
 
 
3193
 
 
3194
Haverinen & Salowey          Informational                     [Page 57]
 
3195
 
 
3196
RFC 4186                 EAP-SIM Authentication             January 2006
 
3197
 
 
3198
 
 
3199
10.9.  AT_RAND
 
3200
 
 
3201
   The format of the AT_RAND attribute is shown below.
 
3202
 
 
3203
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3208
    |                                                               |
 
3209
    .                            n*RAND                             .
 
3210
    .                                                               .
 
3211
    |                                                               |
 
3212
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3213
 
 
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.
 
3218
 
 
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.
 
3225
 
 
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
 
3237
   attempt.
 
3238
 
 
3239
 
 
3240
 
 
3241
 
 
3242
 
 
3243
 
 
3244
 
 
3245
 
 
3246
 
 
3247
 
 
3248
 
 
3249
 
 
3250
Haverinen & Salowey          Informational                     [Page 58]
 
3251
 
 
3252
RFC 4186                 EAP-SIM Authentication             January 2006
 
3253
 
 
3254
 
 
3255
10.10.  AT_NEXT_PSEUDONYM
 
3256
 
 
3257
   The format of the AT_NEXT_PSEUDONYM attribute is shown below.
 
3258
 
 
3259
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3264
    |                                                               |
 
3265
    .                          Next Pseudonym                       .
 
3266
    .                                                               .
 
3267
    |                                                               |
 
3268
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3269
 
 
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.
 
3280
 
 
3281
10.11.  AT_NEXT_REAUTH_ID
 
3282
 
 
3283
   The format of the AT_NEXT_REAUTH_ID attribute is shown below.
 
3284
 
 
3285
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3290
    |                                                               |
 
3291
    .               Next Fast Re-authentication Username            .
 
3292
    .                                                               .
 
3293
    |                                                               |
 
3294
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3295
 
 
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
 
3303
 
 
3304
 
 
3305
 
 
3306
Haverinen & Salowey          Informational                     [Page 59]
 
3307
 
 
3308
RFC 4186                 EAP-SIM Authentication             January 2006
 
3309
 
 
3310
 
 
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.
 
3318
 
 
3319
10.12.  AT_IV, AT_ENCR_DATA, and AT_PADDING
 
3320
 
 
3321
   AT_IV and AT_ENCR_DATA attributes can be used to transmit encrypted
 
3322
   information between the EAP-SIM peer and server.
 
3323
 
 
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.
 
3330
 
 
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.
 
3337
 
 
3338
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3343
    |                                                               |
 
3344
    |                 Initialization Vector                         |
 
3345
    |                                                               |
 
3346
    |                                                               |
 
3347
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3348
 
 
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.
 
3357
 
 
3358
 
 
3359
 
 
3360
 
 
3361
 
 
3362
Haverinen & Salowey          Informational                     [Page 60]
 
3363
 
 
3364
RFC 4186                 EAP-SIM Authentication             January 2006
 
3365
 
 
3366
 
 
3367
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3372
    |                                                               |
 
3373
    .                    Encrypted Data                             .
 
3374
    .                                                               .
 
3375
    |                                                               |
 
3376
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3377
 
 
3378
   The derivation of the encryption key (K_encr) is specified in Section
 
3379
   7.
 
3380
 
 
3381
   The plaintext consists of nested EAP-SIM attributes.
 
3382
 
 
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.
 
3402
 
 
3403
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
 
3408
    |                                                               |
 
3409
    |                                                               |
 
3410
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3411
 
 
3412
 
 
3413
 
 
3414
 
 
3415
 
 
3416
 
 
3417
 
 
3418
Haverinen & Salowey          Informational                     [Page 61]
 
3419
 
 
3420
RFC 4186                 EAP-SIM Authentication             January 2006
 
3421
 
 
3422
 
 
3423
10.13.  AT_RESULT_IND
 
3424
 
 
3425
   The format of the AT_RESULT_IND attribute is shown below.
 
3426
 
 
3427
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3432
 
 
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.
 
3437
 
 
3438
10.14.  AT_MAC
 
3439
 
 
3440
   The AT_MAC attribute is used for EAP-SIM message authentication.
 
3441
   Section 8 specifies in which messages AT_MAC MUST be included.
 
3442
 
 
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
 
3454
   Section 9.
 
3455
 
 
3456
   The format of the AT_MAC attribute is shown below.
 
3457
 
 
3458
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3463
    |                                                               |
 
3464
    |                           MAC                                 |
 
3465
    |                                                               |
 
3466
    |                                                               |
 
3467
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3468
 
 
3469
 
 
3470
 
 
3471
 
 
3472
 
 
3473
 
 
3474
Haverinen & Salowey          Informational                     [Page 62]
 
3475
 
 
3476
RFC 4186                 EAP-SIM Authentication             January 2006
 
3477
 
 
3478
 
 
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.
 
3484
 
 
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.
 
3492
 
 
3493
10.15.  AT_COUNTER
 
3494
 
 
3495
   The format of the AT_COUNTER attribute is shown below.
 
3496
 
 
3497
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3502
 
 
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.
 
3507
 
 
3508
10.16.  AT_COUNTER_TOO_SMALL
 
3509
 
 
3510
   The format of the AT_COUNTER_TOO_SMALL attribute is shown below.
 
3511
 
 
3512
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3517
 
 
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.
 
3522
 
 
3523
 
 
3524
 
 
3525
 
 
3526
 
 
3527
 
 
3528
 
 
3529
 
 
3530
Haverinen & Salowey          Informational                     [Page 63]
 
3531
 
 
3532
RFC 4186                 EAP-SIM Authentication             January 2006
 
3533
 
 
3534
 
 
3535
10.17.  AT_NONCE_S
 
3536
 
 
3537
   The format of the AT_NONCE_S attribute is shown below.
 
3538
 
 
3539
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3544
    |                                                               |
 
3545
    |                                                               |
 
3546
    |                            NONCE_S                            |
 
3547
    |                                                               |
 
3548
    |                                                               |
 
3549
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3550
 
 
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.
 
3558
 
 
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
 
3563
   applications.
 
3564
 
 
3565
10.18.  AT_NOTIFICATION
 
3566
 
 
3567
   The format of the AT_NOTIFICATION attribute is shown below.
 
3568
 
 
3569
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3574
 
 
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.
 
3578
 
 
3579
   The notification code values listed below have been reserved.  The
 
3580
   descriptions below illustrate the semantics of the notifications.
 
3581
 
 
3582
 
 
3583
 
 
3584
 
 
3585
 
 
3586
Haverinen & Salowey          Informational                     [Page 64]
 
3587
 
 
3588
RFC 4186                 EAP-SIM Authentication             January 2006
 
3589
 
 
3590
 
 
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.
 
3594
 
 
3595
   0 - General failure after authentication.  (Implies failure, used
 
3596
   after successful authentication.)
 
3597
 
 
3598
   16384 - General failure.  (Implies failure, used before
 
3599
   authentication.)
 
3600
 
 
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.
 
3604
 
 
3605
   1026 - User has been temporarily denied access to the requested
 
3606
   service.  (Implies failure, used after successful authentication.)
 
3607
 
 
3608
   1031 - User has not subscribed to the requested service.  (Implies
 
3609
   failure, used after successful authentication.)
 
3610
 
 
3611
10.19.  AT_CLIENT_ERROR_CODE
 
3612
 
 
3613
   The format of the AT_CLIENT_ERROR_CODE attribute is shown below.
 
3614
 
 
3615
     0                   1                   2                   3
 
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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
3620
 
 
3621
   The value field of this attribute contains a two-byte client error
 
3622
   code.  The following error code values have been reserved.
 
3623
 
 
3624
 
 
3625
    0    "unable to process packet": a general error code
 
3626
 
 
3627
    1    "unsupported version": the peer does not support any of
 
3628
         the versions listed in AT_VERSION_LIST
 
3629
 
 
3630
    2    "insufficient number of challenges": the peer's policy
 
3631
         requires more triplets than the server included in AT_RAND
 
3632
 
 
3633
    3    "RANDs are not fresh": the peer believes that the RAND
 
3634
         challenges included in AT_RAND were not fresh
 
3635
 
 
3636
 
 
3637
 
 
3638
 
 
3639
 
 
3640
 
 
3641
 
 
3642
Haverinen & Salowey          Informational                     [Page 65]
 
3643
 
 
3644
RFC 4186                 EAP-SIM Authentication             January 2006
 
3645
 
 
3646
 
 
3647
11.  IANA Considerations
 
3648
 
 
3649
   IANA has assigned the EAP type number 18 for this protocol.
 
3650
 
 
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
 
3658
   [EAP-AKA].
 
3659
 
 
3660
12.  Security Considerations
 
3661
 
 
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.
 
3666
 
 
3667
12.1.  A3 and A8 Algorithms
 
3668
 
 
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.
 
3677
 
 
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
 
3684
   any known attacks.
 
3685
 
 
3686
12.2.  Identity Protection
 
3687
 
 
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
 
3695
 
 
3696
 
 
3697
 
 
3698
Haverinen & Salowey          Informational                     [Page 66]
 
3699
 
 
3700
RFC 4186                 EAP-SIM Authentication             January 2006
 
3701
 
 
3702
 
 
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.
 
3711
 
 
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.
 
3720
 
 
3721
12.3.  Mutual Authentication and Triplet Exposure
 
3722
 
 
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.
 
3736
 
 
3737
   Given physical access to the SIM card, it is easy to obtain any
 
3738
   number of GSM triplets.
 
3739
 
 
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.
 
3750
 
 
3751
 
 
3752
 
 
3753
 
 
3754
Haverinen & Salowey          Informational                     [Page 67]
 
3755
 
 
3756
RFC 4186                 EAP-SIM Authentication             January 2006
 
3757
 
 
3758
 
 
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
 
3768
   document.
 
3769
 
 
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.
 
3772
 
 
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.
 
3784
 
 
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.
 
3790
 
 
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].
 
3797
 
 
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.
 
3802
 
 
3803
 
 
3804
 
 
3805
 
 
3806
 
 
3807
 
 
3808
 
 
3809
 
 
3810
Haverinen & Salowey          Informational                     [Page 68]
 
3811
 
 
3812
RFC 4186                 EAP-SIM Authentication             January 2006
 
3813
 
 
3814
 
 
3815
12.4.  Flooding the Authentication Centre
 
3816
 
 
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.
 
3827
 
 
3828
12.5.  Key Derivation
 
3829
 
 
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.
 
3841
 
 
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.
 
3846
 
 
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.
 
3855
 
 
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
 
3861
 
 
3862
 
 
3863
 
 
3864
 
 
3865
 
 
3866
Haverinen & Salowey          Informational                     [Page 69]
 
3867
 
 
3868
RFC 4186                 EAP-SIM Authentication             January 2006
 
3869
 
 
3870
 
 
3871
   combined from several shorter keys, i.e., the effective length of 128
 
3872
   bits may be achieved.  For additional considerations, see Section
 
3873
   12.8.
 
3874
 
 
3875
12.6.  Cryptographic Separation of Keys and Session Independence
 
3876
 
 
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.
 
3884
 
 
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
 
3897
   exchange.
 
3898
 
 
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.
 
3906
 
 
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
 
3912
   security claim.
 
3913
 
 
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.
 
3919
 
 
3920
 
 
3921
 
 
3922
Haverinen & Salowey          Informational                     [Page 70]
 
3923
 
 
3924
RFC 4186                 EAP-SIM Authentication             January 2006
 
3925
 
 
3926
 
 
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
 
3931
   about RAND re-use.
 
3932
 
 
3933
12.7.  Dictionary Attacks
 
3934
 
 
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.)
 
3938
 
 
3939
12.8.  Credentials Re-use
 
3940
 
 
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.
 
3944
 
 
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
 
3949
   key separately.
 
3950
 
 
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).
 
3957
 
 
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
 
3963
   than a second).
 
3964
 
 
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.
 
3969
 
 
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
 
3975
 
 
3976
 
 
3977
 
 
3978
Haverinen & Salowey          Informational                     [Page 71]
 
3979
 
 
3980
RFC 4186                 EAP-SIM Authentication             January 2006
 
3981
 
 
3982
 
 
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
 
3989
   selected yet.
 
3990
 
 
3991
12.9.  Integrity and Replay Protection, and Confidentiality
 
3992
 
 
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
 
4000
   key derivation.
 
4001
 
 
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.
 
4005
 
 
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.
 
4012
 
 
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.
 
4020
 
 
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.
 
4026
 
 
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
 
4031
 
 
4032
 
 
4033
 
 
4034
Haverinen & Salowey          Informational                     [Page 72]
 
4035
 
 
4036
RFC 4186                 EAP-SIM Authentication             January 2006
 
4037
 
 
4038
 
 
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.
 
4046
 
 
4047
   The security considerations of EAP-SIM result indications are covered
 
4048
   in Section 12.11
 
4049
 
 
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.
 
4054
 
 
4055
12.10.  Negotiation Attacks
 
4056
 
 
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.
 
4061
 
 
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.
 
4066
 
 
4067
   EAP-SIM does not support ciphersuite negotiation.
 
4068
 
 
4069
12.11.  Protected Result Indications
 
4070
 
 
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.
 
4075
 
 
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
 
4085
 
 
4086
 
 
4087
 
 
4088
 
 
4089
 
 
4090
Haverinen & Salowey          Informational                     [Page 73]
 
4091
 
 
4092
RFC 4186                 EAP-SIM Authentication             January 2006
 
4093
 
 
4094
 
 
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.
 
4098
 
 
4099
12.12.  Man-in-the-Middle Attacks
 
4100
 
 
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.
 
4107
 
 
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.
 
4120
 
 
4121
12.13.  Generating Random Numbers
 
4122
 
 
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.
 
4127
 
 
4128
13.  Security Claims
 
4129
 
 
4130
   This section provides the security claims required by [RFC3748].
 
4131
 
 
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.
 
4136
 
 
4137
   Ciphersuite negotiation: No
 
4138
 
 
4139
   Mutual authentication: Yes (Section 12.3)
 
4140
 
 
4141
   Integrity protection: Yes (Section 12.9)
 
4142
 
 
4143
 
 
4144
 
 
4145
 
 
4146
Haverinen & Salowey          Informational                     [Page 74]
 
4147
 
 
4148
RFC 4186                 EAP-SIM Authentication             January 2006
 
4149
 
 
4150
 
 
4151
   Replay protection: Yes (Section 12.9)
 
4152
 
 
4153
   Confidentiality: Yes, except method-specific success and failure
 
4154
   indications (Section 12.2, Section 12.9)
 
4155
 
 
4156
   Key derivation: Yes
 
4157
 
 
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.
 
4165
 
 
4166
   Description of key hierarchy: Please see Section 7.
 
4167
 
 
4168
   Dictionary attack protection: N/A (Section 12.7)
 
4169
 
 
4170
   Fast reconnect: Yes
 
4171
 
 
4172
   Cryptographic binding: N/A
 
4173
 
 
4174
   Session independence: Yes (Section 12.6)
 
4175
 
 
4176
   Fragmentation: No
 
4177
 
 
4178
   Channel binding: No
 
4179
 
 
4180
   Indication of vulnerabilities: Vulnerabilities are discussed in
 
4181
   Section 12.
 
4182
 
 
4183
14.  Acknowledgements and Contributions
 
4184
 
 
4185
14.1.  Contributors
 
4186
 
 
4187
   In addition to the editors, Nora Dabbous, Jose Puthenkulam, and
 
4188
   Prasanna Satarasinghe were significant contributors to this document.
 
4189
 
 
4190
   Pasi Eronen and Jukka-Pekka Honkanen contributed Appendix A.
 
4191
 
 
4192
14.2.  Acknowledgements
 
4193
 
 
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.
 
4198
 
 
4199
 
 
4200
 
 
4201
 
 
4202
Haverinen & Salowey          Informational                     [Page 75]
 
4203
 
 
4204
RFC 4186                 EAP-SIM Authentication             January 2006
 
4205
 
 
4206
 
 
4207
   N. Asokan, Pasi Eronen, and Jukka-Pekka Honkanen contributed and
 
4208
   helped in innumerable ways during the development of the protocol.
 
4209
 
 
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.
 
4214
 
 
4215
   Simon Blake-Wilson provided very helpful comments on key derivation
 
4216
   and version negotiation.
 
4217
 
 
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.
 
4221
 
 
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
 
4228
   MAC calculation.
 
4229
 
 
4230
   Thanks to Glen Zorn for reviewing this document and for providing
 
4231
   very useful comments on the protocol.
 
4232
 
 
4233
   Thanks to Sarvar Patel for his review of the protocol [Patel-2003].
 
4234
 
 
4235
   Thanks to Bernard Aboba for reviewing this document for RFC 3748
 
4236
   compliance.
 
4237
 
 
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].
 
4241
 
 
4242
   This protocol has been partly developed in parallel with EAP-AKA
 
4243
   [EAP-AKA], and hence this specification incorporates many ideas from
 
4244
   Jari Arkko.
 
4245
 
 
4246
 
 
4247
 
 
4248
 
 
4249
 
 
4250
 
 
4251
 
 
4252
 
 
4253
 
 
4254
 
 
4255
 
 
4256
 
 
4257
 
 
4258
Haverinen & Salowey          Informational                     [Page 76]
 
4259
 
 
4260
RFC 4186                 EAP-SIM Authentication             January 2006
 
4261
 
 
4262
 
 
4263
14.2.1.  Contributors' Addresses
 
4264
 
 
4265
   Nora Dabbous
 
4266
   Gemplus
 
4267
   34 rue Guynemer
 
4268
   92447 Issy les Moulineaux
 
4269
   France
 
4270
 
 
4271
   Phone: +33 1 4648 2000
 
4272
   EMail: nora.dabbous@gemplus.com
 
4273
 
 
4274
 
 
4275
   Jose Puthenkulam
 
4276
   Intel Corporation
 
4277
   2111 NE 25th Avenue, JF2-58
 
4278
   Hillsboro, OR 97124
 
4279
   USA
 
4280
 
 
4281
   Phone: +1 503 264 6121
 
4282
   EMail: jose.p.puthenkulam@intel.com
 
4283
 
 
4284
 
 
4285
   Prasanna Satarasinghe
 
4286
   Transat Technologies
 
4287
   180 State Street, Suite 240
 
4288
   Southlake, TX 76092
 
4289
   USA
 
4290
 
 
4291
   Phone: + 1 817 4814412
 
4292
   EMail: prasannas@transat-tech.com
 
4293
 
 
4294
 
 
4295
 
 
4296
 
 
4297
 
 
4298
 
 
4299
 
 
4300
 
 
4301
 
 
4302
 
 
4303
 
 
4304
 
 
4305
 
 
4306
 
 
4307
 
 
4308
 
 
4309
 
 
4310
 
 
4311
 
 
4312
 
 
4313
 
 
4314
Haverinen & Salowey          Informational                     [Page 77]
 
4315
 
 
4316
RFC 4186                 EAP-SIM Authentication             January 2006
 
4317
 
 
4318
 
 
4319
15.  References
 
4320
 
 
4321
15.1.  Normative References
 
4322
 
 
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"",
 
4327
                      August 1997.
 
4328
 
 
4329
   [RFC2119]          Bradner, S., "Key words for use in RFCs to
 
4330
                      Indicate Requirement Levels", BCP 14, RFC 2119,
 
4331
                      March 1997.
 
4332
 
 
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.
 
4338
 
 
4339
   [RFC2104]          Krawczyk, H., Bellare, M., and R. Canetti, "HMAC:
 
4340
                      Keyed-Hashing for Message Authentication", RFC
 
4341
                      2104, February 1997.
 
4342
 
 
4343
   [RFC4282]          Aboba, B., Beadles, M., Arkko, J., and P. Eronen,
 
4344
                      "The Network Access Identifier", RFC 4282,
 
4345
                      December 2005.
 
4346
 
 
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/
 
4352
                      fips-197.pdf
 
4353
 
 
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
 
4360
 
 
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.
 
4365
 
 
4366
 
 
4367
 
 
4368
 
 
4369
 
 
4370
Haverinen & Salowey          Informational                     [Page 78]
 
4371
 
 
4372
RFC 4186                 EAP-SIM Authentication             January 2006
 
4373
 
 
4374
 
 
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
 
4382
 
 
4383
   [RFC3629]          Yergeau, F., "UTF-8, a transformation format of
 
4384
                      ISO 10646", STD 63, RFC 3629, November 2003.
 
4385
 
 
4386
   [RFC3748]          Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J.,
 
4387
                      and H. Levkowetz, "Extensible Authentication
 
4388
                      Protocol (EAP)", RFC 3748, June 2004.
 
4389
 
 
4390
   [EAP-AKA]          Arkko, J. and H. Haverinen, "Extensible
 
4391
                      Authentication Protocol Method for 3rd Generation
 
4392
                      Authentication and Key Agreement (EAP-AKA)", RFC
 
4393
                      4187, January 2006.
 
4394
 
 
4395
15.2.  Informative References
 
4396
 
 
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)"",
 
4402
                      December 2005.
 
4403
 
 
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.
 
4412
 
 
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,
 
4416
                      October 2004.
 
4417
 
 
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.
 
4421
 
 
4422
 
 
4423
 
 
4424
 
 
4425
 
 
4426
Haverinen & Salowey          Informational                     [Page 79]
 
4427
 
 
4428
RFC 4186                 EAP-SIM Authentication             January 2006
 
4429
 
 
4430
 
 
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,
 
4434
                      October 2005.
 
4435
 
 
4436
   [Service-Identity] Arkko, J. and P. Eronen, "Authenticated Service
 
4437
                      Information for the Extensible Authentication
 
4438
                      Protocol (EAP)", Work in Progress, October 2004.
 
4439
 
 
4440
   [RFC4086]          Eastlake, D., 3rd, Schiller, J., and S. Crocker,
 
4441
                      "Randomness Requirements for Security", BCP 106,
 
4442
                      RFC 4086, June 2005.
 
4443
 
 
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.
 
4447
 
 
4448
   [RFC3344]          Perkins, C., "IP Mobility Support for IPv4", RFC
 
4449
                      3344, August 2002.
 
4450
 
 
4451
   [RFC2548]          Zorn, G., "Microsoft Vendor-specific RADIUS
 
4452
                      Attributes ", RFC 2548, March 1999.
 
4453
 
 
4454
   [EAP-SRP]          Carlson, J., Aboba, B., and H. Haverinen, "EAP
 
4455
                      SRP-SHA1 Authentication Protocol", Work in
 
4456
                      Progress, July 2001.
 
4457
 
 
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
 
4461
 
 
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
 
4466
 
 
4467
   [Patel-2003]       Patel, S., "Analysis of EAP-SIM Session Key
 
4468
                      Agreement".  Posted to the EAP mailing list 29
 
4469
                      May,2003. http://
 
4470
                      mail.frascone.com/pipermail/public/eap/2003-May/
 
4471
                      001267.html
 
4472
 
 
4473
 
 
4474
 
 
4475
 
 
4476
 
 
4477
 
 
4478
 
 
4479
 
 
4480
 
 
4481
 
 
4482
Haverinen & Salowey          Informational                     [Page 80]
 
4483
 
 
4484
RFC 4186                 EAP-SIM Authentication             January 2006
 
4485
 
 
4486
 
 
4487
Appendix A.  Test Vectors
 
4488
 
 
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
 
4492
 
 
4493
   The following examples show the contents of EAP-SIM packets on full
 
4494
   authentication and fast re-authentication.
 
4495
 
 
4496
A.1.  EAP-Request/Identity
 
4497
 
 
4498
   The first packet is a plain Identity Request:
 
4499
 
 
4500
      01                   ; Code: Request
 
4501
      00                   ; Identifier: 0
 
4502
      00 05                ; Length: 5 octets
 
4503
      01                   ; Type: Identity
 
4504
 
 
4505
A.2.  EAP-Response/Identity
 
4506
 
 
4507
   The client's identity is "1244070100000001@eapsim.foo", so it
 
4508
   responds with the following packet:
 
4509
 
 
4510
      02                   ; Code: Response
 
4511
      00                   ; Identifier: 0
 
4512
      00 20                ; Length: 32 octets
 
4513
      01                   ; Type: Identity
 
4514
         31 32 34 34       ; "1244070100000001@eapsim.foo"
 
4515
         30 37 30 31
 
4516
         30 30 30 30
 
4517
         30 30 30 31
 
4518
         40 65 61 70
 
4519
         73 69 6d 2e
 
4520
         66 6f 6f
 
4521
 
 
4522
 
 
4523
 
 
4524
 
 
4525
 
 
4526
 
 
4527
 
 
4528
 
 
4529
 
 
4530
 
 
4531
 
 
4532
 
 
4533
 
 
4534
 
 
4535
 
 
4536
 
 
4537
 
 
4538
Haverinen & Salowey          Informational                     [Page 81]
 
4539
 
 
4540
RFC 4186                 EAP-SIM Authentication             January 2006
 
4541
 
 
4542
 
 
4543
A.3.  EAP-Request/SIM/Start
 
4544
 
 
4545
   The server's first packet looks like this:
 
4546
 
 
4547
      01                   ; Code: Request
 
4548
      01                   ; Identifier: 1
 
4549
      00 10                ; Length: 16 octets
 
4550
      12                   ; Type: EAP-SIM
 
4551
         0a                ; EAP-SIM subtype: Start
 
4552
         00 00             ; (reserved)
 
4553
         0f                ; Attribute type: AT_VERSION_LIST
 
4554
            02             ; Attribute length: 8 octets (2*4)
 
4555
            00 02          ; Actual version list length: 2 octets
 
4556
            00 01          ; Version: 1
 
4557
            00 00          ; (attribute padding)
 
4558
 
 
4559
A.4.  EAP-Response/SIM/Start
 
4560
 
 
4561
   The client selects a nonce and responds with the following packet:
 
4562
 
 
4563
      02                   ; Code: Response
 
4564
      01                   ; Identifier: 1
 
4565
      00 20                ; Length: 32 octets
 
4566
      12                   ; Type: EAP-SIM
 
4567
         0a                ; EAP-SIM subtype: Start
 
4568
         00 00             ; (reserved)
 
4569
         07                ; Attribute type: AT_NONCE_MT
 
4570
            05             ; Attribute length: 20 octets (5*4)
 
4571
            00 00          ; (reserved)
 
4572
            01 23 45 67    ; NONCE_MT value
 
4573
            89 ab cd ef
 
4574
            fe dc ba 98
 
4575
            76 54 32 10
 
4576
         10                ; Attribute type: AT_SELECTED_VERSION
 
4577
            01             ; Attribute length: 4 octets (1*4)
 
4578
            00 01          ; Version: 1
 
4579
 
 
4580
 
 
4581
 
 
4582
 
 
4583
 
 
4584
 
 
4585
 
 
4586
 
 
4587
 
 
4588
 
 
4589
 
 
4590
 
 
4591
 
 
4592
 
 
4593
 
 
4594
Haverinen & Salowey          Informational                     [Page 82]
 
4595
 
 
4596
RFC 4186                 EAP-SIM Authentication             January 2006
 
4597
 
 
4598
 
 
4599
A.5.  EAP-Request/SIM/Challenge
 
4600
 
 
4601
   Next, the server selects three authentication triplets
 
4602
 
 
4603
         (RAND1,SRES1,Kc1) = (10111213 14151617 18191a1b 1c1d1e1f,
 
4604
                              d1d2d3d4,
 
4605
                              a0a1a2a3 a4a5a6a7)
 
4606
         (RAND2,SRES2,Kc2) = (20212223 24252627 28292a2b 2c2d2e2f,
 
4607
                              e1e2e3e4,
 
4608
                              b0b1b2b3 b4b5b6b7)
 
4609
         (RAND3,SRES3,Kc3) = (30313233 34353637 38393a3b 3c3d3e3f,
 
4610
                              f1f2f3f4,
 
4611
                              c0c1c2c3 c4c5c6c7)
 
4612
 
 
4613
   Next, the MK is calculated as specified in Section 7*.
 
4614
 
 
4615
   MK = e576d5ca 332e9930 018bf1ba ee2763c7 95b3c712
 
4616
 
 
4617
   And the other keys are derived using the PRNG:
 
4618
 
 
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
 
4629
 
 
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).
 
4635
 
 
4636
 
 
4637
 
 
4638
 
 
4639
 
 
4640
 
 
4641
 
 
4642
 
 
4643
 
 
4644
 
 
4645
 
 
4646
 
 
4647
 
 
4648
 
 
4649
 
 
4650
Haverinen & Salowey          Informational                     [Page 83]
 
4651
 
 
4652
RFC 4186                 EAP-SIM Authentication             January 2006
 
4653
 
 
4654
 
 
4655
   The following plaintext will be encrypted and stored in the
 
4656
   AT_ENCR_DATA attribute:
 
4657
 
 
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
 
4665
            65 4a 4f 55 31 47
 
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
 
4675
            6f
 
4676
            00 00 00       ; (attribute padding)
 
4677
         06                ; Attribute type: AT_PADDING
 
4678
            03             ; Attribute length: 12 octets (3*4)
 
4679
            00 00 00 00
 
4680
            00 00 00 00
 
4681
            00 00
 
4682
 
 
4683
   The EAP packet looks like this:
 
4684
 
 
4685
      01                   ; Code: Request
 
4686
      02                   ; Identifier: 2
 
4687
      01 18                ; Length: 280 octets
 
4688
      12                   ; Type: EAP-SIM
 
4689
         0b                ; EAP-SIM subtype: Challenge
 
4690
         00 00             ; (reserved)
 
4691
         01                ; Attribute type: AT_RAND
 
4692
            0d             ; Attribute length: 52 octets (13*4)
 
4693
            00 00          ; (reserved)
 
4694
            10 11 12 13    ; first RAND
 
4695
            14 15 16 17
 
4696
            18 19 1a 1b
 
4697
            1c 1d 1e 1f
 
4698
            20 21 22 23    ; second RAND
 
4699
            24 25 26 27
 
4700
            28 29 2a 2b
 
4701
            2c 2d 2e 2f
 
4702
 
 
4703
 
 
4704
 
 
4705
 
 
4706
Haverinen & Salowey          Informational                     [Page 84]
 
4707
 
 
4708
RFC 4186                 EAP-SIM Authentication             January 2006
 
4709
 
 
4710
 
 
4711
            30 31 32 33    ; third RAND
 
4712
            34 35 36 37
 
4713
            38 39 3a 3b
 
4714
            3c 3d 3e 3f
 
4715
         81                ; Attribute type: AT_IV
 
4716
            05             ; Attribute length: 20 octets (5*4)
 
4717
            00 00          ; (reserved)
 
4718
            9e 18 b0 c2    ; IV value
 
4719
            9a 65 22 63
 
4720
            c0 6e fb 54
 
4721
            dd 00 a8 95
 
4722
         82               ; Attribute type: AT_ENCR_DATA
 
4723
            2d            ; Attribute length: 180 octets (45*4)
 
4724
            00 00         ; (reserved)
 
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)
 
4738
            00 00          ; (reserved)
 
4739
            fe f3 24 ac    ; MAC value
 
4740
            39 62 b5 9f
 
4741
            3b d7 82 53
 
4742
            ae 4d cb 6a
 
4743
 
 
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).
 
4746
 
 
4747
 
 
4748
 
 
4749
 
 
4750
 
 
4751
 
 
4752
 
 
4753
 
 
4754
 
 
4755
 
 
4756
 
 
4757
 
 
4758
 
 
4759
 
 
4760
 
 
4761
 
 
4762
Haverinen & Salowey          Informational                     [Page 85]
 
4763
 
 
4764
RFC 4186                 EAP-SIM Authentication             January 2006
 
4765
 
 
4766
 
 
4767
A.6.  EAP-Response/SIM/Challenge
 
4768
 
 
4769
   The client's response looks like this:
 
4770
 
 
4771
      02                   ; Code: Response
 
4772
      02                   ; Identifier: 2
 
4773
      00 1c                ; Length: 28 octets
 
4774
      12                   ; Type: EAP-SIM
 
4775
         0b                ; EAP-SIM subtype: Challenge
 
4776
         00 00             ; (reserved)
 
4777
         0b                ; Attribute type: AT_MAC
 
4778
            05             ; Attribute length: 20 octets (5*4)
 
4779
            00 00          ; (reserved)
 
4780
            f5 6d 64 33    ; MAC value
 
4781
            e6 8e d2 97
 
4782
            6a c1 19 37
 
4783
            fc 3d 11 54
 
4784
 
 
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).
 
4787
 
 
4788
A.7.  EAP-Success
 
4789
 
 
4790
   The last packet is an EAP-Success:
 
4791
 
 
4792
      03                   ; Code: Success
 
4793
      02                   ; Identifier: 2
 
4794
      00 04                ; Length: 4 octets
 
4795
 
 
4796
A.8.  Fast Re-authentication
 
4797
 
 
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):
 
4801
 
 
4802
      02                   ; Code: Response
 
4803
      00                   ; Identifier: 0
 
4804
      00 56                ; Length: 86 octets
 
4805
      01                   ; Type: Identity
 
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
 
4811
         6f
 
4812
 
 
4813
 
 
4814
 
 
4815
 
 
4816
 
 
4817
 
 
4818
Haverinen & Salowey          Informational                     [Page 86]
 
4819
 
 
4820
RFC 4186                 EAP-SIM Authentication             January 2006
 
4821
 
 
4822
 
 
4823
A.9.  EAP-Request/SIM/Re-authentication
 
4824
 
 
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").
 
4831
 
 
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.
 
4835
 
 
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)
 
4841
            00 00          ; (reserved)
 
4842
            01 23 45 67    ; NONCE_S value
 
4843
            89 ab cd ef
 
4844
            fe dc ba 98
 
4845
            76 54 32 10
 
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
 
4854
            6f
 
4855
            00 00 00       ; (attribute padding)
 
4856
 
 
4857
 
 
4858
 
 
4859
 
 
4860
 
 
4861
 
 
4862
 
 
4863
 
 
4864
 
 
4865
 
 
4866
 
 
4867
 
 
4868
 
 
4869
 
 
4870
 
 
4871
 
 
4872
 
 
4873
 
 
4874
Haverinen & Salowey          Informational                     [Page 87]
 
4875
 
 
4876
RFC 4186                 EAP-SIM Authentication             January 2006
 
4877
 
 
4878
 
 
4879
   The EAP packet looks like this:
 
4880
 
 
4881
      01                   ; Code: Request
 
4882
      01                   ; Identifier: 1
 
4883
      00 a4                ; Length: 164 octets
 
4884
      12                   ; Type: EAP-SIM
 
4885
         0d                ; EAP-SIM subtype: Re-authentication
 
4886
         00 00             ; (reserved)
 
4887
         81                ; Attribute type: AT_IV
 
4888
            05             ; Attribute length: 20 octets (5*4)
 
4889
            00 00          ; (reserved)
 
4890
            d5 85 ac 77    ; IV value
 
4891
            86 b9 03 36
 
4892
            65 7c 77 b4
 
4893
            65 75 b9 c4
 
4894
         82                ; Attribute type: AT_ENCR_DATA
 
4895
            1d             ; Attribute length: 116 octets (29*4)
 
4896
            00 00          ; (reserved)
 
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)
 
4906
            00 00          ; (reserved)
 
4907
            48 3a 17 99    ; MAC value
 
4908
            b8 3d 7c d3
 
4909
            d0 a1 e4 01
 
4910
            d9 ee 47 70
 
4911
 
 
4912
   The MAC is calculated over the EAP packet above (with MAC value set
 
4913
   to zero; a total of 164 bytes).
 
4914
 
 
4915
   Finally, the server derives new keys.  The XKEY' is calculated as
 
4916
   described in Section 7*:
 
4917
 
 
4918
   XKEY' = 863dc120 32e08343 c1a2308d b48377f6 801f58d4
 
4919
 
 
4920
 
 
4921
 
 
4922
 
 
4923
 
 
4924
 
 
4925
 
 
4926
 
 
4927
 
 
4928
 
 
4929
 
 
4930
Haverinen & Salowey          Informational                     [Page 88]
 
4931
 
 
4932
RFC 4186                 EAP-SIM Authentication             January 2006
 
4933
 
 
4934
 
 
4935
   The new MSK and EMSK are derived using the PRNG (note that K_encr and
 
4936
   K_aut stay the same).
 
4937
 
 
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
 
4946
 
 
4947
A.10.  EAP-Response/SIM/Re-authentication
 
4948
 
 
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:
 
4951
 
 
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)
 
4957
            00 00 00 00
 
4958
            00 00 00 00
 
4959
            00 00
 
4960
 
 
4961
   The EAP packet looks like this:
 
4962
 
 
4963
      02                   ; Code: Response
 
4964
      01                   ; Identifier: 1
 
4965
      00 44                ; Length: 68 octets
 
4966
      12                   ; Type: EAP-SIM
 
4967
         0d                ; EAP-SIM subtype: Re-authentication
 
4968
         00 00             ; (reserved)
 
4969
         81                ; Attribute type: AT_IV
 
4970
            05             ; Attribute length: 20 octets (5*4)
 
4971
            00 00          ; (reserved)
 
4972
            cd f7 ff a6    ; IV value
 
4973
            5d e0 4c 02
 
4974
            6b 56 c8 6b
 
4975
            76 b1 02 ea
 
4976
         82                ; Attribute type: AT_ENCR_DATA
 
4977
            05             ; Attribute length: 20 octets (5*4)
 
4978
            00 00          ; (reserved)
 
4979
            b6 ed d3 82
 
4980
            79 e2 a1 42
 
4981
            3c 1a fc 5c
 
4982
            45 5c 7d 56
 
4983
 
 
4984
 
 
4985
 
 
4986
Haverinen & Salowey          Informational                     [Page 89]
 
4987
 
 
4988
RFC 4186                 EAP-SIM Authentication             January 2006
 
4989
 
 
4990
 
 
4991
         0b                ; Attribute type: AT_MAC
 
4992
            05             ; Attribute length: 20 octets (5*4)
 
4993
            00 00          ; (reserved)
 
4994
            fa f7 6b 71    ; MAC value
 
4995
            fb e2 d2 55
 
4996
            b9 6a 35 66
 
4997
            c9 15 c6 17
 
4998
 
 
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).
 
5001
 
 
5002
   The next packet will be EAP-Success:
 
5003
 
 
5004
      03                   ; Code: Success
 
5005
      01                   ; Identifier: 1
 
5006
      00 04                ; Length: 4 octets
 
5007
 
 
5008
Appendix B.  Pseudo-Random Number Generator
 
5009
 
 
5010
   The "|" character denotes concatenation, and "^" denotes
 
5011
   exponentiation.
 
5012
 
 
5013
   Step 1: Choose a new, secret value for the seed-key, XKEY
 
5014
 
 
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]
 
5019
 
 
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
 
5024
             b. w_i = G(t, XVAL)
 
5025
             c. XKEY = (1 + XKEY + w_i) mod 2^b
 
5026
         3.3 x_j = w_0|w_1
 
5027
 
 
5028
 
 
5029
 
 
5030
 
 
5031
 
 
5032
 
 
5033
 
 
5034
 
 
5035
 
 
5036
 
 
5037
 
 
5038
 
 
5039
 
 
5040
 
 
5041
 
 
5042
Haverinen & Salowey          Informational                     [Page 90]
 
5043
 
 
5044
RFC 4186                 EAP-SIM Authentication             January 2006
 
5045
 
 
5046
 
 
5047
Authors' Addresses
 
5048
 
 
5049
   Henry Haverinen (editor)
 
5050
   Nokia Enterprise Solutions
 
5051
   P.O. Box 12
 
5052
   FIN-40101 Jyvaskyla
 
5053
   Finland
 
5054
 
 
5055
   EMail: henry.haverinen@nokia.com
 
5056
 
 
5057
 
 
5058
   Joseph Salowey (editor)
 
5059
   Cisco Systems
 
5060
   2901 Third Avenue
 
5061
   Seattle, WA  98121
 
5062
   USA
 
5063
 
 
5064
   Phone: +1 206 256 3380
 
5065
   EMail: jsalowey@cisco.com
 
5066
 
 
5067
 
 
5068
 
 
5069
 
 
5070
 
 
5071
 
 
5072
 
 
5073
 
 
5074
 
 
5075
 
 
5076
 
 
5077
 
 
5078
 
 
5079
 
 
5080
 
 
5081
 
 
5082
 
 
5083
 
 
5084
 
 
5085
 
 
5086
 
 
5087
 
 
5088
 
 
5089
 
 
5090
 
 
5091
 
 
5092
 
 
5093
 
 
5094
 
 
5095
 
 
5096
 
 
5097
 
 
5098
Haverinen & Salowey          Informational                     [Page 91]
 
5099
 
 
5100
RFC 4186                 EAP-SIM Authentication             January 2006
 
5101
 
 
5102
 
 
5103
Full Copyright Statement
 
5104
 
 
5105
   Copyright (C) The Internet Society (2006).
 
5106
 
 
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.
 
5110
 
 
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.
 
5118
 
 
5119
Intellectual Property
 
5120
 
 
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.
 
5129
 
 
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.
 
5136
 
 
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
 
5141
   ietf-ipr@ietf.org.
 
5142
 
 
5143
Acknowledgement
 
5144
 
 
5145
   Funding for the RFC Editor function is provided by the IETF
 
5146
   Administrative Support Activity (IASA).
 
5147
 
 
5148
 
 
5149
 
 
5150
 
 
5151
 
 
5152
 
 
5153
 
 
5154
Haverinen & Salowey          Informational                     [Page 92]
 
5155