[RFCs/IDs] [Plain Text] [Tracker] [Diff1] [Diff2] [Nits]

Versions: 00 01 03 04 05 06 07 08 09 10 11 12 13 14 15 RFC 4187

Network Working Group                                           J. Arkko
Internet-Draft                                                  Ericsson
Expires: April 25, 2005                                     H. Haverinen
                                                                   Nokia
                                                        October 25, 2004



      Extensible Authentication Protocol Method for 3rd Generation
               Authentication and Key Agreement (EAP-AKA)
                   draft-arkko-pppext-eap-aka-13.txt


Status of this Memo


   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she become aware will be disclosed, in accordance with
   RFC 3668.


   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.


   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."


   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.


   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.


   This Internet-Draft will expire on April 25, 2005.


Copyright Notice


   Copyright (C) The Internet Society (2004).


Abstract


   This document specifies an Extensible Authentication Protocol (EAP)
   mechanism for authentication and session key distribution using the
   Authentication and Key Agreement (AKA) mechanism used in the 3rd
   generation mobile networks Universal Mobile Telecommunications System
   (UMTS) and cdma2000.  AKA is based on symmetric keys, and runs




Arkko & Haverinen        Expires April 25, 2005                 [Page 1]

Internet-Draft           EAP-AKA Authentication             October 2004



   typically in a Subscriber Identity Module (UMTS Subscriber Identity
   Module USIM, or (Removable) User Identity Module (R)UIM), a smart
   card like device.


   EAP-AKA includes optional identity privacy support, optional result
   indications, and an optional fast re-authentication procedure.


Table of Contents


   1.  Introduction and Motivation  . . . . . . . . . . . . . . . . .  5
   2.  Terms and Conventions Used in This Document  . . . . . . . . .  6
   3.  Protocol Overview  . . . . . . . . . . . . . . . . . . . . . . 10
   4.  Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . 15
     4.1   Identity Management  . . . . . . . . . . . . . . . . . . . 15
       4.1.1   Format, Generation and Usage of Peer Identities  . . . 16
       4.1.2   Communicating the Peer Identity to the Server  . . . . 22
       4.1.3   Choice of Identity for the EAP-Response/Identity . . . 23
       4.1.4   Server Operation in the Beginning of EAP-AKA
               Exchange . . . . . . . . . . . . . . . . . . . . . . . 23
       4.1.5   Processing of EAP-Request/AKA-Identity by the Peer . . 24
       4.1.6   Attacks against Identity Privacy . . . . . . . . . . . 25
       4.1.7   Processing of AT_IDENTITY by the Server  . . . . . . . 26
     4.2   Message Sequence Examples (Informative)  . . . . . . . . . 27
       4.2.1   Usage of AT_ANY_ID_REQ . . . . . . . . . . . . . . . . 27
       4.2.2   Fall Back on Full Authentication . . . . . . . . . . . 28
       4.2.3   Requesting the Permanent Identity 1  . . . . . . . . . 29
       4.2.4   Requesting the Permanent Identity 2  . . . . . . . . . 30
       4.2.5   Three EAP/AKA-Identity Round Trips . . . . . . . . . . 31
   5.  Fast Re-authentication . . . . . . . . . . . . . . . . . . . . 33
     5.1   General  . . . . . . . . . . . . . . . . . . . . . . . . . 33
     5.2   Comparison to AKA  . . . . . . . . . . . . . . . . . . . . 34
     5.3   Fast Re-authentication Identity  . . . . . . . . . . . . . 35
     5.4   Fast Re-authentication Procedure . . . . . . . . . . . . . 36
     5.5   Fast Re-authentication Procedure when Counter is Too
           Small  . . . . . . . . . . . . . . . . . . . . . . . . . . 38
   6.  EAP-AKA Notifications  . . . . . . . . . . . . . . . . . . . . 40
     6.1   General  . . . . . . . . . . . . . . . . . . . . . . . . . 40
     6.2   Result Indications . . . . . . . . . . . . . . . . . . . . 41
     6.3   Error Cases  . . . . . . . . . . . . . . . . . . . . . . . 42
       6.3.1   Peer Operation . . . . . . . . . . . . . . . . . . . . 42
       6.3.2   Server Operation . . . . . . . . . . . . . . . . . . . 43
       6.3.3   EAP-Failure  . . . . . . . . . . . . . . . . . . . . . 44
       6.3.4   EAP-Success  . . . . . . . . . . . . . . . . . . . . . 44
     6.4   Key Generation . . . . . . . . . . . . . . . . . . . . . . 45
   7.  Message Format and Protocol Extensibility  . . . . . . . . . . 47
     7.1   Message Format . . . . . . . . . . . . . . . . . . . . . . 47
     7.2   Protocol Extensibility . . . . . . . . . . . . . . . . . . 49
   8.  Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . 49




Arkko & Haverinen        Expires April 25, 2005                 [Page 2]

Internet-Draft           EAP-AKA Authentication             October 2004



     8.1   EAP-Request/AKA-Identity . . . . . . . . . . . . . . . . . 49
     8.2   EAP-Response/AKA-Identity  . . . . . . . . . . . . . . . . 50
     8.3   EAP-Request/AKA-Challenge  . . . . . . . . . . . . . . . . 50
     8.4   EAP-Response/AKA-Challenge . . . . . . . . . . . . . . . . 51
     8.5   EAP-Response/AKA-Authentication-Reject . . . . . . . . . . 52
     8.6   EAP-Response/AKA-Synchronization-Failure . . . . . . . . . 52
     8.7   EAP-Request/AKA-Reauthentication . . . . . . . . . . . . . 52
     8.8   EAP-Response/AKA-Reauthentication  . . . . . . . . . . . . 52
     8.9   EAP-Response/AKA-Client-Error  . . . . . . . . . . . . . . 53
     8.10  EAP-Request/AKA-Notification . . . . . . . . . . . . . . . 53
     8.11  EAP-Response/AKA-Notification  . . . . . . . . . . . . . . 54
   9.  Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 54
     9.1   Table of Attributes  . . . . . . . . . . . . . . . . . . . 54
     9.2   AT_PERMANENT_ID_REQ  . . . . . . . . . . . . . . . . . . . 55
     9.3   AT_ANY_ID_REQ  . . . . . . . . . . . . . . . . . . . . . . 56
     9.4   AT_FULLAUTH_ID_REQ . . . . . . . . . . . . . . . . . . . . 56
     9.5   AT_IDENTITY  . . . . . . . . . . . . . . . . . . . . . . . 56
     9.6   AT_RAND  . . . . . . . . . . . . . . . . . . . . . . . . . 57
     9.7   AT_AUTN  . . . . . . . . . . . . . . . . . . . . . . . . . 57
     9.8   AT_RES . . . . . . . . . . . . . . . . . . . . . . . . . . 58
     9.9   AT_AUTS  . . . . . . . . . . . . . . . . . . . . . . . . . 58
     9.10  AT_NEXT_PSEUDONYM  . . . . . . . . . . . . . . . . . . . . 58
     9.11  AT_NEXT_REAUTH_ID  . . . . . . . . . . . . . . . . . . . . 59
     9.12  AT_IV, AT_ENCR_DATA and AT_PADDING . . . . . . . . . . . . 60
     9.13  AT_CHECKCODE . . . . . . . . . . . . . . . . . . . . . . . 62
     9.14  AT_RESULT_IND  . . . . . . . . . . . . . . . . . . . . . . 64
     9.15  AT_MAC . . . . . . . . . . . . . . . . . . . . . . . . . . 64
     9.16  AT_COUNTER . . . . . . . . . . . . . . . . . . . . . . . . 65
     9.17  AT_COUNTER_TOO_SMALL . . . . . . . . . . . . . . . . . . . 65
     9.18  AT_NONCE_S . . . . . . . . . . . . . . . . . . . . . . . . 66
     9.19  AT_NOTIFICATION  . . . . . . . . . . . . . . . . . . . . . 66
     9.20  AT_CLIENT_ERROR_CODE . . . . . . . . . . . . . . . . . . . 67
   10.   IANA and Protocol Numbering Considerations . . . . . . . . . 67
   11.   Security Considerations  . . . . . . . . . . . . . . . . . . 69
     11.1  Identity Protection  . . . . . . . . . . . . . . . . . . . 69
     11.2  Mutual Authentication  . . . . . . . . . . . . . . . . . . 70
     11.3  Flooding the Authentication Centre . . . . . . . . . . . . 70
     11.4  Key Derivation . . . . . . . . . . . . . . . . . . . . . . 70
     11.5  Brute-Force and Dictionary Attacks . . . . . . . . . . . . 70
     11.6  Protection, Replay Protection and Confidentiality  . . . . 70
     11.7  Negotiation Attacks  . . . . . . . . . . . . . . . . . . . 72
     11.8  Protected Result Indications . . . . . . . . . . . . . . . 72
     11.9  Man-in-the-middle Attacks  . . . . . . . . . . . . . . . . 72
     11.10   Generating Random Numbers  . . . . . . . . . . . . . . . 73
   12.   Security Claims  . . . . . . . . . . . . . . . . . . . . . . 73
   13.   Acknowledgements and Contributions . . . . . . . . . . . . . 74
   14.   References . . . . . . . . . . . . . . . . . . . . . . . . . 74
   14.1  Normative References . . . . . . . . . . . . . . . . . . . . 74




Arkko & Haverinen        Expires April 25, 2005                 [Page 3]

Internet-Draft           EAP-AKA Authentication             October 2004



   14.2  Informative References . . . . . . . . . . . . . . . . . . . 76
       Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 76
   A.  Pseudo-Random Number Generator . . . . . . . . . . . . . . . . 77
       Intellectual Property and Copyright Statements . . . . . . . . 78
















































Arkko & Haverinen        Expires April 25, 2005                 [Page 4]

Internet-Draft           EAP-AKA Authentication             October 2004



