idnits 2.17.00 (12 Aug 2021) /tmp/idnits31696/draft-ietf-ipsecme-qr-ikev2-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 and authors Copyright Line does not match the current year -- The document date (January 14, 2020) is 851 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) == Missing Reference: 'THIS RFC' is mentioned on line 774, but not defined == Outdated reference: A later version (-07) exists of draft-hoffman-c2pq-06 -- Obsolete informational reference (is this intentional?): RFC 2409 (Obsoleted by RFC 4306) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force S. Fluhrer 3 Internet-Draft P. Kampanakis 4 Intended status: Standards Track D. McGrew 5 Expires: July 17, 2020 Cisco Systems 6 V. Smyslov 7 ELVIS-PLUS 8 January 14, 2020 10 Mixing Preshared Keys in IKEv2 for Post-quantum Security 11 draft-ietf-ipsecme-qr-ikev2-11 13 Abstract 15 The possibility of quantum computers poses a serious challenge to 16 cryptographic algorithms deployed widely today. IKEv2 is one example 17 of a cryptosystem that could be broken; someone storing VPN 18 communications today could decrypt them at a later time when a 19 quantum computer is available. It is anticipated that IKEv2 will be 20 extended to support quantum-secure key exchange algorithms; however 21 that is not likely to happen in the near term. To address this 22 problem before then, this document describes an extension of IKEv2 to 23 allow it to be resistant to a quantum computer, by using preshared 24 keys. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on July 17, 2020. 43 Copyright Notice 45 Copyright (c) 2020 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Changes . . . . . . . . . . . . . . . . . . . . . . . . . 3 62 1.2. Requirements Language . . . . . . . . . . . . . . . . . . 6 63 2. Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 3. Exchanges . . . . . . . . . . . . . . . . . . . . . . . . . . 6 65 4. Upgrade procedure . . . . . . . . . . . . . . . . . . . . . . 11 66 5. PPK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 67 5.1. PPK_ID format . . . . . . . . . . . . . . . . . . . . . . 12 68 5.2. Operational Considerations . . . . . . . . . . . . . . . 13 69 5.2.1. PPK Distribution . . . . . . . . . . . . . . . . . . 13 70 5.2.2. Group PPK . . . . . . . . . . . . . . . . . . . . . . 13 71 5.2.3. PPK-only Authentication . . . . . . . . . . . . . . . 14 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 14 73 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 74 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 75 8.1. Normative References . . . . . . . . . . . . . . . . . . 17 76 8.2. Informational References . . . . . . . . . . . . . . . . 18 77 Appendix A. Discussion and Rationale . . . . . . . . . . . . . . 19 78 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 20 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 81 1. Introduction 83 Recent achievements in developing quantum computers demonstrate that 84 it is probably feasible to build a cryptographically significant one. 85 If such a computer is implemented, many of the cryptographic 86 algorithms and protocols currently in use would be insecure. A 87 quantum computer would be able to solve DH and ECDH problems in 88 polynomial time [I-D.hoffman-c2pq], and this would imply that the 89 security of existing IKEv2 [RFC7296] systems would be compromised. 90 IKEv1 [RFC2409], when used with strong preshared keys, is not 91 vulnerable to quantum attacks, because those keys are one of the 92 inputs to the key derivation function. If the preshared key has 93 sufficient entropy and the PRF, encryption and authentication 94 transforms are quantum-secure, then the resulting system is believed 95 to be quantum-secure, that is, secure against classical attackers of 96 today or future attackers with a quantum computer. 98 This document describes a way to extend IKEv2 to have a similar 99 property; assuming that the two end systems share a long secret key, 100 then the resulting exchange is quantum-secure. By bringing post- 101 quantum security to IKEv2, this document removes the need to use an 102 obsolete version of the Internet Key Exchange in order to achieve 103 that security goal. 105 The general idea is that we add an additional secret that is shared 106 between the initiator and the responder; this secret is in addition 107 to the authentication method that is already provided within IKEv2. 108 We stir this secret into the SK_d value, which is used to generate 109 the key material (KEYMAT) and the SKEYSEED for the child SAs; this 110 secret provides quantum resistance to the IPsec SAs (and any child 111 IKE SAs). We also stir the secret into the SK_pi, SK_pr values; this 112 allows both sides to detect a secret mismatch cleanly. 114 It was considered important to minimize the changes to IKEv2. The 115 existing mechanisms to do authentication and key exchange remain in 116 place (that is, we continue to do (EC)DH, and potentially PKI 117 authentication if configured). This document does not replace the 118 authentication checks that the protocol does; instead, they are 119 strengthened by using an additional secret key. 121 1.1. Changes 123 RFC EDITOR PLEASE DELETE THIS SECTION. 125 Changes in this draft in each version iterations. 127 draft-ietf-ipsecme-qr-ikev2-11 129 o Updates the IANA section based on Eric V.'s IESG Review. 131 o Updates based on IESG Reviews (Alissa, Adam, Barry, Alexey, Mijra, 132 Roman, Martin. 134 draft-ietf-ipsecme-qr-ikev2-10 136 o Addresses issues raised during IETF LC. 138 draft-ietf-ipsecme-qr-ikev2-09 140 o Addresses issues raised in AD review. 142 draft-ietf-ipsecme-qr-ikev2-08 143 o Editorial changes. 145 draft-ietf-ipsecme-qr-ikev2-07 147 o Editorial changes. 149 draft-ietf-ipsecme-qr-ikev2-06 151 o Editorial changes. 153 draft-ietf-ipsecme-qr-ikev2-05 155 o Addressed comments received during WGLC. 157 draft-ietf-ipsecme-qr-ikev2-04 159 o Using Group PPK is clarified based on comment from Quynh Dang. 161 draft-ietf-ipsecme-qr-ikev2-03 163 o Editorial changes and minor text nit fixes. 165 o Integrated Tommy P. text suggestions. 167 draft-ietf-ipsecme-qr-ikev2-02 169 o Added note that the PPK is stirred in the initial IKE SA setup 170 only. 172 o Added note about the initiator ignoring any content in the 173 PPK_IDENTITY notification from the responder. 175 o fixed Tero's suggestions from 2/6/1028 177 o Added IANA assigned message types where necessary. 179 o fixed minor text nits 181 draft-ietf-ipsecme-qr-ikev2-01 183 o Nits and minor fixes. 185 o prf is replaced with prf+ for the SK_d and SK_pi/r calculations. 187 o Clarified using PPK in case of EAP authentication. 189 o PPK_SUPPORT notification is changed to USE_PPK to better reflect 190 its purpose. 192 o Migrated from draft-fluhrer-qr-ikev2-05 to draft-ietf-ipsecme-qr- 193 ikev2-00 that is a WG item. 195 draft-fluhrer-qr-ikev2-05 197 o Nits and editorial fixes. 199 o Made PPK_ID format and PPK Distributions subsection of the PPK 200 section. Also added an Operational Considerations section. 202 o Added comment about Child SA rekey in the Security Considerations 203 section. 205 o Added NO_PPK_AUTH to solve the cases where a PPK_ID is not 206 configured for a responder. 208 o Various text changes and clarifications. 210 o Expanded Security Considerations section to describe some security 211 concerns and how they should be addressed. 213 draft-fluhrer-qr-ikev2-03 215 o Modified how we stir the PPK into the IKEv2 secret state. 217 o Modified how the use of PPKs is negotiated. 219 draft-fluhrer-qr-ikev2-02 221 o Simplified the protocol by stirring in the preshared key into the 222 child SAs; this avoids the problem of having the responder decide 223 which preshared key to use (as it knows the initiator identity at 224 that point); it does mean that someone with a quantum computer can 225 recover the initial IKE negotiation. 227 o Removed positive endorsements of various algorithms. Retained 228 warnings about algorithms known to be weak against a quantum 229 computer. 231 draft-fluhrer-qr-ikev2-01 233 o Added explicit guidance as to what IKE and IPsec algorithms are 234 quantum resistant. 236 draft-fluhrer-qr-ikev2-00 237 o We switched from using vendor ID's to transmit the additional data 238 to notifications. 240 o We added a mandatory cookie exchange to allow the server to 241 communicate to the client before the initial exchange. 243 o We added algorithm agility by having the server tell the client 244 what algorithm to use in the cookie exchange. 246 o We have the server specify the PPK Indicator Input, which allows 247 the server to make a trade-off between the efficiency for the 248 search of the clients PPK, and the anonymity of the client. 250 o We now use the negotiated PRF (rather than a fixed HMAC-SHA256) to 251 transform the nonces during the KDF. 253 1.2. Requirements Language 255 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 256 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 257 "OPTIONAL" in this document are to be interpreted as described in BCP 258 14 [RFC2119] [RFC8174] when, and only when, they appear in all 259 capitals, as shown here. 261 2. Assumptions 263 We assume that each IKE peer has a list of Post-quantum Preshared 264 Keys (PPK) along with their identifiers (PPK_ID), and any potential 265 IKE initiator selects which PPK to use with any specific responder. 266 In addition, implementations have a configurable flag that determines 267 whether this post-quantum preshared key is mandatory. This PPK is 268 independent of the preshared key (if any) that the IKEv2 protocol 269 uses to perform authentication (because the preshared key in IKEv2 is 270 not used for any key derivation, and thus doesn't protect against 271 quantum computers). The PPK specific configuration that is assumed 272 to be on each node consists of the following tuple: 274 Peer, PPK, PPK_ID, mandatory_or_not 276 3. Exchanges 278 If the initiator is configured to use a post-quantum preshared key 279 with the responder (whether or not the use of the PPK is mandatory), 280 then it MUST include a notification USE_PPK in the IKE_SA_INIT 281 request message as follows: 283 Initiator Responder 284 ------------------------------------------------------------------ 285 HDR, SAi1, KEi, Ni, N(USE_PPK) ---> 287 N(USE_PPK) is a status notification payload with the type 16435; it 288 has a protocol ID of 0, no SPI and no notification data associated 289 with it. 291 If the initiator needs to resend this initial message with a COOKIE 292 notification, then the resend would include the USE_PPK notification 293 if the original message did (see Section 2.6 of [RFC7296]). 295 If the responder does not support this specification or does not have 296 any PPK configured, then it ignores the received notification (as 297 defined in [RFC7296] for unknown status notifications) and continues 298 with the IKEv2 protocol as normal. Otherwise the responder replies 299 with the IKE_SA_INIT message including a USE_PPK notification in the 300 response: 302 Initiator Responder 303 ------------------------------------------------------------------ 304 <--- HDR, SAr1, KEr, Nr, [CERTREQ,] N(USE_PPK) 306 When the initiator receives this reply, it checks whether the 307 responder included the USE_PPK notification. If the responder did 308 not and the flag mandatory_or_not indicates that using PPKs is 309 mandatory for communication with this responder, then the initiator 310 MUST abort the exchange. This situation may happen in case of 311 misconfiguration, when the initiator believes it has a mandatory-to- 312 use PPK for the responder, while the responder either doesn't support 313 PPKs at all or doesn't have any PPK configured for the initiator. 314 See Section 6 for discussion of the possible impacts of this 315 situation. 317 If the responder did not include the USE_PPK notification and using a 318 PPK for this particular responder is optional, then the initiator 319 continues with the IKEv2 protocol as normal, without using PPKs. 321 If the responder did include the USE_PPK notification, then the 322 initiator selects a PPK, along with its identifier PPK_ID. Then, it 323 computes this modification of the standard IKEv2 key derivation from 324 Section 2.14 of [RFC7296]: 326 SKEYSEED = prf(Ni | Nr, g^ir) 327 {SK_d' | SK_ai | SK_ar | SK_ei | SK_er | SK_pi' | SK_pr' ) 328 = prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr } 330 SK_d = prf+ (PPK, SK_d') 331 SK_pi = prf+ (PPK, SK_pi') 332 SK_pr = prf+ (PPK, SK_pr') 334 That is, we use the standard IKEv2 key derivation process except that 335 the three resulting subkeys SK_d, SK_pi, SK_pr (marked with primes in 336 the formula above) are then run through the prf+ again, this time 337 using the PPK as the key. The result is the unprimed versions of 338 these keys which are then used as inputs to subsequent steps of the 339 IKEv2 exchange. 341 Using a prf+ construction ensures that it is always possible to get 342 the resulting keys of the same size as the initial ones, even if the 343 underlying PRF has output size different from its key size. Note, 344 that at the time of this writing, all PRFs defined for use in IKEv2 345 [IKEV2-IANA-PRFS] had output size equal to the (preferred) key size. 346 For such PRFs only the first iteration of prf+ is needed: 348 SK_d = prf (PPK, SK_d' | 0x01) 349 SK_pi = prf (PPK, SK_pi' | 0x01) 350 SK_pr = prf (PPK, SK_pr' | 0x01) 352 Note that the PPK is used in SK_d, SK_pi and SK_pr calculation only 353 during the initial IKE SA setup. It MUST NOT be used when these 354 subkeys are calculated as result of IKE SA rekey, resumption or other 355 similar operation. 357 The initiator then sends the IKE_AUTH request message, including the 358 PPK_ID value as follows: 360 Initiator Responder 361 ------------------------------------------------------------------ 362 HDR, SK {IDi, [CERT,] [CERTREQ,] 363 [IDr,] AUTH, SAi2, 364 TSi, TSr, N(PPK_IDENTITY, PPK_ID), [N(NO_PPK_AUTH)]} ---> 366 PPK_IDENTITY is a status notification with the type 16436; it has a 367 protocol ID of 0, no SPI and a notification data that consists of the 368 identifier PPK_ID. 370 A situation may happen when the responder has some PPKs, but doesn't 371 have a PPK with the PPK_ID received from the initiator. In this case 372 the responder cannot continue with PPK (in particular, it cannot 373 authenticate the initiator), but the responder could be able to 374 continue with normal IKEv2 protocol if the initiator provided its 375 authentication data computed as in normal IKEv2, without using PPKs. 376 For this purpose, if using PPKs for communication with this responder 377 is optional for the initiator (based on the mandatory_or_not flag), 378 then the initiator MUST include a NO_PPK_AUTH notification in the 379 above message. This notification informs the responder that PPK is 380 optional and allows for authenticating the initiator without using 381 PPK. 383 NO_PPK_AUTH is a status notification with the type 16437; it has a 384 protocol ID of 0 and no SPI. The Notification Data field contains 385 the initiator's authentication data computed using SK_pi', which has 386 been computed without using PPKs. This is the same data that would 387 normally be placed in the Authentication Data field of an AUTH 388 payload. Since the Auth Method field is not present in the 389 notification, the authentication method used for computing the 390 authentication data MUST be the same as method indicated in the AUTH 391 payload. Note that if the initiator decides to include the 392 NO_PPK_AUTH notification, the initiator needs to perform 393 authentication data computation twice, which may consume computation 394 power (e.g., if digital signatures are involved). 396 When the responder receives this encrypted exchange, it first 397 computes the values: 399 SKEYSEED = prf(Ni | Nr, g^ir) 400 {SK_d' | SK_ai | SK_ar | SK_ei | SK_er | SK_pi' | SK_pr' } 401 = prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr ) 403 The responder then uses the SK_ei/SK_ai values to decrypt/check the 404 message and then scans through the payloads for the PPK_ID attached 405 to the PPK_IDENTITY notification. If no PPK_IDENTITY notification is 406 found and the peers successfully exchanged USE_PPK notifications in 407 the IKE_SA_INIT exchange, then the responder MUST send back 408 AUTHENTICATION_FAILED notification and then fail the negotiation. 410 If the PPK_IDENTITY notification contains a PPK_ID that is not known 411 to the responder or is not configured for use for the identity from 412 IDi payload, then the responder checks whether using PPKs for this 413 initiator is mandatory and whether the initiator included NO_PPK_AUTH 414 notification in the message. If using PPKs is mandatory or no 415 NO_PPK_AUTH notification is found, then then the responder MUST send 416 back AUTHENTICATION_FAILED notification and then fail the 417 negotiation. Otherwise (when PPK is optional and the initiator 418 included NO_PPK_AUTH notification) the responder MAY continue regular 419 IKEv2 protocol, except that it uses the data from the NO_PPK_AUTH 420 notification as the authentication data (which usually resides in the 421 AUTH payload), for the purpose of the initiator authentication. 423 Note, that Authentication Method is still indicated in the AUTH 424 payload. 426 This table summarizes the above logic for the responder: 428 Received Received Configured PPK is 429 USE_PPK NO_PPK_AUTH with PPK Mandatory Action 430 --------------------------------------------------------------------- 431 No * No * Standard IKEv2 protocol 432 No * Yes No Standard IKEv2 protocol 433 No * Yes Yes Abort negotiation 434 Yes No No * Abort negotiation 435 Yes Yes No Yes Abort negotiation 436 Yes Yes No No Standard IKEv2 protocol 437 Yes * Yes * Use PPK 439 If PPK is in use, then the responder extracts the corresponding PPK 440 and computes the following values: 442 SK_d = prf+ (PPK, SK_d') 443 SK_pi = prf+ (PPK, SK_pi') 444 SK_pr = prf+ (PPK, SK_pr') 446 The responder then continues with the IKE_AUTH exchange (validating 447 the AUTH payload that the initiator included) as usual and sends back 448 a response, which includes the PPK_IDENTITY notification with no data 449 to indicate that the PPK is used in the exchange: 451 Initiator Responder 452 ------------------------------------------------------------------ 453 <-- HDR, SK {IDr, [CERT,] 454 AUTH, SAr2, 455 TSi, TSr, N(PPK_IDENTITY)} 457 When the initiator receives the response, then it checks for the 458 presence of the PPK_IDENTITY notification. If it receives one, it 459 marks the SA as using the configured PPK to generate SK_d, SK_pi, 460 SK_pr (as shown above); the content of the received PPK_IDENTITY (if 461 any) MUST be ignored. If the initiator does not receive the 462 PPK_IDENTITY, it MUST either fail the IKE SA negotiation sending the 463 AUTHENTICATION_FAILED notification in the Informational exchange (if 464 the PPK was configured as mandatory), or continue without using the 465 PPK (if the PPK was not configured as mandatory and the initiator 466 included the NO_PPK_AUTH notification in the request). 468 If EAP is used in the IKE_AUTH exchange, then the initiator doesn't 469 include AUTH payload in the first request message, however the 470 responder sends back AUTH payload in the first reply. The peers then 471 exchange AUTH payloads after EAP is successfully completed. As a 472 result, the responder sends AUTH payload twice - in the first 473 IKE_AUTH reply message and in the last one, while the initiator sends 474 AUTH payload only in the last IKE_AUTH request. See more details 475 about EAP authentication in IKEv2 in Section 2.16 of [RFC7296]. 477 The general rule for using PPK in the IKE_AUTH exchange, which covers 478 EAP authentication case too, is that the initiator includes 479 PPK_IDENTITY (and optionally NO_PPK_AUTH) notification in the request 480 message containing AUTH payload. Therefore, in case of EAP the 481 responder always computes the AUTH payload in the first IKE_AUTH 482 reply message without using PPK (by means of SK_pr'), since PPK_ID is 483 not yet known to the responder. Once the IKE_AUTH request message 484 containing the PPK_IDENTITY notification is received, the responder 485 follows the rules described above for the non-EAP authentication 486 case. 488 Initiator Responder 489 ---------------------------------------------------------------- 490 HDR, SK {IDi, [CERTREQ,] 491 [IDr,] SAi2, 492 TSi, TSr} --> 493 <-- HDR, SK {IDr, [CERT,] AUTH, 494 EAP} 495 HDR, SK {EAP} --> 496 <-- HDR, SK {EAP (success)} 497 HDR, SK {AUTH, 498 N(PPK_IDENTITY, PPK_ID) 499 [, N(NO_PPK_AUTH)]} --> 500 <-- HDR, SK {AUTH, SAr2, TSi, TSr 501 [, N(PPK_IDENTITY)]} 503 Note that the diagram above shows both the cases when the responder 504 uses PPK and when it chooses not to use it (provided the initiator 505 has included NO_PPK_AUTH notification), and thus the responder's 506 PPK_IDENTITY notification is marked as optional. Also, note that the 507 IKE_SA_INIT exchange in case of PPK is as described above (including 508 exchange of the USE_PPK notifications), regardless whether EAP is 509 employed in the IKE_AUTH or not. 511 4. Upgrade procedure 513 This algorithm was designed so that someone can introduce PPKs into 514 an existing IKE network without causing network disruption. 516 In the initial phase of the network upgrade, the network 517 administrator would visit each IKE node, and configure: 519 o The set of PPKs (and corresponding PPK_IDs) that this node would 520 need to know. 522 o For each peer that this node would initiate to, which PPK will be 523 used. 525 o That the use of PPK is currently not mandatory. 527 With this configuration, the node will continue to operate with nodes 528 that have not yet been upgraded. This is due to the USE_PPK 529 notification and the NO_PPK_AUTH notification; if the initiator has 530 not been upgraded, it will not send the USE_PPK notification (and so 531 the responder will know that the peers will not use a PPK). If the 532 responder has not been upgraded, it will not send the USE_PPK 533 notification (and so the initiator will know to not use a PPK). If 534 both peers have been upgraded, but the responder isn't yet configured 535 with the PPK for the initiator, then the responder could do standard 536 IKEv2 protocol if the initiator sent NO_PPK_AUTH notification. If 537 both the responder and initiator have been upgraded and properly 538 configured, they will both realize it, and the Child SAs will be 539 quantum-secure. 541 As an optional second step, after all nodes have been upgraded, then 542 the administrator should then go back through the nodes, and mark the 543 use of PPK as mandatory. This will not affect the strength against a 544 passive attacker, but it would mean that an active attacker with a 545 quantum computer (which is sufficiently fast to be able to break the 546 (EC)DH in real-time) would not be able to perform a downgrade attack. 548 5. PPK 550 5.1. PPK_ID format 552 This standard requires that both the initiator and the responder have 553 a secret PPK value, with the responder selecting the PPK based on the 554 PPK_ID that the initiator sends. In this standard, both the 555 initiator and the responder are configured with fixed PPK and PPK_ID 556 values, and do the look up based on PPK_ID value. It is anticipated 557 that later specifications will extend this technique to allow 558 dynamically changing PPK values. To facilitate such an extension, we 559 specify that the PPK_ID the initiator sends will have its first octet 560 be the PPK_ID Type value. This document defines two values for 561 PPK_ID Type: 563 o PPK_ID_OPAQUE (1) - for this type the format of the PPK_ID (and 564 the PPK itself) is not specified by this document; it is assumed 565 to be mutually intelligible by both by initiator and the 566 responder. This PPK_ID type is intended for those implementations 567 that choose not to disclose the type of PPK to active attackers. 569 o PPK_ID_FIXED (2) - in this case the format of the PPK_ID and the 570 PPK are fixed octet strings; the remaining bytes of the PPK_ID are 571 a configured value. We assume that there is a fixed mapping 572 between PPK_ID and PPK, which is configured locally to both the 573 initiator and the responder. The responder can use the PPK_ID to 574 look up the corresponding PPK value. Not all implementations are 575 able to configure arbitrary octet strings; to improve the 576 potential interoperability, it is recommended that, in the 577 PPK_ID_FIXED case, both the PPK and the PPK_ID strings be limited 578 to the Base64 character set [RFC4648]. 580 5.2. Operational Considerations 582 The need to maintain several independent sets of security credentials 583 can significantly complicate a security administrator's job, and can 584 potentially slow down widespread adoption of this specification. It 585 is anticipated, that administrators will try to simplify their job by 586 decreasing the number of credentials they need to maintain. This 587 section describes some of the considerations for PPK management. 589 5.2.1. PPK Distribution 591 PPK_IDs of the type PPK_ID_FIXED (and the corresponding PPKs) are 592 assumed to be configured within the IKE device in an out-of-band 593 fashion. While the method of distribution is a local matter and out 594 of scope of this document or IKEv2, [RFC6030] describes a format for 595 for the transport and provisioning of symmetric keys. That format 596 could be reused using the PIN profile (defined in Section 10.2 of 597 [RFC6030]) with the "Id" attribute of the element being the 598 PPK_ID (without the PPK_ID Type octet for a PPK_ID_FIXED) and the 599 element containing the PPK. 601 5.2.2. Group PPK 603 This document doesn't explicitly require that PPK is unique for each 604 pair of peers. If it is the case, then this solution provides full 605 peer authentication, but it also means that each host must have as 606 many independent PPKs as the peers it is going to communicate with. 607 As the number of peers grows the PPKs will not scale. 609 It is possible to use a single PPK for a group of users. Since each 610 peer uses classical public key cryptography in addition to PPK for 611 key exchange and authentication, members of the group can neither 612 impersonate each other nor read other's traffic, unless they use 613 quantum computers to break public key operations. However group 614 members can record any traffic they have access to that comes from 615 other group members and decrypt it later, when they get access to a 616 quantum computer. 618 In addition, the fact that the PPK is known to a (potentially large) 619 group of users makes it more susceptible to theft. When an attacker 620 equipped with a quantum computer gets access to a group PPK, all 621 communications inside the group are revealed. 623 For these reasons using group PPK is NOT RECOMMENDED. 625 5.2.3. PPK-only Authentication 627 If quantum computers become a reality, classical public key 628 cryptography will provide little security, so administrators may find 629 it attractive not to use it at all for authentication. This will 630 reduce the number of credentials they need to maintain to PPKs only. 631 Combining group PPK and PPK-only authentication is NOT RECOMMENDED, 632 since in this case any member of the group can impersonate any other 633 member even without help of quantum computers. 635 PPK-only authentication can be achieved in IKEv2 if the NULL 636 Authentication method [RFC7619] is employed. Without PPK the NULL 637 Authentication method provides no authentication of the peers, 638 however since a PPK is stirred into the SK_pi and the SK_pr, the 639 peers become authenticated if a PPK is in use. Using PPKs MUST be 640 mandatory for the peers if they advertise support for PPK in 641 IKE_SA_INIT and use NULL Authentication. Additionally, since the 642 peers are authenticated via PPK, the ID Type in the IDi/IDr payloads 643 SHOULD NOT be ID_NULL, despite using the NULL Authentication method. 645 6. Security Considerations 647 Quantum computers are able to perform Grover's algorithm [GROVER]; 648 that effectively halves the size of a symmetric key. Because of 649 this, the user SHOULD ensure that the post-quantum preshared key used 650 has at least 256 bits of entropy, in order to provide 128 bits of 651 post-quantum security. That provides security equivalent to Level 5 652 as defined in the NIST PQ Project Call For Proposals [NISTPQCFP]. 654 With this protocol, the computed SK_d is a function of the PPK. 655 Assuming that the PPK has sufficient entropy (for example, at least 656 2^256 possible values), then even if an attacker was able to recover 657 the rest of the inputs to the PRF function, it would be infeasible to 658 use Grover's algorithm with a quantum computer to recover the SK_d 659 value. Similarly, all keys that are a function of SK_d, which 660 include all Child SAs keys and all keys for subsequent IKE SAs 661 (created when the initial IKE SA is rekeyed), are also quantum-secure 662 (assuming that the PPK was of high enough entropy, and that all the 663 subkeys are sufficiently long). 665 An attacker with a quantum computer that can decrypt the initial IKE 666 SA has access to all the information exchanged over it, such as 667 identities of the peers, configuration parameters and all negotiated 668 IPsec SAs information (including traffic selectors), with the 669 exception of the cryptographic keys used by the IPsec SAs which are 670 protected by the PPK. 672 Deployments that treat this information as sensitive or that send 673 other sensitive data (like cryptographic keys) over IKE SA MUST rekey 674 the IKE SA before the sensitive information is sent to ensure this 675 information is protected by the PPK. It is possible to create a 676 childless IKE SA as specified in [RFC6023]. This prevents Child SA 677 configuration information from being transmitted in the original IKE 678 SA that is not protected by a PPK. Some information related to IKE 679 SA, that is sent in the IKE_AUTH exchange, such as peer identities, 680 feature notifications, Vendor ID's etc. cannot be hidden from the 681 attack described above, even if the additional IKE SA rekey is 682 performed. 684 In addition, the policy SHOULD be set to negotiate only quantum- 685 secure symmetric algorithms; while this RFC doesn't claim to give 686 advice as to what algorithms are secure (as that may change based on 687 future cryptographical results), below is a list of defined IKEv2 and 688 IPsec algorithms that should not be used, as they are known to 689 provide less than 128 bits of post-quantum security 691 o Any IKEv2 Encryption algorithm, PRF or Integrity algorithm with 692 key size less than 256 bits. 694 o Any ESP Transform with key size less than 256 bits. 696 o PRF_AES128_XCBC and PRF_AES128_CBC; even though they are defined 697 to be able to use an arbitrary key size, they convert it into a 698 128-bit key internally. 700 Section 3 requires the initiator to abort the initial exchange if 701 using PPKs is mandatory for it, but the responder does not include 702 the USE_PPK notification in the response. In this situation, when 703 the initiator aborts negotiation it leaves a half-open IKE SA on the 704 responder (because IKE_SA_INIT completes successfully from the 705 responder's point of view). This half-open SA will eventually expire 706 and be deleted, but if the initiator continues its attempts to create 707 IKE SA with a high enough rate, then the responder may consider it as 708 a Denial-of-Service (DoS) attack and take protection measures (see 709 [RFC8019] for more detail). In this situation, it is RECOMMENDED 710 that the initiator caches the negative result of the negotiation and 711 doesn't make attempts to create it again for some time. This period 712 of time may vary, but it is believed that waiting for at least few 713 minutes will not cause the responder to treat it as DoS attack. 714 Note, that this situation would most likely be a result of 715 misconfiguration and some re-configuration of the peers would 716 probably be needed. 718 If using PPKs is optional for both peers and they authenticate 719 themselves using digital signatures, then an attacker in between, 720 equipped with a quantum computer capable of breaking public key 721 operations in real time, is able to mount downgrade attack by 722 removing USE_PPK notification from the IKE_SA_INIT and forging 723 digital signatures in the subsequent exchange. If using PPKs is 724 mandatory for at least one of the peers or PSK is used for 725 authentication, then the attack will be detected and the SA won't be 726 created. 728 If using PPKs is mandatory for the initiator, then an attacker able 729 to eavesdrop and to inject packets into the network can prevent 730 creating an IKE SA by mounting the following attack. The attacker 731 intercepts the initial request containing the USE_PPK notification 732 and injects a forged response containing no USE_PPK. If the attacker 733 manages to inject this packet before the responder sends a genuine 734 response, then the initiator would abort the exchange. To thwart 735 this kind of attack it is RECOMMENDED, that if using PPKs is 736 mandatory for the initiator and the received response doesn't contain 737 the USE_PPK notification, then the initiator doesn't abort the 738 exchange immediately. Instead it waits for more response messages 739 retransmitting the request as if no responses were received at all, 740 until either the received message contains the USE_PPK or the 741 exchange times out (see section 2.4 of [RFC7296] for more details 742 about retransmission timers in IKEv2). If neither of the received 743 responses contains USE_PPK, then the exchange is aborted. 745 If using PPK is optional for both peers, then in case of 746 misconfiguration (e.g., mismatched PPK_ID) the IKE SA will be created 747 without protection against quantum computers. It is advised that if 748 PPK was configured, but was not used for a particular IKE SA, then 749 implementations SHOULD audit this event. 751 7. IANA Considerations 753 This document defines three new Notify Message Types in the "Notify 754 Message Types - Status Types" registry 755 (https://www.iana.org/assignments/ikev2-parameters/ 756 ikev2-parameters.xhtml#ikev2-parameters-16): 758 16435 USE_PPK [THIS RFC] 759 16436 PPK_IDENTITY [THIS RFC] 760 16437 NO_PPK_AUTH [THIS RFC] 762 This document also creates a new IANA registry "IKEv2 Post-quantum 763 Preshared Key ID Types" in IKEv2 IANA registry 764 (https://www.iana.org/assignments/ikev2-parameters/) for the PPK_ID 765 types used in the PPK_IDENTITY notification defined in this 766 specification. The initial values of the new registry are: 768 PPK_ID Type Value Reference 769 ----------- ----- --------- 770 Reserved 0 [THIS RFC] 771 PPK_ID_OPAQUE 1 [THIS RFC] 772 PPK_ID_FIXED 2 [THIS RFC] 773 Unassigned 3-127 [THIS RFC] 774 Private Use 128-255 [THIS RFC] 776 The PPK_ID type value 0 is reserved; values 3-127 are to be assigned 777 by IANA; values 128-255 are for private use among mutually consenting 778 parties. To register new PPK_IDs in the unassigned range, a Type 779 name, a Value between 3 and 127 and a Reference specification need to 780 be defined. Changes and additions to the unassigned range of this 781 registry are by the Expert Review Policy [RFC8126]. Changes and 782 additions to the private use range of this registry are by the 783 Private Use Policy [RFC8126]. 785 8. References 787 8.1. Normative References 789 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 790 Requirement Levels", BCP 14, RFC 2119, 791 DOI 10.17487/RFC2119, March 1997, 792 . 794 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 795 Kivinen, "Internet Key Exchange Protocol Version 2 796 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 797 2014, . 799 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 800 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 801 May 2017, . 803 8.2. Informational References 805 [GROVER] Grover, L., "A Fast Quantum Mechanical Algorithm for 806 Database Search", Proc. of the Twenty-Eighth Annual ACM 807 Symposium on the Theory of Computing (STOC 1996), 1996. 809 [I-D.hoffman-c2pq] 810 Hoffman, P., "The Transition from Classical to Post- 811 Quantum Cryptography", draft-hoffman-c2pq-06 (work in 812 progress), November 2019. 814 [IKEV2-IANA-PRFS] 815 "Internet Key Exchange Version 2 (IKEv2) Parameters, 816 Transform Type 2 - Pseudorandom Function Transform IDs", 817 . 820 [NISTPQCFP] 821 NIST, "NIST Post-Quantum Cryptography Call for Proposals", 822 2016, . 826 [RFC2409] Harkins, D. and D. Carrel, "The Internet Key Exchange 827 (IKE)", RFC 2409, DOI 10.17487/RFC2409, November 1998, 828 . 830 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 831 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 832 . 834 [RFC6023] Nir, Y., Tschofenig, H., Deng, H., and R. Singh, "A 835 Childless Initiation of the Internet Key Exchange Version 836 2 (IKEv2) Security Association (SA)", RFC 6023, 837 DOI 10.17487/RFC6023, October 2010, 838 . 840 [RFC6030] Hoyer, P., Pei, M., and S. Machani, "Portable Symmetric 841 Key Container (PSKC)", RFC 6030, DOI 10.17487/RFC6030, 842 October 2010, . 844 [RFC7619] Smyslov, V. and P. Wouters, "The NULL Authentication 845 Method in the Internet Key Exchange Protocol Version 2 846 (IKEv2)", RFC 7619, DOI 10.17487/RFC7619, August 2015, 847 . 849 [RFC8019] Nir, Y. and V. Smyslov, "Protecting Internet Key Exchange 850 Protocol Version 2 (IKEv2) Implementations from 851 Distributed Denial-of-Service Attacks", RFC 8019, 852 DOI 10.17487/RFC8019, November 2016, 853 . 855 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 856 Writing an IANA Considerations Section in RFCs", BCP 26, 857 RFC 8126, DOI 10.17487/RFC8126, June 2017, 858 . 860 Appendix A. Discussion and Rationale 862 The idea behind this document is that while a quantum computer can 863 easily reconstruct the shared secret of an (EC)DH exchange, they 864 cannot as easily recover a secret from a symmetric exchange. This 865 document makes the SK_d, and hence the IPsec KEYMAT and any child 866 SA's SKEYSEED, depend on both the symmetric PPK, and also the Diffie- 867 Hellman exchange. If we assume that the attacker knows everything 868 except the PPK during the key exchange, and there are 2^n plausible 869 PPKs, then a quantum computer (using Grover's algorithm) would take 870 O(2^(n/2)) time to recover the PPK. So, even if the (EC)DH can be 871 trivially solved, the attacker still can't recover any key material 872 (except for the SK_ei, SK_er, SK_ai and SK_ar values for the initial 873 IKE exchange) unless they can find the PPK, which is too difficult if 874 the PPK has enough entropy (for example, 256 bits). Note that we do 875 allow an attacker with a quantum computer to rederive the keying 876 material for the initial IKE SA; this was a compromise to allow the 877 responder to select the correct PPK quickly. 879 Another goal of this protocol is to minimize the number of changes 880 within the IKEv2 protocol, and in particular, within the cryptography 881 of IKEv2. By limiting our changes to notifications, and only 882 adjusting the SK_d, SK_pi, SK_pr, it is hoped that this would be 883 implementable, even on systems that perform most of the IKEv2 884 processing in hardware. 886 A third goal was to be friendly to incremental deployment in 887 operational networks, for which we might not want to have a global 888 shared key, or quantum-secure IKEv2 is rolled out incrementally. 889 This is why we specifically try to allow the PPK to be dependent on 890 the peer, and why we allow the PPK to be configured as optional. 892 A fourth goal was to avoid violating any of the security properties 893 provided by IKEv2. 895 Appendix B. Acknowledgements 897 We would like to thank Tero Kivinen, Paul Wouters, Graham Bartlett, 898 Tommy Pauly, Quynh Dang and the rest of the IPSecME Working Group for 899 their feedback and suggestions for the scheme. 901 Authors' Addresses 903 Scott Fluhrer 904 Cisco Systems 906 Email: sfluhrer@cisco.com 908 Panos Kampanakis 909 Cisco Systems 911 Email: pkampana@cisco.com 913 David McGrew 914 Cisco Systems 916 Email: mcgrew@cisco.com 918 Valery Smyslov 919 ELVIS-PLUS 921 Phone: +7 495 276 0211 922 Email: svan@elvis.ru