idnits 2.17.00 (12 Aug 2021) /tmp/idnits64354/draft-bersani-eap-psk-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5 on line 2728. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2705. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2712. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2718. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 7 instances of too long lines in the document, the longest one being 7 characters in excess of 72. ** There is 1 instance of lines with control characters in the document. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 523: '...means that there MUST only be at most ...' RFC 2119 keyword, line 557: '...tive NAIs. This means that there MUST...' RFC 2119 keyword, line 578: '...tive NAIs. This means that there MUST...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 1922 has weird spacing: '...h makes this ...' == Line 2468 has weird spacing: '...ication and K...' == Line 2516 has weird spacing: '... common know...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 9, 2005) is 6128 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: 'String' on line 334 == Unused Reference: '8' is defined on line 2442, but no explicit reference was found in the text == Unused Reference: '21' is defined on line 2500, but no explicit reference was found in the text == Unused Reference: '25' is defined on line 2513, but no explicit reference was found in the text == Unused Reference: '37' is defined on line 2563, but no explicit reference was found in the text == Unused Reference: '45' is defined on line 2589, but no explicit reference was found in the text == Unused Reference: '50' is defined on line 2606, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2486 (ref. '1') (Obsoleted by RFC 4282) -- Possible downref: Non-RFC (?) normative reference: ref. '3' -- Possible downref: Non-RFC (?) normative reference: ref. '4' -- Possible downref: Non-RFC (?) normative reference: ref. '5' ** Obsolete normative reference: RFC 2434 (ref. '6') (Obsoleted by RFC 5226) -- Possible downref: Non-RFC (?) normative reference: ref. '7' -- Possible downref: Non-RFC (?) normative reference: ref. '8' == Outdated reference: draft-ietf-eap-keying has been published as RFC 5247 -- Obsolete informational reference (is this intentional?): RFC 2716 (ref. '12') (Obsoleted by RFC 5216) == Outdated reference: draft-arkko-pppext-eap-aka has been published as RFC 4187 == Outdated reference: A later version (-04) exists of draft-arkko-eap-service-identity-auth-03 -- Obsolete informational reference (is this intentional?): RFC 2246 (ref. '21') (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 1750 (ref. '22') (Obsoleted by RFC 4086) -- Obsolete informational reference (is this intentional?): RFC 2409 (ref. '25') (Obsoleted by RFC 4306) == Outdated reference: draft-haverinen-pppext-eap-sim has been published as RFC 4186 -- Obsolete informational reference (is this intentional?): RFC 2898 (ref. '35') (Obsoleted by RFC 8018) == Outdated reference: A later version (-02) exists of draft-kamath-pppext-eap-mschapv2-01 == Outdated reference: draft-ietf-ipsec-ikev2 has been published as RFC 4306 -- Obsolete informational reference (is this intentional?): RFC 2402 (ref. '38') (Obsoleted by RFC 4302, RFC 4305) == Outdated reference: A later version (-07) exists of draft-iab-auth-mech-03 == Outdated reference: draft-cam-winget-eap-fast has been published as RFC 4851 == Outdated reference: draft-walker-ieee802-req has been published as RFC 4017 == Outdated reference: draft-tschofenig-eap-ikev2 has been published as RFC 5106 == Outdated reference: draft-ietf-tls-psk has been published as RFC 4279 Summary: 8 errors (**), 0 flaws (~~), 22 warnings (==), 19 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 EAP F. Bersani 3 Internet-Draft France Telecom R&D 4 Expires: February 10, 2006 H. Tschofenig 5 Siemens AG 6 August 9, 2005 8 The EAP-PSK Protocol: a Pre-Shared Key EAP Method 9 draft-bersani-eap-psk-09 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on February 10, 2006. 36 Copyright Notice 38 Copyright (C) The Internet Society (2005). 40 Abstract 42 This document specifies EAP-PSK, an Extensible Authentication 43 Protocol (EAP) method for mutual authentication and session key 44 derivation using a Pre-Shared Key (PSK). 45 EAP-PSK provides a protected communication channel when mutual 46 authentication is successful for both parties to communicate over. 47 This document describes the use of this channel only for protected 48 exchange of result indications, but future EAP-PSK extensions may use 49 the channel for other purposes. 50 EAP-PSK is designed for authentication over insecure networks such as 51 IEEE 802.11. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 1.1 Design goals for EAP-PSK . . . . . . . . . . . . . . . . . 4 57 1.1.1 Simplicity . . . . . . . . . . . . . . . . . . . . . . 4 58 1.1.2 Wide Applicability . . . . . . . . . . . . . . . . . . 5 59 1.1.3 Security . . . . . . . . . . . . . . . . . . . . . . . 5 60 1.1.4 Extensibility . . . . . . . . . . . . . . . . . . . . 5 61 1.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 62 1.3 Conventions . . . . . . . . . . . . . . . . . . . . . . . 8 63 1.4 Related Work . . . . . . . . . . . . . . . . . . . . . . . 8 64 2. Protocol overview . . . . . . . . . . . . . . . . . . . . . . 11 65 2.1 EAP-PSK key hierarchy . . . . . . . . . . . . . . . . . . 12 66 2.1.1 The PSK . . . . . . . . . . . . . . . . . . . . . . . 12 67 2.1.2 The TEK . . . . . . . . . . . . . . . . . . . . . . . 14 68 2.1.3 The MSK . . . . . . . . . . . . . . . . . . . . . . . 14 69 2.1.4 The EMSK . . . . . . . . . . . . . . . . . . . . . . . 14 70 2.1.5 The IV . . . . . . . . . . . . . . . . . . . . . . . . 14 71 2.2 Cryptographic design of EAP-PSK . . . . . . . . . . . . . 14 72 2.2.1 The Key Setup . . . . . . . . . . . . . . . . . . . . 15 73 2.2.2 The Authenticated Key Exchange . . . . . . . . . . . . 17 74 2.2.3 The Protected Channel . . . . . . . . . . . . . . . . 20 75 2.3 EAP-PSK Message Flows . . . . . . . . . . . . . . . . . . 23 76 2.3.1 EAP-PSK Standard Authentication . . . . . . . . . . . 23 77 2.3.2 EAP-PSK Extended Authentication . . . . . . . . . . . 26 78 3. EAP-PSK Message format . . . . . . . . . . . . . . . . . . . . 29 79 3.1 EAP-PSK First Message . . . . . . . . . . . . . . . . . . 29 80 3.2 EAP-PSK Second Message . . . . . . . . . . . . . . . . . . 31 81 3.3 EAP-PSK Third Message . . . . . . . . . . . . . . . . . . 33 82 3.4 EAP-PSK Fourth Message . . . . . . . . . . . . . . . . . . 37 83 4. Rules of Operation for the EAP-PSK Protected Channel . . . . . 40 84 4.1 Protected Result Indications . . . . . . . . . . . . . . . 40 85 4.1.1 CONT . . . . . . . . . . . . . . . . . . . . . . . . . 41 86 4.1.2 DONE_SUCCESS . . . . . . . . . . . . . . . . . . . . . 41 87 4.1.3 DONE_FAILURE . . . . . . . . . . . . . . . . . . . . . 42 88 4.2 Extended Authentication . . . . . . . . . . . . . . . . . 42 89 5. IANA considerations . . . . . . . . . . . . . . . . . . . . . 44 90 5.1 Allocation of an EAP-Request/Response Type for EAP-PSK . . 44 91 5.2 Allocation of EXT Type numbers . . . . . . . . . . . . . . 44 92 6. Security Considerations . . . . . . . . . . . . . . . . . . . 46 93 6.1 Mutual Authentication . . . . . . . . . . . . . . . . . . 46 94 6.2 Protected Result Indications . . . . . . . . . . . . . . . 46 95 6.3 Integrity Protection . . . . . . . . . . . . . . . . . . . 47 96 6.4 Replay Protection . . . . . . . . . . . . . . . . . . . . 47 97 6.5 Reflection attacks . . . . . . . . . . . . . . . . . . . . 48 98 6.6 Dictionary Attacks . . . . . . . . . . . . . . . . . . . . 48 99 6.7 Key Derivation . . . . . . . . . . . . . . . . . . . . . . 49 100 6.8 Denial of Service Resistance . . . . . . . . . . . . . . . 50 101 6.9 Session Independence . . . . . . . . . . . . . . . . . . . 51 102 6.10 Exposition of the PSK . . . . . . . . . . . . . . . . . . 51 103 6.11 Fragmentation . . . . . . . . . . . . . . . . . . . . . . 51 104 6.12 Channel Binding . . . . . . . . . . . . . . . . . . . . . 52 105 6.13 Fast Reconnect . . . . . . . . . . . . . . . . . . . . . . 52 106 6.14 Identity Protection . . . . . . . . . . . . . . . . . . . 52 107 6.15 Protected Ciphersuite Negotiation . . . . . . . . . . . . 54 108 6.16 Confidentiality . . . . . . . . . . . . . . . . . . . . . 54 109 6.17 Cryptographic Binding . . . . . . . . . . . . . . . . . . 54 110 6.18 Implementation of EAP-PSK . . . . . . . . . . . . . . . . 54 111 7. Security Claims . . . . . . . . . . . . . . . . . . . . . . . 56 112 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 57 113 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 58 114 9.1 Normative References . . . . . . . . . . . . . . . . . . . 58 115 9.2 Informative References . . . . . . . . . . . . . . . . . . 58 116 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 62 117 A. Generation of the PSK from a password - Discouraged . . . . . 63 118 Intellectual Property and Copyright Statements . . . . . . . . 65 120 1. Introduction 122 1.1 Design goals for EAP-PSK 124 The Extensible Authentication Protocol (EAP) [2] provides an 125 authentication framework which supports multiple authentication 126 methods. 128 This document specifies an EAP method, called EAP-PSK, that uses a 129 Pre-Shared Key (PSK). 131 EAP-PSK was developed at France Telecom R&D in 2003-2004. It is 132 published as an RFC for the general information of the Internet 133 community and to allow independent implementations. 135 Because PSKs are of frequent use in security protocols, other 136 protocols may also refer to a PSK or contain this word in their name. 137 For instance, Wi-Fi Protected Access (WPA) [53] specifies an 138 authentication mode called "WPA-PSK". EAP-PSK is distinct from these 139 protocols and should not be confused with them. 141 Design goals for EAP-PSK were: 143 o Simplicity: EAP-PSK should be easy to implement and deploy without 144 any pre-existing infrastructure. It should be available quickly 145 because recently-released protocols, such as IEEE 802.11i [30], 146 employ EAP in a different threat model than PPP [48] and thus 147 require "modern" EAP methods. 149 o Wide applicability: EAP-PSK should be suitable to authenticate 150 over any network, and in particular over IEEE 802.11 [31] wireless 151 LANs. 153 o Security: EAP-PSK should be conservative in its cryptographic 154 design. 156 o Extensibility: EAP-PSK should be easily extensible. 158 1.1.1 Simplicity 160 For the sake of simplicity, EAP-PSK relies on a single cryptographic 161 primitive, AES-128 [7]. 163 Restriction to such a primitive, and in particular, not using 164 asymmetric cryptography like Diffie-Hellman key exchange, makes EAP- 165 PSK: 167 o Easy to understand and implement while avoiding cryptographic 168 negotiations. 170 o Light-weight and well suited for any type of device, especially 171 those with little processing power and memory. 173 However, as further discussed in Section 6, this prevents EAP-PSK 174 from offering advanced features such as identity protection, password 175 support, or Perfect Forward Secrecy (PFS). This choice has been 176 deliberately made as a trade-off between simplicity and security. 178 For the sake of simplicity, EAP-PSK has also chosen a fixed message 179 format and not a Type-Length-Value (TLV) design. 181 1.1.2 Wide Applicability 183 EAP-PSK has been designed in a threat model where the attacker has 184 full control over the communication channel. This is the EAP threat 185 model that is presented in Section 7.1 of [2]. 187 1.1.3 Security 189 Since the design of authenticated key exchange is notoriously known 190 to be hard and error prone, EAP-PSK tries to avoid inventing any new 191 cryptographic mechanism. It attempts to build instead on existing 192 primitives and protocols that have been reviewed by the cryptographic 193 community. 195 1.1.4 Extensibility 197 EAP-PSK explicitly provides a mechanism to allow future extensions 198 within its protected channel (see Section 2.2.3). Thanks to this 199 mechanism, EAP-PSK will be able to provide more sophisticated 200 services as the need to do so appears. 202 1.2 Terminology 204 Authentication, Authorization and Accounting (AAA) Please refer to 205 [11] for more details. 207 AES-128 A block cipher specified in the Advanced Encryption 208 Standard [7]. 210 Authentication Key (AK) A 16-byte key derived from the PSK that the 211 EAP peer and server use to mutually authenticate. 213 AKEP2 An authenticated key exchange protocol, please refer to 214 [15] for more details. 216 Backend Authentication Server An entity that provides an 217 authentication service to an Authenticator. When used, 218 this server typically executes EAP Methods for the 219 Authenticator (This terminology is also used in [29], and 220 has the same meaning in this document). 222 Extensible Authentication Protocol (EAP) Defined in [2]. 224 EAP Authenticator (or simply Authenticator) The end of the EAP link 225 initiating the EAP authentication methods. (This 226 terminology is also used in [29], and has the same meaning 227 in this document). 229 EAP peer (or simply peer) The end of the EAP link that responds to 230 the Authenticator. (In [29], this end is known as the 231 Supplicant). 233 EAP server (or simply server) The entity that terminates the EAP 234 authentication with the peer. When there is no Backend 235 Authentication Server, this term refers to the EAP 236 Authenticator. Where the EAP Authenticator operates in 237 pass-through mode, it refers to the Backend Authentication 238 Server. 240 EAX An authenticated-encryption with associated data mode of 241 operation for block ciphers, [3]. 243 Extended Master Session Key (EMSK) Additional keying material derived 244 between the EAP peer and server that is exported by the EAP 245 method. The EMSK is reserved for future uses that are not 246 defined yet and is not provided to a third party. Please 247 refer to [9] for more details. 248 EAP-PSK generates a 64-byte EMSK. 250 Initialization Vector (IV) A quantity of at least 64 bytes, suitable 251 for use in an initialization vector field, that is derived 252 between the peer and EAP server. Since the IV is a known 253 value in methods such as EAP-TLS [12], it cannot be used by 254 itself for computation of any quantity that needs to remain 255 secret. As a result, its use has been deprecated and EAP 256 methods are not required to generate it. Please refer to 257 [9] for more details. 258 EAP-PSK does not generate an IV. 260 Key-Derivation Key (KDK) A 16-byte key derived from the PSK that the 261 EAP peer and server use to derive session keys (namely, the 262 TEK, MSK and EMSK). 264 Message Authentication Code (MAC) Informally, the purpose of a MAC 265 is to provide assurances regarding both the source of a 266 message and its integrity [43]. IEEE 802.11i uses the 267 acronym MIC (Message Integrity Check) to avoid confusion 268 with the other meaning of the acronym MAC (Medium Access 269 Control). 271 Master Session Key (MSK) Keying material that is derived between the 272 EAP peer and server and exported by the EAP method. In 273 existing implementations a AAA server acting as an EAP 274 server transports the MSK to the Authenticator [9]. 275 EAP-PSK generates a 64-byte MSK. 277 Network Access Identifier (NAI) Identifier used to identify the 278 communicating parties [1]. 280 One Key CBC-MAC 1 (OMAC1) A method to generate a Message 281 Authentication Code [5]. OMAC1 is the variant of the OMAC 282 message authentication code family that is used by EAP-PSK. 284 Perfect Forward Secrecy (PFS) The confidence that the compromise of a 285 long-term private key does not compromise any earlier 286 session keys. In other words, once an EAP dialog is 287 finished and its corresponding keys are forgotten, even 288 someone who has recorded all of the data from the 289 connection and gets access to all of the long-term keys of 290 the peer and the server cannot reconstruct the keys used to 291 protect the conversation without doing a brute force search 292 of the session key space. 293 EAP-PSK does not have this property. 295 Pre-Shared Key (PSK) A Pre-Shared Key simply means a key in symmetric 296 cryptography. This key is derived by some prior mechanism 297 and shared between the parties before the protocol using it 298 takes place. It is merely a bit sequence of given length, 299 each bit of which has been chosen at random uniformly and 300 independently. For EAP-PSK, the PSK is the long term 16- 301 byte credential shared by the EAP peer and server. 303 Protected Result Indication Please refer to Section 7.16 of [2] for a 304 definition of this term. This feature has been introduced 305 because EAP-Success/Failure packets are unidirectional and 306 are not protected. 308 Transient EAP Key (TEK) A session key which is used to establish a 309 protected channel between the EAP peer and server during 310 the EAP authentication exchange. The TEK is appropriate 311 for use with the ciphersuite negotiated between the EAP 312 peer and server to protect the EAP conversation. Note that 313 the ciphersuite used to set up the protected channel 314 between the EAP peer and server during EAP authentication 315 is unrelated to the ciphersuite used to subsequently 316 protect data sent between the EAP peer and Authenticator 317 [9]. 318 EAP-PSK uses a 16-byte TEK for its protected channel, which 319 is the only ciphersuite available between the EAP peer and 320 server to protect the EAP conversation. This ciphersuite 321 uses AES-128 in the EAX mode of operation. 323 1.3 Conventions 325 All numbers presented in this document are considered in network-byte 326 order. 328 || denotes concatenation of strings (and not the logical OR). 330 MAC(K, String) denotes the MAC of String under the key K (the 331 algorithm used in this document to compute the MACs is OMAC1 with 332 AES-128, see Section 2.2.2). 334 [String] denotes the concatenation of String with the MAC of String 335 calculated as specified by the context. Hence, we have, with K 336 specified by the context: 337 [String]=String||MAC(K,String) . 339 ** denotes integer exponentiation. 341 "i" denotes the unsigned binary representation on 16 bytes of the 342 integer i in network byte order. Therefore this notation only makes 343 sense when i is between 0 and 2**128-1. 345 denotes the unsigned binary representation on 4 bytes of the 346 integer i in network byte order. Therefore this notation only makes 347 sense when i is between 0 and 2**32-1. 349 1.4 Related Work 351 At the time this document is written, only three EAP methods are 352 standards track EAP methods per IETF terminology (see [18]), namely: 354 o MD5-Challenge (EAP-Request/Response type 4), defined in [2], which 355 uses a MD5 challenge similar to [49]. 357 o OTP (EAP-Request/Response type 5), defined in [2], which aims at 358 providing One-Time Password support similar to [24] and [42]. 360 o GTC (EAP-Request/Response type 6), defined in [2], which aims at 361 providing Generic Token Card Support. 363 Unfortunately, all three methods are deprecated for security reasons 364 that are explained in part in [2]. 366 Myriads of EAP methods have however been otherwise proposed: 368 o One as an experimental RFC (EAP-TLS [12]) - which therefore is not 369 a standard (see [28]) 371 o Some as individual Internet-Drafts submissions (e.g., [46] or this 372 document). 374 o And some even undocumented (e.g., Rob EAP which has EAP-Request/ 375 Response type 31). 377 However, no secure and mature Pre-Shared Key EAP method is yet easily 378 and widely available, which is all the more regrettable that Pre- 379 Shared Key methods are the most basic ones! 381 The existing proposals for a future Pre-Shared Key EAP method are 382 briefly reviewed hereafter (please refer to [17] for a more thorough 383 synthesis on EAP methods). 385 Among these proposals, there are some which: 387 o Are broken from a security point of view, e.g.: 389 * LEAP which is specified in [41] and which vulnerabilities are 390 discussed in [54]. 392 * EAP-MSCHAPv2 which is specified in [36] and which 393 vulnerabilities are indirectly discussed in [47]. 395 o Essentially require additional infrastructure, e.g., EAP-SIM [27], 396 EAP-AKA [13] or OTP/token card methods like [33]. 398 o Are not shared key methods but often confused with them, namely 399 the password methods, e.g., EAP-SRP [19] or SPEKE [32] - which 400 wide adoption very unfortunately seem to be hindered by 401 Intellectual Property Rights issues. 403 o Are generic tunneling methods which do not essentially rely on 404 Pre-Shared Keys as they require a public-key certificate for the 405 server and allow the peer to authenticate with whatever EAP method 406 or even other non-EAP authentication mechanisms, namely [34] and 407 [23]. 409 o Are abandoned but have provided the basis for EAP-PSK, namely, 410 EAP-Archie [52]. 412 o Are possible alternatives to EAP-PSK (i.e., claimed to be secure 413 and subject of active work): 415 * EAP-FAST [46]. 417 * EAP-IKEv2 [51]. 419 * EAP-TLS (when shared key/password support is added to TLS, see 420 [55]). 422 EAP-PSK differs from the aforementioned methods on the following 423 points: 425 o No attacks on EAP-PSK within its threat model have yet been found. 427 o EAP-PSK was not designed to leverage a pre-existing 428 infrastructure. Thus, it does not inherit potential limitations 429 of such an infrastructure and it should be easier to deploy "from 430 scratch". 432 o EAP-PSK wished to avoid IPR blockages. 434 o EAP-PSK does not have any dependencies on protocols other than 435 EAP. 437 o EAP-PSK restricted to simply proposing a Pre-Shared Key method 438 with symmetric cryptography 440 * To remain simple to understand and implement 442 * To avoid potentially complex configurations and negotiations 444 o EAP-PSK was designed with efficiency in mind. 446 2. Protocol overview 448 Figure 1 presents an overview of the EAP-PSK protocol. 450 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++ ---+ 451 | | ^ 452 | EAP-PSK Protocol: a Pre-Shared Key EAP Method | | 453 | | | 454 | +----------+ | | 455 | | PSK | | | 456 | |(16 bytes)| | | 457 | +----------+ | | 458 | | | | 459 | v | | 460 | *********************** | | 461 | *Modified Counter Mode* | | 462 | *********************** | | 463 | | | | | 464 | v v | | 465 | +----------+ +----------+ +----------------+ | | 466 | | AK | | KDK | | RAND_P | | | 467 | |(16 bytes)| |(16 bytes)| |(16 bytes) | | | 468 | +----------+ +----------+ +----------------+ | | 469 | | | | | 470 | | | | | 471 | +-----------+ | | | | 472 | +--------+|Plain Text | | | | | 473 |+-------+|Header H||Var.Length | | | | | 474 ||Nonce N||22 bytes|+-----------+ v v Local | 475 ||4 bytes|+--------+ | *********************** to EAP | 476 |+-------+ | +--------+ +------*Modified Counter Mode* Method | 477 | | v v v *********************** | | 478 | | ******* +--------+ |64 |64 | | 479 | | * EAX *-------|TEK | |bytes |bytes | | 480 | +-->******* |16 bytes| | | | | 481 | | +--------+ | | | | 482 | +-----+----+ | | | | 483 | v v | | | | 484 |+--------+ +-------------------+ | | | | 485 ||Tag | |Cipher Text Payload| | | | | 486 ||16 bytes| | Variable length L | | | | | 487 |+--------+ +-------------------+ | | | V 488 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++ ---+ 489 | | ^ 490 +-+-+-+-+-++ +-+-+-+-+-++ | 491 |MSK | |EMSK | | 492 | | | | Exported | 493 +-+-+-+-+-++ +-+-+-+-+-++ by EAP | 494 | | Method | 495 | | | 496 V V | 497 ************************* V 498 * AAA Key Derivation * ---+ 499 * Naming & Binding * 500 ************************* 502 Figure 1: EAP-PSK overview 504 2.1 EAP-PSK key hierarchy 506 This section presents the key hierarchy used by EAP-PSK. This 507 hierarchy is inspired by the EAP Key hierarchy described in [9]. 509 2.1.1 The PSK 511 EAP-PSK uses a 16-byte Pre-Shared Key called the PSK as its initial 512 static credential. PSK is not a session key: it is a key that is 513 used to derive static long-lived keys for EAP-PSK. 515 This PSK is shared between the EAP peer and the EAP server. 517 EAP-PSK assumes that the PSK is known only to the EAP peer and EAP 518 server. The security properties of the protocol may be compromised 519 if it has wider distribution. 521 EAP-PSK also assumes the EAP server and EAP peer identify the correct 522 PSK to use with each other thanks to their respective NAIs. This 523 means that there MUST only be at most one PSK shared between an EAP 524 server using a given server NAI and an EAP peer using a given peer 525 NAI. 527 This PSK is used, as shown in Figure 2, to derive two 16-byte static 528 long-lived subkeys, respectively called the Authentication Key (AK) 529 and the Key-Derivation Key (KDK). This derivation should only be 530 done once: it is called the key setup. For an explanation of why PSK 531 is not used a static long-lived key but only as the initial keying 532 material from which the static long-lived keys, AK and KDK, that are 533 actually used by the protocol EAP-PSK, see Section 2.2.1. 535 +---------------------------+ 536 | PSK | 537 | (16 bytes) | 538 +---------------------------+ 539 | | 540 v v 541 +---------------------------+ +---------------------------+ 542 | AK | | KDK | 543 | (16 bytes) | | (16 bytes) | 544 +---------------------------+ +---------------------------+ 546 Figure 2: Derivation of AK and KDK from the PSK 548 2.1.1.1 AK 550 EAP-PSK uses AK to mutually authenticate the EAP peer and the EAP 551 server. 553 AK is a static long-lived key derived from the PSK, see 554 Section 2.2.1. AK is not a session key. 556 The EAP server and EAP peer identify the correct AK to use with each 557 other thanks to their respective NAIs. This means that there MUST 558 only be at most one AK shared between an EAP server using a given 559 server NAI and an EAP peer using a given peer NAI. This is the case 560 when there is at most one PSK shared between an EAP server using a 561 given server NAI and an EAP peer using a given peer NAI, see 562 Section 2.1.1. 564 The EAP peer chooses the AK to use based on the EAP server NAI that 565 has been sent by the EAP server in the first EAP-PSK message (namely 566 ID_S, see Section 2.3.1) and the EAP peer NAI it chooses to include 567 in the second EAP-PSK message (namely ID_P, see Section 2.3.1). 569 2.1.1.2 KDK 571 EAP-PSK uses KDK to derive session keys shared by the EAP peer and 572 the EAP server (namely, the TEK, MSK and EMSK). 574 KDK is a static long-lived key derived from the PSK, see 575 Section 2.2.1. KDK is not a session key. 577 The EAP server and EAP peer identify the correct AK to use with each 578 other thanks to their respective NAIs. This means that there MUST 579 only be at most one AK shared between an EAP server using a given 580 server NAI and an EAP peer using a given peer NAI. This is the case 581 when there is at most one PSK shared between an EAP server using a 582 given server NAI and an EAP peer using a given peer NAI, see 583 Section 2.1.1. 585 The EAP peer chooses the AK to use based on the EAP server NAI that 586 has been sent by the EAP server in the first EAP-PSK message (namely 587 ID_S, see Section 2.3.1) and the EAP peer NAI it chooses to include 588 in the second EAP-PSK message (namely ID_P, see Section 2.3.1). 590 2.1.2 The TEK 592 EAP-PSK derives a 16-byte TEK thanks to a random number exchanged 593 during authentication (RAND_P, see Section 3.1) and KDK. 595 This TEK is used to implement a protected channel for both mutually 596 authenticated parties to communicate over securely. 598 2.1.3 The MSK 600 EAP-PSK derives a MSK thanks to a random number exchanged during 601 authentication (RAND_P, see Section 3.1) and the KDK. 603 The MSK is 64 bytes long, which complies with [2]. 605 2.1.4 The EMSK 607 EAP-PSK derives an EMSK thanks to a random number exchanged during 608 authentication (RAND_P, see Section 3.1) and the KDK. 610 The EMSK is 64 bytes long, which complies with [2]. 612 2.1.5 The IV 614 EAP-PSK does not derive any IV, which complies with [9]. 616 2.2 Cryptographic design of EAP-PSK 618 EAP-PSK relies on a single cryptographic primitive, a block cipher, 619 which is instantiated with AES-128. AES-128 takes a 16-byte Pre- 620 Shared Key and a 16-byte Plain Text block as inputs. It outputs a 621 16-byte Cipher Text block. For a detailed description of AES-128, 622 please refer to [7]. 624 AES-128 has been chosen because: 626 o It is standardized and implementations are widely available. 628 o It has been carefully reviewed by the cryptographic community and 629 is believed to be secure. 631 Other block ciphers could easily be proposed for EAP-PSK, as EAP-PSK 632 does not intricately depend on AES-128. The only parameters of AES- 633 128 that EAP-PSK depends on, are the AES-128 block and key size (16 634 bytes). For the sake of simplicity, EAP-PSK has however been chosen 635 to restrict to a single mandatory block cipher and not allow the 636 negotiation of other block ciphers. In case AES-128 is deprecated 637 for security reasons, EAP-PSK should also be deprecated and a cut- 638 and-paste EAP-PSK' should be defined with another block cipher. This 639 EAP-PSK' should not be backward compatible with EAP-PSK because of 640 the security issues with AES-128. EAP-PSK' should therefore use a 641 different EAP-Request/Response Type number. With the EAP-Request/ 642 Response Type number space structure defined in [2], this should not 643 be a problem. 645 EAP-PSK uses three cryptographic parts: 647 o A key setup to derive AK and KDK from the PSK. 649 o An authenticated key exchange protocol to mutually authenticate 650 the communicating parties and derive session keys. 652 o A protected channel protocol for both mutually authenticated 653 parties to communicate over. 655 Each part is discussed in more detail in the subsequent paragraphs. 657 2.2.1 The Key Setup 659 EAP-PSK needs two cryptographically separated 16-byte subkeys for 660 mutual authentication and session key derivation. Indeed, it is a 661 rule of the thumb in cryptography to use different keys for different 662 applications. 664 It could have implemented these two subkeys either by specifying a 665 32-byte PSK that would then be split in two 16-byte subkeys, or by 666 specifying a 16-byte PSK that would then be cryptographically 667 expanded to two 16-byte subkeys. 669 Because provisioning a 32-byte long term credential is more 670 cumbersome than a 16-byte one, and the strength of the derived 671 session keys is 16 bytes either ways, the latter option was chosen. 673 Hence, the PSK is only used by EAP-PSK to derive AK and KDK. This 674 derivation should be done only once, immediately after the PSK has 675 been provisioned. As soon as AK and KDK have been derived, the PSK 676 should be deleted. If the PSK is deleted, it should be done so 677 securely (see, for instance, [20] for guidance on secure deletion of 678 the PSK). 680 Derivation of AK and KDK from the PSK is called the key setup: 682 o The input to the key setup is the PSK. 684 o The outputs of the key setup are AK and KDK. 686 AK and KDK are derived from the PSK using the modified counter mode 687 of operation of AES-128. The modified counter mode is a length 688 increasing function, i.e., it expands one AES-128 input block into a 689 longer t-block output, where t>=2. This mode was chosen for the key 690 setup because it had already been chosen for the derivation of the 691 session keys (see Section 2.2.2). 693 The details of the derivation of AK and KDK from the PSK are shown in 694 Figure 3. 696 +--------------------------+ 697 | "0" | 698 | Input Block (16 bytes) | 699 +--------------------------+ 700 | 701 v 702 +----------------+ 703 | | 704 | AES-128(PSK,.) | 705 | | 706 +----------------+ 707 | 708 | 709 +----------------------------+ 710 | | 711 v v 712 +--------+ +---+ +--------+ +---+ 713 | c1="1" |->|XOR| | c2="2" |->|XOR| 714 |16 bytes| +---+ |16 bytes| +---+ 715 +--------+ | +--------+ | 716 | | 717 +----------------+ +----------------+ 718 | | | | 719 | AES-128(PSK,.) | | AES-128(PSK,.) | 720 | | | | 721 +----------------+ +----------------+ 722 | | 723 | | 724 v v 725 +------------------------+ +------------------------+ 726 | AK | | KDK | 727 | (16 bytes) | | (16 bytes) | 728 +------------------------+ +------------------------+ 730 Figure 3: Derivation of AK and KDK from the PSK in Details 732 The input block is "0". For the sake of simplicity, this input block 733 has been chosen constant: it could have been set to a value depending 734 on the peer and the server (for instance, the XOR of their respective 735 NAIs appropriately truncated or zero-padded), but this did not seem 736 to add much security to the scheme, whereas it added complexity. Any 737 16-byte constant could have been chosen, as the security is not 738 supposed to depend on the particular value taken by the constant. "0" 739 was arbitrarily chosen. 741 2.2.2 The Authenticated Key Exchange 743 The authentication protocol used by EAP-PSK is inspired of AKEP2 744 which is described in [15]. 746 AKEP2 consists of a one and half round trip exchange, as shown in 747 Figure 4. 749 Bob Alice 750 | A||RA | 751 |<---------------------------------------------------------| 752 | | 753 | [B||A||RA||RB] | 754 |--------------------------------------------------------->| 755 | | 756 | [A||RB] | 757 |<---------------------------------------------------------| 759 Figure 4: Overview of AKEP2 761 In AKEP2, 763 o RA and RB are random numbers chosen respectively by Alice and Bob. 765 o A and B are Alice's and Bob's respective identities. They allow 766 Alice and Bob to retrieve the key that they have to use to run an 767 authenticated key exchange between each other. They are also 768 included in the protocol for cryptographic reasons. 770 o The MACs (see Section 1.3 for the notation "[]") are calculated 771 using a dedicated key. 773 EAP-PSK instantiates this protocol with: 775 o The server as Alice and the peer as Bob. 777 o RA and RB as 16-byte random numbers, using Section 2.3.1 778 notations, this means RA=RAND_S and RB=RAND_P. 780 o A and B as Alice's and Bob's respective NAIs, using Section 2.3.1 781 notations, this means A=ID_S and B=ID_P.. 783 o The MAC algorithm as OMAC1 with AES-128 using AK and producing a 784 tag length of 16 bytes. 786 o The modified counter mode of operation of AES-128 using KDK, to 787 derive session keys as a result of this exchange. 789 OMAC1 was chosen as the MAC algorithm because it is capable of 790 handling of arbitrary length messages, and its design is simple. It 791 also enjoys up to date review by the cryptographic community, 792 especially using provable security concepts. It has been recommended 793 by the NIST under the name CMAC . For a detailed description of 794 OMAC1, please refer to [5]. 796 In AKEP2 the key exchange is "implicit": the session keys are derived 797 from RB. In EAP-PSK, the session keys are thus derived from RAND_P 798 by using KDK and the modified counter mode of operation of AES-128 799 described in [4]. This mode was chosen because it is a simple key 800 derivation schemes that relies on a block cipher and has a proof of 801 its security. It is a length increasing function, i.e., it expands 802 one AES-128 input block into a longer t-block output, where t>=2. 803 The derivation of the session keys is shown in Figure 5. 805 +--------------------------+ +-------------------------------+ 806 | RAND_P | | KDK | 807 | Input Block (16 bytes) | | Key Derivation Key (16 bytes) | 808 +--------------------------+ +-------------------------------+ 809 | | 810 v v 811 +-----------------------------------------------------------------+ 812 | | 813 | Modified Counter Mode | 814 | | 815 +-----------------------------------------------------------------+ 816 | | | 817 v v v 818 +------------+ +----------------------+ +----------------------+ 819 | TEK | | MSK | | EMSK | 820 | (16 bytes) | | (64 bytes) | | (64 bytes) | 821 +------------+ +----------------------+ +----------------------+ 823 Figure 5: Derivation of the Session Keys 825 The input to the derivation of the session keys is RAND_P. 827 The outputs of the derivation of the session keys are: 829 * The 16-byte TEK (the first output block). 831 * The 64-byte MSK (the concatenation of the second to fifth 832 output blocks). 834 * The 64-byte EMSK (the concatenation of the sixth to ninth 835 output blocks). 837 The details of the derivation of the session keys are shown in 838 Figure 6. 840 +--------------------------+ 841 | RB | 842 | Input Block (16 bytes) | 843 +--------------------------+ 844 | 845 v 846 +----------------+ 847 | | 848 | AES-128(KDK,.) | 849 | | 850 +----------------+ 851 | 852 | 853 +---------------------+-- - - - - - - - - - --+ 854 | | | 855 v v v 856 +--------+ +---+ +--------+ +---+ +--------+ +---+ 857 | c1="1" |->|XOR| | c2="2" |->|XOR|.......| c9="9" |->|XOR| 858 |16 bytes| +---+ |16 bytes| +---+ |16 bytes| +---+ 859 +--------+ | +--------+ | +--------+ | 860 | | | 861 +----------------+ +----------------+ +----------------+ 862 | | | | | | 863 | AES-128(KDK,.) | | AES-128(KDK,.) |......| AES-128(KDK,.) | 864 | | | | | | 865 +----------------+ +----------------+ +----------------+ 866 | | | 867 | | | 868 v v v 869 +-----------------+ +-----------------+ +------------------+ 870 | Output Block #1 | | Output Block #2 | | Output Block #9 | 871 | (16 bytes) | | (16 bytes) |.....| (16 bytes) | 872 | TEK | | MSK (block 1/4) | | EMSK (block 4/4) | 873 +-----------------+ +-----------------+ +------------------+ 875 Figure 6: Derivation of the Session Keys in Details 877 The counter values are set respectively to the first t integers (that 878 is ci="i", with i=1 to 9). 880 Keying material is sensitive information and should be handled 881 accordingly (see Section 6.10 for further discussion. 883 2.2.3 The Protected Channel 885 EAP-PSK provides a protected channel for both parties to communicate 886 over, in case of a successful authentication. This protected channel 887 is currently used to exchange protected result indications and may be 888 used in the future to implement extensions. 890 EAP-PSK uses the EAX mode of operation to provide this protected 891 channel. For a detailed description of EAX, please refer to [3]. 892 Figure 7 shows how EAX is used to implement EAP-PSK protected 893 channel. 895 +-----------+ +----------------+ +---------------------+ +----------+ 896 | Nonce N | | Header H | | Plain Text Payload | | TEK | 897 | 4 bytes | | 22 bytes | | Variable length L | | 16 bytes | 898 +-----------+ +----------------+ +---------------------+ +----------+ 899 | | | | 900 v v v v 901 +-------------------------------------------------------------------+ 902 | | 903 | EAX | 904 | | 905 +-------------------------------------------------------------------+ 906 | | 907 v v 908 +---------------------+ +----------+ 909 | Cipher Text Payload | | Tag | 910 | Variable length L | | 16 bytes | 911 +---------------------+ +----------+ 913 Figure 7: The Protected Channel 915 This protected channel: 917 o Provides replay protection. 919 o Encrypts and authenticates a Plain Text Payload that becomes an 920 Encrypted Payload. The Plain Text Payload must not exceed 960 921 bytes, see Section 3.3, Section 3.4 and Section 6.11. 923 o Only authenticates a Header that is thus sent in clear. 925 EAX is instantiated with AES-128 as the underlying block cipher. 927 AES-128 is keyed with the TEK. 929 The nonce N is used to provide cryptographic security to the 930 encryption and data origin authentication as well as protection 931 replay. Indeed, N is a 4-byte sequence number starting from <0> that 932 is monotonically incremented at each EAP-PSK message within one EAP- 933 PSK dialog, except retransmissions of course. 934 N was taken to be 4 bytes to avoid 16-byte arithmetic. Since EAX 935 uses a 16-byte nonce, N is padded with 96 zero bits for its high 936 order bits. 937 For cryptographic reasons, N is not allowed to wrap around. In the 938 unlikely, yet possible, event of the server sending an EAP-PSK 939 message with N set to <2**32-2>, it must not send any further message 940 on this protected channel, which would cause to reuse the value 0. 941 Either the conversation is finished after the server receives the 942 EAP-PSK answer from the peer with N set to <2**32-1> and the server 943 proceeds (typically by sending an EAP-Success or Failure), or the 944 conversation is not finished and must then be aborted (a new EAP-PSK 945 dialog may subsequently be started to try again to authenticate). 946 Thus, the maximum number of messages that can be exchanged over the 947 same protected channel is 2**32 (which should not be a limitation in 948 practice as this is approximately equal to 4 billions). 950 The Header H consists in the first 22 bytes of the EAP Request or 951 Response packet (i.e. the EAP Code, Identifier, Length and Type 952 fields followed by the EAP-PSK Flags and RAND_S fields). Although it 953 may appear unorthodox that an upper layer (EAP-PSK) protects some 954 information of the lower layer (EAP), this was chosen to comply with 955 EAP recommendation (see Section 7.5. of [2]) and seems to be existing 956 practice at IETF (see, for instance, [38]). 958 The Plain Text Payload is the payload that is to be encrypted and 959 integrity protected. The Cipher Text payload is the result of the 960 encryption of the Plain Text. 962 The Tag is a MAC that protects both the Header and the Plain Text 963 Payload. 964 The verification of the Tag must only be done after a successful 965 verification of the Nonce for replay protection. 966 If the verification of the Tag succeeds, then the Encrypted Payload 967 is decrypted to recover the Plain Text Payload. If the verification 968 of the Tag fails, then no decryption is performed and this MAC 969 failure should be logged. 970 The tag length is chosen to be 16 bytes for EAX within EAP-PSK. This 971 length is considered appropriate by the cryptographic community. 973 EAX was mainly chosen because: 975 o It strongly relies on OMAC in its design and OMAC1, a variant of 976 OMAC, had already been chosen in EAP-PSK for the authentication 977 part. 979 o Its design is simple. 981 o It enjoys a security proof. 983 o It is free of any Intellectual Property Rights claims. 985 2.3 EAP-PSK Message Flows 987 EAP-PSK may consist of two different types of message flows: 989 o The "standard authentication", which is: 991 * Mandatory to implement. 993 * Fully specified in this document. 995 * The simpler type of message flow, which is expected to be used 996 most frequently. 998 o The "extended authentication", which is: 1000 * Optional to implement (i.e., there are no mandatory 1001 extensions). 1003 * Partly specified in this document since it depends on 1004 extensions and none are currently specified, let alone in this 1005 document. 1007 * The type of message flow that should be used when extensions of 1008 EAP-PSK are needed by more sophisticated usage scenarios and 1009 are available. 1011 EAP-PSK introduces the concept of session to facilitate its analysis 1012 and provide a cleaner interface to other layers. A session is a 1013 particular instance of an EAP-PSK dialog between two parties. This 1014 session is identified by a session identifier. 1016 In the first EAP-PSK message, the EAP server asserts its identity. 1017 Given that the EAP-Request/Identity and EAP-Response/Identity may not 1018 be assumed to have occured prior to this sending and that the 1019 response included in EAP-Response/Identity (if this EAP Identity 1020 exchange takes) place may not contain the actual NAI the peer shall 1021 use with EAP-PSK, this means that an EAP server implementing EAP-PSK 1022 must use the same EAP server NAI for all EAP-PSK dialogs with any EAP 1023 peer implementing EAP-PSK. 1025 2.3.1 EAP-PSK Standard Authentication 1027 EAP-PSK standard authentication is comprised of four messages, i.e., 1028 two round trips; see Figure 8. 1030 peer server 1031 | Flags||RAND_S||ID_S | 1032 |<---------------------------------------------------------| 1033 | | 1034 | Flags||RAND_S||RAND_P||MAC_P||ID_P | 1035 |--------------------------------------------------------->| 1036 | | 1037 | Flags||RAND_S||MAC_S||PCHANNEL_S_0 | 1038 |<---------------------------------------------------------| 1039 | | 1040 | Flags||RAND_S||PCHANNEL_P_1 | 1041 |--------------------------------------------------------->| 1042 | | 1044 Figure 8: EAP-PSK Standard Authentication 1046 o The first message is sent by the server to the peer to: 1048 * Send a 16-byte random challenge (RAND_S). RAND_S was called RA 1049 in Section 2.2.2 1051 * State its identity (ID_S). ID_S was denoted by A in 1052 Section 2.2.2. 1054 o The second message is sent by the peer to the server to: 1056 * Send another 16-byte random challenge (RAND_P). RAND_P was 1057 called RB in Section 2.2.2 1059 * State its identity (ID_P). ID_P was denoted by B in 1060 Section 2.2.2. 1062 * Authenticate to the server by proving that it is able to 1063 compute a particular MAC (MAC_P), which is a function of the 1064 two challenges and AK: 1065 MAC_P = OMAC1-AES-128(AK, ID_P||ID_S||RAND_S||RAND_P) 1067 o The third message is sent by the server to the peer to: 1069 * Authenticate to the peer by proving that it is able to compute 1070 another MAC (MAC_S), which is a function of the peer's 1071 challenge and AK: 1072 MAC_S = OMAC1-AES-128(AK, ID_S||RAND_P) 1074 * Set up the protected channel (P_CHANNEL_S_0) to: 1076 + Confirm that it has derived session keys (at least the TEK). 1078 + Give a protected result indication of the authentication. 1080 o The fourth message is sent by the peer to the server to finish the 1081 setup of the protected channel (P_CHANNEL_P_1) to: 1083 * Confirm that it has derived session keys (at least the TEK). 1085 * Give a protected result indication of the authentication. 1087 The PCHANNEL_S_0 and PCHANNEL_P_1 fields of the third and fourth EAP- 1088 PSK messages contain a MAC computed thanks to TEK that protects the 1089 integrity of the messages. For a detailed list of the fields of the 1090 messages that are integrity protected please refer to Section 2.2.3. 1092 All EAP-PSK messages include a sort of header which is comprised of 1093 two fields: 1095 o Flags, a 1-byte field that is currently only used to number EAP- 1096 PSK messages. 1098 o RAND_S, a 16-byte challenge sent by the server that is used as a 1099 session identifier. 1101 This standard message flow could be comprised of only three messages, 1102 like AKEP2, were it not the request/response nature of EAP that 1103 prevents the third message to be the last one. Since the fourth 1104 message is mandatory, EAP-PSK chose to take advantage of this and set 1105 up a protected channel. 1107 The standard message flow also includes a statement by the peer of 1108 its identity, in addition to the EAP-Response/Identity it may have 1109 sent. This behavior follows Section 5.1 of [2] which recommends that 1110 the EAP-Response/Identity be used primarily for routing purposes and 1111 selecting which EAP method to use, and therefore that EAP methods 1112 include a method-specific mechanism for obtaining the identity, so 1113 that they do not have to rely on the Identity Response. 1115 When a party receives an EAP-PSK message, it checks that the message 1116 is syntaxically valid in accordance with the message formats defined 1117 in Section 3. If the message is syntaxically incorrect, then it is 1118 silently discarded.Then it checks the cryptographic validity of this 1119 message, i.e. it checks the MAC(s), namely 1121 o If the received message is the first EAP-PSK message, there is no 1122 MAC to check as none is included in message 1. 1124 o If the received message is the second EAP-PSK message, the 1125 validity of MAC_P is checked. 1127 o If the received message is the third EAP-PSK message, the validity 1128 of MAC_S is checked and then the validity of the Tag included in 1129 P_CHANNEL_S_0 is checked. The validity checks must be done in 1130 this order to avoid unnecessarily deriving TEK, MSK and EMSK in 1131 case MAC_S is invalid, meaning that mutual authentication has 1132 failed. Indeed, TEK is used to verify the validity of the Tag 1133 included in P_CHANNEL_S_0. 1135 o If the received message is the fourth EAP-PSK message, the 1136 validity of the Tag included in P_CHANNEL_P_1 is checked. 1138 In case a validity check fails, the message is silently discarded. 1139 There can be a counter to track the number of silently discarded 1140 messages Section 6.8. In case, there is an encrypted payload in the 1141 message (namely in the PCHANNEL attribute), then the encrypted 1142 payload is decrypted. Then, if the decrypted payload is syntaxically 1143 incorrect then the message is silently discarded. 1145 2.3.2 EAP-PSK Extended Authentication 1147 To remain simple and yet be extensible to meet future requirements, 1148 EAP-PSK provides an extension mechanism within its protected channel: 1149 the payload of the protected channel may contain an optional 1150 extension field (EXT). 1152 Figure 9 presents the message sequence for EAP-PSK extended 1153 authentication. 1155 Although support of the EXT field is mandatory, there is no mandatory 1156 extension type to support. The mandatory support of the EXT field is 1157 dictated: 1159 o To guarantee a robust behavior in the future where some peers 1160 might support some extensions and others not. All peers will thus 1161 be able to understand that an extended authentication is being 1162 attempted and indicate whether or not they support the extension 1163 that is tried. 1165 o To ensure that all implementations will indeed be extensible. 1167 No extension is currently defined. 1169 At most One extension may be run within a single EAP-PSK dialog: 1170 there can neither be sequences of extensions nor interleaved 1171 extensions. However, extensions may take a variable number of round 1172 trips to complete. 1174 Only the server can start an extension and, if it does so, it must 1175 start it in the first payload it sends over the protected channel. 1177 peer server 1178 | Flags||RAND_S||ID_S | 1179 |<---------------------------------------------------------| 1180 | | 1181 | Flags||RAND_S||RAND_P||MAC_P||ID_P | 1182 |--------------------------------------------------------->| 1183 | | 1184 | Flags||RAND_S||MAC_S||PCHANNEL_S_0(EXT) | 1185 |<---------------------------------------------------------| 1186 | | 1187 | Flags||RAND_S||PCHANNEL_P_1(EXT) | 1188 |--------------------------------------------------------->| 1189 | | 1190 . . 1191 . . 1192 . . 1193 | Flags||RAND_S||PCHANNEL_S_2i(EXT) | 1194 |<---------------------------------------------------------| 1195 | | 1196 | Flags||RAND_S||PCHANNEL_P_2i+1(EXT) | 1197 |--------------------------------------------------------->| 1198 | | 1200 Figure 9: EAP-PSK Extended Authentication 1202 Please refer to Section 4 for more details on how extended 1203 authentication works. 1205 The PCHANNEL_S_2j and PCHANNEL_P_2j+1 fields of the EAP-PSK messages 1206 (where j varies from 0 to i) contain a MAC computed thanks to TEK 1207 that protects the integrity of the messages. For a detailed list of 1208 the fields of the messages that are integrity protected please refer 1209 to Section 2.2.3. 1211 When a party receives an EAP-PSK message, it checks that the message 1212 is syntaxically valid in accordance with the message formats defined 1213 in Section 3. If the message is syntaxically incorrect, then it is 1214 silently discarded.Then it checks the cryptographic validity of this 1215 message, i.e. it checks the MAC(s), namely 1217 o If the received message is the first EAP-PSK message, there is no 1218 MAC to check as none is included in message 1. 1220 o If the received message is the second EAP-PSK message, the 1221 validity of MAC_P is checked. 1223 o If the received message is the third EAP-PSK message, the validity 1224 of MAC_S is checked and then the validity of the Tag included in 1225 P_CHANNEL_S_0 is checked. The validity checks must be done in 1226 this order to avoid unnecessarily deriving TEK, MSK and EMSK in 1227 case MAC_S is invalid, meaning that mutual authentication has 1228 failed. Indeed, TEK is used to verify the validity of the Tag 1229 included in P_CHANNEL_S_0. 1231 o If the received message is the fourth EAP-PSK message, the 1232 validity of the Tag included in P_CHANNEL_P_1 is checked. 1234 o If the received message is an EAP-PSK message different from the 1235 first four ones, then validity of the Tag included in P_CHANNEL is 1236 checked 1238 In case a validity check fails, the message is silently discarded. 1239 There can be a counter to track the number of silently discarded 1240 messages Section 6.8. In case, there is an encrypted payload in the 1241 message (namely in the PCHANNEL attribute), then the encrypted 1242 payload is decrypted. Then, if the decrypted payload is syntaxically 1243 incorrect then the message is silently discarded. 1245 3. EAP-PSK Message format 1247 For the sake of simplicity, EAP-PSK uses a fixed message format. 1248 There are four different types of EAP-PSK messages: 1250 o The first EAP-PSK message, which is sent by the server to the 1251 peer. 1253 o The second EAP-PSK message, which is sent by the peer to the 1254 server. 1256 o The third EAP-PSK message, which is sent by the server to the 1257 peer. 1259 o The fourth EAP-PSK message, which is sent by the peer to the 1260 server. This is also the type of the message that the peer 1261 further sends to the server in case of an extended authentication. 1262 This is also essentially the type of message that the server 1263 further sends to the peer in case of an extended authentication: 1264 the only slight modification that occurs in this last case is the 1265 setting of the EAP Code to 1 instead of 2 in the other cases. 1267 For the sake of clarity, the whole EAP packet that encapsulates the 1268 EAP-PSK message, i.e., the EAP-PSK message plus its EAP headers, are 1269 depicted in Figure 10, Figure 12, Figure 13 and Figure 17. 1271 3.1 EAP-PSK First Message 1273 The first EAP-PSK message is sent by the server to the peer. It has 1274 the format presented in Figure 10. 1276 0 1 2 3 1277 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1279 | Code=1 | Identifier | Length | 1280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1281 | Type EAP-PSK | Flags | | 1282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1283 | | 1284 + + 1285 | RAND_S | 1286 + + 1287 | | 1288 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1289 | | | 1290 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1291 : : 1292 : ID_S : 1293 : : 1294 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1295 | | 1296 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1298 Figure 10: EAP-PSK First Message 1300 The first EAP-PSK message consists of: 1302 o A 1-byte Flags field 1304 o A 16-byte random number: RAND_S 1306 o A variable length field that conveys the server's NAI: ID_S. The 1307 length of this field is deduced from the EAP length field. The 1308 length of this NAI must not exceed 966 bytes. This restriction 1309 aims at avoiding fragmentation issues (see Section 6.11). 1311 The Flags field has the format presented in Figure 11. 1313 0 1314 0 1 2 3 4 5 6 7 8 1315 +-+-+-+-+-+-+-+-+ 1316 | T | Reserved | 1317 +-+-+-+-+-+-+-+-+ 1319 Figure 11: EAP-PSK Flags Field 1321 The Flags field is comprised of two subfields: 1323 o A 2-bit T subfield which indicates the type of the EAP-PSK 1324 message: 1326 * T=0 for the first EAP-PSK message presented in Section 3.1. 1328 * T=1 for the second EAP-PSK message presented in Section 3.2. 1330 * T=2 for the third EAP-PSK message presented in Section 3.3. 1332 * T=3 for the fourth EAP-PSK message presented in Section 3.4 and 1333 the subsequent EAP-PSK messages that may be exchanged during 1334 extended authentication. 1336 o A 6-bit Reserved subfield that is set to zero on transmission and 1337 ignored on reception. 1339 The PCHANNEL Nonce field N (see Section 3.3) is used to distinguish 1340 between the different EAP-PSK messages that may be exchanged during 1341 extended authentication which all have T set to 3, i.e., the fourth 1342 EAP-PSK message and possibly the next ones. 1344 3.2 EAP-PSK Second Message 1346 The second EAP-PSK message is sent by the peer to the server. It has 1347 the format presented in Figure 12. 1349 0 1 2 3 1350 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1351 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1352 | Code=2 | Identifier | Length | 1353 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1354 | Type EAP-PSK | Flags | | 1355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1356 | | 1357 + + 1358 | RAND_S | 1359 + + 1360 | | 1361 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1362 | | | 1363 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1364 | | 1365 + + 1366 | RAND_P | 1367 + + 1368 | | 1369 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1370 | | | 1371 +-+-+-+-+-+-+-+-+ + 1372 | | 1373 + + 1374 | MAC_P | 1375 + + 1376 | | 1377 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1378 | | | 1379 +-+-+-+-+-+-+-+-+ + 1380 : ID_P : 1381 : : 1382 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1383 | | 1384 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1386 Figure 12: EAP-PSK Second Message 1388 It consists of: 1390 o A 1-byte Flags field 1392 o The 16-byte random number sent by the server in the first EAP-PSK 1393 message (RAND_S) that serves as a session identifier 1395 o A 16-byte random number: RAND_P 1396 o A 16-byte MAC: MAC_P 1398 o A variable length field that conveys the peer's NAI: ID_P. The 1399 length of this field is deduced from the EAP length field. The 1400 length of this NAI must not exceed 966 bytes. This restriction 1401 aims at avoiding fragmentation issues (see Section 6.11). 1403 The Flags field format is presented in Figure 11. 1405 3.3 EAP-PSK Third Message 1407 The third EAP-PSK message is sent by the server to the peer. It has 1408 the format presented in Figure 13. 1410 0 1 2 3 1411 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1412 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1413 | Code=1 | Identifier | Length | 1414 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1415 | Type EAP-PSK | Flags | | 1416 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1417 | | 1418 + + 1419 | RAND_S | 1420 + + 1421 | | 1422 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1423 | | | 1424 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1425 | | 1426 + + 1427 | MAC_S | 1428 + + 1429 | | 1430 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1431 | | | 1432 +-+-+-+-+-+-+-+-+ + 1433 : PCHANNEL : 1434 : : 1435 : : 1436 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1437 | | 1438 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1440 Figure 13: EAP-PSK Third Message 1442 It consists of: 1444 o A 1-byte Flags field 1446 o The 16-byte random number sent by the server in the first EAP-PSK 1447 message (RAND_S) that is used as a session identifier 1449 o A 16-byte MAC: MAC_S 1451 o A variable length field that constitutes the protected channel: 1452 PCHANNEL 1454 The Flags field format is presented in Figure 11. 1456 If there is no extension, i.e., if the authentication is standard, 1457 the PCHANNEL field consists of: 1459 o A 4-byte Nonce N (see Section 2.2.3). 1461 o A 16-byte Tag (see Section 2.2.3). 1463 o A 2-bit result indication flag R. 1465 o A 1-bit extension flag E, which is set to 0. 1467 o A 5-bit Reserved field, which is set to zero on emission and 1468 ignored on reception. 1470 R, E and Reserved are sent encrypted by the protected channel (see 1471 Section 2.2.3). 1473 If there is no extension, PCHANNEL has the format presented in 1474 Figure 14 (where R, E and Reserved are presented in the clear for the 1475 sake of clarity, although in reality they are sent encrypted). 1477 0 1 2 3 1478 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1479 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1480 | Nonce | 1481 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1482 | | 1483 + + 1484 | Tag | 1485 + + 1486 | | 1487 + + 1488 | | 1489 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1490 | R |0| Reserved| 1491 +-+-+-+-+-+-+-+-+ 1493 Figure 14: The PCHANNEL Field with E=0 1495 If there is an extension, i.e., if the authentication is extended, 1496 the PCHANNEL field consists of: 1498 o A 4-byte Nonce N (see Section 2.2.3). 1500 o A 16-byte Tag (see Section 2.2.3). 1502 o A 2-bit result indication flag R. 1504 o A 1-bit extension flag E, which is set to 1. 1506 o A 5-bit Reserved field, which is set to zero on emission and 1507 ignored on reception. 1509 o A variable length EXT field. 1511 R, E, Reserved and EXT are sent encrypted by the protected channel 1512 (see Section 2.2.3). 1514 If there is an extension, PCHANNEL has the format presented in 1515 Figure 15 where R, E, Reserved and EXT are presented in the clear for 1516 the sake of clarity, although in reality they are sent encrypted).. 1518 0 1 2 3 1519 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1520 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1521 | Nonce | 1522 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1523 | | 1524 + + 1525 | Tag | 1526 + + 1527 | | 1528 + + 1529 | | 1530 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1531 | R |1| Reserved| | 1532 +-+-+-+-+-+-+-+-+ + 1533 : EXT : 1534 : : 1535 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1536 | | 1537 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1539 Figure 15: The PCHANNEL Field with E=1 1541 This EXT field is split in two subfields: 1543 o The EXT_Type subfield which indicates the type of the extension 1545 o The EXT_Payload subfield which consists in the payload of the 1546 extension. The EXT_Payload length is derived from the EAP Length 1547 field. EXT_Payload must have a bit-length that is a multiple of 8 1548 bits and must not exceed 960 bytes. The latter restriction aims 1549 at avoiding fragmentation issues (see Section 6.11) whereas the 1550 former comes from the EAP length being specified in bytes. 1552 The format of the EXT field is presented in Figure 16. 1554 0 1 2 3 1555 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1557 | EXT_Type | | 1558 +-+-+-+-+-+-+-+-+ + 1559 : EXT_Payload : 1560 : : 1561 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1562 | | 1563 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1565 Figure 16: The EXT Field 1567 3.4 EAP-PSK Fourth Message 1569 The fourth EAP-PSK message is sent by the peer to the server. It has 1570 the format presented in Figure 17. 1572 0 1 2 3 1573 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1574 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1575 | Code=2 | Identifier | Length | 1576 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1577 | Type EAP-PSK | Flags | | 1578 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1579 | | 1580 + + 1581 | RAND_S | 1582 + + 1583 | | 1584 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1585 | | | 1586 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1587 : : 1588 : PCHANNEL : 1589 : : 1590 : : 1591 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1592 | | 1593 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1595 Figure 17: EAP-PSK Fourth Message 1597 It consists of: 1599 o A 1-byte Flags field 1601 o The 16-byte random number sent by the server in the first EAP-PSK 1602 message (RAND_S) that is used as a session identifier 1604 o A variable length field that constitutes the protected channel: 1605 PCHANNEL 1607 The Flags field format is presented in Figure 11. 1609 The PCHANNEL field has the following structure, which was already 1610 described in Section 3.3. 1612 If there is no extension, i.e., if the authentication is standard, 1613 the PCHANNEL field consists of: 1615 o A 4-byte Nonce N (see Section 2.2.3). 1617 o A 16-byte Tag (see Section 2.2.3). 1619 o A 2-bit result indication flag R. 1621 o A 1-bit extension flag E, which is set to 0. 1623 o A 5-bit Reserved field, which is set to zero on emission and 1624 ignored on reception. 1626 R, E and Reserved are sent encrypted by the protected channel (see 1627 Section 2.2.3). 1629 If there is no extension, PCHANNEL has the format presented in 1630 Figure 14. 1632 If there is an extension, i.e., if the authentication is extended, 1633 the PCHANNEL field consists of: 1635 o A 4-byte Nonce N (see Section 2.2.3). 1637 o A 16-byte Tag (see Section 2.2.3). 1639 o A 2-bit result indication flag R. 1641 o A 1-bit extension flag E, which is set to 1. 1643 o A 5-bit Reserved field, which is set to zero on emission and 1644 ignored on reception. 1646 o A variable length EXT field. 1648 R, E, Reserved and EXT are sent encrypted by the protected channel 1649 (see Section 2.2.3). 1651 If there is an extension, PCHANNEL has the format presented in 1652 Figure 15. 1654 This EXT field is split in two subfields: 1656 o The EXT_Type subfield which indicates the type of the extension 1658 o The EXT_Payload subfield which consists in the payload of the 1659 extension. The EXT_Payload length is derived from the EAP Length 1660 field. EXT_Payload must have a bit-length that is a multiple of 8 1661 bits and must not exceed 960 bytes. The latter restriction aims 1662 at avoiding fragmentation issues (see Section 6.11). 1664 The format of the EXT field is presented in Figure 16. 1666 4. Rules of Operation for the EAP-PSK Protected Channel 1668 In this section, the rules of operation of the EAP-PSK protected 1669 channel are presented: 1671 o How protected result indications are implemented. 1673 o How an extended authentication works in details. 1675 4.1 Protected Result Indications 1677 The R flag of the PCHANNEL field in the third and fourth type of EAP- 1678 PSK messages is used to provide result indications. 1680 Since this 2-bit flag is communicated over the protected channel, it 1681 is: 1683 o Encrypted so that only the peer and the server can know its value. 1685 o Integrity-protected so that it cannot be modified by an attacker 1686 without the peer or the server detecting this modification. 1688 o Protected against replays. 1690 This 2-bit R flag can take the following values: 1692 o 01 to mean CONT 1694 o 10 to mean DONE_SUCCESS 1696 o 11 to mean DONE_FAILURE 1698 The peer and the server each remember some information about both the 1699 values of R that they have sent and the values of R they have 1700 received. It is the conjunction of both sent and received R values 1701 that indicate the success or the failure of the EAP-PSK dialog. 1703 In case of a standard authentication, the following values of R 1704 should be exchanged: 1706 o Either the server sends a DONE_SUCCESS in the PCHANNEL of the 1707 third EAP-PSK message, to which the peer replies with a 1708 DONE_SUCCESS in the PCHANNEL of the fourth EAP-PSK message, which 1709 successfully ends the EAP-PSK dialog. 1711 o Or the server sends a DONE_FAILURE in the PCHANNEL of the third 1712 EAP-PSK message, to which the peer replies with a DONE_FAILURE in 1713 the PCHANNEL of the fourth EAP-PSK message, which unsuccessfully 1714 ends the EAP-PSK dialog. 1716 In case of an extended authentication, more complex exchanges may 1717 occur, which is why the CONT value was introduced. 1719 The rules of operation for each value R may take are presented in 1720 details hereafter. 1722 4.1.1 CONT 1724 The server and the peer each initialize the values of R they intend 1725 to send and receive as CONT. 1727 Here CONT stands for "Continue". It indicates that the EAP-PSK 1728 dialog is not yet successful and that the party sending it wants to 1729 continue the dialog to try and reach success. 1731 Indeed, although the peer and the server must have successfully 1732 authenticated each other, thanks to MAC_P and MAC_S, before they 1733 start communicating over the protected channel, the EAP-PSK dialog 1734 may not yet be deemed successful after this mutual authentication 1735 because of authorization issues. For instance, a prepaid customer of 1736 a wireless Hot-Spot might have successfully authenticated but has to 1737 refill its account, e.g., with a credit card transaction over the 1738 protected channel, before it is authorized. 1740 4.1.2 DONE_SUCCESS 1742 DONE_SUCCESS indicates that the party that sent it deems the EAP-PSK 1743 dialog successful and therefore proposes to end this dialog. 1745 Once the server has sent a DONE_SUCCESS, it must keep sending this 1746 value for R. 1748 The peer must first receive a DONE_SUCCESS from the server before it 1749 is allowed to send a DONE_SUCCESS. 1751 After the peer has received a DONE_SUCCESS from the server, it may: 1753 o Send a CONT to the server if it has not reached success on its 1754 side. The server that receives a CONT should continue the EAP-PSK 1755 dialog (see Section 6.2 for some discussion on the security 1756 implications of this should). 1758 o Send a DONE_SUCCESS to the server, which will end the EAP-PSK 1759 dialog with success. 1761 o Send a DONE_FAILURE to the server, which will end the EAP-PSK 1762 dialog with failure. 1764 4.1.3 DONE_FAILURE 1766 DONE_FAILURE indicates that the party that sent it deems the EAP-PSK 1767 dialog unsuccessful and proposes to end this dialog because nothing 1768 will make it change its mind. 1770 If the server is the first to send a DONE_FAILURE, then, the peer 1771 that receives this DONE_FAILURE must reply with a DONE_FAILURE and 1772 fail, which ends the EAP-PSK dialog. 1774 If the peer is the first to send a DONE_FAILURE, then, the server 1775 that receives this DONE_FAILURE must immediately end this EAP-PSK 1776 dialog without sending any further EAP-PSK message, and fail. 1778 4.2 Extended Authentication 1780 An extended authentication can only be started by the server. 1782 Exactly one extension (identified by the EXT_Type subfield of the EXT 1783 field) must be run during an EAP-PSK extended authentication dialog. 1785 The extension is run over the protected channel: it can assume 1786 confidentiality, integrity and replay protection. 1788 To start an extended authentication, the server sets the PCHANNEL E 1789 flag to 1 and includes the EXT_Payload of the extension it has 1790 chosen. 1792 Since EAP-PSK does not provide fragmentation, the extension must not 1793 send an EXT_Payload larger than 960 bytes, which corresponds to the 1794 1020-byte EAP MTU that may minimally be assumed (see [2]). 1796 Moreover, an extension must not send an empty EXT_Payload (because 1797 this has a particular meaning for EAP-PSK, see below). 1799 When the peer receives the third EAP-PSK message with the E flag set 1800 to 1, it checks whether it is able to process the proposed extension. 1802 If the peer is not able to process the proposed extension, i.e., it 1803 does not recognize the EXT_Type of the proposed extension, it sets 1804 E=1 in its reply (the fourth EAP-PSK message) and include an EXT 1805 field of the same EXT_Type but with an empty EXT_Payload. 1806 Depending on the values taken by the R flags, the EAP-PSK dialog may: 1808 o End 1810 * In case the peer's policy mandates that it fails in case of an 1811 unrecognized extension, it sends a DONE_FAILURE in the fourth 1812 EAP-PSK message. 1814 * In case the server has sent a DONE_SUCCESS in the third EAP-PSK 1815 message and the peer's policy authorizes it to succeed even if 1816 the extension is not recognized, the peer sends a DONE_SUCCESS. 1818 o Continue for exactly one round-trip, namely, in case the server 1819 has sent a CONT in the third EAP-PSK message and the peer's policy 1820 authorizes it to succeed even if the extension is not recognized, 1821 the peer replies with a CONT in the fourth EAP-PSK message. The 1822 server must then, depending on its policy, either send a 1823 DONE_SUCCESS or a DONE_FAILURE to the peer in the fifth EAP-PSK 1824 message. If the server sent a DONE_SUCCESS in the fifth EAP-PSK 1825 message, the peer must send a DONE_SUCCESS in the sixth EAP-PSK 1826 message. All these messages must have the E flag sent to 1 with 1827 an EXT field of with the EXT_Type of the extension that was 1828 proposed and an empty EXT_Payload (this behavior was chosen to 1829 simplify implementations). 1831 If the peer is able to process the proposed extension, then it does 1832 so. In this case, the extension must be aware of the R values sent 1833 and received and able to propose to update them. All the subsequent 1834 messages exchanged between the peer and the server must have the E 1835 flag sent to 1 with an EXT field of the EXT_Type of the extension 1836 that was proposed and a non-empty EXT_Payload. 1838 5. IANA considerations 1840 This section provides guidance to the IANA regarding registration of 1841 values related to the EAP-PSK protocol, in accordance with [6]. 1843 The following terms are used here with the meanings defined in [6]: 1844 "name space" and "registration". 1846 The following policies are used here with the meanings defined in 1847 [6]: "Expert Review" and "Specification Required". 1849 This document introduces two new Internet Assigned Numbers Authority 1850 (IANA) considerations: 1852 o It requires IANA to allocate an EAP-Request/Response Type for EAP- 1853 PSK. 1855 o There is one name space in EAP-PSK that requires registration: the 1856 EXT_Type values (see Section 3.3 and Section 3.4). 1858 For registration requests where a Designated Expert should be 1859 consulted, the responsible IESG area director should appoint the 1860 Designated Expert. The intention is that any allocation will be 1861 accompanied by a published RFC. But in order to allow for the 1862 allocation of values prior to the RFC being approved for publication, 1863 the Designated Expert can approve allocations once it seems clear 1864 that an RFC will be published. The Designated expert will post a 1865 request to the EAP WG mailing list (or a successor designated by the 1866 Area Director) for comment and review, including an Internet-Draft. 1867 Before a period of 30 days has passed, the Designated Expert will 1868 either approve or deny the registration request and publish a notice 1869 of the decision to the EAP WG mailing list or its successor, as well 1870 as informing IANA. A denial notice must be justified by an 1871 explanation and, in the cases where it is possible, concrete 1872 suggestions on how the request can be modified so as to become 1873 acceptable. 1875 5.1 Allocation of an EAP-Request/Response Type for EAP-PSK 1877 This document requires IANA to allocate a new EAP Type for EAP-PSK. 1879 5.2 Allocation of EXT Type numbers 1881 EAP-PSK is not intended as a general-purpose protocol, and 1882 allocations of EXT_Type should not be made for purposes unrelated to 1883 authentication, authorization and accounting. 1885 EXT_Type numbers have a range from 1 to 255. 1887 EXT_Type 255 has been allocated for Experimental use. 1889 EXT_Type 1-254 may be allocated on the advice of a Designated Expert, 1890 with Specification Required. 1892 6. Security Considerations 1894 [2] highlights several attacks that are possible against EAP as EAP 1895 does not provide any robust security mechanism. 1897 This section discusses the claimed security properties of EAP-PSK as 1898 well as vulnerabilities and security recommendations in the threat 1899 model of [2]. 1901 6.1 Mutual Authentication 1903 EAP-PSK provides mutual authentication. 1905 The server believes that the peer is authentic because it can 1906 calculate a valid MAC and the peer believes that the server is 1907 authentic because it can calculate another valid MAC. 1909 The authentication protocol which inspired EAP-PSK, AKEP2, enjoys a 1910 security proof in the provable security paradigm, see [15]. 1912 The MAC algorithm used in the instantiation of AKEP2 within EAP-PSK, 1913 OMAC1, also enjoys a security proof in the provable security 1914 paradigm, see [5]. A tag length of 16 bytes for OMAC1 is currently 1915 deemed appropriate by the cryptographic community for entity 1916 authentication. 1918 The underlying block cipher used, AES-128, is widely believed to be a 1919 secure block cipher. 1921 Finally, the key used for mutual authentication, AK, is only used for 1922 that purpose, which makes this part cryptographically independent of 1923 the other parts of the protocol. 1925 6.2 Protected Result Indications 1927 EAP-PSK provides protected result indications thanks to its 2-bit R 1928 flag (see Section 4.1). This 2-bit R flag is protected because it is 1929 encrypted and integrity protected by the EAX mode of operation, see 1930 Section 2.2.3. 1932 Care may be taken against Byzantine failures, that is to say, for 1933 instance, when a peer tries to force a server to engage in a never 1934 ending conversation. This could for example, be done by a peer that 1935 keeps sending a CONT after it has received a DONE_SUCCESS from the 1936 server. A policy may limit the number of rounds in an EAP-PSK 1937 extended authentication to mitigate this threat, which is outside our 1938 threat model. 1940 It should also be noted that the cryptographic protection of the 1941 result indications does not prevent message deletion. 1943 For instance, let us consider a scenario in which: 1945 o A server sends a DONE_SUCCESS to a peer. 1947 o The peer replies with a DONE_SUCCESS. 1949 In case the last message from the peer is intercepted, and an EAP 1950 Success is sent to the peer before any retransmission from the server 1951 reaches it or the retransmissions from the server are also deleted, 1952 the peer will believe that it has successfully authenticated to the 1953 server while the server will fail. 1955 This behavior is well known (see e.g., [26]) and in a sense 1956 unavoidable. There is a trade-off between efficiency and the "level" 1957 of information sharing that is attainable. EAP-PSK specified a 1958 single round trip of DONE_SUCCESS because, it is believed that: 1960 o In case there is an adversary capable of disrupting the 1961 communication channel, it can do so whenever it wants (be it after 1962 one or 10 round trip or even during data communication). 1964 o Other layers/applications will generally start by doing a specific 1965 key exchange and confirmation procedure using the keys derived by 1966 EAP-PSK. This is typically done by IEEE 802.11i "four-way 1967 handshake". In case the error is not detected by EAP- PSK, it 1968 should be detected then (please note however, that it is bad 1969 practice to rely on external mechanism to ensure synchronization, 1970 unless this is an explicit property of the external mechanism). 1972 6.3 Integrity Protection 1974 EAP-PSK provides integrity protection thanks to the Tag of its 1975 protected channel (see Section 2.2.3). 1977 6.4 Replay Protection 1979 EAP-PSK provides replay protection of its mutual authentication part 1980 thanks to the use of random numbers RAND_S and RAND_P. Since RAND_S 1981 is 128 bit long, one expects to have to record 2**64 (i.e. 1982 approximately 1.84*10**19) EAP-PSK successful authentication before 1983 an authentication can be replayed. Hence, EAP-PSK provides replay 1984 protection of its mutual authentication part as long as RAND_S and 1985 RAND_P are chosen at random, randomness is critical for security. 1987 EAP-PSK provides replay protection during the conversation of the 1988 protected channel thanks to the Nonce N of its protected channel (see 1989 Section 2.2.3). This nonce is initialized to 0 by the server and 1990 monotonically incremented by one by the party that receives a valide 1991 EAP-PSK message. For instance, after receiving from the server a 1992 valid EAP-PSK message with Nonce set to x, the peer will answer with 1993 an EAP-PSK message with Nonce set to x+1 and wait for an EAP-PSK 1994 message with Nonce set to x+2. A retransmission of the server's 1995 message with Nonce set to x, would cause the peer EAP layer to resend 1996 the message in which Nonce was set to x+1, which would be transparent 1997 to the EAP-PSK layer. 1999 The EAP peer must check that the Nonce is indeed initialized to 0 by 2000 the server. 2002 6.5 Reflection attacks 2004 EAP-PSK provides protection against reflection attacks in case of an 2005 extended authentication because: 2007 o It integrity protects the EAP header (which contains the 2008 indication Request/Response. 2010 o It includes two separate spaces for the Nonces: the EAP server 2011 only receives messages with odd nonces, whereas the EAP peer only 2012 received messages with even nonces. 2014 6.6 Dictionary Attacks 2016 Because EAP-PSK is not a password protocol, it is not vulnerable to 2017 dictionary attacks. 2019 Indeed, the PSK used by EAP-PSK must not be derived from a password. 2020 Derivation of the PSK from a password may lead to dictionary attacks. 2022 However using a 16-byte PSK key has: 2024 o Ergonomic impacts: some people may find it cumbersome to manually 2025 provision a 16-byte PSK. 2027 o Deployment impacts: some people may want to reuse existing 2028 credential databases that contain passwords and not PSKs. 2030 Since, despite the warning not to use passwords, people will probably 2031 do that anyway, guidance to derive a PSK from a password is provided 2032 in Appendix A. The method proposed in Appendix A only tries to make 2033 dictionary attacks harder. It does not eliminate them. 2035 It is however not a fatality that passwords be used instead of PSKs: 2036 people rarely use password derived certificates, so why should they 2037 do so for shared keys? 2039 6.7 Key Derivation 2041 EAP-PSK supports key derivation. 2043 The key hierarchy is specified in Section 2.1. 2045 The mechanism used for key derivation is the modified counter mode. 2047 The instantiation of the modified counter in EAP-PSK complies with 2048 the conditions stated in [4] so that the security proof for this mode 2049 holds. 2051 The underlying block cipher used, AES-128, is widely believed to be a 2052 secure block cipher. 2054 A first key derivation occurs to calculate AK and KDK from the PSK: 2055 it is called the key setup (see Section 2.2.1). 2056 It uses the PSK as the key to the modified counter mode. Thus, AK 2057 and KDK are believed to be cryptographically separated and computable 2058 only to those who have knowledge of the PSK. 2060 A second key derivation occurs to derive session keys, namely, the 2061 TEK, MSK and EMSK (see Section 2.2.2). 2062 It uses KDK as the key to the modified counter mode. 2064 The protocol design explicitly assumes that neither AK nor KDK are 2065 shared beyond the two parties utilizing them. AK loses its efficacy 2066 to mutually authenticate the peer and server with each other when it 2067 is shared. Similarly, the derived TEK, MSK, and EMSK lose their 2068 value when KDK is shared with a third party. 2070 It should be emphasized that the peer has control of the session keys 2071 derived by EAP-PSK. In particular, it can easily choose the random 2072 number it sends in EAP-PSK so that one of the nine derived 16-byte 2073 key blocks (see Section 2.1) takes a pre-specified value. 2075 It was chosen not to prevent this control of the session keys by the 2076 peer because: 2078 o Preventing it would have added some complexity to the protocol 2079 (typically, the inclusion of a one-way mode of operation of AES in 2080 the key derivation part). 2082 o It is believed that the peer won't try to force the server to use 2083 some pre- specified value for the session keys. Such an attack is 2084 outside the threat model and seems to have little value compared 2085 to a peer sharing its PSK. 2087 This is however not the behavior recommended by EAP in section 7.10 2088 of [2]. 2090 Since deriving the session keys requires some cryptographic 2091 computations, it is recommended that the session keys be derived only 2092 once authentication has succeeded (i.e., once the server has 2093 successfully verified MAC_P for the server side, and once the peer 2094 has successfully verified MAC_S for the peer side). 2096 It is recommended to take great care in implementations, so that 2097 derived keys are not made available if the EAP-PSK dialog fails, 2098 e.g., ends with DONE_FAILURE. 2100 The TEK must not be made available to anyone except to the current 2101 EAP-PSK dialog. 2103 6.8 Denial of Service Resistance 2105 Denial of Service resistance (DoS) has not been a design goal for 2106 EAP-PSK. 2108 It is however believed that EAP-PSK does not provide any obvious and 2109 avoidable venue for such attacks. 2111 It is worth noting that the server has to do a cryptographic 2112 calculation and maintain some state when it engages in an EAP-PSK 2113 conversation, namely generate and remember the 16-byte RAND_S. This 2114 should however not lead to resource exhaustion as this state and the 2115 associated computation are fairly lightweight. 2117 It is recommended that EAP-PSK does not allow EAP notifications to be 2118 interleaved in its dialog to prevent potential DoS attacks. Indeed, 2119 since EAP Notifications are not integrity protected, they can easily 2120 be spoofed by an attacker. Such an attacker could force a peer that 2121 allows EAP Notifications to engage in a discussion which would delay 2122 his authentication or result in the peer taking unexpected actions 2123 (e.g., in case a notification is used to prompt the peer to do some 2124 "bad" action). 2126 It is up to the implementation of EAP-PSK or to the peer and the 2127 server to specify the maximum number of failed cryptographic checks 2128 that are allowed. For instance, does the reception of a bogus MAC_P 2129 in the second EAP-PSK message cause a fatal error or is it discarded 2130 to continue waiting for the valid response of the valid peer? There 2131 is a trade-off between possibly allowing multiple tentative forgeries 2132 and allowing a direct DoS (in case the first error is fatal). 2134 For the sake of simplicity and denial of service resilience, EAP-PSK 2135 has chosen not to include any error messages. Hence, an "invalid" 2136 EAP-PSK message is silently discarded. Although this makes 2137 interoperability testing and debugging harder, this leads to simpler 2138 implementations and does not open any venue for denial of service 2139 attacks. 2141 6.9 Session Independence 2143 Thanks to its key derivation mechanisms, EAP-PSK provides session 2144 independence: passive attacks (such as capture of the EAP 2145 conversation) or active attacks (including compromise of the MSK or 2146 EMSK) does not enable compromise of subsequent or prior MSKs or 2147 EMSKs. The assumption that RAND_P and RAND_S are random is central 2148 for the security of EAP-PSK in general and session independance in 2149 particular. 2151 6.10 Exposition of the PSK 2153 EAP-PSK does not provide perfect forward secrecy. Compromise of the 2154 PSK leads to compromise of recorded past sessions. 2156 Compromise of the PSK enables the attacker to impersonate the peer 2157 and the server: compromise of the PSK leads to "full" compromise of 2158 future sessions. 2160 EAP-PSK provides no protection against a legitimate peer sharing its 2161 PSK with a third party. Such protection may be provided by 2162 appropriate repositories for the PSK, which choice is outside the 2163 scope of this document. The PSK used by EAP-PSK must only be shared 2164 between two parties: the peer and the server. In particular, this 2165 PSK must not be shared by a group of peers communicating with the 2166 same server. 2168 The PSK used by EAP-PSK must be cryptographically separated from keys 2169 used by other protocols, otherwise the security of EAP-PSK may be 2170 compromised. It is a rule of the thumb in cryptography to use 2171 different keys for different applications. 2173 6.11 Fragmentation 2175 EAP-PSK does not support fragmentation and reassembly. 2177 Indeed, the largest EAP-PSK frame is at most 1015 bytes long, 2178 because: 2180 o The maximum length for the peer NAI identity used in EAP- PSK is 2181 966 bytes (see Section 3.2). This should not be a limitation in 2182 practice (see Section 2.2 of [10] for more considerations on NAI 2183 length). 2185 o The maximum length for the EXT_Payload field used in EAP-PSK is 2186 960 bytes (see Section 3.3 and Section 3.4). 2188 Per Section 3.1 of [2], the lower layers over which EAP may be run 2189 are assumed to have an EAP MTU of 1020 bytes or greater. Since the 2190 EAP header is 5 bytes long, supporting fragmentation for EAP-PSK is 2191 unnecessary. 2193 Extensions that require sending a payload larger than 960 bytes 2194 should provide their own fragmentation and reassembly mechanism. 2196 6.12 Channel Binding 2198 EAP-PSK does not provide channel binding as this feature is still 2199 very much work in progress (see [14]). 2201 However, it should be easy to add it to EAP-PSK as an extension (see 2202 Section 2.3.2). 2204 6.13 Fast Reconnect 2206 EAP-PSK does not provide any fast reconnect capability. 2208 Indeed, as noted for instance in [16], mutual authentication (without 2209 counters or timestamps) requires three exchanges, thus four exchanges 2210 in EAP since any EAP-Request must be answered to by an EAP-Response. 2212 Since this minimum bound is already reached in EAP-PSK standard 2213 authentication, there is no way the number of round-trips used within 2214 EAP-PSK can be reduced without using timestamps or counters. 2215 Timestamps and counters were deliberately avoided for the sake of 2216 simplicity and security (e.g., synchronization issues). 2218 6.14 Identity Protection 2220 Since it was chosen to restrict to a single cryptographic primitive 2221 from symmetric cryptography, namely the block cipher AES-128, it 2222 appears that it is not possible to provide "reasonable" identity 2223 protection without failing to meet the simplicity goal. 2225 Hereafter is an informal discussion of what is meant by identity 2226 protection and the rationale behind the requirement of identity 2227 protection. For some complementary discussion, refer to [40]. 2229 Identity protection basically means preventing the disclosure of the 2230 identities of the communicating parties over the network, which is 2231 quite contradictory with authentication. There are two levels of 2232 identity protection: protection against passive attackers and 2233 protection against active eavesdroppers. 2235 As explained in [40], "a common example [for identity protection] is 2236 the case of mobile devices wishing to prevent an attacker from 2237 correlating their (changing) location with the logical identity of 2238 the device (or user)". 2240 In case only symmetric cryptography is used, only a weak form of 2241 identity protection may be offered, namely pseudonym management. In 2242 other words, the peer and the server agree on pseudonyms that they 2243 use to identify each other and usually change them periodically, 2244 possibly in a protected way so that an attacker cannot learn new 2245 pseudonyms before they are used. 2247 With pseudonym management, there is a trade-off between allowing for 2248 pseudonym resynchronization (thanks to a permanent identity) and 2249 being vulnerable to active attacks (in which the attacker forges 2250 messages simulating a pseudonym desynchronization). 2251 Indeed, a protocol using time-varying pseudonyms may want to 2252 anticipate "desynchronization" situations such as, for instance, when 2253 the peer believes that its current pseudonym is "pseudo1@bigco.com" 2254 whereas the server believes this peer will use the pseudonym 2255 "pseudo2@bigco.com" (which is the pseudonym the server has sent to 2256 update "pseudo1@bigco.com"). 2258 Because pseudonym management adds complexity to the protocol and 2259 implies this unsatisfactory trade-off, it was decided not to include 2260 this feature in EAP-PSK. 2262 However, EAP-PSK may trivially provide some protection when the 2263 concern is to avoid the "real-life" identity of the user being 2264 "discovered". For instance, let us take the example of user John Doe 2265 that roams and connects to a Hot-Spot owned and operated by Wireless 2266 Internet Service Provider (WISP) BAD. Suppose this user 2267 authenticates to his home WISP (WISP GOOD) with an EAP method under 2268 an identity (e.g., "john.doe@wispgood.com") that allows WISP BAD (or 2269 an attacker) to recover his "real-life" identity, i.e. John Doe. An 2270 example drawback of this, is that a competitor of John Doe's WISP may 2271 want to win John Doe as a new customer by sending him some special 2272 targeted advertisement. 2273 EAP-PSK can very simply thwart this attack, merely by avoiding to 2274 provide John Doe with a NAI that allows easy recovery of his real- 2275 life identity. It is believed that, when a NAI that is not 2276 correlated to a real-life identity, is used, no valuable information 2277 leaks because of the EAP method. 2278 Indeed, the identity of the WISP used by a peer has to be disclosed 2279 anyway in the realm portion of its NAI to allow AAA routing. 2280 Moreover, the Medium Access Control Address of the peer's Network 2281 Interface Card can generally be used to track the peer as efficiently 2282 as a fixed NAI. 2284 It is worth noting that the server systematically discloses its 2285 identity, which may allow probing attacks. This may not be a problem 2286 as the identity of the server is not supposed to remain secret. 2287 Quite on the contrary, users tend to want to know to whom they will 2288 be talking to choose the right network to attach to. 2290 6.15 Protected Ciphersuite Negotiation 2292 EAP-PSK does not allow to negotiate cipher suites. Hence, it is not 2293 vulnerable to negotiation attacks and does not implement protected 2294 cipher suite negotiation. 2296 6.16 Confidentiality 2298 Although EAP-PSK provides confidentiality in its protected channel, 2299 it cannot claim to do so as per Section 7.2.1 of [2]: "A method 2300 making this claim must support identity protection". 2302 6.17 Cryptographic Binding 2304 Since EAP-PSK is not intended to be tunneled within another protocol 2305 that omits peer authentication, it does not implement cryptographic 2306 binding. 2308 6.18 Implementation of EAP-PSK 2310 To really provide security, not only must a protocol be well-thought 2311 and correctly specified, but its implementation must take special 2312 care. 2314 For instance, implementing cryptographic algorithms requires special 2315 skills since cryptographic software is not only vulnerable to 2316 classical attacks (e.g., buffer overflow or missing checks) but also 2317 to some special cryptographic attacks (e.g., side channels attacks 2318 like timing ones, see [39]). In particular, care must be taken to 2319 avoid such attacks in EAX implementation, please refer to [3] for a 2320 note on this point. 2322 An EAP-PSK implementation should use a good source of randomness to 2323 generate the random numbers required in the protocol. Please refer 2324 to [22] for more information on generating random numbers for 2325 security applications. 2327 Handling sensitive material (namely, keying material such as the PSK, 2328 AK, KDK, etc.) should be done so in a secure way (see, for instance, 2329 [20] for guidance on secure deletion). 2331 The specification of a repository for the PSK that EAP-PSK uses is 2332 outside of the scope of this document. In particular, nothing 2333 prevents from storing this PSK on a tamper-resistant device such as a 2334 smart card rather than having it memorized or written down on a sheet 2335 of paper. The choice of the PSK repository may have important 2336 security impacts. 2338 7. Security Claims 2340 This section provides the security claims required by [2]. 2342 [a] Mechanism. EAP-PSK is based on symmetric cryptography (AES-128) 2343 and uses a 16-byte Pre-Shared Key (PSK). 2345 [b] Security claims. EAP-PSK provides: 2347 * Mutual authentication (see Section 6.1) 2349 * Integrity protection (see Section 6.3) 2351 * Replay protection (see Section 6.4) 2353 * Key derivation (see Section 6.7) 2355 * Dictionary attack resistance (see Section 6.6) 2357 * Session independence (see section Section 6.6) 2359 [c] Key strength. EAP-PSK provides a 16-byte effective key strength. 2361 [d] Description of key hierarchy. Please see Section 2.1. 2363 [e] Indication of vulnerabilities. EAP-PSK does not provide: 2365 * Identity protection (see Section 6.14) 2367 * Confidentiality (see Section 6.16) 2369 * Fast reconnect (see Section 6.13) 2371 * Fragmentation (see Section 6.11) 2373 * Cryptographic binding (see Section 6.17) 2375 * Protected cipher suite negotiation (see Section 6.15) 2377 * Perfect Forward Secrecy (see Section 6.7) 2379 * Key agreement: the session key is chosen by the peer (see 2380 Section 6.7) 2382 * Channel binding (see Section 6.12) 2384 8. Acknowledgments 2386 This EAP method has been inspired by EAP-SIM and EAP-Archie. Many 2387 thanks to their respective authors: Jesse Walker, Russ Housley, Henry 2388 Haverinen and Joseph Salowey. 2390 Extra thanks to Jesse Walker for his thorough and challenging review 2391 of EAP-PSK. 2393 Special thanks to 2395 o Henri Gilbert for some interesting discussions on the 2396 cryptographic parts of EAP-PSK. 2398 o Aurelien Magniez for his valuable feedback on network aspects of 2399 EAP-PSK, his curiosity and rigor that led to numerous 2400 improvements, and his help in the first implementation of EAP-PSK 2401 under Microsoft Windows and Freeradius. 2403 o Thomas Otto for his valuable feedback on EAP-PSK and the 2404 implementation of the first version of EAP-PSK under Xsupplicant. 2406 EAP-PSK also benefited from exchanges with other EAP methods 2407 designers: many thanks to Nancy Cam-Winget (EAP-FAST). 2409 Thanks to Jari Arkko and Bernard Aboba, the beloved EAP WG chairs, 2410 for the work they stimulate! 2412 Finally, thanks to Vir who has brought a permanent and outstanding 2413 contribution to this protocol. 2415 9. References 2417 9.1 Normative References 2419 [1] Aboba, B. and M. Beadles, "The Network Access Identifier", 2420 RFC 2486, January 1999. 2422 [2] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. 2423 Levkowetz, "Extensible Authentication Protocol (EAP)", RFC 3748, 2424 June 2004. 2426 [3] Bellare, M., Rogaway, P., and D. Wagner, "The EAX mode of 2427 operation", FSE 04, Springer-Verlag LNCS 3017, 2004. 2429 [4] Gilbert, H., "The Security of One-Block-to-Many Modes of 2430 Operation", FSE 03, Springer-Verlag LNCS 2287, 2003. 2432 [5] Iwata, T. and K. Kurosawa, "OMAC: One-Key CBC MAC", FSE 03, 2433 Springer-Verlag LNCS 2887, 2003. 2435 [6] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 2436 Considerations Section in RFCs", BCP 26, RFC 2434, October 1998. 2438 [7] National Institute of Standards and Technology, "Specification 2439 for the Advanced Encryption Standard (AES)", Federal Information 2440 Processing Standards (FIPS) 197, November 2001. 2442 [8] National Institute of Standards and Technology, "Recommendation 2443 for Block Cipher Modes of Operation: The CMAC Mode for 2444 Authentication", Special Publication (SP) 800-38B, May 2005. 2446 9.2 Informative References 2448 [9] Aboba, B., "Extensible Authentication Protocol (EAP) Key 2449 Management Framework", draft-ietf-eap-keying-07 (work in 2450 progress), July 2005. 2452 [10] Aboba, B., "The Network Access Identifier", 2453 draft-arkko-roamops-rfc2486bis-02 (work in progress), 2454 July 2004. 2456 [11] Aboba, B., Calhoun, P., Glass, S., Hiller, T., McCann, P., 2457 Shiino, H., Zorn, G., Dommety, G., Perkins, C., Patil, B., 2458 Mitton, D., Manning, S., Beadles, M., Walsh, P., Chen, X., 2459 Sivalingham, S., Hameed, A., Munson, M., Jacobs, S., Lim, B., 2460 Hirschman, B., Hsu, R., Xu, Y., Campbell, E., Baba, S., and E. 2461 Jaques, "Criteria for Evaluating AAA Protocols for Network 2462 Access", RFC 2989, November 2000. 2464 [12] Aboba, B. and D. Simon, "PPP EAP TLS Authentication Protocol", 2465 RFC 2716, October 1999. 2467 [13] Arkko, J. and H. Haverinen, "Extensible Authentication Protocol 2468 Method for 3rd Generation Authentication and Key Agreement 2469 (EAP-AKA)", draft-arkko-pppext-eap-aka-15 (work in progress), 2470 December 2004. 2472 [14] Arkko, J. and P. Eronen, "Authenticated Service Information for 2473 the Extensible Authentication Protocol (EAP)", 2474 draft-arkko-eap-service-identity-auth-03 (work in progress), 2475 July 2005. 2477 [15] Bellare, M. and P. Rogaway, "Entity Authentication and Key 2478 Distribution", CRYPTO 93, Springer-Verlag LNCS 773, 1994. 2480 [16] Bellare, M., Pointcheval, D., and P. Rogaway, "Authenticated 2481 Key Exchange Secure Against Dictionary attacks", 2482 EUROCRYPT 00, Springer-Verlag LNCS 1807, 2000. 2484 [17] Bersani, F., "EAP shared key methods: a tentative synthesis of 2485 those proposed so far", 2486 draft-bersani-eap-synthesis-sharedkeymethods-00 (work in 2487 progress), April 2004. 2489 [18] Bradner, S., "The Internet Standards Process -- Revision 3", 2490 BCP 9, RFC 2026, October 1996. 2492 [19] Carlson, J., Aboba, B., and H. Haverinen, "EAP SRP-SHA1 2493 Authentication Protocol", draft-ietf-pppext-eap-srp-03.txt 2494 (work in progress), July 2001. 2496 [20] Department of Defense of the United States, "National 2497 Industrial Security Program Operating Manual", DoD 5220-22M, 2498 January 1995. 2500 [21] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 2501 RFC 2246, January 1999. 2503 [22] Eastlake, D., Crocker, S., and J. Schiller, "Randomness 2504 Recommendations for Security", RFC 1750, December 1994. 2506 [23] Funk, P. and S. Blake-Wilson, "EAP Tunneled TLS Authentication 2507 Protocol (EAP-TTLS)", draft-ietf-pppext-eap-ttls-05 (work in 2508 progress), July 2004. 2510 [24] Haller, N., Metz, C., Nesser, P., and M. Straw, "A One-Time 2511 Password System", RFC 2289, February 1998. 2513 [25] Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)", 2514 RFC 2409, November 1998. 2516 [26] Halpern, J. and Y. Moses, "Knowledge and common knowledge in 2517 a distributed environment", Journal of the ACM 37:3, 1990. 2519 [27] Haverinen, H. and J. Salowey, "Extensible Authentication 2520 Protocol Method for GSM Subscriber Identity Modules (EAP- 2521 SIM)", draft-haverinen-pppext-eap-sim-16 (work in progress), 2522 December 2004. 2524 [28] Huitema, C., Postel, J., and S. Crocker, "Not All RFCs are 2525 Standards", RFC 1796, April 1995. 2527 [29] Institute of Electrical and Electronics Engineers, "Local and 2528 Metropolitan Area Networks: Port-Based Network Access Control", 2529 IEEE Standard 802.1X, September 2001. 2531 [30] Institute of Electrical and Electronics Engineers, "Approved 2532 Draft Supplement to Standard for Telecommunications and 2533 Information Exchange Between Systems-LAN/MAN Specific 2534 Requirements - Part 11: Wireless LAN Medium Access Control 2535 (MAC) and Physical Layer (PHY) Specifications: Specification 2536 for Enhanced Security", IEEE 802.11i-2004, 2004. 2538 [31] Institute of Electrical and Electronics Engineers, "Standard 2539 for Telecommunications and Information Exchange Between Systems 2540 - LAN/MAN Specific Requirements - Part 11: Wireless LAN Medium 2541 Access Control (MAC) and Physical Layer (PHY) Specifications", 2542 IEEE Standard 802.11, 1999. 2544 [32] Jablon, D., "The SPEKE Password-Based Key Agreement Methods", 2545 draft-jablon-speke-02 (work in progress), November 2002. 2547 [33] Josefsson, S., "The EAP SecurID(r) Mechanism", 2548 draft-josefsson-eap-securid-01 (work in progress), 2549 February 2002. 2551 [34] Josefsson, S., Palekar, A., Simon, D., and G. Zorn, "Protected 2552 EAP Protocol (PEAP) Version 2", 2553 draft-josefsson-pppext-eap-tls-eap-10 (work in progress), 2554 October 2004. 2556 [35] Kaliski, B., "PKCS #5: Password-Based Cryptography 2557 Specification Version 2.0", RFC 2898, September 2000. 2559 [36] Kamath, V. and A. Palekar, "Microsoft EAP CHAP Extensions", 2560 draft-kamath-pppext-eap-mschapv2-01 (work in progress), 2561 April 2004. 2563 [37] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", 2564 draft-ietf-ipsec-ikev2-17 (work in progress), October 2004. 2566 [38] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, 2567 November 1998. 2569 [39] Kocher, P., "Timing Attacks on Implementations of Diffie- 2570 Hellman, RSA, DSS, and Other Systems", CRYPTO 96, Springer- 2571 Verlag LNCS 1109, 1996. 2573 [40] Krawczyk, H., "SIGMA: the `SIGn-and-MAc' Approach to 2574 Authenticated Diffie-Hellman and its Use in the IKE Protocols", 2575 CRYPTO 03, Springer-Verlag LNCS 2729, June 2003. 2577 [41] MacNally, C., "Cisco LEAP protocol description", 2578 September 2001. 2580 [42] Metz, C., "OTP Extended Responses", RFC 2243, November 1997. 2582 [43] Menezes, A., van Oorschot, P., and S. Vanstone, "Handbook of 2583 Applied Cryptography", CRC Press , 1996. 2585 [44] National Institute of Standards and Technology, "Password 2586 Usage", Federal Information Processing Standards (FIPS) 112, 2587 May 1985. 2589 [45] Rescorla, E., "A Survey of Authentication Mechanisms", 2590 draft-iab-auth-mech-03 (work in progress), March 2004. 2592 [46] Salowey, J., "EAP Flexible Authentication via Secure Tunneling 2593 (EAP-FAST)", draft-cam-winget-eap-fast-02 (work in progress), 2594 April 2005. 2596 [47] Schneier, B., Mudge, and D. Wagner, "Cryptanalysis of 2597 Microsoft's PPTP Authentication Extensions (MS-CHAPv2)", 2598 CQRE 99, Springer-Verlag LNCS 1740, October 1999. 2600 [48] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, 2601 RFC 1661, July 1994. 2603 [49] Simpson, W., "PPP Challenge Handshake Authentication Protocol 2604 (CHAP)", RFC 1994, August 1996. 2606 [50] Stanley, D., Walker, J., and B. Aboba, "EAP Method Requirements 2607 for Wireless LANs", draft-walker-ieee802-req-04 (work in 2608 progress), August 2004. 2610 [51] Tschofenig, H., "EAP IKEv2 Method (EAP-IKEv2)", 2611 draft-tschofenig-eap-ikev2-07 (work in progress), July 2005. 2613 [52] Walker, J. and R. Housley, "The EAP Archie Protocol", 2614 draft-jwalker-eap-archie-01 (work in progress), June 2003. 2616 [53] Wi-Fi Alliance, "Wi-Fi Protected Access, version 2.0", 2617 April 2003. 2619 [54] Wright, J., "Weaknesses in LEAP Challenge/Response", Defcon 03, 2620 August 2003. 2622 [55] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites for 2623 Transport Layer Security (TLS)", draft-ietf-tls-psk-09 (work in 2624 progress), June 2005. 2626 Authors' Addresses 2628 Florent Bersani 2629 France Telecom R&D 2630 38, rue du General Leclerc 2631 Issy-Les-Moulineaux 92794 Cedex 9 2632 FR 2634 Email: florent.bersani@francetelecom.com 2636 Hannes Tschofenig 2637 Siemens AG 2638 Otto-Hahn-Ring 6 2639 Munich 81739 2640 GE 2642 Email: Hannes.Tschofenig@siemens.com 2644 Appendix A. Generation of the PSK from a password - Discouraged 2646 It is formally discouraged to use a password to generate the PSK, 2647 since this opens the door to exhaustive search or dictionary, two 2648 attacks that would not otherwise be possible. 2650 EAP-PSK only provides a 16-byte key strength when a 16-byte PSK is 2651 drawn at random from the set of all possible 16-byte strings. 2653 However, as people will probably do this anyway, guidance is provided 2654 hereafter to generate the PSK from a password. 2656 For some hints on how passwords should be selected, please refer to 2657 [44]. 2659 The technique presented herein is drawn from [35]. It is intended to 2660 try to mitigate the risks associated with password usage in 2661 cryptography, typically dictionary attacks. 2663 If the binary representation of the password is strictly fewer than 2664 16 bytes long (which by the way means that the chosen password is 2665 probably weak because it is too short), then it is padded to 16 bytes 2666 with zeroes as its high order bits. 2668 If the binary representation of the password is strictly more than 16 2669 bytes long, then it is hashed down to exactly 16 bytes using the 2670 Matyas-Meyer-Oseas hash (please refer to [43] for a description of 2671 this hash. Using the notation of Figure 9.3 of [43], g is the 2672 identity function and E is AES-128 in our construction.) with 2673 IV=0x0123456789ABCDEFFEDCBA9876543210 (this value has been 2674 arbitrarily selected). 2676 We now assume that we have a 16-byte number derived from the initial 2677 password (that can be the password itself if its binary 2678 representation is exactly 16 bytes long). We shall call this number 2679 P16. 2681 Following the notations used in [35], the PSK is derived thanks to 2682 PBKDF2 instantiated with: 2684 o P16 as P 2686 o The first 96 bits of the XOR of the peer and server NAIs as Salt 2687 (zero-padded in the high-order bits if necessary). 2689 o 5000 as c 2690 o 16 as dkLen 2692 Although this gives better protection than nothing, this derivation 2693 does not stricto sensu protect against dictionary attacks. It only 2694 makes dictionary precomputation harder. 2696 Intellectual Property Statement 2698 The IETF takes no position regarding the validity or scope of any 2699 Intellectual Property Rights or other rights that might be claimed to 2700 pertain to the implementation or use of the technology described in 2701 this document or the extent to which any license under such rights 2702 might or might not be available; nor does it represent that it has 2703 made any independent effort to identify any such rights. Information 2704 on the procedures with respect to rights in RFC documents can be 2705 found in BCP 78 and BCP 79. 2707 Copies of IPR disclosures made to the IETF Secretariat and any 2708 assurances of licenses to be made available, or the result of an 2709 attempt made to obtain a general license or permission for the use of 2710 such proprietary rights by implementers or users of this 2711 specification can be obtained from the IETF on-line IPR repository at 2712 http://www.ietf.org/ipr. 2714 The IETF invites any interested party to bring to its attention any 2715 copyrights, patents or patent applications, or other proprietary 2716 rights that may cover technology that may be required to implement 2717 this standard. Please address the information to the IETF at 2718 ietf-ipr@ietf.org. 2720 Disclaimer of Validity 2722 This document and the information contained herein are provided on an 2723 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2724 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 2725 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 2726 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 2727 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2728 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2730 Copyright Statement 2732 Copyright (C) The Internet Society (2005). This document is subject 2733 to the rights, licenses and restrictions contained in BCP 78, and 2734 except as set forth therein, the authors retain all their rights. 2736 Acknowledgment 2738 Funding for the RFC Editor function is currently provided by the 2739 Internet Society.