1.  Introduction and Motivation


   This document specifies an Extensible Authentication Protocol (EAP)
   mechanism for authentication and session key distribution using the
   3rd generation Authentication and Key Agreement mechanism, specified
   for Universal Mobile Telecommunications System (UMTS) in [TS 33.102]
   and for cdma2000 in [S.S0055-A].  UMTS and cdma2000 are global third
   generation mobile network standards that use the same AKA mechanism.


   Second generation mobile networks and third generation mobile
   networks use different authentication and key agreement mechanisms.
   The Global System for Mobile communications (GSM) is a 2nd generation
   mobile network standard, and EAP-SIM [EAP-SIM] specifies an EAP
   mechanism that is based on the GSM authentication and key agreement
   primitives.


   AKA is based on challenge-response mechanisms and symmetric
   cryptography.  AKA typically runs in a UMTS Subscriber Identity
   Module (USIM) or a cdma2000 (Removable) User Identity Module
   ((R)UIM).  In this document, both modules are referred to as identity
   modules.  Compared to the 2nd generation mechanisms such as GSM AKA,
   the 3rd generation AKA provides substantially longer key lengths and
   mutual authentication.


   The introduction of AKA inside EAP allows several new applications.
   These include the following:


   o  The use of the AKA also as a secure PPP authentication method in
      devices that already contain an identity module.
   o  The use of the third generation mobile network authentication
      infrastructure in the context of wireless LANs
   o  Relying on AKA and the existing infrastructure in a seamless way
      with any other technology that can use EAP.


   AKA works in the following manner:


   o  The identity module and the home environment have agreed on a
      secret key beforehand.  (The "home environment" refers to the home
      operator's authentication network infrastructure.)
   o  The actual authentication process starts by having the home
      environment produce an authentication vector, based on the secret
      key and a sequence number.  The authentication vector contains a
      random part RAND, an authenticator part AUTN used for
      authenticating the network to the identity module, an expected
      result part XRES, a 128-bit session key for integrity check IK,
      and a 128-bit session key for encryption CK.
   o  The RAND and the AUTN are delivered to the identity module.





Arkko & Haverinen        Expires April 25, 2005                 [Page 5]

Internet-Draft           EAP-AKA Authentication             October 2004



   o  The identity module verifies the AUTN, again based on the secret
      key and the sequence number.  If this process is successful (the
      AUTN is valid and the sequence number used to generate AUTN is
      within the correct range), the identity moduleproduces an
      authentication result, RES and sends this to the home environment.
   o  The home environment verifies the correct result from the identity
      module.  If the result is correct, IK and CK can be used to
      protect further communications between the identity module and the
      home environment.


   When verifying AUTN, the identity module may detect that the sequence
   number the network uses is not within the correct range.  In this
   case, the identity module calculates a sequence number
   synchronization parameter AUTS and sends it to the network.  AKA
   authentication may then be retried with a new authentication vector
   generated using the synchronized sequence number.


   For a specification of the AKA mechanisms and how the cryptographic
   values AUTN, RES, IK, CK and AUTS are calculated, see [TS 33.102] for
   UMTS and [S.S0055-A] for cdma2000.


   In EAP-AKA, the EAP server node obtains the authentication vectors,
   compares RES and XRES, and uses CK and IK in key derivation.


   In the third generation mobile networks, AKA is used both for radio
   network authentication and IP multimedia service authentication
   purposes.  Different user identities and formats are used for these;
   the radio network uses the International Mobile Subscriber Identifier
   (IMSI), whereas the IP multimedia service uses the Network Access
   Identifier (NAI) [RFC2486].


2.  Terms and Conventions Used in This Document


   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].


   The terms and abbreviations "authenticator", "backend authentication
   server", "EAP server", "peer", "Silently Discard", "Master Session
   Key (MSK)", and "Extended Master Session Key (EMSK)" in this document
   are to be interpreted as described in [RFC3748].


   This document frequently uses the following terms and abbreviations.
   The AKA parameters are specified in detail in [TS 33.102] for UMTS
   and [S.S0055-A] for cdma2000.


   AAA protocol





Arkko & Haverinen        Expires April 25, 2005                 [Page 6]

Internet-Draft           EAP-AKA Authentication             October 2004



         Authentication, Authorization and Accounting protocol


   AKA


         Authentication and Key Agreement


   AuC


         Authentication Centre. The mobile network element that can
         authenticate subscribers in the mobile networks.


   AUTN


         AKA parameter. AUTN is an authentication value generated by the AuC
         which together with the RAND authenticates the server to the peer,
         128 bits


   AUTS


         AKA parameter. A value generated by the peer upon experiencing
         a synchronization failure, 112 bits.


   EAP


         Extensible Authentication Protocol
   [RFC3748]


   Fast re-authentication


         An EAP-AKA authentication exchange that is based on keys derived
         upon a preceding full authentication exchange. The 3rd Generation
         AKA is not used in the fast re-authentication procedure.


   Fast Re-authentication Identity


         A fast re-authentication identity of the peer, including an NAI realm
         portion in environments where a realm is used. Used on re-
         authentication only.


   Fast Re-authentication Username


         The username portion of fast re-authentication identity, ie. not
         including any realm portions.


   Full authentication


         An EAP-AKA authentication exchange that is based on the 3rd
         Generation AKA procedure.




Arkko & Haverinen        Expires April 25, 2005                 [Page 7]

Internet-Draft           EAP-AKA Authentication             October 2004



   GSM


         Global System for Mobile communications.


   NAI


         Network Access Identifier
   [RFC2486]


   Identity module


         Identity module is used in this document to refer to the
         part of the mobile device that contains authentication and key agreement
         primitives. The identity module may be an integral part of the mobile
         device or it can be an application on a smart card distributed by a mobile
         operator. USIM and (R)UIM are identity modules.


   Nonce


         A value that is used at most once or that is never repeated
         within the same cryptographic context. In general, a nonce can be
         predictable (e.g. a counter) or unpredictable (e.g. a random value).
         Since some cryptographic properties may depend on the randomness of
         the nonce, attention should be paid to whether a nonce is required
         to be random or not. In this document, the term nonce is only
         used to denote random nonces, and it is not used to denote counters.


   Permanent Identity


         The permanent identity of the peer, including an NAI realm
         portion in environments where a realm is used. The permanent
         identity is usually based on the IMSI. Used on full
         authentication only.


   Permanent Username


         The username portion of permanent identity, ie. not including any
         realm portions.


   Pseudonym Identity


         A pseudonym identity of the peer, including an NAI realm portion
         in environments where a realm is used. Used on full authentication
         only.


   Pseudonym Username


         The username portion of pseudonym identity, ie. not including any




Arkko & Haverinen        Expires April 25, 2005                 [Page 8]

Internet-Draft           EAP-AKA Authentication             October 2004



         realm portions.


   RAND


         An AKA parameter. Random number generated by the AuC, 128 bits


   RES


         Authentication result from the peer, which together with the RAND
         authenticates the peer to the server, 128 bits
   [TS 33.102]


   (R)UIM


            cdma2000 (Removable) User Identity Module. (R)UIM is an application
            that is resident e.g. on smart cards which may be fixed in the
            terminal or distributed by cdma2000 operators (when removable)


   SQN


         An AKA parameter. Sequence number used in the authentication process,
         48 bits


   SIM


         Subscriber Identity Module. The SIM is traditionally a smart
         card distributed by a GSM operator.


   SRES


         The authentication result parameter in GSM, corresponds to the
         RES parameter in 3G AKA, 32 bits.


   UAK


         UIM Authentication Key, used in cdma2000 AKA. Both the identity module and
         the network can optionally generate the UAK during the AKA computation
         in cdma2000. UAK is not used in this version of EAP-AKA.


   UIM


         Please see (R)UIM


   USIM


         UMTS Subscriber Identity Module. USIM is an application that is
         resident e.g. on smart cards distributed by UMTS operators.





Arkko & Haverinen        Expires April 25, 2005                 [Page 9]

Internet-Draft           EAP-AKA Authentication             October 2004



3.  Protocol Overview


   Figure 1 shows the basic successful full authentication exchange in
   EAP-AKA, when optional result indications are not used.  The
   authenticator typically communicates with an EAP server that is
   located on a backend authentication server using an AAA protocol.
   The authenticator shown in the figure is often simply relaying EAP
   messages to and from the EAP server, but these back end AAA
   communications are not shown.  At the minimum, EAP-AKA uses two
   roundtrips to authenticate and authorize the peer and generate
   session keys.  As in other EAP schemes, an identity request/response
   message pair is usually exchanged first.  On full authentication, the
   peer's identity response includes either the user's International
   Mobile Subscriber Identity (IMSI), or a temporary identity
   (pseudonym) if identity privacy is in effect, as specified in Section
   4.1.  (As specified in [RFC3748], the initial identity request is not
   required, and MAY be bypassed in cases where the network can presume
   the identity, such as when using leased lines, dedicated dial-ups,
   etc.  Please see also Section 4.1.2 for specification how to obtain
   the identity via EAP AKA messages.)


   After obtaining the subscriber identity, the EAP server obtains an
   authentication vector (RAND, AUTN, RES, CK, IK) for use in
   authenticating the subscriber.  From the vector, the EAP server
   derives the keying material, as specified in Section 6.4.  The vector
   may be obtained by contacting an Authentication Centre (AuC) on the
   mobile network; for example per UMTS specifications, several vectors
   may be obtained at a time.  Vectors may be stored in the EAP server
   for use at a later time, but they may not be reused.


   In cdma2000, the vector may include a sixth value called the User
   Identity Module Authentication Key (UAK).  This key is not used in
   EAP-AKA.


   Next, the EAP server starts the actual AKA protocol by sending an
   EAP-Request/AKA-Challenge message.  EAP-AKA packets encapsulate
   parameters in attributes, encoded in a Type, Length, Value format.
   The packet format and the use of attributes are specified in Section
   7.  The EAP-Request/AKA-Challenge message contains a RAND random
   number (AT_RAND) and a network authentication token (AT_AUTN), and a
   message authentication code AT_MAC.  The EAP-Request/AKA-Challenge
   message MAY optionally contain encrypted data, which is used for
   identity privacy and fast re-authentication support, as described in
   Section 4.1.  The AT_MAC attribute contains a message authentication
   code covering the EAP packet.  The encrypted data is not shown in the
   figures of this section.


   The peer runs the AKA algorithm (typically using an identity module)




Arkko & Haverinen        Expires April 25, 2005                [Page 10]

Internet-Draft           EAP-AKA Authentication             October 2004



   and verifies the AUTN.  If this is successful, the peer is talking to
   a legitimate EAP server and proceeds to send the
   EAP-Response/AKA-Challenge.  This message contains a result parameter
   that allows the EAP server in turn to authenticate the peer, and the
   AT_MAC attribute to integrity protect the EAP message.


   The EAP server verifies that the RES and the MAC in the
   EAP-Response/AKA-Challenge packet are correct.  Because protected
   success indications are not used in this example, the EAP server
   sends the EAP-Success packet, indicating that the authentication was
   successful.  (Protected success indications are discussed in Section
   6.2.)  The EAP server may also include derived keying material in the
   message it sends to the authenticator.  The peer has derived the same
   keying material, so the authenticator does not forward the keying
   material to the peer along with EAP-Success.





































