idnits 2.17.1 draft-ietf-emu-eap-gpsk-07.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, updated by RFC 4748 on line 1567. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1578. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1585. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1591. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- 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 (November 19, 2007) is 6003 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 4282 (Obsoleted by RFC 7542) -- Obsolete informational reference (is this intentional?): RFC 4634 (Obsoleted by RFC 6234) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 EMU Working Group T. Clancy 3 Internet-Draft LTS 4 Intended status: Standards Track H. Tschofenig 5 Expires: May 22, 2008 Nokia Siemens Networks 6 November 19, 2007 8 EAP Generalized Pre-Shared Key (EAP-GPSK) 9 draft-ietf-emu-eap-gpsk-07 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 May 22, 2008. 36 Copyright Notice 38 Copyright (C) The IETF Trust (2007). 40 Abstract 42 This Internet Draft defines an Extensible Authentication Protocol 43 method called EAP Generalized Pre-Shared Key (EAP-GPSK). This method 44 is a lightweight shared-key authentication protocol supporting mutual 45 authentication and key derivation. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 51 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 53 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 55 4. Key Derivation . . . . . . . . . . . . . . . . . . . . . . . . 9 57 5. Ciphersuites . . . . . . . . . . . . . . . . . . . . . . . . . 11 59 6. Generalized Key Derivation Function (GKDF) . . . . . . . . . . 12 61 7. Ciphersuites Processing Rules . . . . . . . . . . . . . . . . 12 62 7.1. Ciphersuite #1 . . . . . . . . . . . . . . . . . . . . . 12 63 7.1.1. Encryption . . . . . . . . . . . . . . . . . . . . . . 12 64 7.1.2. Integrity . . . . . . . . . . . . . . . . . . . . . . 13 65 7.1.3. Key Derivation . . . . . . . . . . . . . . . . . . . . 13 66 7.2. Ciphersuite #2 . . . . . . . . . . . . . . . . . . . . . 13 67 7.2.1. Encryption . . . . . . . . . . . . . . . . . . . . . . 14 68 7.2.2. Integrity . . . . . . . . . . . . . . . . . . . . . . 14 69 7.2.3. Key Derivation . . . . . . . . . . . . . . . . . . . . 14 71 8. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . . 14 72 8.1. Header Format . . . . . . . . . . . . . . . . . . . . . . 15 73 8.2. Ciphersuite Formatting . . . . . . . . . . . . . . . . . 15 74 8.3. Payload Formatting . . . . . . . . . . . . . . . . . . . 16 75 8.4. Protected Data . . . . . . . . . . . . . . . . . . . . . 20 76 8.4.1. Protected Results Indication . . . . . . . . . . . . . 23 78 9. Packet Processing Rules . . . . . . . . . . . . . . . . . . . 23 80 10. Example Message Exchanges . . . . . . . . . . . . . . . . . . 24 82 11. Security Considerations . . . . . . . . . . . . . . . . . . . 27 83 11.1. Mutual Authentication . . . . . . . . . . . . . . . . . . 27 84 11.2. Protected Result Indications . . . . . . . . . . . . . . 28 85 11.3. Integrity Protection . . . . . . . . . . . . . . . . . . 28 86 11.4. Replay Protection . . . . . . . . . . . . . . . . . . . . 28 87 11.5. Reflection attacks . . . . . . . . . . . . . . . . . . . 28 88 11.6. Dictionary Attacks . . . . . . . . . . . . . . . . . . . 28 89 11.7. Key Derivation . . . . . . . . . . . . . . . . . . . . . 29 90 11.8. Denial of Service Resistance . . . . . . . . . . . . . . 29 91 11.9. Session Independence . . . . . . . . . . . . . . . . . . 29 92 11.10. Exposition of the PSK . . . . . . . . . . . . . . . . . . 30 93 11.11. Fragmentation . . . . . . . . . . . . . . . . . . . . . . 30 94 11.12. Channel Binding . . . . . . . . . . . . . . . . . . . . . 30 95 11.13. Fast Reconnect . . . . . . . . . . . . . . . . . . . . . 30 96 11.14. Identity Protection . . . . . . . . . . . . . . . . . . . 30 97 11.15. Protected Ciphersuite Negotiation . . . . . . . . . . . . 30 98 11.16. Confidentiality . . . . . . . . . . . . . . . . . . . . . 31 99 11.17. Cryptographic Binding . . . . . . . . . . . . . . . . . . 31 101 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 103 13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 32 105 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 33 107 15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34 108 15.1. Normative References . . . . . . . . . . . . . . . . . . 34 109 15.2. Informative References . . . . . . . . . . . . . . . . . 34 111 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 35 112 Intellectual Property and Copyright Statements . . . . . . . . . . 36 114 1. Introduction 116 EAP Generalized Pre-Shared Key (EAP-GPSK) is an EAP method defining a 117 generalized pre-shared key authentication technique. Mutual 118 authentication is achieved through a nonce-based exchange that is 119 secured by a pre-shared key. 121 EAP-GPSK addresses a large number of design goals with the intention 122 of being applicable in a broad range of usage scenarios. 124 The main design goals of EAP-GPSK are 126 Simplicity: 128 EAP-GPSK should be easy to implement. 130 Security Model: 132 EAP-GPSK has been designed in a threat model where the attacker 133 has full control over the communication channel. This is the EAP 134 threat model that is presented in Section 7.1 of [RFC3748]. 136 Efficiency: 138 EAP-GPSK does not make use of public key cryptography and fully 139 relies of symmetric cryptography. The restriction on symmetric 140 cryptographic computations allows for low computational overhead. 141 Hence, EAP-GPSK is lightweight and well suited for any type of 142 device, especially those with processing power, memory and battery 143 constraints. Additionally it seeks to minimize the number of 144 round trips. 146 Flexibility: 148 EAP-GPSK offers cryptographic flexibility. At the beginning, the 149 EAP server proposes a list of ciphersuites. The client then 150 selects one. The current version of EAP-GPSK comprises two 151 ciphersuites, but additional ones can be easily added. 153 Extensibility: 155 The design of EAP-GPSK allows to securely exchange information 156 between the EAP peer and the EAP server using protected data 157 fields. These fields might, for example, be used to exchange 158 channel binding information or to provide support for identity 159 confidentiality. 161 2. Terminology 163 In this document, several words are used to signify the requirements 164 of the specification. These words are often capitalized. The key 165 words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", 166 "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document 167 are to be interpreted as described in [RFC2119]. 169 This section describes the various variables and functions used in 170 the EAP-GPSK method. 172 Variables: 174 CSuite_List: An octet array listing available ciphersuites (variable 175 length) 177 CSuite_Sel: Ciphersuite selected by the peer (6 octets) 179 ID_Peer: Peer NAI [RFC4282] 181 ID_Server: Server identity as an opaque blob. 183 KS: Integer representing the key size in octets of the selected 184 ciphersuite CSuite_Sel. The key size is one of the ciphersuite 185 parameters. 187 PD_Payload: Data carried within the protected data payload 189 PD_Payload_Block: Block of possibly multiple PD_Payloads carried by 190 a GPSK packet 192 PL: Integer representing the length of the PSK in octets (2 octets) 194 RAND_Peer: Random integer generated by the peer (32 octets) 196 RAND_Server: Random integer generated by the server (32 octets) 198 Operations: 200 A || B: Concatenation of octet strings A and B 202 A**B: Integer exponentiation 203 truncate(A,B): Returns the first B octets of A 205 ENC_X(Y): Encryption of message Y with a symmetric key X, using a 206 defined block cipher 208 KDF_X(Y): Key Derivation Function that generates an arbitrary number 209 of octets of output using secret X and seed Y 211 length(X): Function that returns the length of input X in octets, 212 encoded as a 2-octet integer in network byte order 214 MAC_X(Y): Keyed message authentication code computed over Y with 215 symmetric key X 217 SEC_X(Y): SEC is a function that provides integrity protection based 218 on the chosen ciphersuite. The function SEC uses the algorithm 219 defined by the selected ciphersuite and applies it to the message 220 content Y with key X. In short, SEC_X(Y) = Y || MAC_X(Y). 222 X[A..B]: Notation representing octets A through B of octet array X 224 The following abbreviations are used for the keying material: 226 EMSK: Extended Master Session Key is exported by the EAP method (64 227 octets) 229 MK: Master Key between the peer and EAP server from which all other 230 EAP method session keys are derived (KS octets) 232 MSK: Master Session Key exported by the EAP method (64 octets) 234 PK: Session key generated from the MK and used during protocol 235 exchange to encrypt protected data (KS octets) 237 PSK: Long-term key shared between the peer and the server (PL 238 octets) 240 SK: Session key generated from the MK and used during protocol 241 exchange to demonstrate knowledge of the PSK (KS octets) 243 3. Overview 245 The EAP framework (see Section 1.3 of [RFC3748]) defines three basic 246 steps that occur during the execution of an EAP conversation between 247 the EAP peer, the Authenticator and the EAP server. 249 1. The first phase, discovery, is handled by the underlying 250 protocol. 251 2. The EAP authentication phase with EAP-GPSK is defined in this 252 document. 253 3. The secure association distribution and secure association phases 254 are handled differently depending on the underlying protocol. 256 EAP-GPSK performs mutual authentication between EAP peer ("Peer") and 257 EAP server ("Server") based on a pre-shared key (PSK). The protocol 258 consists of four message exchanges (GPSK-1, ..., GPSK-4), in which 259 both sides exchange nonces and their identities, compute and exchange 260 a Message Authentication Code (MAC) over the previously exchanged 261 values, keyed with the pre-shared key. This MAC is considered as 262 proof of possession of the pre-shared key. 264 A successful protocol exchange is shown in Figure 1. 266 +--------+ +--------+ 267 | | EAP-Request/Identity | | 268 | EAP |<------------------------------------| EAP | 269 | peer | | server | 270 | | EAP-Response/Identity | | 271 | |------------------------------------>| | 272 | | | | 273 | | EAP-Request/GPSK-1 | | 274 | |<------------------------------------| | 275 | | | | 276 | | EAP-Response/GPSK-2 | | 277 | |------------------------------------>| | 278 | | | | 279 | | EAP-Request/GPSK-3 | | 280 | |<------------------------------------| | 281 | | | | 282 | | EAP-Response/GPSK-4 | | 283 | |------------------------------------>| | 284 | | | | 285 | | EAP-Success | | 286 | |<------------------------------------| | 287 +--------+ +--------+ 289 Figure 1: EAP-GPSK: Successful Exchange 291 The full EAP-GPSK protocol is as follows: 293 GPSK-1: 295 ID_Server, RAND_Server, CSuite_List 297 GPSK-2: 299 SEC_SK(ID_Peer, ID_Server, RAND_Peer, RAND_Server, CSuite_List, 300 CSuite_Sel, [ ENC_PK(PD_Payload_Block) ] ) 302 GPSK-3: 304 SEC_SK(RAND_Peer, RAND_Server, ID_Server, CSuite_Sel, [ 305 ENC_PK(PD_Payload_Block) ] ) 307 GPSK-4: 309 SEC_SK( [ ENC_PK(PD_Payload_Block) ] ) 311 The EAP server begins EAP-GPSK by selecting a random number 312 RAND_Server and by encoding the supported ciphersuites into 313 CSuite_List. A ciphersuite consists of an encryption algorithm, a 314 key derivation function and a message authentication code. 316 In GPSK-1, the EAP server sends its identity ID_Server, a random 317 number RAND_Server and a list of supported ciphersuites CSuite_List. 318 The decision which ciphersuite to offer and which ciphersuite to pick 319 is policy- and implementation-dependent and therefore outside the 320 scope of this document. 322 In GPSK-2, the peer sends its identity ID_Peer and a random number 323 RAND_Peer. Furthermore, it repeats the received parameters of the 324 GPSK-1 message (ID_Server, RAND_Server, CSuite_List) and the selected 325 ciphersuite. It computes a Message Authentication Code over all the 326 transmitted parameters. 328 The EAP server verifies the received Message Authentication Code. In 329 case of successful verification, the EAP server computes a Message 330 Authentication Code over the session parameter and returns it to the 331 peer (within GPSK-3). Within GPSK-2 and GPSK-3, peer and EAP server 332 have the possibility to exchange encrypted protected data parameters. 334 The peer verifies the received Message Authentication Code. If the 335 verification is successful, GPSK-4 is prepared. This message can 336 optionally contain the peer's protected data parameters. 338 Upon receipt of GPSK-4, the server processes any included 339 PD_Payload_Block. Then, the EAP server sends an EAP Success message 340 to indicate the successful outcome of the authentication. 342 4. Key Derivation 344 EAP-GPSK provides key derivation in compliance to the requirements of 345 [RFC3748] and [I-D.ietf-eap-keying]. Note that this section provides 346 an abstract description for the key derivation procedure that needs 347 to be instantiated with a specific ciphersuite. 349 The long-term credential shared between EAP peer and EAP server 350 SHOULD be a strong pre-shared key PSK of at least 16 octets, though 351 its length and entropy is variable. While it is possible to use a 352 password or passphrase, doing so is NOT RECOMMENDED as it would make 353 EAP-GPSK vulnerable to dictionary attacks. 355 During an EAP-GPSK authentication, a Master Key MK, a Session Key SK 356 and a Protected Data Encryption Key PK (if using an encrypting 357 ciphersuite) are derived using the ciphersuite-specified KDF and data 358 exchanged during the execution of the protocol, namely 'RAND_Peer || 359 ID_Peer || RAND_Server || ID_Server' referred as inputString as its 360 short-hand form. 362 In case of successful completion, EAP-GPSK derives and exports an MSK 363 and EMSK both in length of 64 octets. 365 The following notation is used: KDF-X(Y, Z)[A..B], whereby 366 X is the length, in octets, of the desired output, 367 Y is a secret key, 368 Z is the inputString, 369 [A..B] extracts the string of octets starting with octet A finishing 370 with octet B from the output of the KDF function. 372 This keying material is derived using the ciphersuite-specified KDF 373 as follows: 375 o inputString = RAND_Peer || ID_Peer || RAND_Server || ID_Server 376 o zero = 0x00 || 0x00 || ... || 0x00 (KS times) 378 o MK = KDF-KS(zero, PL || PSK || CSuite_Sel || inputString)[0..KS-1] 379 o MSK = KDF-{128+2*KS}(MK, inputString)[0..63] 380 o EMSK = KDF-{128+2*KS}(MK, inputString)[64..127] 381 o SK = KDF-{128+2*KS}(MK, inputString)[128..127+KS] 382 o PK = KDF-{128+2*KS}(MK, inputString)[128+KS..127+2*KS] (if using 383 an encrypting ciphersuite) 385 Additionally, the EAP keying framework [I-D.ietf-eap-keying] requires 386 the definition of a Method-ID, Session-ID, Peer-ID, and Server-ID. 388 These values are defined as: 390 o zero = 0x00 || 0x00 || ... || 0x00 (KS times) 391 o Method-ID = KDF-16(zero, "Method ID" || EAP_Method_Type || 392 CSuite_Sel || inputString)[0..15] 393 o Session-ID = Type_Code || Method_ID 394 o Peer-ID = ID_Peer 395 o Server-ID = ID_Server 397 EAP_Method_Type refers to the integer value of the IANA allocated EAP 398 Type code. 400 Figure 2 depicts the key derivation procedure of EAP-GPSK. 402 +-------------+ +-------------------------------+ 403 | PL-octet | | RAND_Peer || ID_Peer || | 404 | PSK | | RAND_Server || ID_Server | 405 +-------------+ +-------------------------------+ 406 | | | 407 | +------------+ | | 408 | | CSuite_Sel | | | 409 | +------------+ | | 410 | | | | 411 v v v | 412 +--------------------------------------------+ | 413 | KDF | | 414 +--------------------------------------------+ | 415 | | 416 v | 417 +-------------+ | 418 | KS-octet | | 419 | MK | | 420 +-------------+ | 421 | | 422 v v 423 +---------------------------------------------------+ 424 | KDF | 425 +---------------------------------------------------+ 426 | | | | 427 v v v v 428 +---------+ +---------+ +----------+ +----------+ 429 | 64-octet| | 64-octet| | KS-octet | | KS-octet | 430 | MSK | | EMSK | | SK | | PK | 431 +---------+ +---------+ +----------+ +----------+ 433 Figure 2: EAP-GPSK Key Derivation 435 5. Ciphersuites 437 The design of EAP-GPSK allows cryptographic algorithms and key sizes, 438 called ciphersuites, to be negotiated during the protocol run. The 439 ability to specify block-based and hash-based ciphersuites is 440 offered. Extensibility is provided with the introduction of new 441 ciphersuites; this document specifies an initial set. The CSuite/ 442 Specifier column in Figure 3 uniquely identifies a ciphersuite. 444 For a vendor-specific ciphersuite the first three octets are the 445 vendor-specific Object Identifier (OID) contains the IANA assigned 446 "SMI Network Management Private Enterprise Codes" value (see 447 [RFC3232]), encoded in network byte order. The last three octets are 448 vendor assigned for the specific ciphersuite. 450 The following ciphersuites are specified in this document: 452 +-----------+----+-------------+--------------+----------------+ 453 | CSuite/ | KS | Encryption | Integrity / | Key Derivation | 454 | Specifier | | | KDF MAC | Function | 455 +-----------+----+-------------+--------------+----------------+ 456 | 0x000001 | 16 | AES-CBC-128 | AES-CMAC-128 | GKDF | 457 +-----------+----+-------------+--------------+----------------+ 458 | 0x000002 | 32 | NULL | HMAC-SHA256 | GKDF | 459 +-----------+----+-------------+--------------+----------------+ 461 Figure 3: Ciphersuites 463 Ciphersuite 1, which is based on AES as a cryptographic primitive, is 464 mandatory to implement. This document specifies also a second 465 ciphersuite, but its support is optional. Both ciphersuites defined 466 in this document make use of the GKDF, as defined in Section 6. The 467 following aspects need to be considered to ensure that the PSK that 468 is used as input to the GKDF is sufficiently long (in case it is 469 longer it needs to be truncated): 471 1. The PSK used with ciphersuite 1 MUST be 128 bits in length or 472 longer. 473 2. The PSK used with ciphersuite 2 MUST be 256 bits in length or 474 longer. 475 3. It is RECOMMENDED that 256 bit keys be provisioned in all cases 476 to provide enough entropy for all current and many possible 477 future ciphersuites. 479 Ciphersuites defined in the future that make use of the GKDF need to 480 specify a minimum PSK size (as it is done with the ciphersuites 481 listed in this document). 483 6. Generalized Key Derivation Function (GKDF) 485 Each ciphersuite needs to specify a key derivation function. The 486 ciphersuites defined in this document make use of the Generalized Key 487 Derivation Function (GKDF) that utilizes the MAC function defined in 488 the ciphersuite. Future ciphersuites can use any other formally 489 specified KDF that takes as arguments a key and a seed value, and 490 produces at least 128+2*KS octets of output. 492 GKDF has the following structure: 494 GKDF-X(Y, Z) 496 X length, in octets, of the desired output 497 Y secret key 498 Z inputString 500 GKDF-X (Y, Z) 501 { 502 n = ceiling integer of ( X / KS ); 503 /* determine number of output blocks */ 505 M_0 = ""; 506 result = ""; 508 for i = 1 to n { 509 M_i = MAC_Y (i || Z); 510 result = result || M_i; 511 } 513 return truncate(result, X) 514 } 516 Note that the variable 'i' in M_i is represented as a 2-octet value 517 in network byte order. 519 7. Ciphersuites Processing Rules 521 7.1. Ciphersuite #1 523 7.1.1. Encryption 525 With this ciphersuite all cryptography is built around a single 526 cryptographic primitive, AES-128 ([AES]). Within the protected data 527 frames, AES-128 is used in Cipher Block Chaining (CBC) mode of 528 operation (see [CBC]). This EAP method uses encryption in a single 529 payload, in the protected data payload (see Section 8.4). 531 In a nutshell, the CBC mode proceeds as follows. The IV is XORed 532 with the first plaintext block before it is encrypted. Then for 533 successive blocks, the previous ciphertext block is XORed with the 534 current plaintext, before it is encrypted. 536 7.1.2. Integrity 538 Ciphersuite 1 uses CMAC as Message Authentication Code. CMAC is 539 recommended by NIST. Among its advantages, CMAC is capable to work 540 with messages of arbitrary length. A detailed description of CMAC 541 can be found in [CMAC]. 543 The following instantiation is used: AES-CMAC-128(SK, Input) denotes 544 the MAC of Input under the key SK. 546 where Input refers to the following content: 548 o Value of SEC_SK(Value) in message GPSK-2 549 o Value of SEC_SK(Value) in message GPSK-3 550 o Value of SEC_SK(Value) in message GPSK-4 552 7.1.3. Key Derivation 554 This ciphersuite instantiates the KDF in the following way: 556 inputString = RAND_Peer || ID_Peer || RAND_Server || ID_Server 558 MK = GKDF-16 (PSK[0..127], PL || PSK || CSuite_Sel || inputString) 560 MSK = GKDF-160 (MK, inputString)[0..63] 562 EMSK = GKDF-160 (MK, inputString)[64..127] 564 SK = GKDF-160 (MK, inputString)[128..143] 566 PK = GKDF-160 (MK, inputString)[144..159] 568 Method-ID = GKDF-16 (zero, "Method ID" || EAP_Method_Type || 569 CSuite_Sel || inputString) 571 7.2. Ciphersuite #2 572 7.2.1. Encryption 574 Ciphersuite 2 does not include an algorithm for encryption. With a 575 NULL encryption algorithm, encryption is defined as: 577 E_X(Y) = Y 579 When using this ciphersuite, the data exchanged inside the protected 580 data block is not encrypted. Therefore this mode MUST NOT be used if 581 confidential information appears inside the protected data block. 583 7.2.2. Integrity 585 Ciphersuite 2 uses the keyed MAC function HMAC, with the SHA256 hash 586 algorithm (see [RFC4634]). 588 For integrity protection the following instantiation is used: 590 HMAC-SHA256(SK, Input) denotes the MAC of Input under the key SK 591 where Input refers to the following content: 593 o Value of SEC_SK(Value) in message GPSK-2 594 o Value of SEC_SK(Value) in message GPSK-3 595 o Value of SEC_SK(Value) in message GPSK-4 597 7.2.3. Key Derivation 599 This ciphersuite instantiates the KDF in the following way: 601 inputString = RAND_Peer || ID_Peer || RAND_Server || ID_Server 603 MK = GKDF-32 (PSK[0..255], PL || PSK || CSuite_Sel || inputString) 605 MSK = GKDF-160 (MK, inputString)[0..63] 607 EMSK = GKDF-160 (MK, inputString)[64..127] 609 SK = GKDF-160 (MK, inputString)[128..159] 611 Method-ID = GKDF-16 (zero, "Method ID" || EAP_Method_Type || 612 CSuite_Sel || inputString) 614 8. Packet Formats 616 This section defines the packet format of the EAP-GPSK messages. 618 8.1. Header Format 620 The EAP-GPSK header has the following structure: 622 --- bit offset ---> 623 0 1 2 3 624 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 625 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 626 | Code | Identifier | Length | 627 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 628 | Type | OP-Code | | 629 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 630 | | 631 ... Payload ... 632 | | 633 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 635 Figure 5 637 The Code, Identifier, Length, and Type fields are all part of the EAP 638 header, and defined in [RFC3748]. IANA has allocated EAP Method Type 639 XX for EAP-GPSK, thus the Type field in the EAP header MUST be XX. 641 The OP-Code field is one of four values: 643 o 0x01 : GPSK-1 644 o 0x02 : GPSK-2 645 o 0x03 : GPSK-3 646 o 0x04 : GPSK-4 647 o 0x05 : GPSK-Fail 648 o 0x06 : GPSK-Protected-Fail 649 All other values of this OP-Code field are available via IANA 650 registration. 652 8.2. Ciphersuite Formatting 654 Ciphersuites are encoded as 6-octet arrays. The first four octets 655 indicate the CSuite/Vendor field. For vendor-specific ciphersuites, 656 this represents the vendor Object Identifier (OID) contains the IANA 657 assigned "SMI Network Management Private Enterprise Codes" value (see 658 [RFC3232]), encoded in network byte order. The last two octets 659 indicate the CSuite/Specifier field, which identifies the particular 660 ciphersuite. The 4-octet CSuite/Vendor value 0x00000000 indicates 661 ciphersuites allocated by the IETF. 663 Graphically, they are represented as 664 --- bit offset ---> 665 0 1 2 3 666 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 667 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 668 | CSuite/Vendor = 0x00000000 or OID | 669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 670 | CSuite/Specifier | 671 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 673 Figure 6 675 CSuite_Sel is encoded as a 6-octet ciphersuite CSuite/Vendor and 676 CSuite/Specifier pair. 678 CSuite_List is a variable-length octet array of ciphersuites. It is 679 encoded by concatenating encoded ciphersuite values. Its length in 680 octets MUST be a multiple of 6. 682 8.3. Payload Formatting 684 Payload formatting is based on the protocol exchange description in 685 Section 3. 687 The GPSK-1 payload format is defined as follows: 689 --- bit offset ---> 690 0 1 2 3 691 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 692 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 693 | length(ID_Server) | | 694 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 695 | | 696 ... ID_Server ... 697 | | 698 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 699 | | 700 ... 32-octet RAND_Server ... 701 | | 702 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 703 | length(CSuite_List) | | 704 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 705 | | 706 ... CSuite_List ... 707 | | 708 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 710 Figure 7: GPSK-1 Payload 712 The GPSK-2 payload format is defined as follows: 714 --- bit offset ---> 715 0 1 2 3 716 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 717 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 718 | length(ID_Peer) | | 719 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 720 | | 721 ... ID_Peer ... 722 | | 723 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 724 | length(ID_Server) | | 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 726 | | 727 ... ID_Server ... 728 | | 729 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 730 | | 731 ... 32-octet RAND_Peer ... 732 | | 733 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 734 | | 735 ... 32-octet RAND_Server ... 736 | | 737 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 738 | length(CSuite_List) | | 739 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 740 | | 741 ... CSuite_List ... 742 | | 743 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 744 | CSuite_Sel | 745 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 746 | | length(PD_Payload_Block) | 747 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 748 | | 749 ... optional PD_Payload_Block ... 750 | | 751 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 752 | | 753 ... KS-octet payload MAC ... 754 | | 755 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 757 Figure 8: GPSK-2 Payload 759 If the optional protected data payload is not included, then 760 length(PD_Payload_Block)=0 and the PD payload is excluded. 762 The GPSK-3 payload is defined as follows: 764 --- bit offset ---> 765 0 1 2 3 766 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 767 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 768 | | 769 ... 32-octet RAND_Peer ... 770 | | 771 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 772 | | 773 ... 32-octet RAND_Server ... 774 | | 775 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 776 | length(ID_Server) | | 777 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 778 | | 779 ... ID_Server ... 780 | | 781 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 782 | CSuite_Sel | 783 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 784 | | length(PD_Payload_Block) | 785 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 786 | | 787 ... optional PD_Payload_Block ... 788 | | 789 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 790 | | 791 ... KS-octet payload MAC ... 792 | | 793 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 795 Figure 9: GPSK-3 Payload 797 If the optional protected data payload is not included, then 798 length(PD_Payload_Block)=0 and the PD payload is excluded. 800 The GPSK-4 payload format is defined as follows: 802 --- bit offset ---> 803 0 1 2 3 804 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 805 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 806 | length(PD_Payload_Block) | | 807 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 808 | | 809 ... optional PD_Payload_Block ... 810 | | 811 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 812 | | 813 ... KS-octet payload MAC ... 814 | | 815 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 817 Figure 10: GPSK-4 Payload 819 If the optional protected data payload is not included, then 820 length(PD_Payload_Block)=0 and the PD payload is excluded. The MAC 821 MUST always be included, regardless of the presence of 822 PD_Payload_Block. 824 The GPSK-Fail payload format is defined as follows: 826 --- bit offset ---> 827 0 1 2 3 828 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 829 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 830 | Failure-Code | 831 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 833 Figure 11: GPSK-Fail Payload 835 The GPSK-Protected-Fail payload format is defined as follows: 837 --- bit offset ---> 838 0 1 2 3 839 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 840 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 841 | Failure-Code | 842 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 843 | | 844 ... KS-octet payload MAC ... 845 | | 846 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 847 Figure 12: GPSK-Protected-Fail Payload 849 The Failure-Code field is one of three values, but can be extended: 851 o 0x00000001: PSK Not Found 852 o 0x00000002: Authentication Failure 853 o 0x00000003: Authorization Failure 854 All other values of this field are available via IANA registration. 856 "PSK Not Found" indicates a key for a particular user could not be 857 located, making authentication impossible. "Authentication Failure" 858 indicates a MAC failure due to a PSK mismatch. "Authorization 859 Failure" indicates that while the PSK being used is correct, the user 860 is not authorized to connect. 862 8.4. Protected Data 864 The protected data blocks are a generic mechanism for the peer and 865 server to securely exchange data. If the specified ciphersuite has a 866 NULL encryption primitive, then this channel only offers 867 authenticity, and not confidentiality. 869 These payloads are encoded as the concatenation of type-length-value 870 (TLV) triples called PD_Payloads. 872 Type values are encoded as a 6-octet string and represented by a 873 4-octet vendor and 2-octet specifier field. The vendor field 874 indicates the type as either standards-specified or vendor-specific. 875 If these four octets are 0x00000000, then the value is standards- 876 specified, and any other value represents a vendor-specific Object 877 Identifier (OID). 879 The specifier field indicates the actual type. For vendor field 880 0x00000000, the specifier field is maintained by IANA. For any other 881 vendor field, the specifier field is maintained by the vendor. 883 Length fields are specified as 2-octet integers in network byte 884 order, and reflect only the length of the value, and do not include 885 the length of the type and length fields. 887 Graphically, this can be depicted as follows: 889 --- bit offset ---> 890 0 1 2 3 891 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 892 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 893 | PData/Vendor | ... 894 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 895 PData/Specifier | PData/Length | 896 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 897 | | 898 ... PData/Value ... 899 | | 900 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 902 Protected Data Payload (PD_Payload) Formatting 904 These PD_Payloads are concatenated together to form a 905 PD_Payload_Block. The If the CSuite_Sel includes support for 906 encryption, then the PD_Payload_Block includes fields specifying an 907 initialization vector (IV), and the necessary padding. This can be 908 depicted as follows: 910 --- bit offset ---> 911 0 1 2 3 912 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 913 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 914 | Initialization Vector | 915 ... (length is block size for encryption algorithm) ... 916 | | 917 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 918 | | 919 ... PD_Payload ... 920 | | 921 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 922 | | 923 ... optional PD_Payload, etc ... 924 | | 925 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 926 | | Padding (0-255 octets) | 927 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ 928 | | Pad Length | 929 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 931 Protected Data Block (PD_Payload_Block) Formatting if Encryption 932 Supported 934 The Initialization Vector is a randomly chosen value whose length is 935 equal to the block length of the underlying encryption algorithm. 937 Recipients MUST accept any value. Senders SHOULD either pick this 938 value pseudo-randomly and independently for each message or use the 939 final ciphertext block of the previous message sent. Senders MUST 940 NOT use the same value for each message, use a sequence of values 941 with low hamming distance (e.g., a sequence number), or use 942 ciphertext from a received message. 944 The concatenation of PD_Payloads along with the padding and padding 945 length are all encrypted using the negotiated block cipher. If no 946 block cipher is specified, then these fields are not encrypted. 948 The Padding field MAY contain any value chosen by the sender, and 949 MUST have a length that makes the combination of the concatenation of 950 PD_Payloads, the Padding, and the Pad Length to be a multiple of the 951 encryption block size. 953 The Pad Length field is the length of the Padding field. The sender 954 SHOULD set the Pad Length to the minimum value that makes the 955 combination of the PD_Payloads, the Padding, and the Pad Length a 956 multiple of the block size, but the recipient MUST accept any length 957 that results in proper alignment. This field is encrypted with the 958 negotiated cipher. 960 If the negotiated ciphersuite does not support encryption, then the 961 padding field MUST be of length zero. The padding length field MUST 962 still be present, and contain the value zero. This is depicted in 963 the following figure. 965 --- bit offset ---> 966 0 1 2 3 967 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 968 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 969 | | 970 ... PD_Payload ... 971 | | 972 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 973 | | 974 ... optional PD_Payload, etc +-+-+-+-+-+-+-+-+ 975 | | 0x00 | 976 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 978 Protected Data Block (PD_Payload_Block) Formatting Without Encryption 980 For PData/Vendor field 0x000000, the following PData/Specifier fields 981 are defined: 983 o 0x000000 : Reserved 984 o 0x000001 : Protected Results Indication 985 All other values of this field are available via IANA registration. 987 8.4.1. Protected Results Indication 989 Based on the PData/Specifier allocation the following 8-bit payload 990 is specified to be placed in the PD_Payload Value to provide the 991 functionality of protected results indication. 993 0 994 0 1 2 3 4 5 6 7 995 +-+-+-+-+-+-+-+-+ 996 |I|R|R|R|R|R|R|R| 997 +-+-+-+-+-+-+-+-+ 999 I: Result Indicator 1001 The bits have the following meaning: 1003 (0): Success 1004 (1): Failure 1006 R: Reserved 1007 These bits are used for padding. 1009 The 8 bits of protected results indication functionality, which does 1010 not require confidentiality protection, MUST only be sent in GPSK-3 1011 from the EAP server to the EAP peer. 1013 9. Packet Processing Rules 1015 This section defines how the EAP peer and EAP server MUST behave when 1016 received packet is deemed invalid. 1018 Any EAP-GPSK packet that cannot be parsed by the EAP peer or the EAP 1019 server MUST be silently discarded. An EAP peer or EAP server 1020 receiving any unexpected packet (e.g., an EAP peer receiving GPSK-3 1021 before receiving GPSK-1 or before transmitting GPSK-2) MUST silently 1022 discard the packet. 1024 GPSK-1 contains no MAC protection, so provided it properly parses, it 1025 MUST be accepted by the peer. Note that the ciphersuite list 1026 provided by the EAP server in CSuite_List MUST always include the 1027 mandatory-to-implement ciphersuite defined in this document. Hence, 1028 there is always at least one ciphersuite in common between the EAP 1029 peer and the EAP server. If the EAP peer decides the ID_Server is 1030 that of a AAA server to which it does not wish to authenticate, the 1031 EAP peer should respond with an EAP-NAK. 1033 For GPSK-2, if ID_Peer is for an unknown user, the EAP server MUST 1034 send either a "PSK Not Found" GPSK-Fail message, or an 1035 "Authentication Failure" GPSK-Fail, depending on its policy, and 1036 discard the received packet. If the MAC validation fails, the server 1037 MUST transmit a GPSK-Fail message specifying "Authentication Failure" 1038 and discard the received packet. If the RAND_Server or CSuite_List 1039 field in GPSK-2 does not match the values in GPSK-1, the server MUST 1040 silently discard the packet. If server policy determines the peer is 1041 not authorized and the MAC is correct, the server MUST transmit a 1042 GPSK-Protected-Fail message indicating "Authorization Failure" and 1043 discard the received packet. 1045 A peer receiving a GPSK-Fail / GPSK-Protected-Fail message in 1046 response to a GPSK-2 message MUST replay the received GPSK-Fail / 1047 GPSK-Protected-Fail message. Then, the EAP server returns an EAP- 1048 Failure after receiving the GPSK-Fail / GPSK-Protected-Fail message 1049 to correctly finish the EAP conversation. If MAC validation on a 1050 GPSK-Protected-Fail packet fails, then the received packet MUST be 1051 silently discarded. 1053 For GPSK-3, a peer MUST silently discard messages where the 1054 RAND_Peer, the RAND_Server, or the CSuite_Sel fields do match those 1055 transmitted in GPSK-2. An EAP peer MUST silently discard any packet 1056 whose MAC fails. 1058 For GPSK-4, a server MUST silently discard any packet whose MAC fails 1059 validation. 1061 If a decryption failure of a protected payload is detected, the 1062 recipient MUST silently discard the GPSK packet. 1064 10. Example Message Exchanges 1066 This section shows a couple of example message flows. 1068 A successful EAP-GPSK message exchange is shown in Figure 1. 1070 +--------+ +--------+ 1071 | | EAP-Request/Identity | | 1072 | EAP |<------------------------------------| EAP | 1073 | peer | | server | 1074 | | EAP-Response/Identity | | 1075 | |------------------------------------>| | 1076 | | | | 1077 | | EAP-Request/GPSK-1 | | 1078 | |<------------------------------------| | 1079 | | | | 1080 | | EAP-Response/EAP-NAK | | 1081 | |------------------------------------>| | 1082 | | | | 1083 | | EAP-Failure | | 1084 | |<------------------------------------| | 1085 +--------+ +--------+ 1087 EAP-GPSK: Unsuccessful Exchange (Unacceptable AAA server identity; 1088 ID_Server) 1090 +--------+ +--------+ 1091 | | EAP-Request/Identity | | 1092 | EAP |<------------------------------------| EAP | 1093 | peer | | server | 1094 | | EAP-Response/Identity | | 1095 | |------------------------------------>| | 1096 | | | | 1097 | | EAP-Request/GPSK-1 | | 1098 | |<------------------------------------| | 1099 | | | | 1100 | | EAP-Response/GPSK-2 | | 1101 | |------------------------------------>| | 1102 | | | | 1103 | | EAP-Request/GPSK-3 (GPSK-Fail | | 1104 | | (PSK Not Found or Authentication | | 1105 | | Failure)) | | 1106 | |<------------------------------------| | 1107 | | | | 1108 | | EAP-Response/GPSK-4 (GPSK-Fail | | 1109 | | (PSK Not Found or Authentication | | 1110 | | Failure)) | | 1111 | |------------------------------------>| | 1112 | | | | 1113 | | EAP-Failure | | 1114 | |<------------------------------------| | 1115 +--------+ +--------+ 1116 EAP-GPSK: Unsuccessful Exchange (Unknown user) 1118 +--------+ +--------+ 1119 | | EAP-Request/Identity | | 1120 | EAP |<------------------------------------| EAP | 1121 | peer | | server | 1122 | | EAP-Response/Identity | | 1123 | |------------------------------------>| | 1124 | | | | 1125 | | EAP-Request/GPSK-1 | | 1126 | |<------------------------------------| | 1127 | | | | 1128 | | EAP-Response/GPSK-2 | | 1129 | |------------------------------------>| | 1130 | | | | 1131 | | EAP-Request/GPSK-3 (GPSK-Fail | | 1132 | | (Authentication Failure)) | | 1133 | |<------------------------------------| | 1134 | | | | 1135 | | EAP-Response/GPSK-4 (GPSK-Fail | | 1136 | | (Authentication Failure)) | | 1137 | |------------------------------------>| | 1138 | | | | 1139 | | EAP-Failure | | 1140 | |<------------------------------------| | 1141 +--------+ +--------+ 1143 EAP-GPSK: Unsuccessful Exchange (Invalid MAC in GPSK-2) 1145 +--------+ +--------+ 1146 | | EAP-Request/Identity | | 1147 | EAP |<------------------------------------| EAP | 1148 | peer | | server | 1149 | | EAP-Response/Identity | | 1150 | |------------------------------------>| | 1151 | | | | 1152 | | EAP-Request/GPSK-1 | | 1153 | |<------------------------------------| | 1154 | | | | 1155 | | EAP-Response/GPSK-2 | | 1156 | |------------------------------------>| | 1157 | | | | 1158 | | EAP-Request/GPSK-3 | | 1159 | | GPSK-Protected-Fail | | 1160 | | (Authorization Failure) | | 1161 | |<------------------------------------| | 1162 | | | | 1163 | | EAP-Request/GPSK-4 | | 1164 | | GPSK-Protected-Fail | | 1165 | | (Authorization Failure) | | 1166 | |------------------------------------>| | 1167 | | | | 1168 | | EAP-Failure | | 1169 | |<------------------------------------| | 1170 +--------+ +--------+ 1172 EAP-GPSK: Unsuccessful Exchange (Authorization failure) 1174 11. Security Considerations 1176 [RFC3748] highlights several attacks that are possible against EAP 1177 since EAP itself does not provide any security. 1179 This section discusses the claimed security properties of EAP-GPSK as 1180 well as vulnerabilities and security recommendations in the threat 1181 model of [RFC3748]. 1183 11.1. Mutual Authentication 1185 EAP-GPSK provides mutual authentication. 1187 The server believes that the peer is authentic when it successfully 1188 verifies the MAC in the GPSK-2 message and the peer believes that the 1189 server is authentic when it successfully verifies the MAC it receives 1190 with the GPSK-3 message. 1192 The key used for mutual authentication is derived based on the long- 1193 term secret PSK, nonces contributed by both parties and other 1194 parameters. The long-term secret PSK has to provide sufficient 1195 entropy and therefore sufficient strength. The nonces (RAND_Peer and 1196 RAND_Server) need to be fresh and unique for every session. In this 1197 way EAP-GPSK is not different than other authentication protocols 1198 based on pre-shared keys. 1200 11.2. Protected Result Indications 1202 EAP-GPSK offers the capability to exchange protected result 1203 indications using the protected data payloads. 1205 11.3. Integrity Protection 1207 EAP-GPSK provides integrity protection based on the ciphersuites 1208 suggested in this document. Integrity protection is a minimum 1209 feature every ciphersuite must provide. 1211 11.4. Replay Protection 1213 EAP-GPSK provides replay protection of its mutual authentication part 1214 thanks to the use of random numbers RAND_Server and RAND_Peer. Since 1215 RAND_Server is 32 octets long, one expects to have to record 2**64 1216 (i.e., approximately 1.84*10**19) EAP-GPSK successful authentication 1217 before an protocol run can be replayed. Hence, EAP-GPSK provides 1218 replay protection of its mutual authentication part as long as 1219 RAND_Server and RAND_Peer are chosen at random, randomness is 1220 critical for replay protection. RFC 4086 [RFC4086] describes 1221 techniques for producing random quantities. 1223 11.5. Reflection attacks 1225 EAP-GPSK provides protection against reflection attacks in case of an 1226 extended authentication because the messages are constructed in a 1227 different fashion. 1229 11.6. Dictionary Attacks 1231 EAP-GPSK relies on a long-term shared secret (PSK) that MUST be based 1232 on at least 16 octets of entropy to guarantee security against 1233 dictionary attacks. Users who use passwords are not guaranteed 1234 protection against dictionary attacks. Derivation of the long-term 1235 shared secret from a password is strongly discouraged. 1237 11.7. Key Derivation 1239 EAP-GPSK supports key derivation as shown in Section 4. 1241 11.8. Denial of Service Resistance 1243 There are two forms of denial of service attacks relevant for this 1244 document, namely attacks that lead to vast amount of state being 1245 allocated and attacks against the computational resources. The 1246 latter onces are less problematic for EAP-GPSK since all computations 1247 are lightweight. We will consider the former one in more detail 1248 below. 1250 In an EAP-GPSK conversation the server has to maintain state, namely 1251 the 32-octet RAND_Server, when transmitting the GPSK-1 message to the 1252 peer. An adversary could therefore flood a server with a large 1253 number of EAP-GPSK communication attempts. An EAP server may 1254 therefore ensure that established state times out after a relatively 1255 short period of time when no further messages are received. This 1256 enables a sort of garbage collection. 1258 The client would have to potentially keep state information after 1259 receiving the GPSK-1 message. Section 4.2 of [HM2004] describes a 1260 short of client-side denial of service attack and illustrates three 1261 possible solutions to avoid having the client to keep state when 1262 receiving the first message. When the client receives the GPSK-3 1263 message then it needs to derive keying material based on the 1264 following information: RAND_Peer, ID_Peer, RAND_Server, ID_Server, 1265 RAND_Peer, RAND_Server. Hence, GPSK-3 includes all necessary 1266 parameters to allow the client to (a) avoid allocating state 1267 information with the arrival of GPSK-1 and (b) to enable deriving the 1268 keying material. 1270 The security considerations of EAP itself, see Section 5.2 and 1271 Section 7 of RFC 3748 [RFC3748], are also applicable to this 1272 specification (e.g., for example concerning EAP-based notifications). 1274 11.9. Session Independence 1276 Thanks to its key derivation mechanisms, EAP-GPSK provides session 1277 independence: passive attacks (such as capture of the EAP 1278 conversation) or active attacks (including compromise of the MSK or 1279 EMSK) do not enable compromise of subsequent or prior MSKs or EMSKs. 1280 The assumption that RAND_Peer and RAND_Server are random is central 1281 for the security of EAP-GPSK in general and session independence in 1282 particular. 1284 11.10. Exposition of the PSK 1286 EAP-GPSK does not provide perfect forward secrecy. Compromise of the 1287 PSK leads to compromise of recorded past sessions. 1289 Compromise of the PSK enables the attacker to impersonate the peer 1290 and the server and it allows the adversary to compromise future 1291 sessions. 1293 EAP-GPSK provides no protection against a legitimate peer sharing its 1294 PSK with a third party. Such protection may be provided by 1295 appropriate repositories for the PSK, which choice is outside the 1296 scope of this document. The PSK used by EAP-GPSK must only be shared 1297 between two parties: the peer and the server. In particular, this 1298 PSK must not be shared by a group of peers communicating with the 1299 same server. 1301 The PSK used by EAP-GPSK must be cryptographically separated from 1302 keys used by other protocols, otherwise the security of EAP-GPSK may 1303 be compromised. 1305 11.11. Fragmentation 1307 EAP-GPSK does not support fragmentation and reassembly since the 1308 message size is relatively small. 1310 11.12. Channel Binding 1312 This document enables the ability to exchange channel binding 1313 information. It does not, however, define the encoding of channel 1314 binding information in the document. 1316 11.13. Fast Reconnect 1318 EAP-GPSK does not provide the fast reconnect capability since this 1319 method is already at (or close to) the lower limit of the number of 1320 roundtrips and the cryptographic operations. 1322 11.14. Identity Protection 1324 Identity protection is not specified in this document. Extensions 1325 can be defined that enhance this protocol to provide this feature. 1327 11.15. Protected Ciphersuite Negotiation 1329 EAP-GPSK provides protected ciphersuite negotiation via the 1330 indication of available ciphersuites by the server in the first 1331 message and a confirmation by the peer in the subsequent message. 1333 Note, however, that the GPSK-2 message may optionally contain a 1334 payload, ENC_PK(PD_Payload_Block), protected with an algorithm based 1335 on a selected ciphersuite before the ciphersuite list has actually 1336 been authenticated. In the classical downgrading attack an adversary 1337 would chose a ciphersuite that it weak enough to that it could break 1338 it in real-time or to turn security off. The latter is not possible 1339 since any ciphersuite defined for EAP-GPSK must at least provide 1340 authentication and integrity protection. Confidentity protection is 1341 optional. When, some time in the future, a ciphersuite contains 1342 algorithms that can be broken in real-time then a policy on peers and 1343 the server needs to indicate that such a ciphersuite must not be 1344 selected by any of parties. 1346 Furthermore, an adversay may modify the selection of the ciphersuite 1347 to for the client to select a ciphersuite that does not provide 1348 confidentity protection. As a result this would cause the content of 1349 PD_Payload_Block to be transmitted in cleartext. When protocol 1350 designers extend EAP-GPSK to carry information in the 1351 PD_Payload_Block of the GPSK-2 message then it must be indicated 1352 whether confidentiality protection is mandatory. In case such an 1353 extension requires a ciphersuite with confidentiality protection then 1354 the policy at the peer must not transmit information of that 1355 extension in the PD_Payload_Block of the GPSK-2 message. The peer 1356 may, if possible, delay the transmission of this information element 1357 to the GPSK-4 message where the ciphersuite negotiation has been 1358 confirmed already. In general, when a ciphersuite is selected that 1359 does not provide confidentiality protection then information that 1360 demands confidentility protection must not be included in any of the 1361 PD_Payload_Block objects. 1363 11.16. Confidentiality 1365 Although EAP-GPSK provides confidentiality in its protected data 1366 payloads, it cannot claim to do so as per Section 7.2.1 of [RFC3748]. 1368 11.17. Cryptographic Binding 1370 Since EAP-GPSK does not tunnel another EAP method, it does not 1371 implement cryptographic binding. 1373 12. IANA Considerations 1375 This document requires IANA to allocate a new EAP Type for EAP-GPSK. 1377 This document requires IANA to create a new registry for 1378 ciphersuites, protected data types, failure codes and op-codes. IANA 1379 is furthermore instructed to add the specified ciphersuites, 1380 protected data types, failure codes and op-codes to these registries 1381 as defined in this document. Values can be added or modified with 1382 informational RFCs defining either block-based or hash-based 1383 ciphersuites, protected data payloads, failure codes and op-codes. 1384 Each ciphersuite needs to provide processing rules and needs to 1385 specify how the following algorithms are instantiated: encryption, 1386 integrity, key derivation and key length. 1388 Figure 3 represents the initial ciphersuite CSuite/Specifier registry 1389 setup. The CSuite/Specifier field is 16 bits long. All other values 1390 are available via IANA registration. 1392 The following is the initial protected data PData/Specifier registry 1393 setup: 1395 o 0x000000 : Reserved 1396 o 0x000001 : Protected Results Indication 1398 The PData/Specifier field is 24 bits long and all other values are 1399 available via IANA registration. Each extension needs to indicate 1400 whether confidentiality protection for transmission between the EAP 1401 peer and the EAP server is mandatory. The following layout 1402 represents the initial Failure-Code registry setup: 1404 o 0x00000001: PSK Not Found 1405 o 0x00000002: Authentication Failure 1406 o 0x00000003: Authorization Failure 1408 The Failure-Code field is 32 bits long and all other values are 1409 available via IANA registration. The following layout represents the 1410 initial OP-Code registry setup: 1412 o 0x01 : GPSK-1 1413 o 0x02 : GPSK-2 1414 o 0x03 : GPSK-3 1415 o 0x04 : GPSK-4 1416 o 0x05 : GPSK-Fail 1417 o 0x06 : GPSK-Protected-Fail 1419 The OP-Code field is 8 bits long and all other values are available 1420 via IANA registration. 1422 13. Contributors 1424 This work is a joint effort of the EAP Method Update (EMU) design 1425 team of the EMU Working Group that was created to develop a mechanism 1426 based on strong shared secrets that meets RFC 3748 [RFC3748] and RFC 1427 4017 [RFC4017] requirements. The design team members (in 1428 alphabetical order) were: 1430 o Jari Arkko 1431 o Mohamad Badra 1432 o Uri Blumenthal 1433 o Charles Clancy 1434 o Lakshminath Dondeti 1435 o David McGrew 1436 o Joe Salowey 1437 o Sharma Suman 1438 o Hannes Tschofenig 1439 o Jesse Walker 1441 Finally, we would like to thank Thomas Otto for his draft reviews, 1442 feedback and text contributions. 1444 14. Acknowledgments 1446 We would like to thank 1448 o Jouni Malinen and Bernard Aboba for their early draft comments in 1449 June 2006. Jouni Malinen developed the first prototype 1450 implementation. It can be found at: 1451 http://hostap.epitest.fi/releases/snapshots/ 1452 o Lakshminath Dondeti, David McGrew, Bernard Aboba, Michaela 1453 Vanderveen and Ray Bell for their input to the ciphersuite 1454 discussions between July and August 2006. 1455 o Lakshminath Dondeti for his detailed draft review (sent to the EMU 1456 ML on the 12th July 2006). 1457 o Based on a review requested from NIST Quynh Dang suggested changes 1458 to the GKDF function (December 2006). 1459 o Jouni Malinen and Victor Fajardo for their review in January 2007. 1460 o Jouni Malinen for his suggestions regarding the examples and the 1461 key derivation function in February 2007. 1462 o Bernard Aboba and Jouni Malinen for their review in February 2007. 1463 o Vidya Narayanan for her review in March 2007. 1464 o 1465 o Joe Salowey, the EMU working group chair, provided a document 1466 review in April 2007. Jouni Malinen also reviewed the document 1467 during the same month. 1468 o We would like to thank Paul Rowe, Arnab Roy, Prof. Andre Scedrov 1469 and Prof. John C. Mitchell for their analysis of EAP-GPSK and for 1470 pointing us to a client-side DoS attack, a downgrading attack and 1471 their input to the key derivation function. Based on their input 1472 the key derivation function has been modified and the text in the 1473 security consideration section has been updated. 1475 o Finally, we would like to thank our working group chair, Joe 1476 Salowey, for his support and for the time he spend on discussing 1477 open issues with us. 1479 15. References 1481 15.1. Normative References 1483 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1484 Requirement Levels", BCP 14, RFC 2119, March 1997. 1486 [RFC3748] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. 1487 Levkowetz, "Extensible Authentication Protocol (EAP)", 1488 RFC 3748, June 2004. 1490 [RFC4282] Aboba, B., Beadles, M., Arkko, J., and P. Eronen, "The 1491 Network Access Identifier", RFC 4282, December 2005. 1493 15.2. Informative References 1495 [I-D.ietf-eap-keying] 1496 Aboba, B., Simon, D., and P. Eronen, "Extensible 1497 Authentication Protocol (EAP) Key Management Framework", 1498 draft-ietf-eap-keying-22 (work in progress), 1499 November 2007. 1501 [RFC4017] Stanley, D., Walker, J., and B. Aboba, "Extensible 1502 Authentication Protocol (EAP) Method Requirements for 1503 Wireless LANs", RFC 4017, March 2005. 1505 [RFC4634] Eastlake, D. and T. Hansen, "US Secure Hash Algorithms 1506 (SHA and HMAC-SHA)", RFC 4634, July 2006. 1508 [AES] National Institute of Standards and Technology, 1509 "Specification for the Advanced Encryption Standard 1510 (AES)", Federal Information Processing Standards 1511 (FIPS) 197, November 2001. 1513 [CMAC] National Institute of Standards and Technology, 1514 "Recommendation for Block Cipher Modes of Operation: The 1515 CMAC Mode for Authentication", Special Publication 1516 (SP) 800-38B, May 2005. 1518 [CBC] National Institute of Standards and Technology, 1519 "Recommendation for Block Cipher Modes of Encryption. 1520 Methods and Techniques.", Special Publication (SP) 800- 1521 38A, December 2001. 1523 [RFC3232] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by 1524 an On-line Database", RFC 3232, January 2002. 1526 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 1527 Requirements for Security", BCP 106, RFC 4086, June 2005. 1529 [HM2004] He, C. and J. Mitchell, "Analysis of the 802.11i 4-Way 1530 Handshake)", Proceedings of the Third ACM International 1531 Workshop on Wireless Security (WiSe'04), Philadelphia, 1532 PA pages 43-50, October 2004. 1534 Authors' Addresses 1536 T. Charles Clancy 1537 DoD Laboratory for Telecommunications Sciences 1538 8080 Greenmead Drive 1539 College Park, MD 20740 1540 USA 1542 Email: clancy@ltsnet.net 1544 Hannes Tschofenig 1545 Nokia Siemens Networks 1546 Otto-Hahn-Ring 6 1547 Munich, Bavaria 81739 1548 Germany 1550 Email: Hannes.Tschofenig@nsn.com 1551 URI: http://www.tschofenig.com 1553 Full Copyright Statement 1555 Copyright (C) The IETF Trust (2007). 1557 This document is subject to the rights, licenses and restrictions 1558 contained in BCP 78, and except as set forth therein, the authors 1559 retain all their rights. 1561 This document and the information contained herein are provided on an 1562 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1563 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1564 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1565 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1566 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1567 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1569 Intellectual Property 1571 The IETF takes no position regarding the validity or scope of any 1572 Intellectual Property Rights or other rights that might be claimed to 1573 pertain to the implementation or use of the technology described in 1574 this document or the extent to which any license under such rights 1575 might or might not be available; nor does it represent that it has 1576 made any independent effort to identify any such rights. Information 1577 on the procedures with respect to rights in RFC documents can be 1578 found in BCP 78 and BCP 79. 1580 Copies of IPR disclosures made to the IETF Secretariat and any 1581 assurances of licenses to be made available, or the result of an 1582 attempt made to obtain a general license or permission for the use of 1583 such proprietary rights by implementers or users of this 1584 specification can be obtained from the IETF on-line IPR repository at 1585 http://www.ietf.org/ipr. 1587 The IETF invites any interested party to bring to its attention any 1588 copyrights, patents or patent applications, or other proprietary 1589 rights that may cover technology that may be required to implement 1590 this standard. Please address the information to the IETF at 1591 ietf-ipr@ietf.org. 1593 Acknowledgment 1595 Funding for the RFC Editor function is provided by the IETF 1596 Administrative Support Activity (IASA).