idnits 2.17.1 draft-ietf-ipsecme-ikev2-intermediate-00.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 (May 31, 2019) is 1764 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: 'CERTREQ' is mentioned on line 144, but not defined -- Obsolete informational reference (is this intentional?): RFC 8229 (Obsoleted by RFC 9329) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group V. Smyslov 3 Internet-Draft ELVIS-PLUS 4 Intended status: Standards Track May 31, 2019 5 Expires: December 2, 2019 7 Intermediate Exchange in the IKEv2 Protocol 8 draft-ietf-ipsecme-ikev2-intermediate-00 10 Abstract 12 This documents defines a new exchange, called Intermediate Exchange, 13 for the Internet Key Exchange protocol Version 2 (IKEv2). This 14 exchange can be used for transferring large amount of data in the 15 process of IKEv2 Security Association (SA) establishment. 16 Introducing Intermediate Exchange allows re-using existing IKE 17 Fragmentation mechanism, that helps to avoid IP fragmentation of 18 large IKE messages, but cannot be used in the initial IKEv2 exchange. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on December 2, 2019. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 2. Terminology and Notation . . . . . . . . . . . . . . . . . . 3 56 3. Intermediate Exchange Details . . . . . . . . . . . . . . . . 3 57 3.1. Support for Intermediate Exchange Negotiation . . . . . . 3 58 3.2. Using Intermediate Exchange . . . . . . . . . . . . . . . 4 59 3.3. The IKE_INTERMEDIATE Exchange Protection and 60 Authentication . . . . . . . . . . . . . . . . . . . . . 5 61 3.3.1. Protection of the IKE_INTERMEDIATE Messages . . . . . 5 62 3.3.2. Authentication of the IKE_INTERMEDIATE Exchanges . . 5 63 3.4. Error Handling in the IKE_INTERMEDIATE Exchange . . . . . 8 64 4. Interaction with other IKEv2 Extensions . . . . . . . . . . . 8 65 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 66 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 67 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 68 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 69 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 70 8.2. Informative References . . . . . . . . . . . . . . . . . 10 71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 73 1. Introduction 75 The Internet Key Exchange protocol version 2 (IKEv2) defined in 76 [RFC7296] uses UDP as a transport for its messages. If size of the 77 messages is large enough, IP fragmentation takes place, that may 78 interfere badly with some network devices. The problem is described 79 in more detail in [RFC7383], which also defines an extension to the 80 IKEv2 called IKE Fragmentation. This extension allows IKE messages 81 to be fragmented at IKE level, eliminating possible issues caused by 82 IP fragmentation. However, the IKE Fragmentation cannot be used in 83 the initial IKEv2 exchange (IKE_SA_INIT). This limitation in most 84 cases is not a problem, since the IKE_SA_INIT messages used to be 85 small enough not to cause IP fragmentation. 87 However, the situation has been changing recently. One example of 88 the need to transfer large amount of data before IKE SA is created is 89 using Quantum Computer resistant key exchange methods in IKEv2. 90 Recent progress in Quantum Computing has brought a concern that 91 classical Diffie-Hellman key exchange methods will become insecure in 92 a relatively near future and should be replaced with Quantum Computer 93 (QC) resistant ones. Currently most of QC-resistant key exchange 94 methods have large public keys. If these keys are exchanged in the 95 IKE_SA_INIT, then most probably IP fragmentation will take place, 96 therefore all the problems caused by it will become inevitable. 98 A possible solution to the problem would be to use TCP as a transport 99 for IKEv2, as defined in [RFC8229]. However this approach has 100 significant drawbacks and is intended to be a "last resort" when UDP 101 transport is completely blocked by intermediate network devices. 103 This specification describes a way to transfer large amount of data 104 in IKEv2 using UDP transport. For this purpose the document defines 105 a new exchange for the IKEv2 protocol, called Intermediate Exchange 106 or IKE_INTERMEDIATE. One or more these exchanges may take place 107 right after the IKE_SA_INIT exchange and prior to the IKE_AUTH 108 exchange. The IKE_INTERMEDIATE exchange messages can be fragmented 109 using IKE Fragmentation mechanism, so these exchanges may be used to 110 transfer large amounts of data which don't fit into the IKE_SA_INIT 111 exchange without causing IP fragmentation. 113 The Intermediate Exchange can be used to transfer large public keys 114 of QC-resistant key exchange methods, but its application is not 115 limited to this use case. This exchange can also be used whenever 116 some data need to be transferred before the IKE_AUTH exchange and for 117 some reason the IKE_SA_INIT exchange is not suited for this purpose. 118 This document defines the IKE_INTERMEDIATE exchange without tying it 119 to any specific use case. It is expected that separate 120 specifications will define for which purposes and how the 121 IKE_INTERMEDIATE exchange is used in the IKEv2. 123 2. Terminology and Notation 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 127 "OPTIONAL" in this document are to be interpreted as described in BCP 128 14 [RFC2119] [RFC8174] when, and only when, they appear in all 129 capitals, as shown here. 131 3. Intermediate Exchange Details 133 3.1. Support for Intermediate Exchange Negotiation 135 The initiator indicates its support for Intermediate Exchange by 136 including a notification of type INTERMEDIATE_EXCHANGE_SUPPORTED in 137 the IKE_SA_INIT request message. If the responder also supports this 138 exchange, it includes this notification in the response message. 140 Initiator Responder 141 ----------- ----------- 142 HDR, SAi1, KEi, Ni, 143 [N(INTERMEDIATE_EXCHANGE_SUPPORTED)] --> 144 <-- HDR, SAr1, KEr, Nr, [CERTREQ], 145 [N(INTERMEDIATE_EXCHANGE_SUPPORTED)] 147 The INTERMEDIATE_EXCHANGE_SUPPORTED is a Status Type IKEv2 148 notification. Its Notify Message Type is . Protocol ID 149 and SPI Size are both set to 0. This specification doesn't define 150 any data this notification may contain, so the Notification Data is 151 left empty. However, future enhancements of this specification may 152 override this. Implementations MUST ignore the non-empty 153 Notification Data if they don't understand its purpose. 155 3.2. Using Intermediate Exchange 157 If both peers indicated their support for the Intermediate Exchange, 158 the initiator may use one or more these exchanges to transfer 159 additional data. Using the IKE_INTERMEDIATE exchange is optional, 160 the initiator may find it unnecessary after completing the 161 IKE_SA_INIT exchange. 163 The Intermediate Exchange is denoted as IKE_INTERMEDIATE, its 164 Exchange Type is . 166 Initiator Responder 167 ----------- ----------- 168 HDR, ..., SK {...} --> 169 <-- HDR, ..., SK {...} 171 The initiator may use several IKE_INTERMEDIATE exchanges if 172 necessary. Since initiator's Window Size is initially set to one 173 (Section 2.3 of [RFC7296]), these exchanges MUST follow each other 174 and MUST all be completed before the IKE_AUTH exchange is initiated. 175 The IKE SA MUST NOT be considered as established until the IKE_AUTH 176 exchange is successfully completed. 178 The Message IDs for the IKE_INTERMEDIATE exchanges MUST be chosen 179 according to the standard IKEv2 rule, described in the Section 2.2. 180 of [RFC7296], i.e. it is set to 1 for the first IKE_INTERMEDIATE 181 exchange, 2 for the next (if any) and so on. The message ID for the 182 first pair of the IKE_AUTH messages is one more than the one that was 183 used in the last IKE_INTERMEDIATE exchange. 185 If the presence of NAT is detected in the IKE_SA_INIT exchange via 186 NAT_DETECTION_SOURCE_IP and NAT_DETECTION_DESTINATION_IP 187 notifications, then the peers MUST switch to port 4500 immediately 188 once this exchange is completed, i.e. in the first IKE_INTERMEDIATE 189 exchange. 191 The content of the IKE_INTERMEDIATE exchange messages depends on the 192 data being transferred and will be defined by specifications 193 utilizing this exchange. However, since the main motivation for the 194 IKE_INTERMEDIATE exchange is to avoid IP fragmentation when large 195 amount of data need to be transferred prior to IKE_AUTH, the 196 Encrypted payload MUST be present in the IKE_INTERMEDIATE exchange 197 messages and payloads containing large data MUST be placed inside. 198 This will allow IKE Fragmentation [RFC7383] to take place, provided 199 it is supported by the peers and negotiated in the initial exchange. 201 3.3. The IKE_INTERMEDIATE Exchange Protection and Authentication 203 3.3.1. Protection of the IKE_INTERMEDIATE Messages 205 The keys SK_e[i/r] and SK_a[i/r] for the Encrypted payload in the 206 IKE_INTERMEDIATE exchanges are computed in a standard fashion, as 207 defined in the Section 2.14 of [RFC7296]. Every subsequent 208 IKE_INTERMEDIATE exchange uses the most recently calculated IKE SA 209 keys before this exchange is started. So, the first IKE_INTERMEDIATE 210 exchange always uses SK_e[i/r] and SK_a[i/r] keys that were computed 211 as a result of the IKE_SA_INIT exchange. If the first 212 IKE_INTERMEDIATE exchange performs additional key exchange resulting 213 in the update of SK_e[i/r] and SK_a[i/r], then these updated keys are 214 used for encryption and authentication of the next IKE_INTERMEDIATE 215 exchange, otherwise the current keys are used, and so on. 217 3.3.2. Authentication of the IKE_INTERMEDIATE Exchanges 219 The content of the IKE_INTERMEDIATE exchanges must be authenticated 220 in the IKE_AUTH exchange. For this purpose the definition of the 221 blob to be signed (or MAC'ed) from the Section 2.15 of [RFC7296] is 222 modified as follows: 224 InitiatorSignedOctets = RealMsg1 | NonceRData | MACedIDForI [| IntAuth] 225 ResponderSignedOctets = RealMsg2 | NonceIData | MACedIDForR [| IntAuth] 227 IntAuth = IntAuth_1 | [| IntAuth_2 [| IntAuth_3]] ... 229 IntAuth_1 = IntAuth_1_I | IntAuth_1_R 230 IntAuth_2 = IntAuth_2_I | IntAuth_2_R 231 IntAuth_3 = IntAuth_3_I | IntAuth_3_R 232 ... 234 IntAuth_1_I = prf(SK_pi_1, [IntAuth_1_I_P |] IntAuth_1_I_A) 235 IntAuth_2_I = prf(SK_pi_2, [IntAuth_2_I_P |] IntAuth_2_I_A) 236 IntAuth_3_I = prf(SK_pi_3, [IntAuth_3_I_P |] IntAuth_3_I_A) 237 ... 239 IntAuth_1_R = prf(SK_pr_1, [IntAuth_1_R_P |] IntAuth_1_R_A) 240 IntAuth_2_R = prf(SK_pr_2, [IntAuth_2_R_P |] IntAuth_2_R_A) 241 IntAuth_3_R = prf(SK_pr_3, [IntAuth_3_R_P |] IntAuth_3_R_A) 242 ... 244 IntAuth_1_I/IntAuth_1_R, IntAuth_2_I/IntAuth_2_R, IntAuth_3_I/ 245 IntAuth_3_R, etc. represent the results of applying the negotiated 246 prf to the content of the IKE_INTERMEDIATE messages sent by the 247 initiator (IntAuth_*_I) and by the responder (IntAuth_*_R) in an 248 order of increasing Message IDs (i.e. in an order the 249 IKE_INTERMEDIATE exchanges took place). The prf is applied to the 250 two chunks of data: optional IntAuth_*_[I/R]_P and mandatory 251 IntAuth_*_[I/R]_A. The IntAuth_*_[I/R]_A chunk lasts from the first 252 octet of the IKE Header (not including prepended four octets of 253 zeros, if port 4500 is used) to the last octet of the Encrypted 254 Payload header. The IntAuth_*_[I/R]_P chunk is present if the 255 Encrypted payload is not empty. It consists of the not yet encrypted 256 content of the Encrypted payload, excluding Initialization Vector, 257 Padding, Pad Length and Integrity Checksum Data fields (see 3.14 of 258 [RFC7296] for description of the Encrypted payload). In other words, 259 the IntAuth_*_[I/R]_P chunk is the inner payloads of the Encrypted 260 payload in plaintext form. 262 1 2 3 263 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 264 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ^ ^ 265 | IKE SA Initiator's SPI | | | 266 | | | | 267 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ I | 268 | IKE SA Responder's SPI | K | 269 | | E | 270 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 271 | Next Payload | MjVer | MnVer | Exchange Type | Flags | H | 272 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ d | 273 | Message ID | r A 274 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | 275 | Length | | | 276 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ v | 277 | | | 278 ~ Unencrypted payloads (if any) ~ | 279 | | | 280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ^ | 281 | Next Payload |C| RESERVED | Payload Length | | | 282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ E v 283 | Initialization Vector | n 284 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ c ^ 285 | | r | 286 ~ Inner payloads (not yet encrypted) ~ P 287 | | P | 288 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ l v 289 | Padding (0-255 octets) | Pad Length | d 290 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 291 ~ Integrity Checksum Data ~ | 292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ v 294 Figure 1: Data to Authenticate in the IKE_INTERMEDIATE Exchange 295 Messages 297 Figure 1 illustrates the layout of the IntAuth_*_[I/R]_P (denoted as 298 P) and the IntAuth_*_[I/R]_A (denoted as A) chunks in case the 299 Encrypted payload is not empty. 301 The calculations are applied to whole messages only, before possible 302 IKE Fragmentation. This ensures that the IntAuth will be the same 303 regardless of whether IKE Fragmentation takes place or not. This is 304 important since [RFC7383] allows sending first unfragmented message 305 and then resending it in fragmented form in case of no reply is 306 received. 308 Each calculation of IntAuth_*_[I/R] uses its own keys SK_p[i/r]_*, 309 which are the most recently updated SK_p[i/r] keys available before 310 the corresponded IKE_INTERMEDIATE exchange is started. The first 311 IKE_INTERMEDIATE exchange always uses SK_p[i/r] keys that were 312 computed in the IKE_SA_INIT as SK_p[i/r]_1. If the first 313 IKE_INTERMEDIATE exchange performs additional key exchange resulting 314 in SK_p[i/r] update, then this updated SK_p[i/r] are used as SK_p[i/ 315 r]_2, otherwise the original SK_p[i/r] are used, and so on. Note, 316 that if keys are updated then for any given IKE_INTERMEDIATE exchange 317 the keys SK_e[i/r] and SK_a[i/r] used for its messages protection 318 (see Section 3.3.1) and the keys SK_p[i/r] for its authentication are 319 always from the same generation. 321 3.4. Error Handling in the IKE_INTERMEDIATE Exchange 323 Since messages of the IKE_INTERMEDIATE exchange are not authenticated 324 until the IKE_AUTH exchange successfully completes, possible errors 325 need to be handled with care. There is a trade-off between providing 326 a better diagnostics of the problem and a risk to become a part of 327 DoS attack. See Section 2.21.1 and 2.21.2 of [RFC7296] describe how 328 errors are handled in initial IKEv2 exchanges, these considerations 329 are also applied to the IKE_INTERMEDIATE exchange. 331 4. Interaction with other IKEv2 Extensions 333 The IKE_INTERMEDIATE exchanges MAY be used in the IKEv2 Session 334 Resumption [RFC5723] between the IKE_SESSION_RESUME and the IKE_AUTH 335 exchanges. 337 5. Security Considerations 339 The data that is transferred by means of the IKE_INTERMEDIATE 340 exchanges is not authenticated until the subsequent IKE_AUTH exchange 341 is completed. However, if the data is placed inside the Encrypted 342 payload, then it is protected from passive eavesdroppers. In 343 addition the peers can be certain that they receives messages from 344 the party he/she performed the IKE_SA_INIT with if they can 345 successfully verify the Integrity Checksum Data of the Encrypted 346 payload. 348 The main application for Intermediate Exchange is to transfer large 349 amount of data before IKE SA is set up without causing IP 350 fragmentation. For that reason it is expected that in most cases IKE 351 Fragmentation will be employed in the IKE_INTERMEDIATE exchanges. 352 Section 5 of [RFC7383] contains security considerations for IKE 353 Fragmentation. 355 Note, that if an attacker was able to break key exchange in real time 356 (e.g. by means of Quantum Computer), then the security of the 357 IKE_INTERMEDIATE exchange would degrade. In particular, such an 358 attacker would be able both to read data contained in the Encrypted 359 payload and to forge it. The forgery would become evident in the 360 IKE_AUTH exchange (provided the attacker cannot break employed 361 authentication mechanism), but the ability to inject forged the 362 IKE_INTERMEDIATE exchange messages with valid ICV would allow the 363 attacker to mount Denial-of-Service attack. Moreover, if in this 364 situation the negotiated prf was not secure against preimage attack 365 with known key, then the attacker could forge the IKE_INTERMEDIATE 366 exchange messages without later being detected in the IKE_AUTH 367 exchange. To do this the attacker should find the same 368 IntAuth_*_[I|R] value for the forged message as for original. 370 6. IANA Considerations 372 This document defines a new Exchange Type in the "IKEv2 Exchange 373 Types" registry: 375 IKE_INTERMEDIATE 377 This document also defines a new Notify Message Types in the "Notify 378 Message Types - Status Types" registry: 380 INTERMEDIATE_EXCHANGE_SUPPORTED 382 7. Acknowledgements 384 The idea to use an intermediate exchange between IKE_SA_INIT and 385 IKE_AUTH was first suggested by Tero Kivinen. Scott Fluhrer and 386 Daniel Van Geest identified a possible problem with authentication of 387 the IKE_INTERMEDIATE exchange and helped to resolve it. 389 8. References 391 8.1. Normative References 393 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 394 Requirement Levels", BCP 14, RFC 2119, 395 DOI 10.17487/RFC2119, March 1997, . 398 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 399 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 400 May 2017, . 402 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 403 Kivinen, "Internet Key Exchange Protocol Version 2 404 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 405 2014, . 407 [RFC7383] Smyslov, V., "Internet Key Exchange Protocol Version 2 408 (IKEv2) Message Fragmentation", RFC 7383, 409 DOI 10.17487/RFC7383, November 2014, . 412 8.2. Informative References 414 [RFC8229] Pauly, T., Touati, S., and R. Mantha, "TCP Encapsulation 415 of IKE and IPsec Packets", RFC 8229, DOI 10.17487/RFC8229, 416 August 2017, . 418 [RFC5723] Sheffer, Y. and H. Tschofenig, "Internet Key Exchange 419 Protocol Version 2 (IKEv2) Session Resumption", RFC 5723, 420 DOI 10.17487/RFC5723, January 2010, . 423 Author's Address 425 Valery Smyslov 426 ELVIS-PLUS 427 PO Box 81 428 Moscow (Zelenograd) 124460 429 RU 431 Phone: +7 495 276 0211 432 Email: svan@elvis.ru