Arkko & Haverinen        Expires April 25, 2005                [Page 11]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                      EAP-Request/Identity             |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/Identity                                 |
          | (Includes user's NAI)                                 |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server runs AKA algorithms,  |
          |                            | generates RAND and AUTN.     |
          |                            +------------------------------+
          |                         EAP-Request/AKA-Challenge     |
          |                         (AT_RAND, AT_AUTN, AT_MAC)    |
          |<------------------------------------------------------|
      +-------------------------------------+                     |
      | Peer runs AKA algorithms,           |                     |
      | verifies AUTN and MAC, derives RES  |                     |
      | and session key                     |                     |
      +-------------------------------------+                     |
          | EAP-Response/AKA-Challenge                            |
          | (AT_RES, AT_MAC)                                      |
          |------------------------------------------------------>|
          |                          +--------------------------------+
          |                          | Server checks the given RES,   |
          |                          | and MAC and finds them correct.|
          |                          +--------------------------------+
          |                                          EAP-Success  |
          |<------------------------------------------------------|


            Figure 1: EAP-AKA full authentication procedure


   Figure 2 shows how the EAP server rejects the Peer due to a failed
   authentication.



















Arkko & Haverinen        Expires April 25, 2005                [Page 12]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                              Authenticator
          |                      EAP-Request/Identity             |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/Identity                                 |
          | (Includes user's NAI)                                 |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server runs AKA algorithms,  |
          |                            | generates RAND and AUTN.     |
          |                            +------------------------------+
          |                      EAP-Request/AKA-Challenge        |
          |                      (AT_RAND, AT_AUTN, AT_MAC)       |
          |<------------------------------------------------------|
      +-------------------------------------+                     |
      | Peer runs AKA algorithms,           |                     |
      | possibly verifies AUTN, and sends an|                     |
      | invalid response                    |                     |
      +-------------------------------------+                     |
          | EAP-Response/AKA-Challenge                            |
          | (AT_RES, AT_MAC)                                      |
          |------------------------------------------------------>|
          |              +------------------------------------------+
          |              | Server checks the given RES and the MAC, |
          |              | and finds one of them incorrct.          |
          |              +------------------------------------------+
          |                      EAP-Request/AKA-Notification     |
          |<------------------------------------------------------|
          | EAP-Response/AKA-Notification                         |
          |------------------------------------------------------>|
          |                                          EAP-Failure  |
          |<------------------------------------------------------|


                  Figure 2: Peer authentication fails


   Figure 3 shows the peer rejecting the AUTN of the EAP server.


   The peer sends an explicit error message
   (EAP-Response/AKA-Authentication-Reject) to the EAP server, as usual
   in AKA when AUTN is incorrect.  This allows the EAP server to produce
   the same error statistics as AKA in general produces in UMTS or
   cdma2000.










Arkko & Haverinen        Expires April 25, 2005                [Page 13]

Internet-Draft           EAP-AKA Authentication             October 2004



        Peer                                             Authenticator
          |                      EAP-Request/Identity             |
          |<------------------------------------------------------|
          | EAP-Response/Identity                                 |
          | (Includes user's NAI)                                 |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server runs AKA algorithms,  |
          |                            | generates RAND and a bad AUTN|
          |                            +------------------------------+
          |                         EAP-Request/AKA-Challenge     |
          |                         (AT_RAND, AT_AUTN, AT_MAC)    |
          |<------------------------------------------------------|
      +-------------------------------------+                     |
      | Peer runs AKA algorithms            |                     |
      | and discovers AUTN that can not be  |                     |
      | verified                            |                     |
      +-------------------------------------+                     |
          | EAP-Response/AKA-Authentication-Reject                |
          |------------------------------------------------------>|
          |                                          EAP-Failure  |
          |<------------------------------------------------------|


                 Figure 3: Network authentication fails


   The AKA uses shared secrets between the Peer and the Peer's home
   operator together with a sequence number to actually perform an
   authentication.  In certain circumstances it is possible for the
   sequence numbers to get out of sequence.  Figure 4 shows what happens
   then.






















Arkko & Haverinen        Expires April 25, 2005                [Page 14]

Internet-Draft           EAP-AKA Authentication             October 2004



        Peer                                             Authenticator
          |                      EAP-Request/Identity             |
          |<------------------------------------------------------|
          | EAP-Response/Identity                                 |
          | (Includes user's NAI)                                 |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server runs AKA algorithms,  |
          |                            | generates RAND and AUTN.     |
          |                            +------------------------------+
          |                         EAP-Request/AKA-Challenge     |
          |                         (AT_RAND, AT_AUTN, AT_MAC)    |
          |<------------------------------------------------------|
      +-------------------------------------+                     |
      | Peer runs AKA algorithms            |                     |
      | and discovers AUTN that contains an |                     |
      | inappropriate sequence number       |                     |
      +-------------------------------------+                     |
          | EAP-Response/AKA-Synchronization-Failure              |
          | (AT_AUTS)                                             |
          |------------------------------------------------------>|
          |                              +---------------------------+
          |                              | Perform resynchronization |
          |                              | Using AUTS and            |
          |                              | the sent RAND             |
          |                              +---------------------------+
          |                                                       |


               Figure 4: Sequence number synchronization


   After the resynchronization process has taken place in the server and
   AAA side, the process continues by the server side sending a new
   EAP-Request/AKA-Challenge message.


   In addition to the full authentication scenarios described above,
   EAP-AKA includes a fast re-authentication procedure, which is
   specified in Section 5.  Fast re-authentication is based on keys
   derived on full authentication.  If the peer has maintained state
   information for re-authentication and wants to use fast
   re-authentication, then the peer indicates this by using a specific
   fast re-authentication identity instead of the permanent identity or
   a pseudonym identity.


4.  Operation


4.1  Identity Management






Arkko & Haverinen        Expires April 25, 2005                [Page 15]

Internet-Draft           EAP-AKA Authentication             October 2004



4.1.1  Format, Generation and Usage of Peer Identities


4.1.1.1  General


   In the beginning of EAP authentication, the Authenticator or the EAP
   server usually issues the EAP-Request/Identity packet to the peer.
   The peer responds with EAP-Response/Identity, which contains the
   user's identity.  The formats of these packets are specified in
   [RFC3748].


   Subscribers of mobile networks are identified with the International
   Mobile Subscriber Identity (IMSI) [TS 23.003].  The IMSI is composed
   of a three digit Mobile Country Code (MCC), a two or three digit
   Mobile Network Code (MNC) and a not more than 10 digit Mobile
   Subscriber Identification Number (MSIN).  In other words, the IMSI is
   a string of not more than 15 digits.  MCC and MNC uniquely identify
   the GSM operator and  help identify the AuC from which the
   authentication vectors need to be retrieved for this subscriber.


   Internet AAA protocols identify users with the Network Access
   Identifier (NAI) [RFC2486].  When used in a roaming environment, the
   NAI is composed of a username and a realm, separated with "@"
   (username@realm).  The username portion identifies the subscriber
   within the realm.


   This section specifies the peer identity format used in EAP-AKA.  In
   this document, the term identity or peer identity refers to the whole
   identity string that is used to identify the peer.  The peer identity
   may include a realm portion.  "Username" refers to the portion of the
   peer identity that identifies the user, i.e.  the username does not
   include the realm portion.


4.1.1.2  Identity Privacy Support


   EAP-AKA includes optional identity privacy (anonymity) support that
   can be used to hide the cleartext permanent identity and thereby to
   make the subscriber's EAP exchanges untraceable to eavesdroppers.
   Because the permanent identity never changes, revealing it would help
   observers to track the user.  The permanent identity is usually based
   on the IMSI, which may further help the tracking, because the same
   identifier may be used in other contexts as well.  Identity privacy
   is based on temporary identities, or pseudonyms, which are equivalent
   to but separate from the Temporary Mobile Subscriber Identities
   (TMSI) that are used on cellular networks.  Please see Section 11.1
   for security considerations regarding identity privacy.







Arkko & Haverinen        Expires April 25, 2005                [Page 16]

Internet-Draft           EAP-AKA Authentication             October 2004



4.1.1.3  Username Types in EAP-AKA Identities


   There are three types of usernames in EAP-AKA peer identities:


   (1) Permanent usernames.  For example,
   0123456789098765@myoperator.com might be a valid permanent identity.
   In this example, 0123456789098765 is the permanent username.


   (2) Pseudonym usernames.  For example, 2s7ah6n9q@myoperator.com might
   be a valid pseudonym identity.  In this example, 2s7ah6n9q is the
   pseudonym username.


   (3) Fast re-authentication usernames.  For example,
   43953754@myoperator.com might be a valid fast re-authentication
   identity.  In this case, 43953754 is the fast re-authentication
   username.  Unlike permanent usernames and pseudonym usernames, fast
   re-authentication usernames are one-time identifiers, which are not
   re-used across EAP exchanges.


   The first two types of identities are only used on full
   authentication and the last one only on fast re-authentication.  When
   the optional identity privacy support is not used, the non-pseudonym
   permanent identity is used on full authentication.  The fast
   re-authentication exchange is specified in Section 5.


4.1.1.4  Username Decoration


   In some environments, the peer may need to decorate the identity by
   prepending or appending the username with a string, in order to
   indicate supplementary AAA routing information in addition to the NAI
   realm.  (The usage of a NAI realm portion is not considered to be
   decoration.) Username decoration is out of the scope of this
   document.  However, it should be noted that username decoration might
   prevent the server from recognizing a valid username.  Hence,
   although the peer MAY use username decoration in the identities the
   peer includes in EAP-Response/Identity, and the EAP server MAY accept
   a decorated peer username in this message, the peer or the EAP server
   MUST NOT decorate any other peer identities that are used in various
   EAP-AKA attributes.  Only the identity used in EAP-Response/Identity
   may be decorated.


4.1.1.5  NAI Realm Portion


   The peer MAY include a realm portion in the peer identity, as per the
   NAI format.  The use of a realm portion is not mandatory.


   If a realm is used, the realm MAY be chosen by the subscriber's home
   operator and it MAY a configurable parameter in the EAP-AKA peer




Arkko & Haverinen        Expires April 25, 2005                [Page 17]

Internet-Draft           EAP-AKA Authentication             October 2004



   implementation.  In this case, the peer is typically configured with
   the NAI realm of the home operator.  Operators MAY reserve a specific
   realm name for EAP-AKA users.  This convention makes it easy to
   recognize that the NAI identifies an AKA subscriber.  Such reserved
   NAI realm may be useful as a hint as to the first authentication
   method to use during method negotiation.  When the peer is using a
   pseudonym username instead of the permanent username, the peer
   selects the realm name portion similarly as it select the realm
   portion when using the permanent username.


   If no configured realm name is available, the peer MAY derive the
   realm name from the MCC and MNC portions of the IMSI.  A RECOMMENDED
   way to derive the realm from the IMSI using the realm 3gppnetwork.org
   will be specified in [Draft 3GPP TS 23.003].


   Some old implementations derive the realm name from the IMSI by
   concatenating "mnc", the MNC digits of IMSI, ".mcc", the MCC digits
   of IMSI and ".owlan.org".  For example, if the IMSI is
   123456789098765, and the MNC is three digits long, then the derived
   realm name is "mnc456.mcc123.owlan.org".  As there are no DNS servers
   running at owlan.org, these realm names can only be used with
   manually configured AAA routing.  New implementations SHOULD use the
   mechanism specified in [Draft 3GPP TS 23.003] instead of owlan.org as
   soon as the 3GPP specification is finalized.


   The IMSI is a string of digits without any explicit structure, so the
   peer may not be able to determine the length of the MNC portion.  If
   the peer is not able to determine whether the MNC is two or three
   digits long, the peer MAY use a 3-digit MNC.  If the correct length
   of the MNC is two, then the MNC used in the realm name includes the
   first digit of MSIN.  Hence, when configuring AAA networks for
   operators that have 2-digit MNC's, the network SHOULD also be
   prepared for realm names with incorrect 3-digit MNC's.


4.1.1.6  Format of the Permanent Username


   The non-pseudonym permanent username SHOULD be derived from the IMSI.
   In this case, the permanent username MUST be of the format "0" |
   IMSI, where the character "|" denotes concatenation.  In other words,
   the first character of the username is the digit zero (ASCII value 30
   hexadecimal), followed by the IMSI.  The IMSI is an ASCII string that
   consists of not more than 15 decimal digits (ASCII values between 30
   and 39 hexadecimal), one character per IMSI digit, in the order as
   specified in [TS 23.003].  For example, a permanent username derived
   from the IMSI 295023820005424 would be encoded as the ASCII string
   "0295023820005424"  (byte values in hexadecimal notation: 30 32 39 35
   30 32 33 38 32 30 30 30 35 34 32 34)





Arkko & Haverinen        Expires April 25, 2005                [Page 18]

Internet-Draft           EAP-AKA Authentication             October 2004



   The EAP server MAY use the leading "0" as a hint to try EAP-AKA as
   the first authentication method during method negotiation, rather
   than for example EAP-SIM.  The EAP-AKA server MAY propose EAP-AKA
   even if the leading character was not "0".


   Alternatively, an implementation MAY choose a permanent username that
   is not based on the IMSI.  In this case the selection of the
   username, its format, and its processing is out of the scope of this
   document.  In this case, the peer implementation MUST NOT prepend any
   leading characters to the username.


4.1.1.7  Generating Pseudonyms and Fast Re-authentication Identities by
        the Server


   Pseudonym usernames and fast re-authentication identities are
   generated by the EAP server.  The EAP server produces pseudonym
   usernames and fast re-authentication identities in an
   implementation-dependent manner.  Only the EAP server needs to be
   able to map the pseudonym username to the permanent identity, or to
   recognize a fast re-authentication identity.


   EAP-AKA includes no provisions to ensure that the same EAP server
   that generated a pseudonym username will be used on the
   authentication exchange when the pseudonym username is used.  It is
   recommended that the EAP servers implement some centralized mechanism
   to allow all EAP servers of the home operator to map pseudonyms
   generated by other severs to the permanent identity.  If no such
   mechanism is available, then the EAP server failing to understand a
   pseudonym issued by another server can request the peer to send the
   permanent identity.


   When issuing a fast re-authentication identity, the EAP server may
   include a realm name in the identity to make the fast
   re-authentication request be forwarded to the same EAP server.


   When generating fast re-authentication identities, the server SHOULD
   choose a fresh new fast re-authentication identity that is different
   from the previous ones used after the same full authentication
   exchange.  A full authentication exchange and the associated fast
   re-authentication exchanges are referred to here as the same "full
   authentication context".  The fast re-authentication identity SHOULD
   include a random component.  The random component works as a full
   authentication context identifier.  A context-specific fast
   re-authentication identity can help the server to detect whether its
   fast re-authentication state information matches the peer's fast
   re-authentication state information (in other words whether the state
   information is from the same full authentication exchange).  The
   random component also makes the fast re-authentication identities




Arkko & Haverinen        Expires April 25, 2005                [Page 19]

Internet-Draft           EAP-AKA Authentication             October 2004



   unpredictable, so an attacker cannot initiate a fast
   re-authentication exchange to get the server's
   EAP-Request/AKA-Reauthentication packet.


   Regardless of construction method, the pseudonym username MUST
   conform to the grammar specified for the username portion of an NAI.
   The fast re-authentication identity also MUST conform to the NAI
   grammar.  The EAP servers that the subscribers of an operator can use
   MUST ensure that the pseudonym usernames and the username portions
   used in fast re-authentication identities they generate are unique.


   In any case, it is necessary that permanent usernames, pseudonym
   usernames and fast re-authentication usernames are separate and
   recognizable from each other.  It is also desirable that EAP-SIM and
   EAP-AKA user names be recognizable from each other as an aid for the
   server to which method to offer.


   In general, it is the task of the EAP server and the policies of its
   administrator to ensure sufficient separation in the usernames.
   Pseudonym usernames and fast re-authentication usernames are both
   produced and used by the EAP server.  The EAP server MUST compose
   pseudonym usernames and fast re-authentication usernames so that it
   can recognize if a NAI username is an EAP-AKA pseudonym username or
   an EAP-AKA fast re-authentication username.  For instance, when the
   usernames have been derived from the IMSI, the server could use
   different leading characters in the pseudonym usernames and fast
   re-authentication usernames (e.g.  the pseudonym could begin with a
   leading "2" character).  When mapping a fast re-authentication
   identity to a permanent identity, the server SHOULD only examine the
   username portion of the fast re-authentication identity and ignore
   the realm portion of the identity.


   Because the peer may fail to save a pseudonym username sent to in an
   EAP-Request/AKA-Challenge, for example due to malfunction, the EAP
   server SHOULD maintain at least the most recently used pseudonym
   username in addition to the most recently issued pseudonym username.
   If the authentication exchange is not completed successfully, then
   the server SHOULD NOT overwrite the pseudonym username that was
   issued during the most recent successful authentication exchange.


4.1.1.8  Transmitting Pseudonyms and Fast Re-authentication Identities
        to the Peer


   The server transmits pseudonym usernames and fast re-authentication
   identities to the peer in cipher, using the AT_ENCR_DATA attribute.


   The EAP-Request/AKA-Challenge message MAY include an encrypted
   pseudonym username and/or an encrypted fast re-authentication




Arkko & Haverinen        Expires April 25, 2005                [Page 20]

Internet-Draft           EAP-AKA Authentication             October 2004



   identity in the value field of the AT_ENCR_DATA attribute.  Because
   identity privacy support and fast re-authentication are optional to
   implement, the peer MAY ignore the AT_ENCR_DATA attribute and always
   use the permanent identity.  On fast re-authentication (discussed in
   Section 5), the server MAY include a new encrypted fast
   re-authentication identity in the EAP-Request/AKA-Reauthentication
   message.


   On receipt of the EAP-Request/AKA-Challenge, the peer MAY decrypt the
   encrypted data in AT_ENCR_DATA and if a pseudonym username is
   included, the peer may use the obtained pseudonym username on the
   next full authentication.  If a fast re-authentication identity is
   included, then the peer MAY save it together with other fast
   re-authentication state information, as discussed in Section 5, for
   the next fast re-authentication.


   If the peer does not receive a new pseudonym username in the EAP-
   Request/AKA-Challenge message, the peer MAY use an old pseudonym
   username instead of the permanent username on next full
   authentication.  The username portions of fast re-authentication
   identities are one-time usernames, which the peer MUST NOT re-use.
   When the peer uses a fast re-authentication identity in an EAP
   exchange, the peer MUST discard the fast re-authentication identity
   and not re-use it in another EAP authentication exchange, even if the
   authentication exchange was not completed.


4.1.1.9  Usage of the Pseudonym by the Peer


   When the optional identity privacy support is used on full
   authentication, the peer MAY use a pseudonym username received as
   part of a previous full authentication sequence as the username
   portion of the NAI.  The peer MUST NOT modify the pseudonym username
   received in AT_NEXT_PSEUDONYM.  However, as discussed above, the peer
   MAY need to decorate the username in some environments by appending
   or prepending the username with a string that indicates supplementary
   AAA routing information.


   When using a pseudonym username in an environment where a realm
   portion is used, the peer concatenates the received pseudonym
   username with the "@" character and a NAI realm portion.  The
   selection of the NAI realm is discussed above.  The peer can select
   the realm portion similarly regardless of whether it uses the
   permanent username or a pseudonym username.


4.1.1.10  Usage of the Fast Re-authentication Identity by the Peer


   On fast re-authentication, the peer uses the fast re-authentication
   identity, received as part of the previous authentication sequence.




Arkko & Haverinen        Expires April 25, 2005                [Page 21]

Internet-Draft           EAP-AKA Authentication             October 2004



   A new fast re-authentication identity may be delivered as part of
   both full authentication and fast re-authentication.  The peer MUST
   NOT modify the username part of the fast re-authentication identity
   received in AT_NEXT_REAUTH_ID, except in cases when username
   decoration is required.  Even in these cases, the "root" fast
   re-authentication username must not be modified, but it may be
   appended or prepended with another string.


4.1.2  Communicating the Peer Identity to the Server


4.1.2.1  General


   The peer identity MAY be communicated to the server with the
   EAP-Response/Identity message.  This message MAY contain the
   permanent identity, a pseudonym identity, or a fast re-authentication
   identity.  If the peer uses the permanent identity or a pseudonym
   identity, which the server is able to map to the permanent identity,
   then the authentication proceeds as discussed in the overview of
   Section 3.  If the peer uses a fast re-authentication identity, and
   if the fast re-authentication identity matches with a valid fast
   re-authentication identity maintained by the server , then a fast
   re-authentication exchange is performed, as described in Section 5.


   The peer identity can also be transmitted from the peer to the server
   using EAP-AKA messages instead of EAP-Response/Identity.  In this
   case, the server includes an identity requesting attribute
   (AT_ANY_ID_REQ, AT_FULLAUTH_ID_REQ or AT_PERMANENT_ID_REQ) in the
   EAP-Request/AKA-Identity message, and the peer includes the
   AT_IDENTITY attribute, which contains the peer's identity, in the
   EAP-Response/AKA-Identity message.  The AT_ANY_ID_REQ attribute is a
   general identity requesting attribute, which the server uses if it
   does not specify which kind of an identity the peer should return in
   AT_IDENTITY.  The server uses the AT_FULLAUTH_ID_REQ attribute to
   request either the permanent identity or a pseudonym identity.  The
   server uses the AT_PERMANENT_ID_REQ attribute to request the peer to
   send its permanent identity.  The EAP-Request/AKA-Challenge,
   EAP-Response/AKA-Challenge, or the packets used on fast
   re-authentication may optionally include the AT_CHECKCODE attribute,
   which enables the protocol peers to ensure the integrity of the
   AKA-Identity packets.  AT_CHECKCODE is specified in Section 9.13.


   The identity format in the AT_IDENTITY attribute is the same as in
   the EAP-Response/Identity packet (except that identity decoration is
   not allowed).  The AT_IDENTITY attribute contains a permanent
   identity, a pseudonym identity or a fast re-authentication identity.


   Please note that the EAP-AKA peer and the EAP-AKA server only process
   the AT_IDENTITY attribute and entities that only pass through EAP




Arkko & Haverinen        Expires April 25, 2005                [Page 22]

Internet-Draft           EAP-AKA Authentication             October 2004



   packets do not process this attribute.  Hence, the authenticator and
   other intermediate AAA elements (such as possible AAA proxy servers)
   will continue to refer to the peer with the original identity from
   the EAP-Response/Identity packet unless the identity authenticated in
   the AT_IDENTITY attribute is communicated to them in another way
   within the AAA protocol.


4.1.2.2  Relying on EAP-Response/Identity Discouraged


   The EAP-Response/Identity packet is not method specific so in many
   implementations it may be handled by an EAP Framework.  This
   introduces an additional layer of processing between the EAP peer and
   EAP server.  The extra layer of processing may cache identity
   responses or add decorations to the identity.  A modification of the
   identity response will cause the EAP peer and EAP server to use
   different identities in the key derivation which will cause the
   protocol to fail.


   For this reason, it is RECOMMENDED that the EAP peer and server use
   the method specific identity attributes in EAP-AKA and the server is
   strongly discouraged from relying upon the EAP-Response/Identity.


   In particular, if the EAP server receives a decorated identity in
   EAP-Response/Identity, then the EAP server MUST use the
   identity-requesting attributes to request the peer to send an
   unmodified and undecorated copy of the identity in AT_IDENTITY.


4.1.3  Choice of Identity for the EAP-Response/Identity


   If EAP-AKA peer is started upon receiving an EAP-Request/Identity
   message, then the peer performs the following steps.


   If the peer has maintained fast re-authentication state information
   and if the peer wants to use fast re-authentication, then the peer
   transmits the fast re-authentication identity in
   EAP-Response/Identity.


   Else, if the peer has a pseudonym username available, then the peer
   transmits the pseudonym identity in EAP-Response/Identity.


   In other cases, the peer transmits the permanent identity in
   EAP-Response/Identity.


4.1.4  Server Operation in the Beginning of EAP-AKA Exchange


   If the EAP server has not received any EAP-AKA peer identity
   (permanent identity, pseudonym identity or fast re-authentication
   identity) from the peer when sending the first EAP-AKA request, or if




Arkko & Haverinen        Expires April 25, 2005                [Page 23]

Internet-Draft           EAP-AKA Authentication             October 2004



   the EAP server has received an EAP-Response/Identity packet but the
   contents do not appear to be a valid permanent identity, pseudonym
   identity or a re-authentication identity, then the server MUST
   request an identity from the peer using one of the methods below.


   The server sends the EAP-Request/AKA-Identity message with the
   AT_PERMANENT_ID_REQ attribute to indicate that the server wants the
   peer to include the permanent identity in the AT_IDENTITY attribute
   of the EAP-Response/AKA-Identity message.  This is done in the
   following cases:


   o  The server does not support fast re-authentication or identity
      privacy.
   o  The server received an identity that it recognizes as a pseudonym
      identity but the server is not able to map the pseudonym identity
      to a permanent identity.


   The server issues the EAP-Request/AKA-Identity packet with the
   AT_FULLAUTH_ID_REQ attribute to indicate that the server wants the
   peer to include a full authentication identity (pseudonym identity or
   permanent identity) in the AT_IDENTITY attribute of the
   EAP-Response/AKA-Identity message.  This is done in the following
   cases:


   o  The server does not support fast re-authentication and the server
      supports identity privacy
   o  The server received an identity that it recognizes as a
      re-authentication identity but the server is not able to map the
      re-authentication identity to a permanent identity


   The server issues the EAP-Request/AKA-Identity packet with the
   AT_ANY_ID_REQ attribute to indicate that the server wants the peer to
   include an identity in the AT_IDENTITY attribute of the
   EAP-Response/AKA-Identity message, and the server does not indicate
   any preferred type for the identity.  This is done in other cases,
   such as when the server does not have any identity, or the server
   does not recognize the format of a received identity.


4.1.5  Processing of EAP-Request/AKA-Identity by the Peer


   Upon receipt of an EAP-Request/AKA-Identity message, the peer MUST
   perform the following steps.


   If the EAP-Request/AKA-Identity includes AT_PERMANENT_ID_REQ, and if
   the peer does not have a pseudonym available, then the peer MUST
   respond with EAP-Response/AKA-Identity and include the permanent
   identity in AT_IDENTITY.  If the peer has a pseudonym available, then
   the peer MAY refuse to send the permanent identity; hence in this




Arkko & Haverinen        Expires April 25, 2005                [Page 24]

Internet-Draft           EAP-AKA Authentication             October 2004



   case the peer MUST either respond with EAP-Response/AKA-Identity and
   include the permanent identity in AT_IDENTITY or respond with
   EAP-Response/AKA-Client-Error packet with code "unable to process
   packet".


   If the EAP-Request/AKA-Identity includes AT_FULL_AUTH_ID_REQ, and if
   the peer has a pseudonym available, then the peer SHOULD respond with
   EAP-Response/AKA-Identity and include the pseudonym identity in
   AT_IDENTITY.  If the peer does not have a pseudonym when it receives
   this message, then the peer MUST respond with
   EAP-Response/AKA-Identity and include the permanent identity in
   AT_IDENTITY.  The Peer MUST NOT use a fast re-authentication identity
   in the AT_IDENTITY attribute.


   If the EAP-Request/AKA-Identity includes AT_ANY_ID_REQ, and if the
   peer has maintained fast re-authentication state information and the
   peer wants to use fast re-authentication, then the peer responds with
   EAP- Response/AKA-Identity and includes the fast re-authentication
   identity in AT_IDENTITY.  Else, if the peer has a pseudonym identity
   available, then the peer responds with EAP-Response/AKA-Identity and
   includes the pseudonym identity in AT_IDENTITY.  Else, the peer
   responds with EAP-Response/AKA-Identity and includes the permanent
   identity in AT_IDENTITY.


   An EAP-AKA exchange may include several EAP/AKA-Identity rounds.  The
   server may issue a second EAP-Request/AKA-Identity, if it was not
   able to recognize the identity the peer used in the previous
   AT_IDENTITY attribute.  At most three EAP/AKA-Identity rounds can be
   used, so the peer MUST NOT respond to more than three
   EAP-Request/AKA-Identity messages within an EAP exchange.  The peer
   MUST verify that the sequence of EAP-Request/AKA-Identity packets the
   peer receives comply with the sequencing rules defined in this
   document.  That is, AT_ANY_ID_REQ can only be used in the first
   EAP-Request/AKA-Identity, in other words AT_ANY_ID_REQ MUST NOT be
   used in the second or third EAP-Request/AKA-Identity.
   AT_FULLAUTH_ID_REQ MUST NOT be used if the previous
   EAP-Request/AKA-Identity included AT_PERMANENT_ID_REQ.  The peer
   operation in cases when it receives an unexpected attribute or an
   unexpected message is specified in Section 6.3.1.


4.1.6  Attacks against Identity Privacy


   The section above specifies two possible ways the peer can operate
   upon receipt of AT_PERMANENT_ID_REQ.  This is because a received
   AT_PERMANENT_ID_REQ does not necessarily originate from the valid
   network, but an active attacker may transmit an
   EAP-Request/AKA-Identity packet with an AT_PERMANENT_ID_REQ attribute
   to the peer, in an effort to find out the true identity of the user.




Arkko & Haverinen        Expires April 25, 2005                [Page 25]

Internet-Draft           EAP-AKA Authentication             October 2004



   If the peer does not want to reveal its permanent identity, then the
   peer sends the EAP-Response/AKA-Client-Error packet with the error
   code "unable to process packet", and the authentication exchange
   terminates.


   Basically, there are two different policies that the peer can employ
   with regard to AT_PERMANENT_ID_REQ.  A "conservative" peer assumes
   that the network is able to maintain pseudonyms robustly.  Therefore,
   if a conservative peer has a pseudonym username, the peer responds
   with EAP-Response/AKA-Client-Error to the EAP packet with
   AT_PERMANENT_ID_REQ, because the peer believes that the valid network
   is able to map the pseudonym identity to the peer's permanent
   identity.  (Alternatively, the conservative peer may accept
   AT_PERMANENT_ID_REQ in certain circumstances, for example if the
   pseudonym was received a long time ago.) The benefit of this policy
   is that it protects the peer against active attacks on anonymity.  On
   the other hand, a "liberal" peer always accepts the
   AT_PERMANENT_ID_REQ and responds with the permanent identity.  The
   benefit of this policy is that it works even if the valid network
   sometimes loses pseudonyms and is not able to map them to the
   permanent identity.


4.1.7  Processing of AT_IDENTITY by the Server


   When the server receives an EAP-Response/AKA-Identity message with
   the AT_IDENTITY (in response to the server's identity requesting
   attribute), the server MUST operate as follows.


   If the server used AT_PERMANENT_ID_REQ, and if the AT_IDENTITY does
   not contain a valid permanent identity, then the server sends an
   EAP-Request/AKA-Notification packet with AT_NOTIFICATION code 16384
   to terminate the EAP exchange.  If the server recognizes the
   permanent identity and is able to continue, then the server proceeds
   with full authentication by sending EAP-Request/AKA-Challenge.


   If the server used AT_FULLAUTH_ID_REQ, and if AT_IDENTITY contains a
   valid permanent identity or a pseudonym identity that the server can
   map to a valid permanent identity, then the server proceeds with full
   authentication by sending EAP-Request/AKA-Challenge.  If AT_IDENTITY
   contains a pseudonym identity that the server is not able to map to a
   valid permanent identity, or an identity that the server is not able
   to recognize or classify, then the server sends EAP-Request/
   AKA-Identity with AT_PERMANENT_ID_REQ.


   If the server used AT_ANY_ID_REQ, and if the AT_IDENTITY contains a
   valid permanent identity or a pseudonym identity that the server can
   map to a valid permanent identity, then the server proceeds with full
   authentication by sending EAP-Request/ AKA-Challenge.




Arkko & Haverinen        Expires April 25, 2005                [Page 26]

Internet-Draft           EAP-AKA Authentication             October 2004



   If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
   fast re-authentication identity and the server agrees on using
   re-authentication, then the server proceeds with fast
   re-authentication by sending EAP-Request/AKA-Reauthentication
   (Section 5).


   If the server used AT_ANY_ID_REQ, and if the peer sent an
   EAP-Response/AKA-Identity with AT_IDENTITY that contains an identity
   that the server recognizes as a fast re-authentication identity, but
   the server is not able to map the identity to a permanent identity,
   then the server sends EAP-Request/AKA-Identity with
   AT_FULLAUTH_ID_REQ.


   If the server used AT_ANY_ID_REQ, and if AT_IDENTITY contains a valid
   fast re-authentication identity, which the server is able to map to a
   permanent identity, and if the server does not want to use fast
   re-authentication, then the server proceeds with full authentication
   by sending EAP-Request/AKA-Challenge.


   If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
   identity that the server recognizes as a pseudonym identity but the
   server is not able to map the pseudonym identity to a permanent
   identity, then the server sends EAP-Request/AKA-Identity with
   AT_PERMANENT_ID_REQ.


   If the server used AT_ANY_ID_REQ, and AT_IDENTITY contains an
   identity that the server is not able to recognize or classify, then
   the server sends EAP-Request/AKA-Identity with AT_FULLAUTH_ID_REQ.


4.2  Message Sequence Examples (Informative)


   This section contains non-normative message sequence examples to
   illustrate how the peer identity can be communicated to the server.


4.2.1  Usage of AT_ANY_ID_REQ


   Obtaining the peer identity with EAP-AKA attributes is illustrated in
   Figure 5 below.














Arkko & Haverinen        Expires April 25, 2005                [Page 27]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                                                       |
          |                            +------------------------------+
          |                            | Server does not have any     |
          |                            | Subscriber identity available|
          |                            | When starting EAP-AKA        |
          |                            +------------------------------+
          |          EAP-Request/AKA-Identity                     |
          |          (AT_ANY_ID_REQ)                              |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY)                                         |
          |------------------------------------------------------>|
          |                                                       |


                    Figure 5: Usage of AT_ANY_ID_REQ



4.2.2  Fall Back on Full Authentication


   Figure 6 illustrates the case when the server does not recognize the
   fast re-authentication identity the peer used in AT_IDENTITY.





























Arkko & Haverinen        Expires April 25, 2005                [Page 28]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                                                       |
          |                            +------------------------------+
          |                            | Server does not have any     |
          |                            | Subscriber identity available|
          |                            | When starting EAP-AKA        |
          |                            +------------------------------+
          |        EAP-Request/AKA-Identity                       |
          |        (AT_ANY_ID_REQ)                                |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY containing a fast re-auth. identity)     |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server does not recognize    |
          |                            | The fast re-auth.            |
          |                            | Identity                     |
          |                            +------------------------------+
          |     EAP-Request/AKA-Identity                          |
          |     (AT_FULLAUTH_ID_REQ)                              |
          |<------------------------------------------------------|
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY with a full-auth. Identity)              |
          |------------------------------------------------------>|
          |                                                       |


               Figure 6: Fall back on full authentication


   If the server recognizes the fast re-authentication identity, but
   still wants to fall back on full authentication, the server may issue
   the EAP-Request/AKA-Challenge packet.  In this case, the full
   authentication procedure proceeds as usual.


4.2.3  Requesting the Permanent Identity 1


   Figure 7 illustrates the case when the EAP server fails to decode a
   pseudonym identity included in the EAP-Response/Identity packet.














Arkko & Haverinen        Expires April 25, 2005                [Page 29]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                               EAP-Request/Identity    |
          |<------------------------------------------------------|
          | EAP-Response/Identity                                 |
          | (Includes a pseudonym)                                |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server fails to decode the   |
          |                            | Pseudonym.                   |
          |                            +------------------------------+
          |  EAP-Request/AKA-Identity                             |
          |  (AT_PERMANENT_ID_REQ)                                |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY with permanent identity)                 |
          |------------------------------------------------------>|
          |                                                       |


             Figure 7: Requesting the permanent identity 1


   If the server recognizes the permanent identity, then the
   authentication sequence proceeds as usual with the EAP Server issuing
   the EAP-Request/AKA-Challenge message.


4.2.4  Requesting the Permanent Identity 2


   Figure 8 illustrates the case when the EAP server fails to decode the
   pseudonym included in the AT_IDENTITY attribute.























Arkko & Haverinen        Expires April 25, 2005                [Page 30]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                                                       |
          |                            +------------------------------+
          |                            | Server does not have any     |
          |                            | Subscriber identity available|
          |                            | When starting EAP-AKA        |
          |                            +------------------------------+
          |        EAP-Request/AKA-Identity                       |
          |        (AT_ANY_ID_REQ)                                |
          |<------------------------------------------------------|
          |                                                       |
          |EAP-Response/AKA-Identity                              |
          |(AT_IDENTITY with a pseudonym identity)                |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server fails to decode the   |
          |                            | Pseudonym in AT_IDENTITY     |
          |                            +------------------------------+
          |                EAP-Request/AKA-Identity               |
          |                (AT_PERMANENT_ID_REQ)                  |
          |<------------------------------------------------------|
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY with permanent identity)                 |
          |------------------------------------------------------>|
          |                                                       |


             Figure 8: Requesting the permanent identity 2



4.2.5  Three EAP/AKA-Identity Round Trips


   Figure 9 illustrates the case with three EAP/AKA-Identity round
   trips.



















Arkko & Haverinen        Expires April 25, 2005                [Page 31]

Internet-Draft           EAP-AKA Authentication             October 2004



       Peer                                             Authenticator
          |                                                       |
          |                            +------------------------------+
          |                            | Server does not have any     |
          |                            | Subscriber identity available|
          |                            | When starting EAP-AKA        |
          |                            +------------------------------+
          |        EAP-Request/AKA-Identity                       |
          |        (AT_ANY_ID_REQ)                                |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY with fast re-auth. identity)             |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server does not accept       |
          |                            | The fast re-authentication   |
          |                            | Identity                     |
          |                            +------------------------------+
          |                                                       |
          :                                                       :
          :                                                       :






























Arkko & Haverinen        Expires April 25, 2005                [Page 32]

Internet-Draft           EAP-AKA Authentication             October 2004



          :                                                       :
          :                                                       :
          |     EAP-Request/AKA-Identity                          |
          |     (AT_FULLAUTH_ID_REQ)                              |
          |<------------------------------------------------------|
          |EAP-Response/AKA-Identity                              |
          |(AT_IDENTITY with a pseudonym identity)                |
          |------------------------------------------------------>|
          |                            +------------------------------+
          |                            | Server fails to decode the   |
          |                            | Pseudonym in AT_IDENTITY     |
          |                            +------------------------------+
          |           EAP-Request/AKA-Identity                    |
          |           (AT_PERMANENT_ID_REQ)                       |
          |<------------------------------------------------------|
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY with permanent identity)                 |
          |------------------------------------------------------>|
          |                                                       |


                  Figure 9: Three EAP-AKA Start rounds


   After the last EAP-Response/AKA-Identity message, the full
   authentication sequence proceeds as usual.


5.  Fast Re-authentication


5.1  General


   In some environments, EAP authentication may be performed frequently.
   Because the EAP-AKA full authentication procedure makes use of the
   AKA algorithms, and it therefore requires fresh authentication
   vectors from the Authentication Centre, the full authentication
   procedure may result in many network operations when used very
   frequently.  Therefore, EAP-AKA includes a more inexpensive fast
   re-authentication procedure that does not make use of the AKA
   algorithms and does not need new vectors from the Authentication
   Centre.


   Fast re-authentication is optional to implement for both the EAP-AKA
   server and peer.  On each EAP authentication, either one of the
   entities may also fall back on full authentication if they do not
   want to use fast re-authentication.


   Fast re-authentication is based on the keys derived on the preceding
   full authentication.  The same K_aut and K_encr keys as in full
   authentication are used to protect EAP-AKA packets and attributes,
   and the original Master Key from full authentication is used to




Arkko & Haverinen        Expires April 25, 2005                [Page 33]

Internet-Draft           EAP-AKA Authentication             October 2004



   generate a fresh Master Session Key, as specified in Section 6.4.


   The fast re-authentication exchange makes use of an unsigned 16-bit
   counter, included in the AT_COUNTER attribute.  The counter has three
   goals: 1) it can be used to limit the number of successive
   reauthentication exchanges without full-authentication  2) it
   contributes to the keying material, and 3) it protects the peer and
   the server from replays.  On full authentication, both the server and
   the peer initialize the counter to one.  The counter value of at
   least one is used on the first fast re-authentication.  On subsequent
   fast re-authentications, the counter MUST be greater than on any of
   the previous fast re-authentications.  For example, on the second
   fast re-authentication, counter value is two or greater etc.  The
   AT_COUNTER attribute is encrypted.


   Both the peer and the EAP server maintain a copy of the counter.  The
   EAP server sends its counter value to the peer in the fast
   re-authentication request.  The peer MUST verify that its counter
   value is less than or equal to the value sent by the EAP server.


   The server includes an encrypted server random nonce (AT_NONCE_S) in
   the fast re-authentication request.  The AT_MAC attribute in the
   peer's response is calculated over NONCE_S to provide a
   challenge/response authentication scheme.  The NONCE_S also
   contributes to the new Master Session Key.


   Both the peer and the server SHOULD have an upper limit for the
   number of subsequent fast re-authentications allowed before a full
   authentication needs to be performed.  Because a 16-bit counter is
   used in fast re-authentication, the theoretical maximum number of
   re-authentications is reached when the counter value reaches FFFF
   hexadecimal.  In order to use fast re-authentication, the peer and
   the EAP server need to store the following values: Master Key, latest
   counter value and the next fast re-authentication identity.  K_aut,
   K_encr may either be stored or derived again from MK.  The server may
   also need to store the permanent identity of the user.


5.2  Comparison to AKA


   When analyzing the fast re-authentication exchange, it may be helpful
   to compare it with the 3rd generation Authentication and Key
   Agreement (AKA) exchange used on full authentication.  The counter
   corresponds to the AKA sequence number, NONCE_S corresponds to RAND,
   and AT_MAC in EAP-Request/AKA-Reauthentication corresponds to AUTN,
   the AT_MAC in EAP-Response/AKA-Reauthentication corresponds to RES,
   AT_COUNTER_TOO_SMALL corresponds to AUTS, and encrypting the counter
   corresponds to the usage of the Anonymity Key.  Also the key
   generation on fast re-authentication with regard to random or fresh




Arkko & Haverinen        Expires April 25, 2005                [Page 34]

Internet-Draft           EAP-AKA Authentication             October 2004



   material is similar to AKA -- the server generates the NONCE_S and
   counter values, and the peer only verifies that the counter value is
   fresh.


   It should also be noted that encrypting the AT_NONCE_S, AT_COUNTER or
   AT_COUNTER_TOO_SMALL attributes is not important to the security of
   the fast re-authentication exchange.


5.3  Fast Re-authentication Identity


   The fast re-authentication procedure makes use of separate
   re-authentication user identities.  Pseudonyms and the permanent
   identity are reserved for full authentication only.  If a fast
   re-authentication identity is lost and the network does not recognize
   it, the EAP server can fall back on full authentication.  If the EAP
   server supports fast re-authentication, it MAY include the skippable
   AT_NEXT_REAUTH_ID attribute in the encrypted data of EAP-
   Request/AKA-Challenge message.  This attribute contains a new
   re-authentication identity for the next fast re-authentication.  The
   attribute also works as a capability flag that indicates the fact
   that the server supports fast re-authentication, and that the server
   wants to continue using fast re-authentication within the current
   context.  The peer MAY ignore this attribute, in which case it will
   use full authentication next time.  If the peer wants to use fast
   re-authentication, it uses this fast re-authentication identity on
   next authentication.  Even if the peer has a fast re-authentication
   identity, the peer MAY discard the re-authentication identity and use
   a pseudonym or the permanent identity instead, in which case full
   authentication MUST be performed.  If the EAP server does not include
   the AT_NEXT_REAUTH_ID in the encrypted data of
   EAP-Request/AKA-Challenge or EAP-Request/AKA-Reauthentication, then
   the peer MUST discard its current fast re-authentication state
   information and perform a full authentication next time.


   In environments where a realm portion is needed in the peer identity,
   the fast re-authentication identity received in AT_NEXT_REAUTH_ID
   MUST contain both a username portion and a realm portion, as per the
   NAI format.  The EAP Server can choose an appropriate realm part in
   order to have the AAA infrastructure route subsequent fast
   re-authentication related requests to the same AAA server.  For
   example, the realm part MAY include a portion that is specific to the
   AAA server.  Hence, it is sufficient to store the context required
   for fast re-authentication in the AAA server that performed the full
   authentication.


   The peer MAY use the fast re-authentication identity in the
   EAP-Response/Identity packet or, in response to server's
   AT_ANY_ID_REQ attribute, the peer MAY use the fast re-authentication




Arkko & Haverinen        Expires April 25, 2005                [Page 35]

Internet-Draft           EAP-AKA Authentication             October 2004



   identity in the AT_IDENTITY attribute of the
   EAP-Response/AKA-Identity packet.


   The peer MUST NOT modify the username portion of the fast
   re-authentication identity, but the peer MAY modify the realm portion
   or replace it with another realm portion.  The peer might need to
   modify the realm in order to influence the AAA routing, for example
   to make sure that the correct server is reached.  It should be noted
   that sharing the same fast re-authentication key among several
   servers may have security risks, so changing the realm portion of the
   NAI in order to change the EAP server is not desirable.


   Even if the peer uses a fast re-authentication identity, the server
   may want to fall back on full authentication, for example because the
   server does not recognize the fast re-authentication identity or does
   not want to use fast re-authentication.  If the server was able to
   decode the fast re-authentication identity to the permanent identity,
   the server issues the EAP-Request/AKA-Challenge packet to initiate
   full authentication.  If the server was not able to recover the
   peer's identity from the fast re-authentication identity, the server
   starts the full authentication procedure by issuing an
   EAP-Request/AKA-Identity packet.  This packet always starts a full
   authentication sequence if it does not include the AT_ANY_ID_REQ
   attribute.


5.4  Fast Re-authentication Procedure


   Figure 10 illustrates the fast re-authentication procedure.  In this
   example, the optional protected success indication is not used.
   Encrypted attributes are denoted with '*'.  The peer uses its fast
   re-authentication identity in the EAP-Response/Identity packet.  As
   discussed above, an alternative way to communicate the fast
   re-authentication identity to the server is for the peer to use the
   AT_IDENTITY attribute in the EAP-Response/AKA-Identity message.  This
   latter case is not illustrated in the figure below, and it is only
   possible when the server requests the peer to send its identity by
   including the AT_ANY_ID_REQ attribute in the EAP-Request/AKA-Identity
   packet.


   If the server recognizes the identity as a valid fast
   re-authentication identity, and if the server agrees on using fast
   re-authentication, then the server sends the EAP-
   Request/AKA-Reauthentication packet to the peer.  This packet MUST
   include the encrypted AT_COUNTER attribute, with a fresh counter
   value, the encrypted AT_NONCE_S attribute that contains a random
   number chosen by the server, the AT_ENCR_DATA and the AT_IV
   attributes used for encryption, and the AT_MAC attribute that
   contains a message authentication code over the packet.  The packet




Arkko & Haverinen        Expires April 25, 2005                [Page 36]

Internet-Draft           EAP-AKA Authentication             October 2004



   MAY also include an encrypted AT_NEXT_REAUTH_ID attribute that
   contains the next fast re-authentication identity.


   Fast re-authentication identities are one-time identities.  If the
   peer does not receive a new fast re-authentication identity, it MUST
   use either the permanent identity or a pseudonym identity on the next
   authentication to initiate full authentication.


   The peer verifies that AT_MAC is correct and that the counter value
   is fresh (greater than any previously used value).  The peer MAY save
   the next fast re-authentication identity from the encrypted
   AT_NEXT_REAUTH_ID for next time.  If all checks are successful, the
   peer responds with the EAP-Response/AKA-Reauthentication packet,
   including the AT_COUNTER attribute with the same counter value and
   the AT_MAC attribute.


   The server verifies the AT_MAC attribute and also verifies that the
   counter value is the same that it used in the EAP-Request/AKA-
   Reauthentication packet.  If these checks are successful, the fast
   re-authentication has succeeded and the server sends the EAP-Success
   packet to the peer.


   If protected success indications (Section 6.2) were used, the
   EAP-Success packet would be preceded by an EAP-AKA notification
   round.


        Peer                                             Authenticator
          |                                                       |
          |                               EAP-Request/Identity    |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/Identity                                 |
          | (Includes a fast re-authentication identity)          |
          |------------------------------------------------------>|
          |                          +--------------------------------+
          |                          | Server recognizes the identity |
          |                          | and agrees on using fast       |
          |                          | re-authentication              |
          |                          +--------------------------------+
          |  EAP-Request/AKA-Reauthentication                     |
          |  (AT_IV, AT_ENCR_DATA, *AT_COUNTER,                   |
          |   *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC)            |
          |<------------------------------------------------------|
          |                                                       |
          :                                                       :
          :                                                       :






Arkko & Haverinen        Expires April 25, 2005                [Page 37]

Internet-Draft           EAP-AKA Authentication             October 2004



          :                                                       :
          :                                                       :
          |                                                       |
     +-----------------------------------------------+            |
     | Peer verifies AT_MAC and the freshness of     |            |
     | the counter. Peer MAY store the new re-       |            |
     | authentication identity for next re-auth.     |            |
     +-----------------------------------------------+            |
          |                                                       |
          | EAP-Response/AKA-Reauthentication                     |
          | (AT_IV, AT_ENCR_DATA, *AT_COUNTER with same value,    |
          |  AT_MAC)                                              |
          |------------------------------------------------------>|
          |                          +--------------------------------+
          |                          | Server verifies AT_MAC and     |
          |                          | the counter                    |
          |                          +--------------------------------+
          |                                          EAP-Success  |
          |<------------------------------------------------------|
          |                                                       |


                      Figure 10: Reauthentication



5.5  Fast Re-authentication Procedure when Counter is Too Small


   If the peer does not accept the counter value of
   EAP-Request/AKA-Reauthentication, it indicates the counter
   synchronization problem by including the encrypted
   AT_COUNTER_TOO_SMALL in EAP-Response/AKA-Reauthentication.  The
   server responds with EAP-Request/AKA-Challenge to initiate a normal
   full authentication procedure.  This is illustrated in Figure 11.
   Encrypted attributes are denoted with '*'.



















Arkko & Haverinen        Expires April 25, 2005                [Page 38]

Internet-Draft           EAP-AKA Authentication             October 2004



        Peer                                             Authenticator
          |          EAP-Request/AKA-Identity                     |
          |          (AT_ANY_ID_REQ)                              |
          |<------------------------------------------------------|
          |                                                       |
          | EAP-Response/AKA-Identity                             |
          | (AT_IDENTITY)                                         |
          | (Includes a fast re-authentication identity)          |
          |------------------------------------------------------>|
          |                                                       |
          |  EAP-Request/AKA-Reauthentication                     |
          |  (AT_IV, AT_ENCR_DATA, *AT_COUNTER,                   |
          |   *AT_NONCE_S, *AT_NEXT_REAUTH_ID, AT_MAC)            |
          |<------------------------------------------------------|
     +-----------------------------------------------+            |
     | AT_MAC is valid but the counter is not fresh. |            |
     +-----------------------------------------------+            |
          | EAP-Response/AKA-Reauthentication                     |
          | (AT_IV, AT_ENCR_DATA, *AT_COUNTER_TOO_SMALL,          |
          |  *AT_COUNTER, AT_MAC)                                 |
          |------------------------------------------------------>|
          |            +----------------------------------------------+
          |            | Server verifies AT_MAC but detects           |
          |            | That peer has included AT_COUNTER_TOO_SMALL|
          |            +----------------------------------------------+
          |                        EAP-Request/AKA-Challenge      |
          |<------------------------------------------------------|
     +---------------------------------------------------------------+
     |                Normal full authentication follows.            |
     +---------------------------------------------------------------+
          |                                                       |


          Figure 11: Fast re-authentication counter too small


   In the figure above, the first three messages are similar to the
   basic fast re-authentication case.  When the peer detects that the
   counter value is not fresh, it includes the AT_COUNTER_TOO_SMALL
   attribute in EAP-Response/AKA-Reauthentication.  This attribute
   doesn't contain any data but it is a request for the server to
   initiate full authentication.  In this case, the peer MUST ignore the
   contents of the server's AT_NEXT_REAUTH_ID attribute.


   On receipt of AT_COUNTER_TOO_SMALL, the server verifies AT_MAC and
   verifies that AT_COUNTER contains the same counter value as in the
   EAP-Request/AKA-Reauthentication packet.  If not, the server
   terminates the authentication exchange by sending the
   EAP-Request/AKA-Notification packet with AT_NOTIFICATION code 16384.
   If all checks on the packet are successful, the server transmits a




Arkko & Haverinen        Expires April 25, 2005                [Page 39]

Internet-Draft           EAP-AKA Authentication             October 2004



   EAP-Request/AKA-Challenge packet and the full authentication
   procedure is performed as usual.  Since the server already knows the
   subscriber identity, it MUST NOT use the EAP-Request/AKA-Identity
   packet to request the identity.


   It should be noted that in this case, peer identity is only
   transmitted in the AT_IDENTITY attribute at the beginning of the
   whole EAP exchange.  The fast re-authentication identity used in this
   AT_IDENTITY attribute will be used in key derivation (see Section
   Section 6.4).


6.  EAP-AKA Notifications


6.1  General


   EAP-AKA does not prohibit the use of the EAP Notifications as
   specified in [RFC3748].  EAP Notifications can be used at any time in
   the EAP-AKA exchange.  It should be noted that EAP-AKA does not
   protect EAP Notifications, and as the contents of the notification is
   a displayable string, these notifications are not easily localizable.
   EAP-AKA also specifies method specific EAP-AKA notifications.


   The EAP server can use EAP-AKA notifications to convey localizable
   notifications and result indications (Section 6.2) to the peer.


   The server MUST use notifications in cases discussed in Section
   6.3.2.  When the EAP server issues an EAP-Request/AKA-Notification
   packet to the peer, the peer MUST process the notification packet.The
   peer MAY show a notification message to the user and the peer MUST
   respond to the EAP server with an EAP-Response/AKA-Notification
   packet, even if the peer did not recognize the notification code.


   An EAP-AKA full authentication exchange or a fast re-authentication
   exchange MUST NOT include more than one EAP-AKA notification round.


   The notification code is a 16-bit number.  The most significant bit
   is called the Success bit (S bit).  The S bit specifies whether the
   notification implies failure.  The code values with the S bit set to
   zero (code values 0...32767) are used on unsuccessful cases.  The
   receipt of a notification code from this range implies failed EAP
   exchange, so the peer can use the notification as a failure
   indication.  After receiving the EAP-Response/AKA-Notification for
   these notification codes, the server MUST send the EAP-Failure
   packet.


   The receipt of a notification code with the S bit set to one (values
   32768...65536) does not imply failure.  Notification code 32768 has
   been reserved as a general notification code to indicate successful




Arkko & Haverinen        Expires April 25, 2005                [Page 40]

Internet-Draft           EAP-AKA Authentication             October 2004



   authentication.


   The second most significant bit of the notification code is called
   the Phase bit (P bit).  It specifies at which phase of the EAP-AKA
   exchange the notification can be used.  If the P bit is set to zero,
   the notification can only be used after  a successful
   EAP/AKA-Challenge round in full authentication or a successful
   EAP/AKA-Reauthentication round in reautentication.  A
   re-authentication round is considered successful only if the peer has
   successfully verified AT_MAC and AT_COUNTER attributes, and does not
   include the AT_COUNTER_TOO_SMALL attribute in
   EAP-Response/AKA-Reauthentication.


   If the P bit is set to one, the notification can only by used before
   the EAP/AKA-Challenge round in full authentication or before the
   EAP/AKA-Reauthentication round in reauthentication.  These
   notifications can only be used to indicate various failure cases.  In
   other words, if the P bit is set to one, then the S bit MUST be set
   to zero.


   Section 8.10  and Section 8.11 specify what other attributes must be
   included in the notification packets.


   Some of the notification codes are authorization related and hence
   not usually considered as part of the responsibility of an EAP
   method.  However, they are included as part of EAP-AKA because there
   are currently no other ways to convey this information to the user in
   a localizable way, and the information is potentially useful for the
   user.  An EAP-AKA server implementation may decide never to send
   these EAP-AKA notifications.


6.2  Result Indications


   As discussed in Section 6.3, the server and the peer use explicit
   error messages in all error cases.  If the server detects an error
   after successful authentication, the server uses an EAP-AKA
   notification to indicate failure to the peer.  In this case, the
   result indication is integrity and replay protected.


   By sending an EAP-Response/AKA-Challenge packet or an
   EAP-Response/AKA-Reauthentication packet (without
   AT_COUNTER_TOO_SMALL), the peer indicates that it has successfully
   authenticated the server and that the peer's local policy accepts the
   EAP exchange.  In other words, these packets are implicit success
   indications from the peer to the server.


   EAP-AKA also supports optional protected success indications from the
   server to the peer.  If the EAP server wants to use protected success




Arkko & Haverinen        Expires April 25, 2005                [Page 41]

Internet-Draft           EAP-AKA Authentication             October 2004



   indications, it includes the AT_RESULT_IND attribute in the
   EAP-Request/AKA-Challenge or the EAP-Request/AKA-Reauthentication
   packet.  This attribute indicates, that the EAP server would like to
   use result indications in both successful and unsuccessful cases.  If
   the peer also wants this, the peer includes AT_RESULT_IND in
   EAP-Response/AKA-Challenge or EAP-Response/AKA-Re-authentication.
   The peer MUST NOT include AT_RESULT_IND if it did not receive
   AT_RESULT_IND from the server.  If both the peer and the server used
   AT_RESULT_IND, then the EAP exchange is not complete yet, but an
   EAP-AKA notification round will follow.  The following EAP-AKA
   notification may indicate either failure or success.


   Success indications with the AT_NOTIFICATION code 32768 can only be
   used if both the server and the peer indicate they want to use them
   with AT_RESULT_IND.  If the server did not include AT_RESULT_IND in
   the EAP-Request/AKA-Challenge or EAP-Request/AKA-Reauthentication
   packet, or if the peer did not include AT_RESULT_IND in the
   corresponding response packet, then the server MUST NOT use protected
   success indications.


   Because the AT_NOTIFICATION code 32768 is used to indicate success,
   the server MUST ignore the contents of the EAP-AKA response it
   receives to the EAP-Request/AKA-Notification with this code.
   Regardless of the contents of the EAP-AKA response, the server MUST
   send EAP-Success as the next packet.


6.3  Error Cases


   This section specifies the operation of the peer and the server in
   error cases.  The subsections below require the EAP-AKA peer and
   server to send an error packet  (EAP-Response/AKA-Client-Error,
   EAP-Response/AKA-Authentication-Reject or
   EAP-Response/AKA-Synchronization-Failure from the peer and
   EAP-Request/AKA-Notification from the server) in error cases.
   However, implementations SHOULD NOT rely upon the correct error
   reporting behavior of the peer, authenticator, or the server.  It is
   possible for error and other messages to be lost in transit or for a
   malicious participant to attempt to consume resources by not issuing
   error messages.  Both the peer and the EAP server SHOULD have a
   mechanism to clean up state even if an error message or EAP-Success
   is not received after a timeout period.


6.3.1  Peer Operation


   Two special error messages have been specified for error cases that
   are related to the processing of the AKA AUTN parameter, as described
   in Section 3: (1) if the peer does not accept AUTN, the peer responds
   with EAP-Response/AKA-Authentication-Reject (Section 8.5), and the




Arkko & Haverinen        Expires April 25, 2005                [Page 42]

Internet-Draft           EAP-AKA Authentication             October 2004



   server issues EAP-Failure, and (2) if the peer detects that the
   sequence number in AUTN is not correct, the peer responds with
   EAP-Response/AKA-Synchronization-Failure (Section 8.6), and the
   server proceeds with a new EAP-Request/AKA-Challenge.


   In other error cases, when an EAP-AKA peer detects an error in a
   received EAP-AKA packet, the EAP-AKA peer responds with the
   EAP-Response/AKA-Client-Error packet.  In response to the
   EAP-Response/AKA-Client-Error, the EAP server MUST issue the
   EAP-Failure packet and the authentication exchange terminates.


   By default, the peer uses the client error code 0, "unable to process
   packet".  This error code is used in the following cases:


   o  EAP exchange is not acceptable according to the peer's local
      policy.
   o  the peer is not able to parse the EAP request, i.e.  the EAP
      request is malformed
   o  the peer encountered a malformed attribute
   o  wrong attribute types or duplicate attributes have been included
      in the EAP request
   o  a mandatory attribute is missing
   o  unrecognized non-skippable attribute
   o  unrecognized or unexpected EAP-AKA Subtype in the EAP request
   o  invalid AT_MAC.  The peer SHOULD log this event.
   o  invalid AT_CHECKCODE.  The peer SHOULD log this event.
   o  invalid pad bytes in AT_PADDING
   o  the peer does not want to process AT_PERMANENT_ID_REQ


6.3.2  Server Operation


   If an EAP-AKA server detects an error in a received EAP-AKA response,
   the server MUST issue the EAP-Request/AKA-Notification packet with an
   AT_NOTIFICATION code that implies failure.  By default, the server
   uses one of the general failure codes (0 or 16384).  The choice
   between these two codes depends on the phase of the EAP-AKA exchange,
   see Section 6.  The errors cases when the server issues an
   EAP-Request/AKA-Notification that implies failure include the
   following:


   o  the server is not able to parse the peer's EAP response
   o  the server encounters a malformed attribute, a non-recognized non-
      skippable attribute, or a duplicate attribute
   o  a mandatory attribute is missing or an invalid attribute was
      included
   o  unrecognized or unexpected EAP-AKA Subtype in the EAP Response
   o  invalid AT_MAC.  The server SHOULD log this event.





Arkko & Haverinen        Expires April 25, 2005                [Page 43]

Internet-Draft           EAP-AKA Authentication             October 2004



   o  invalid AT_CHECKCODE.  The server SHOULD log this event.
   o  invalid AT_COUNTER


6.3.3  EAP-Failure


   The EAP-AKA server sends EAP-Failure in three cases:


   1) In response to an EAP-Response/AKA-Client-Error packet the server
   has received from the peer, or


   2) In response to an EAP-Response/AKA-Authentication-Reject  packet
   the server has received from the peer, or


   3) Following an EAP-AKA notification round, when the AT_NOTIFICATION
   code implies failure.


   The EAP-AKA server MUST NOT send EAP-Failure in other cases than
   these three.  However, it should be noted that even though the
   EAP-AKA server would not send an EAP-Failure, an authorization
   decision that happens outside EAP-AKA, such as in the AAA server or
   in an intermediate AAA proxy, may result in a failed exchange.


   The peer MUST accept the EAP-Failure packet in case 1), case 2) and
   case 3) above.  The peer SHOULD silently discard the EAP-Failure
   packet in other cases.


6.3.4  EAP-Success


   On full authentication, the server can only send EAP-Success after
   the EAP/AKA-Challenge round.  The peer MUST silently discard any
   EAP-Success packets if they are received before the peer has
   successfully authenticated the server and sent the
   EAP-Response/AKA-Challenge packet.


   If the peer did not indicate that it wants to use protected success
   indications with AT_RESULT_IND (as discussed in Section 6.2) on full
   authentication, then the peer MUST accept EAP-Success after a
   successful EAP/AKA-Challenge round.


   If the peer indicated that it wants to use protected success
   indications with AT_RESULT_IND (as discussed in Section 6.2), then
   the peer MUST NOT accept EAP-Success after a successful
   EAP/AKA-Challenge round.  In this case, the peer MUST only accept
   EAP-Success after receiving an EAP-AKA Notification with the
   AT_NOTIFICATION code 32768.


   On fast re-authentication, EAP-Success can only