]>
Commit | Line | Data |
---|---|---|
ff8a0c21 MW |
1 | |
2 | ||
3 | ||
4 | Network Working Group C. Kaufman | |
5 | Internet-Draft Microsoft | |
6 | Expires: August 27, 2006 P. Hoffman | |
7 | VPN Consortium | |
8 | P. Eronen | |
9 | Nokia | |
10 | February 23, 2006 | |
11 | ||
12 | ||
13 | Internet Key Exchange Protocol: IKEv2 | |
14 | draft-hoffman-ikev2bis-00.txt | |
15 | ||
16 | Status of this Memo | |
17 | ||
18 | By submitting this Internet-Draft, each author represents that any | |
19 | applicable patent or other IPR claims of which he or she is aware | |
20 | have been or will be disclosed, and any of which he or she becomes | |
21 | aware will be disclosed, in accordance with Section 6 of BCP 79. | |
22 | ||
23 | Internet-Drafts are working documents of the Internet Engineering | |
24 | Task Force (IETF), its areas, and its working groups. Note that | |
25 | other groups may also distribute working documents as Internet- | |
26 | Drafts. | |
27 | ||
28 | Internet-Drafts are draft documents valid for a maximum of six months | |
29 | and may be updated, replaced, or obsoleted by other documents at any | |
30 | time. It is inappropriate to use Internet-Drafts as reference | |
31 | material or to cite them other than as "work in progress." | |
32 | ||
33 | The list of current Internet-Drafts can be accessed at | |
34 | http://www.ietf.org/ietf/1id-abstracts.txt. | |
35 | ||
36 | The list of Internet-Draft Shadow Directories can be accessed at | |
37 | http://www.ietf.org/shadow.html. | |
38 | ||
39 | This Internet-Draft will expire on August 27, 2006. | |
40 | ||
41 | Copyright Notice | |
42 | ||
43 | Copyright (C) The Internet Society (2006). | |
44 | ||
45 | Abstract | |
46 | ||
47 | This document describes version 2 of the Internet Key Exchange (IKE) | |
48 | protocol. It is a restatement of RFC 4306, and includes all of the | |
49 | clarifications from the "IKEv2 Clarifications" document. | |
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | Kaufman, et al. Expires August 27, 2006 [Page 1] | |
56 | \f | |
57 | Internet-Draft IKEv2bis February 2006 | |
58 | ||
59 | ||
60 | Table of Contents | |
61 | ||
62 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | |
63 | 1.1. Usage Scenarios . . . . . . . . . . . . . . . . . . . . . 6 | |
64 | 1.1.1. Security Gateway to Security Gateway Tunnel . . . . . 7 | |
65 | 1.1.2. Endpoint-to-Endpoint Transport . . . . . . . . . . . 7 | |
66 | 1.1.3. Endpoint to Security Gateway Tunnel . . . . . . . . . 8 | |
67 | 1.1.4. Other Scenarios . . . . . . . . . . . . . . . . . . . 9 | |
68 | 1.2. The Initial Exchanges . . . . . . . . . . . . . . . . . . 9 | |
69 | 1.3. The CREATE_CHILD_SA Exchange . . . . . . . . . . . . . . 12 | |
70 | 1.3.1. Creating New CHILD_SAs with the CREATE_CHILD_SA | |
71 | Exchange . . . . . . . . . . . . . . . . . . . . . . 13 | |
72 | 1.3.2. Rekeying IKE_SAs with the CREATE_CHILD_SA Exchange . 14 | |
73 | 1.3.3. Rekeying CHILD_SAs with the CREATE_CHILD_SA | |
74 | Exchange . . . . . . . . . . . . . . . . . . . . . . 14 | |
75 | 1.4. The INFORMATIONAL Exchange . . . . . . . . . . . . . . . 15 | |
76 | 1.5. Informational Messages outside of an IKE_SA . . . . . . . 16 | |
77 | 1.6. Requirements Terminology . . . . . . . . . . . . . . . . 17 | |
78 | 1.7. Differences Between RFC 4306 and This Document . . . . . 17 | |
79 | 2. IKE Protocol Details and Variations . . . . . . . . . . . . . 18 | |
80 | 2.1. Use of Retransmission Timers . . . . . . . . . . . . . . 19 | |
81 | 2.2. Use of Sequence Numbers for Message ID . . . . . . . . . 19 | |
82 | 2.3. Window Size for Overlapping Requests . . . . . . . . . . 20 | |
83 | 2.4. State Synchronization and Connection Timeouts . . . . . . 21 | |
84 | 2.5. Version Numbers and Forward Compatibility . . . . . . . . 23 | |
85 | 2.6. Cookies . . . . . . . . . . . . . . . . . . . . . . . . . 25 | |
86 | 2.6.1. Interaction of COOKIE and INVALID_KE_PAYLOAD . . . . 27 | |
87 | 2.7. Cryptographic Algorithm Negotiation . . . . . . . . . . . 28 | |
88 | 2.8. Rekeying . . . . . . . . . . . . . . . . . . . . . . . . 29 | |
89 | 2.8.1. Simultaneous CHILD_SA rekeying . . . . . . . . . . . 31 | |
90 | 2.8.2. Rekeying the IKE_SA Versus Reauthentication . . . . . 33 | |
91 | 2.9. Traffic Selector Negotiation . . . . . . . . . . . . . . 34 | |
92 | 2.9.1. Traffic Selectors Violating Own Policy . . . . . . . 37 | |
93 | 2.10. Nonces . . . . . . . . . . . . . . . . . . . . . . . . . 38 | |
94 | 2.11. Address and Port Agility . . . . . . . . . . . . . . . . 38 | |
95 | 2.12. Reuse of Diffie-Hellman Exponentials . . . . . . . . . . 38 | |
96 | 2.13. Generating Keying Material . . . . . . . . . . . . . . . 39 | |
97 | 2.14. Generating Keying Material for the IKE_SA . . . . . . . . 40 | |
98 | 2.15. Authentication of the IKE_SA . . . . . . . . . . . . . . 41 | |
99 | 2.16. Extensible Authentication Protocol Methods . . . . . . . 43 | |
100 | 2.17. Generating Keying Material for CHILD_SAs . . . . . . . . 45 | |
101 | 2.18. Rekeying IKE_SAs Using a CREATE_CHILD_SA Exchange . . . . 46 | |
102 | 2.19. Requesting an Internal Address on a Remote Network . . . 47 | |
103 | 2.20. Requesting the Peer's Version . . . . . . . . . . . . . . 48 | |
104 | 2.21. Error Handling . . . . . . . . . . . . . . . . . . . . . 49 | |
105 | 2.22. IPComp . . . . . . . . . . . . . . . . . . . . . . . . . 50 | |
106 | 2.23. NAT Traversal . . . . . . . . . . . . . . . . . . . . . . 50 | |
107 | 2.24. Explicit Congestion Notification (ECN) . . . . . . . . . 53 | |
108 | ||
109 | ||
110 | ||
111 | Kaufman, et al. Expires August 27, 2006 [Page 2] | |
112 | \f | |
113 | Internet-Draft IKEv2bis February 2006 | |
114 | ||
115 | ||
116 | 3. Header and Payload Formats . . . . . . . . . . . . . . . . . 53 | |
117 | 3.1. The IKE Header . . . . . . . . . . . . . . . . . . . . . 53 | |
118 | 3.2. Generic Payload Header . . . . . . . . . . . . . . . . . 56 | |
119 | 3.3. Security Association Payload . . . . . . . . . . . . . . 58 | |
120 | 3.3.1. Proposal Substructure . . . . . . . . . . . . . . . . 60 | |
121 | 3.3.2. Transform Substructure . . . . . . . . . . . . . . . 62 | |
122 | 3.3.3. Valid Transform Types by Protocol . . . . . . . . . . 64 | |
123 | 3.3.4. Mandatory Transform IDs . . . . . . . . . . . . . . . 65 | |
124 | 3.3.5. Transform Attributes . . . . . . . . . . . . . . . . 66 | |
125 | 3.3.6. Attribute Negotiation . . . . . . . . . . . . . . . . 67 | |
126 | 3.4. Key Exchange Payload . . . . . . . . . . . . . . . . . . 68 | |
127 | 3.5. Identification Payloads . . . . . . . . . . . . . . . . . 69 | |
128 | 3.6. Certificate Payload . . . . . . . . . . . . . . . . . . . 71 | |
129 | 3.7. Certificate Request Payload . . . . . . . . . . . . . . . 74 | |
130 | 3.8. Authentication Payload . . . . . . . . . . . . . . . . . 76 | |
131 | 3.9. Nonce Payload . . . . . . . . . . . . . . . . . . . . . . 77 | |
132 | 3.10. Notify Payload . . . . . . . . . . . . . . . . . . . . . 77 | |
133 | 3.10.1. Notify Message Types . . . . . . . . . . . . . . . . 78 | |
134 | 3.11. Delete Payload . . . . . . . . . . . . . . . . . . . . . 84 | |
135 | 3.12. Vendor ID Payload . . . . . . . . . . . . . . . . . . . . 85 | |
136 | 3.13. Traffic Selector Payload . . . . . . . . . . . . . . . . 86 | |
137 | 3.13.1. Traffic Selector . . . . . . . . . . . . . . . . . . 88 | |
138 | 3.14. Encrypted Payload . . . . . . . . . . . . . . . . . . . . 90 | |
139 | 3.15. Configuration Payload . . . . . . . . . . . . . . . . . . 92 | |
140 | 3.15.1. Configuration Attributes . . . . . . . . . . . . . . 94 | |
141 | 3.15.2. Meaning of INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET . 97 | |
142 | 3.15.3. Configuration payloads for IPv6 . . . . . . . . . . . 99 | |
143 | 3.15.4. Address Assignment Failures . . . . . . . . . . . . . 100 | |
144 | 3.16. Extensible Authentication Protocol (EAP) Payload . . . . 100 | |
145 | 4. Conformance Requirements . . . . . . . . . . . . . . . . . . 102 | |
146 | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 104 | |
147 | 5.1. Traffic selector authorization . . . . . . . . . . . . . 107 | |
148 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 108 | |
149 | 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 108 | |
150 | 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 109 | |
151 | 8.1. Normative References . . . . . . . . . . . . . . . . . . 109 | |
152 | 8.2. Informative References . . . . . . . . . . . . . . . . . 110 | |
153 | Appendix A. Summary of changes from IKEv1 . . . . . . . . . . . 114 | |
154 | Appendix B. Diffie-Hellman Groups . . . . . . . . . . . . . . . 115 | |
155 | B.1. Group 1 - 768 Bit MODP . . . . . . . . . . . . . . . . . 115 | |
156 | B.2. Group 2 - 1024 Bit MODP . . . . . . . . . . . . . . . . . 115 | |
157 | Appendix C. Exchanges and Payloads . . . . . . . . . . . . . . . 116 | |
158 | C.1. IKE_SA_INIT Exchange . . . . . . . . . . . . . . . . . . 116 | |
159 | C.2. IKE_AUTH Exchange without EAP . . . . . . . . . . . . . . 117 | |
160 | C.3. IKE_AUTH Exchange with EAP . . . . . . . . . . . . . . . 118 | |
161 | C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying | |
162 | CHILD_SAs . . . . . . . . . . . . . . . . . . . . . . . . 119 | |
163 | C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE_SA . . . . 119 | |
164 | ||
165 | ||
166 | ||
167 | Kaufman, et al. Expires August 27, 2006 [Page 3] | |
168 | \f | |
169 | Internet-Draft IKEv2bis February 2006 | |
170 | ||
171 | ||
172 | C.6. INFORMATIONAL Exchange . . . . . . . . . . . . . . . . . 119 | |
173 | Appendix D. Changes Between Internet Draft Versions . . . . . . 119 | |
174 | D.1. Changes from IKEv2 to draft -00 . . . . . . . . . . . . . 119 | |
175 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 120 | |
176 | Intellectual Property and Copyright Statements . . . . . . . . . 120 | |
177 | ||
178 | ||
179 | ||
180 | ||
181 | ||
182 | ||
183 | ||
184 | ||
185 | ||
186 | ||
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | ||
203 | ||
204 | ||
205 | ||
206 | ||
207 | ||
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | ||
214 | ||
215 | ||
216 | ||
217 | ||
218 | ||
219 | ||
220 | ||
221 | ||
222 | ||
223 | Kaufman, et al. Expires August 27, 2006 [Page 4] | |
224 | \f | |
225 | Internet-Draft IKEv2bis February 2006 | |
226 | ||
227 | ||
228 | 1. Introduction | |
229 | ||
230 | {{ An introduction to the differences between RFC 4306 [IKEV2] and | |
231 | this document is given at the end of Section 1. It is put there | |
232 | (instead of here) to preserve the section numbering of the original | |
233 | IKEv2 document. }} | |
234 | ||
235 | IP Security (IPsec) provides confidentiality, data integrity, access | |
236 | control, and data source authentication to IP datagrams. These | |
237 | services are provided by maintaining shared state between the source | |
238 | and the sink of an IP datagram. This state defines, among other | |
239 | things, the specific services provided to the datagram, which | |
240 | cryptographic algorithms will be used to provide the services, and | |
241 | the keys used as input to the cryptographic algorithms. | |
242 | ||
243 | Establishing this shared state in a manual fashion does not scale | |
244 | well. Therefore, a protocol to establish this state dynamically is | |
245 | needed. This memo describes such a protocol -- the Internet Key | |
246 | Exchange (IKE). Version 1 of IKE was defined in RFCs 2407 [DOI], | |
247 | 2408 [ISAKMP], and 2409 [IKEV1]. IKEv2 was defined in [IKEV2]. This | |
248 | single document is intended to replace all three of those RFCs. | |
249 | ||
250 | Definitions of the primitive terms in this document (such as Security | |
251 | Association or SA) can be found in [IPSECARCH]. {{ Clarif-7.2 }} It | |
252 | should be noted that parts of IKEv2 rely on some of the processing | |
253 | rules in [IPSECARCH], as described in various sections of this | |
254 | document. | |
255 | ||
256 | IKE performs mutual authentication between two parties and | |
257 | establishes an IKE security association (SA) that includes shared | |
258 | secret information that can be used to efficiently establish SAs for | |
259 | Encapsulating Security Payload (ESP) [ESP] and/or Authentication | |
260 | Header (AH) [AH] and a set of cryptographic algorithms to be used by | |
261 | the SAs to protect the traffic that they carry. In this document, | |
262 | the term "suite" or "cryptographic suite" refers to a complete set of | |
263 | algorithms used to protect an SA. An initiator proposes one or more | |
264 | suites by listing supported algorithms that can be combined into | |
265 | suites in a mix-and-match fashion. IKE can also negotiate use of IP | |
266 | Compression (IPComp) [IPCOMP] in connection with an ESP and/or AH SA. | |
267 | We call the IKE SA an "IKE_SA". The SAs for ESP and/or AH that get | |
268 | set up through that IKE_SA we call "CHILD_SAs". | |
269 | ||
270 | All IKE communications consist of pairs of messages: a request and a | |
271 | response. The pair is called an "exchange". We call the first | |
272 | messages establishing an IKE_SA IKE_SA_INIT and IKE_AUTH exchanges | |
273 | and subsequent IKE exchanges CREATE_CHILD_SA or INFORMATIONAL | |
274 | exchanges. In the common case, there is a single IKE_SA_INIT | |
275 | exchange and a single IKE_AUTH exchange (a total of four messages) to | |
276 | ||
277 | ||
278 | ||
279 | Kaufman, et al. Expires August 27, 2006 [Page 5] | |
280 | \f | |
281 | Internet-Draft IKEv2bis February 2006 | |
282 | ||
283 | ||
284 | establish the IKE_SA and the first CHILD_SA. In exceptional cases, | |
285 | there may be more than one of each of these exchanges. In all cases, | |
286 | all IKE_SA_INIT exchanges MUST complete before any other exchange | |
287 | type, then all IKE_AUTH exchanges MUST complete, and following that | |
288 | any number of CREATE_CHILD_SA and INFORMATIONAL exchanges may occur | |
289 | in any order. In some scenarios, only a single CHILD_SA is needed | |
290 | between the IPsec endpoints, and therefore there would be no | |
291 | additional exchanges. Subsequent exchanges MAY be used to establish | |
292 | additional CHILD_SAs between the same authenticated pair of endpoints | |
293 | and to perform housekeeping functions. | |
294 | ||
295 | IKE message flow always consists of a request followed by a response. | |
296 | It is the responsibility of the requester to ensure reliability. If | |
297 | the response is not received within a timeout interval, the requester | |
298 | needs to retransmit the request (or abandon the connection). | |
299 | ||
300 | The first request/response of an IKE session (IKE_SA_INIT) negotiates | |
301 | security parameters for the IKE_SA, sends nonces, and sends Diffie- | |
302 | Hellman values. | |
303 | ||
304 | The second request/response (IKE_AUTH) transmits identities, proves | |
305 | knowledge of the secrets corresponding to the two identities, and | |
306 | sets up an SA for the first (and often only) AH and/or ESP CHILD_SA. | |
307 | ||
308 | The types of subsequent exchanges are CREATE_CHILD_SA (which creates | |
309 | a CHILD_SA) and INFORMATIONAL (which deletes an SA, reports error | |
310 | conditions, or does other housekeeping). Every request requires a | |
311 | response. An INFORMATIONAL request with no payloads (other than the | |
312 | empty Encrypted payload required by the syntax) is commonly used as a | |
313 | check for liveness. These subsequent exchanges cannot be used until | |
314 | the initial exchanges have completed. | |
315 | ||
316 | In the description that follows, we assume that no errors occur. | |
317 | Modifications to the flow should errors occur are described in | |
318 | Section 2.21. | |
319 | ||
320 | 1.1. Usage Scenarios | |
321 | ||
322 | IKE is expected to be used to negotiate ESP and/or AH SAs in a number | |
323 | of different scenarios, each with its own special requirements. | |
324 | ||
325 | ||
326 | ||
327 | ||
328 | ||
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | ||
335 | Kaufman, et al. Expires August 27, 2006 [Page 6] | |
336 | \f | |
337 | Internet-Draft IKEv2bis February 2006 | |
338 | ||
339 | ||
340 | 1.1.1. Security Gateway to Security Gateway Tunnel | |
341 | ||
342 | +-+-+-+-+-+ +-+-+-+-+-+ | |
343 | ! ! IPsec ! ! | |
344 | Protected !Tunnel ! tunnel !Tunnel ! Protected | |
345 | Subnet <-->!Endpoint !<---------->!Endpoint !<--> Subnet | |
346 | ! ! ! ! | |
347 | +-+-+-+-+-+ +-+-+-+-+-+ | |
348 | ||
349 | Figure 1: Security Gateway to Security Gateway Tunnel | |
350 | ||
351 | In this scenario, neither endpoint of the IP connection implements | |
352 | IPsec, but network nodes between them protect traffic for part of the | |
353 | way. Protection is transparent to the endpoints, and depends on | |
354 | ordinary routing to send packets through the tunnel endpoints for | |
355 | processing. Each endpoint would announce the set of addresses | |
356 | "behind" it, and packets would be sent in tunnel mode where the inner | |
357 | IP header would contain the IP addresses of the actual endpoints. | |
358 | ||
359 | 1.1.2. Endpoint-to-Endpoint Transport | |
360 | ||
361 | +-+-+-+-+-+ +-+-+-+-+-+ | |
362 | ! ! IPsec transport ! ! | |
363 | !Protected! or tunnel mode SA !Protected! | |
364 | !Endpoint !<---------------------------------------->!Endpoint ! | |
365 | ! ! ! ! | |
366 | +-+-+-+-+-+ +-+-+-+-+-+ | |
367 | ||
368 | Figure 2: Endpoint to Endpoint | |
369 | ||
370 | In this scenario, both endpoints of the IP connection implement | |
371 | IPsec, as required of hosts in [IPSECARCH]. Transport mode will | |
372 | commonly be used with no inner IP header. If there is an inner IP | |
373 | header, the inner addresses will be the same as the outer addresses. | |
374 | A single pair of addresses will be negotiated for packets to be | |
375 | protected by this SA. These endpoints MAY implement application | |
376 | layer access controls based on the IPsec authenticated identities of | |
377 | the participants. This scenario enables the end-to-end security that | |
378 | has been a guiding principle for the Internet since [ARCHPRINC], | |
379 | [TRANSPARENCY], and a method of limiting the inherent problems with | |
380 | complexity in networks noted by [ARCHGUIDEPHIL]. Although this | |
381 | scenario may not be fully applicable to the IPv4 Internet, it has | |
382 | been deployed successfully in specific scenarios within intranets | |
383 | using IKEv1. It should be more broadly enabled during the transition | |
384 | to IPv6 and with the adoption of IKEv2. | |
385 | ||
386 | It is possible in this scenario that one or both of the protected | |
387 | endpoints will be behind a network address translation (NAT) node, in | |
388 | ||
389 | ||
390 | ||
391 | Kaufman, et al. Expires August 27, 2006 [Page 7] | |
392 | \f | |
393 | Internet-Draft IKEv2bis February 2006 | |
394 | ||
395 | ||
396 | which case the tunneled packets will have to be UDP encapsulated so | |
397 | that port numbers in the UDP headers can be used to identify | |
398 | individual endpoints "behind" the NAT (see Section 2.23). | |
399 | ||
400 | 1.1.3. Endpoint to Security Gateway Tunnel | |
401 | ||
402 | +-+-+-+-+-+ +-+-+-+-+-+ | |
403 | ! ! IPsec ! ! Protected | |
404 | !Protected! tunnel !Tunnel ! Subnet | |
405 | !Endpoint !<------------------------>!Endpoint !<--- and/or | |
406 | ! ! ! ! Internet | |
407 | +-+-+-+-+-+ +-+-+-+-+-+ | |
408 | ||
409 | Figure 3: Endpoint to Security Gateway Tunnel | |
410 | ||
411 | In this scenario, a protected endpoint (typically a portable roaming | |
412 | computer) connects back to its corporate network through an IPsec- | |
413 | protected tunnel. It might use this tunnel only to access | |
414 | information on the corporate network, or it might tunnel all of its | |
415 | traffic back through the corporate network in order to take advantage | |
416 | of protection provided by a corporate firewall against Internet-based | |
417 | attacks. In either case, the protected endpoint will want an IP | |
418 | address associated with the security gateway so that packets returned | |
419 | to it will go to the security gateway and be tunneled back. This IP | |
420 | address may be static or may be dynamically allocated by the security | |
421 | gateway. {{ Clarif-6.1 }} In support of the latter case, IKEv2 | |
422 | includes a mechanism (namely, configuration payloads) for the | |
423 | initiator to request an IP address owned by the security gateway for | |
424 | use for the duration of its SA. | |
425 | ||
426 | In this scenario, packets will use tunnel mode. On each packet from | |
427 | the protected endpoint, the outer IP header will contain the source | |
428 | IP address associated with its current location (i.e., the address | |
429 | that will get traffic routed to the endpoint directly), while the | |
430 | inner IP header will contain the source IP address assigned by the | |
431 | security gateway (i.e., the address that will get traffic routed to | |
432 | the security gateway for forwarding to the endpoint). The outer | |
433 | destination address will always be that of the security gateway, | |
434 | while the inner destination address will be the ultimate destination | |
435 | for the packet. | |
436 | ||
437 | In this scenario, it is possible that the protected endpoint will be | |
438 | behind a NAT. In that case, the IP address as seen by the security | |
439 | gateway will not be the same as the IP address sent by the protected | |
440 | endpoint, and packets will have to be UDP encapsulated in order to be | |
441 | routed properly. | |
442 | ||
443 | ||
444 | ||
445 | ||
446 | ||
447 | Kaufman, et al. Expires August 27, 2006 [Page 8] | |
448 | \f | |
449 | Internet-Draft IKEv2bis February 2006 | |
450 | ||
451 | ||
452 | 1.1.4. Other Scenarios | |
453 | ||
454 | Other scenarios are possible, as are nested combinations of the | |
455 | above. One notable example combines aspects of 1.1.1 and 1.1.3. A | |
456 | subnet may make all external accesses through a remote security | |
457 | gateway using an IPsec tunnel, where the addresses on the subnet are | |
458 | routed to the security gateway by the rest of the Internet. An | |
459 | example would be someone's home network being virtually on the | |
460 | Internet with static IP addresses even though connectivity is | |
461 | provided by an ISP that assigns a single dynamically assigned IP | |
462 | address to the user's security gateway (where the static IP addresses | |
463 | and an IPsec relay are provided by a third party located elsewhere). | |
464 | ||
465 | 1.2. The Initial Exchanges | |
466 | ||
467 | Communication using IKE always begins with IKE_SA_INIT and IKE_AUTH | |
468 | exchanges (known in IKEv1 as Phase 1). These initial exchanges | |
469 | normally consist of four messages, though in some scenarios that | |
470 | number can grow. All communications using IKE consist of request/ | |
471 | response pairs. We'll describe the base exchange first, followed by | |
472 | variations. The first pair of messages (IKE_SA_INIT) negotiate | |
473 | cryptographic algorithms, exchange nonces, and do a Diffie-Hellman | |
474 | exchange [DH]. | |
475 | ||
476 | The second pair of messages (IKE_AUTH) authenticate the previous | |
477 | messages, exchange identities and certificates, and establish the | |
478 | first CHILD_SA. Parts of these messages are encrypted and integrity | |
479 | protected with keys established through the IKE_SA_INIT exchange, so | |
480 | the identities are hidden from eavesdroppers and all fields in all | |
481 | the messages are authenticated. | |
482 | ||
483 | In the following descriptions, the payloads contained in the message | |
484 | are indicated by names as listed below. | |
485 | ||
486 | ||
487 | ||
488 | ||
489 | ||
490 | ||
491 | ||
492 | ||
493 | ||
494 | ||
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | ||
501 | ||
502 | ||
503 | Kaufman, et al. Expires August 27, 2006 [Page 9] | |
504 | \f | |
505 | Internet-Draft IKEv2bis February 2006 | |
506 | ||
507 | ||
508 | Notation Payload | |
509 | ----------------------------------------- | |
510 | AUTH Authentication | |
511 | CERT Certificate | |
512 | CERTREQ Certificate Request | |
513 | CP Configuration | |
514 | D Delete | |
515 | E Encrypted | |
516 | EAP Extensible Authentication | |
517 | HDR IKE Header | |
518 | IDi Identification - Initiator | |
519 | IDr Identification - Responder | |
520 | KE Key Exchange | |
521 | Ni, Nr Nonce | |
522 | N Notify | |
523 | SA Security Association | |
524 | TSi Traffic Selector - Initiator | |
525 | TSr Traffic Selector - Responder | |
526 | V Vendor ID | |
527 | ||
528 | The details of the contents of each payload are described in section | |
529 | 3. Payloads that may optionally appear will be shown in brackets, | |
530 | such as [CERTREQ], indicate that optionally a certificate request | |
531 | payload can be included. | |
532 | ||
533 | {{ Clarif-7.10 }} Many payloads contain fields marked as "RESERVED". | |
534 | Some payloads in IKEv2 (and historically in IKEv1) are not aligned to | |
535 | 4-byte boundaries. | |
536 | ||
537 | The initial exchanges are as follows: | |
538 | ||
539 | Initiator Responder | |
540 | ------------------------------------------------------------------- | |
541 | HDR, SAi1, KEi, Ni --> | |
542 | ||
543 | HDR contains the Security Parameter Indexes (SPIs), version numbers, | |
544 | and flags of various sorts. The SAi1 payload states the | |
545 | cryptographic algorithms the initiator supports for the IKE_SA. The | |
546 | KE payload sends the initiator's Diffie-Hellman value. Ni is the | |
547 | initiator's nonce. | |
548 | ||
549 | <-- HDR, SAr1, KEr, Nr, [CERTREQ] | |
550 | ||
551 | The responder chooses a cryptographic suite from the initiator's | |
552 | offered choices and expresses that choice in the SAr1 payload, | |
553 | completes the Diffie-Hellman exchange with the KEr payload, and sends | |
554 | its nonce in the Nr payload. | |
555 | ||
556 | ||
557 | ||
558 | ||
559 | Kaufman, et al. Expires August 27, 2006 [Page 10] | |
560 | \f | |
561 | Internet-Draft IKEv2bis February 2006 | |
562 | ||
563 | ||
564 | At this point in the negotiation, each party can generate SKEYSEED, | |
565 | from which all keys are derived for that IKE_SA. All but the headers | |
566 | of all the messages that follow are encrypted and integrity | |
567 | protected. The keys used for the encryption and integrity protection | |
568 | are derived from SKEYSEED and are known as SK_e (encryption) and SK_a | |
569 | (authentication, a.k.a. integrity protection). A separate SK_e and | |
570 | SK_a is computed for each direction. In addition to the keys SK_e | |
571 | and SK_a derived from the DH value for protection of the IKE_SA, | |
572 | another quantity SK_d is derived and used for derivation of further | |
573 | keying material for CHILD_SAs. The notation SK { ... } indicates | |
574 | that these payloads are encrypted and integrity protected using that | |
575 | direction's SK_e and SK_a. | |
576 | ||
577 | HDR, SK {IDi, [CERT,] [CERTREQ,] | |
578 | [IDr,] AUTH, SAi2, | |
579 | TSi, TSr} --> | |
580 | ||
581 | The initiator asserts its identity with the IDi payload, proves | |
582 | knowledge of the secret corresponding to IDi and integrity protects | |
583 | the contents of the first message using the AUTH payload (see | |
584 | Section 2.15). It might also send its certificate(s) in CERT | |
585 | payload(s) and a list of its trust anchors in CERTREQ payload(s). If | |
586 | any CERT payloads are included, the first certificate provided MUST | |
587 | contain the public key used to verify the AUTH field. The optional | |
588 | payload IDr enables the initiator to specify which of the responder's | |
589 | identities it wants to talk to. This is useful when the machine on | |
590 | which the responder is running is hosting multiple identities at the | |
591 | same IP address. The initiator begins negotiation of a CHILD_SA | |
592 | using the SAi2 payload. The final fields (starting with SAi2) are | |
593 | described in the description of the CREATE_CHILD_SA exchange. | |
594 | ||
595 | <-- HDR, SK {IDr, [CERT,] AUTH, | |
596 | SAr2, TSi, TSr} | |
597 | ||
598 | The responder asserts its identity with the IDr payload, optionally | |
599 | sends one or more certificates (again with the certificate containing | |
600 | the public key used to verify AUTH listed first), authenticates its | |
601 | identity and protects the integrity of the second message with the | |
602 | AUTH payload, and completes negotiation of a CHILD_SA with the | |
603 | additional fields described below in the CREATE_CHILD_SA exchange. | |
604 | ||
605 | The recipients of messages 3 and 4 MUST verify that all signatures | |
606 | and MACs are computed correctly and that the names in the ID payloads | |
607 | correspond to the keys used to generate the AUTH payload. | |
608 | ||
609 | {{ Clarif-4.2}} If creating the CHILD_SA during the IKE_AUTH exchange | |
610 | fails for some reason, the IKE_SA is still created as usual. The | |
611 | list of responses in the IKE_AUTH exchange that do not prevent an | |
612 | ||
613 | ||
614 | ||
615 | Kaufman, et al. Expires August 27, 2006 [Page 11] | |
616 | \f | |
617 | Internet-Draft IKEv2bis February 2006 | |
618 | ||
619 | ||
620 | IKE_SA from being set up include at least the following: | |
621 | NO_PROPOSAL_CHOSEN, TS_UNACCEPTABLE, SINGLE_PAIR_REQUIRED, | |
622 | INTERNAL_ADDRESS_FAILURE, and FAILED_CP_REQUIRED. | |
623 | ||
624 | {{ Clarif-4.3 }} Note that IKE_AUTH messages do not contain KEi/KEr | |
625 | or Ni/Nr payloads. Thus, the SA payload in IKE_AUTH exchange cannot | |
626 | contain Transform Type 4 (Diffie-Hellman Group) with any value other | |
627 | than NONE. Implementations SHOULD NOT send such a transform because | |
628 | it cannot be interpreted consistently, and implementations SHOULD | |
629 | ignore any such tranforms they receive. | |
630 | ||
631 | 1.3. The CREATE_CHILD_SA Exchange | |
632 | ||
633 | {{ This is a heavy rewrite of most of this section. The major | |
634 | organization changes are described in Clarif-4.1 and Clarif-5.1. }} | |
635 | ||
636 | The CREATE_CHILD_SA exchange is used to create new CHILD_SAs and to | |
637 | rekey both IKE_SAs and CHILD_SAs. This exchange consists of a single | |
638 | request/response pair, and some of its function was referred to as a | |
639 | phase 2 exchange in IKEv1. It MAY be initiated by either end of the | |
640 | IKE_SA after the initial exchanges are completed. | |
641 | ||
642 | All messages following the initial exchange are cryptographically | |
643 | protected using the cryptographic algorithms and keys negotiated in | |
644 | the first two messages of the IKE exchange. These subsequent | |
645 | messages use the syntax of the Encrypted Payload described in | |
646 | Section 3.14. All subsequent messages include an Encrypted Payload, | |
647 | even if they are referred to in the text as "empty". For both | |
648 | messages in the CREATE_CHILD_SA, the message following the header is | |
649 | encrypted and the message including the header is integrity protected | |
650 | using the cryptographic algorithms negotiated for the IKE_SA. | |
651 | ||
652 | The CREATE_CHILD_SA is also used for rekeying IKE_SAs and CHILD_SAs. | |
653 | An SA is rekeyed by creating a new SA and then deleting the old one. | |
654 | This section describes the first part of rekeying, the creation of | |
655 | new SAs; Section 2.8 covers the mechanics of rekeying, including | |
656 | moving traffic from old to new SAs and the deletion of the old SAs. | |
657 | The two sections must be read together to understand the entire | |
658 | process of rekeying. | |
659 | ||
660 | Either endpoint may initiate a CREATE_CHILD_SA exchange, so in this | |
661 | section the term initiator refers to the endpoint initiating this | |
662 | exchange. An implementation MAY refuse all CREATE_CHILD_SA requests | |
663 | within an IKE_SA. | |
664 | ||
665 | The CREATE_CHILD_SA request MAY optionally contain a KE payload for | |
666 | an additional Diffie-Hellman exchange to enable stronger guarantees | |
667 | of forward secrecy for the CHILD_SA. The keying material for the | |
668 | ||
669 | ||
670 | ||
671 | Kaufman, et al. Expires August 27, 2006 [Page 12] | |
672 | \f | |
673 | Internet-Draft IKEv2bis February 2006 | |
674 | ||
675 | ||
676 | CHILD_SA is a function of SK_d established during the establishment | |
677 | of the IKE_SA, the nonces exchanged during the CREATE_CHILD_SA | |
678 | exchange, and the Diffie-Hellman value (if KE payloads are included | |
679 | in the CREATE_CHILD_SA exchange). | |
680 | ||
681 | If a CREATE_CHILD_SA exchange includes a KEi payload, at least one of | |
682 | the SA offers MUST include the Diffie-Hellman group of the KEi. The | |
683 | Diffie-Hellman group of the KEi MUST be an element of the group the | |
684 | initiator expects the responder to accept (additional Diffie-Hellman | |
685 | groups can be proposed). If the responder rejects the Diffie-Hellman | |
686 | group of the KEi payload, the responder MUST reject the request and | |
687 | indicate its preferred Diffie-Hellman group in the INVALID_KE_PAYLOAD | |
688 | Notification payload. In the case of such a rejection, the | |
689 | CREATE_CHILD_SA exchange fails, and the initiator will probably retry | |
690 | the exchange with a Diffie-Hellman proposal and KEi in the group that | |
691 | the responder gave in the INVALID_KE_PAYLOAD. | |
692 | ||
693 | 1.3.1. Creating New CHILD_SAs with the CREATE_CHILD_SA Exchange | |
694 | ||
695 | A CHILD_SA may be created by sending a CREATE_CHILD_SA request. The | |
696 | CREATE_CHILD_SA request for creating a new CHILD_SA is: | |
697 | ||
698 | Initiator Responder | |
699 | ------------------------------------------------------------------- | |
700 | HDR, SK {SA, Ni, [KEi], | |
701 | TSi, TSr} --> | |
702 | ||
703 | The initiator sends SA offer(s) in the SA payload, a nonce in the Ni | |
704 | payload, optionally a Diffie-Hellman value in the KEi payload, and | |
705 | the proposed traffic selectors for the proposed CHILD_SA in the TSi | |
706 | and TSr payloads. | |
707 | ||
708 | The CREATE_CHILD_SA response for creating a new CHILD_SA is: | |
709 | ||
710 | <-- HDR, SK {SA, Nr, [KEr], | |
711 | TSi, TSr} | |
712 | ||
713 | The responder replies (using the same Message ID to respond) with the | |
714 | accepted offer in an SA payload, and a Diffie-Hellman value in the | |
715 | KEr payload if KEi was included in the request and the selected | |
716 | cryptographic suite includes that group. | |
717 | ||
718 | The traffic selectors for traffic to be sent on that SA are specified | |
719 | in the TS payloads in the response, which may be a subset of what the | |
720 | initiator of the CHILD_SA proposed. | |
721 | ||
722 | ||
723 | ||
724 | ||
725 | ||
726 | ||
727 | Kaufman, et al. Expires August 27, 2006 [Page 13] | |
728 | \f | |
729 | Internet-Draft IKEv2bis February 2006 | |
730 | ||
731 | ||
732 | 1.3.2. Rekeying IKE_SAs with the CREATE_CHILD_SA Exchange | |
733 | ||
734 | The CREATE_CHILD_SA request for rekeying an IKE_SA is: | |
735 | ||
736 | Initiator Responder | |
737 | ------------------------------------------------------------------- | |
738 | HDR, SK {SA, Ni, KEi} --> | |
739 | ||
740 | The initiator sends SA offer(s) in the SA payload, a nonce in the Ni | |
741 | payload, and a Diffie-Hellman value in the KEi payload. New | |
742 | initiator and responder SPIs are supplied in the SPI fields. | |
743 | ||
744 | The CREATE_CHILD_SA response for rekeying an IKE_SA is: | |
745 | ||
746 | <-- HDR, SK {SA, Nr, KEr} | |
747 | ||
748 | The responder replies (using the same Message ID to respond) with the | |
749 | accepted offer in an SA payload, and a Diffie-Hellman value in the | |
750 | KEr payload if the selected cryptographic suite includes that group. | |
751 | ||
752 | The new IKE_SA has its message counters set to 0, regardless of what | |
753 | they were in the earlier IKE_SA. The window size starts at 1 for any | |
754 | new IKE_SA. | |
755 | ||
756 | KEi and KEr are required for rekeying an IKE_SA. | |
757 | ||
758 | 1.3.3. Rekeying CHILD_SAs with the CREATE_CHILD_SA Exchange | |
759 | ||
760 | The CREATE_CHILD_SA request for rekeying a CHILD_SA is: | |
761 | ||
762 | Initiator Responder | |
763 | ------------------------------------------------------------------- | |
764 | HDR, SK {N, SA, Ni, [KEi], | |
765 | TSi, TSr} --> | |
766 | ||
767 | The initiator sends SA offer(s) in the SA payload, a nonce in the Ni | |
768 | payload, optionally a Diffie-Hellman value in the KEi payload, and | |
769 | the proposed traffic selectors for the proposed CHILD_SA in the TSi | |
770 | and TSr payloads. When rekeying an existing CHILD_SA, the leading N | |
771 | payload of type REKEY_SA MUST be included and MUST give the SPI (as | |
772 | they would be expected in the headers of inbound packets) of the SAs | |
773 | being rekeyed. | |
774 | ||
775 | The CREATE_CHILD_SA response for rekeying a CHILD_SA is: | |
776 | ||
777 | <-- HDR, SK {SA, Nr, [KEr], | |
778 | Si, TSr} | |
779 | ||
780 | ||
781 | ||
782 | ||
783 | Kaufman, et al. Expires August 27, 2006 [Page 14] | |
784 | \f | |
785 | Internet-Draft IKEv2bis February 2006 | |
786 | ||
787 | ||
788 | The responder replies (using the same Message ID to respond) with the | |
789 | accepted offer in an SA payload, and a Diffie-Hellman value in the | |
790 | KEr payload if KEi was included in the request and the selected | |
791 | cryptographic suite includes that group. | |
792 | ||
793 | The traffic selectors for traffic to be sent on that SA are specified | |
794 | in the TS payloads in the response, which may be a subset of what the | |
795 | initiator of the CHILD_SA proposed. | |
796 | ||
797 | 1.4. The INFORMATIONAL Exchange | |
798 | ||
799 | At various points during the operation of an IKE_SA, peers may desire | |
800 | to convey control messages to each other regarding errors or | |
801 | notifications of certain events. To accomplish this, IKE defines an | |
802 | INFORMATIONAL exchange. INFORMATIONAL exchanges MUST ONLY occur | |
803 | after the initial exchanges and are cryptographically protected with | |
804 | the negotiated keys. | |
805 | ||
806 | Control messages that pertain to an IKE_SA MUST be sent under that | |
807 | IKE_SA. Control messages that pertain to CHILD_SAs MUST be sent | |
808 | under the protection of the IKE_SA which generated them (or its | |
809 | successor if the IKE_SA was replaced for the purpose of rekeying). | |
810 | ||
811 | Messages in an INFORMATIONAL exchange contain zero or more | |
812 | Notification, Delete, and Configuration payloads. The Recipient of | |
813 | an INFORMATIONAL exchange request MUST send some response (else the | |
814 | Sender will assume the message was lost in the network and will | |
815 | retransmit it). That response MAY be a message with no payloads. | |
816 | The request message in an INFORMATIONAL exchange MAY also contain no | |
817 | payloads. This is the expected way an endpoint can ask the other | |
818 | endpoint to verify that it is alive. | |
819 | ||
820 | {{ Clarif-5.6 }} ESP and AH SAs always exist in pairs, with one SA in | |
821 | each direction. When an SA is closed, both members of the pair MUST | |
822 | be closed (that is, deleted). When SAs are nested, as when data (and | |
823 | IP headers if in tunnel mode) are encapsulated first with IPComp, | |
824 | then with ESP, and finally with AH between the same pair of | |
825 | endpoints, all of the SAs MUST be deleted together. Each endpoint | |
826 | MUST close its incoming SAs and allow the other endpoint to close the | |
827 | other SA in each pair. To delete an SA, an INFORMATIONAL exchange | |
828 | with one or more delete payloads is sent listing the SPIs (as they | |
829 | would be expected in the headers of inbound packets) of the SAs to be | |
830 | deleted. The recipient MUST close the designated SAs. {{ Clarif-5.7 | |
831 | }} Note that one never sends delete payloads for the two sides of an | |
832 | SA in a single message. If there are many SAs to delete at the same | |
833 | time (such as for nested SAs), one includes delete payloads for in | |
834 | inbound half of each SA pair in your Informational exchange. | |
835 | ||
836 | ||
837 | ||
838 | ||
839 | Kaufman, et al. Expires August 27, 2006 [Page 15] | |
840 | \f | |
841 | Internet-Draft IKEv2bis February 2006 | |
842 | ||
843 | ||
844 | Normally, the reply in the INFORMATIONAL exchange will contain delete | |
845 | payloads for the paired SAs going in the other direction. There is | |
846 | one exception. If by chance both ends of a set of SAs independently | |
847 | decide to close them, each may send a delete payload and the two | |
848 | requests may cross in the network. If a node receives a delete | |
849 | request for SAs for which it has already issued a delete request, it | |
850 | MUST delete the outgoing SAs while processing the request and the | |
851 | incoming SAs while processing the response. In that case, the | |
852 | responses MUST NOT include delete payloads for the deleted SAs, since | |
853 | that would result in duplicate deletion and could in theory delete | |
854 | the wrong SA. | |
855 | ||
856 | {{ Demoted the SHOULD }} Half-closed connections are anomalous, and a | |
857 | node with auditing capability should probably audit their existence | |
858 | if they persist. Note that this specification nowhere specifies time | |
859 | periods, so it is up to individual endpoints to decide how long to | |
860 | wait. A node MAY refuse to accept incoming data on half-closed | |
861 | connections but MUST NOT unilaterally close them and reuse the SPIs. | |
862 | If connection state becomes sufficiently messed up, a node MAY close | |
863 | the IKE_SA; doing so will implicitly close all SAs negotiated under | |
864 | it. It can then rebuild the SAs it needs on a clean base under a new | |
865 | IKE_SA. {{ Clarif-5.8 }} The response to a request that deletes the | |
866 | IKE_SA is an empty Informational response. | |
867 | ||
868 | The INFORMATIONAL exchange is defined as: | |
869 | ||
870 | Initiator Responder | |
871 | ------------------------------------------------------------------- | |
872 | HDR, SK {[N,] [D,] | |
873 | [CP,] ...} --> | |
874 | <-- HDR, SK {[N,] [D,] | |
875 | [CP], ...} | |
876 | ||
877 | The processing of an INFORMATIONAL exchange is determined by its | |
878 | component payloads. | |
879 | ||
880 | 1.5. Informational Messages outside of an IKE_SA | |
881 | ||
882 | If an encrypted IKE packet arrives on port 500 or 4500 with an | |
883 | unrecognized SPI, it could be because the receiving node has recently | |
884 | crashed and lost state or because of some other system malfunction or | |
885 | attack. If the receiving node has an active IKE_SA to the IP address | |
886 | from whence the packet came, it MAY send a notification of the | |
887 | wayward packet over that IKE_SA in an INFORMATIONAL exchange. If it | |
888 | does not have such an IKE_SA, it MAY send an Informational message | |
889 | without cryptographic protection to the source IP address. Such a | |
890 | message is not part of an informational exchange, and the receiving | |
891 | node MUST NOT respond to it. Doing so could cause a message loop. | |
892 | ||
893 | ||
894 | ||
895 | Kaufman, et al. Expires August 27, 2006 [Page 16] | |
896 | \f | |
897 | Internet-Draft IKEv2bis February 2006 | |
898 | ||
899 | ||
900 | {{ Clarif-7.7 }} There are two cases when such a one-way notification | |
901 | is sent: INVALID_IKE_SPI and INVALID_SPI. These notifications are | |
902 | sent outside of an IKE_SA. Note that such notifications are | |
903 | explicitly not Informational exchanges; these are one-way messages | |
904 | that must not be responded to. In case of INVALID_IKE_SPI, the | |
905 | message sent is a response message, and thus it is sent to the IP | |
906 | address and port from whence it came with the same IKE SPIs and the | |
907 | Message ID copied. In case of INVALID_SPI, however, there are no IKE | |
908 | SPI values that would be meaningful to the recipient of such a | |
909 | notification. Using zero values or random values are both | |
910 | acceptable. | |
911 | ||
912 | 1.6. Requirements Terminology | |
913 | ||
914 | Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT" and | |
915 | "MAY" that appear in this document are to be interpreted as described | |
916 | in [MUSTSHOULD]. | |
917 | ||
918 | The term "Expert Review" is to be interpreted as defined in | |
919 | [IANACONS]. | |
920 | ||
921 | 1.7. Differences Between RFC 4306 and This Document | |
922 | ||
923 | {{ Added this entire section, including this recursive remark. }} | |
924 | ||
925 | This document contains clarifications and amplifications to IKEv2 | |
926 | [IKEV2]. The clarifications are mostly based on [Clarif]. The | |
927 | changes listed in that document were discussed in the IPsec Working | |
928 | Group and, after the Working Group was disbanded, on the IPsec | |
929 | mailing list. That document contains detailed explanations of areas | |
930 | that were unclear in IKEv2, and is thus useful to implementers of | |
931 | IKEv2. | |
932 | ||
933 | The protocol described in this document retains the same major | |
934 | version number (2) and minor version number (0) as was used in RFC | |
935 | 4306. | |
936 | ||
937 | In the body of this document, notes that are enclosed in double curly | |
938 | braces {{ such as this }} point out changes from IKEv2. Changes that | |
939 | come from [Clarif] are marked with the section from that document, | |
940 | such as "{{ Clarif-2.10 }}". | |
941 | ||
942 | This document also make the figures and references a bit more regular | |
943 | than in [IKEV2]. | |
944 | ||
945 | IKEv2 developers have noted that the SHOULD-level requirements are | |
946 | often unclear in that they don't say when it is OK to not obey the | |
947 | requirements. They also have noted that there are MUST-level | |
948 | ||
949 | ||
950 | ||
951 | Kaufman, et al. Expires August 27, 2006 [Page 17] | |
952 | \f | |
953 | Internet-Draft IKEv2bis February 2006 | |
954 | ||
955 | ||
956 | requirements that are not related to interoperability. This document | |
957 | has more explanation of some of these requirements. All non- | |
958 | capitalized uses of the words SHOULD and MUST now mean their normal | |
959 | English sense, not the interoperability sense of [MUSTSHOULD]. | |
960 | ||
961 | IKEv2 (and IKEv1) developers have noted that there is a great deal of | |
962 | material in the tables of codes in Section 3.10. This leads to | |
963 | implementers not having all the needed information in the main body | |
964 | of the docment. A later version of this document may move much of | |
965 | the material from those tables into the associated parts of the main | |
966 | body of the document. | |
967 | ||
968 | A later version of this document will probably have all the {{ }} | |
969 | comments removed from the body of the document and instead appear in | |
970 | an appendix. | |
971 | ||
972 | ||
973 | 2. IKE Protocol Details and Variations | |
974 | ||
975 | IKE normally listens and sends on UDP port 500, though IKE messages | |
976 | may also be received on UDP port 4500 with a slightly different | |
977 | format (see Section 2.23). Since UDP is a datagram (unreliable) | |
978 | protocol, IKE includes in its definition recovery from transmission | |
979 | errors, including packet loss, packet replay, and packet forgery. | |
980 | IKE is designed to function so long as (1) at least one of a series | |
981 | of retransmitted packets reaches its destination before timing out; | |
982 | and (2) the channel is not so full of forged and replayed packets so | |
983 | as to exhaust the network or CPU capacities of either endpoint. Even | |
984 | in the absence of those minimum performance requirements, IKE is | |
985 | designed to fail cleanly (as though the network were broken). | |
986 | ||
987 | Although IKEv2 messages are intended to be short, they contain | |
988 | structures with no hard upper bound on size (in particular, X.509 | |
989 | certificates), and IKEv2 itself does not have a mechanism for | |
990 | fragmenting large messages. IP defines a mechanism for fragmentation | |
991 | of oversize UDP messages, but implementations vary in the maximum | |
992 | message size supported. Furthermore, use of IP fragmentation opens | |
993 | an implementation to denial of service attacks [DOSUDPPROT]. | |
994 | Finally, some NAT and/or firewall implementations may block IP | |
995 | fragments. | |
996 | ||
997 | All IKEv2 implementations MUST be able to send, receive, and process | |
998 | IKE messages that are up to 1280 bytes long, and they SHOULD be able | |
999 | to send, receive, and process messages that are up to 3000 bytes | |
1000 | long. {{ Demoted the SHOULD }} IKEv2 implementations need to be aware | |
1001 | of the maximum UDP message size supported and MAY shorten messages by | |
1002 | leaving out some certificates or cryptographic suite proposals if | |
1003 | that will keep messages below the maximum. Use of the "Hash and URL" | |
1004 | ||
1005 | ||
1006 | ||
1007 | Kaufman, et al. Expires August 27, 2006 [Page 18] | |
1008 | \f | |
1009 | Internet-Draft IKEv2bis February 2006 | |
1010 | ||
1011 | ||
1012 | formats rather than including certificates in exchanges where | |
1013 | possible can avoid most problems. {{ Demoted the SHOULD }} | |
1014 | Implementations and configuration need to keep in mind, however, that | |
1015 | if the URL lookups are possible only after the IPsec SA is | |
1016 | established, recursion issues could prevent this technique from | |
1017 | working. | |
1018 | ||
1019 | {{ Clarif-7.5 }} All packets sent on port 4500 MUST begin with the | |
1020 | prefix of four zeros; otherwise, the receiver won't know how to | |
1021 | handle them. | |
1022 | ||
1023 | 2.1. Use of Retransmission Timers | |
1024 | ||
1025 | All messages in IKE exist in pairs: a request and a response. The | |
1026 | setup of an IKE_SA normally consists of two request/response pairs. | |
1027 | Once the IKE_SA is set up, either end of the security association may | |
1028 | initiate requests at any time, and there can be many requests and | |
1029 | responses "in flight" at any given moment. But each message is | |
1030 | labeled as either a request or a response, and for each request/ | |
1031 | response pair one end of the security association is the initiator | |
1032 | and the other is the responder. | |
1033 | ||
1034 | For every pair of IKE messages, the initiator is responsible for | |
1035 | retransmission in the event of a timeout. The responder MUST never | |
1036 | retransmit a response unless it receives a retransmission of the | |
1037 | request. In that event, the responder MUST ignore the retransmitted | |
1038 | request except insofar as it triggers a retransmission of the | |
1039 | response. The initiator MUST remember each request until it receives | |
1040 | the corresponding response. The responder MUST remember each | |
1041 | response until it receives a request whose sequence number is larger | |
1042 | than the sequence number in the response plus its window size (see | |
1043 | Section 2.3). | |
1044 | ||
1045 | IKE is a reliable protocol, in the sense that the initiator MUST | |
1046 | retransmit a request until either it receives a corresponding reply | |
1047 | OR it deems the IKE security association to have failed and it | |
1048 | discards all state associated with the IKE_SA and any CHILD_SAs | |
1049 | negotiated using that IKE_SA. | |
1050 | ||
1051 | 2.2. Use of Sequence Numbers for Message ID | |
1052 | ||
1053 | Every IKE message contains a Message ID as part of its fixed header. | |
1054 | This Message ID is used to match up requests and responses, and to | |
1055 | identify retransmissions of messages. | |
1056 | ||
1057 | The Message ID is a 32-bit quantity, which is zero for the first IKE | |
1058 | request in each direction. {{ Clarif-3.10 }} When the IKE_AUTH | |
1059 | exchange does not use EAP, the IKE_SA initial setup messages will | |
1060 | ||
1061 | ||
1062 | ||
1063 | Kaufman, et al. Expires August 27, 2006 [Page 19] | |
1064 | \f | |
1065 | Internet-Draft IKEv2bis February 2006 | |
1066 | ||
1067 | ||
1068 | always be numbered 0 and 1. When EAP is used, each pair of messages | |
1069 | have their message numbers incremented; the first pair of AUTH | |
1070 | messages will have an ID of 1, the second will be 2, and so on. | |
1071 | ||
1072 | Each endpoint in the IKE Security Association maintains two "current" | |
1073 | Message IDs: the next one to be used for a request it initiates and | |
1074 | the next one it expects to see in a request from the other end. | |
1075 | These counters increment as requests are generated and received. | |
1076 | Responses always contain the same message ID as the corresponding | |
1077 | request. That means that after the initial exchange, each integer n | |
1078 | may appear as the message ID in four distinct messages: the nth | |
1079 | request from the original IKE initiator, the corresponding response, | |
1080 | the nth request from the original IKE responder, and the | |
1081 | corresponding response. If the two ends make very different numbers | |
1082 | of requests, the Message IDs in the two directions can be very | |
1083 | different. There is no ambiguity in the messages, however, because | |
1084 | the (I)nitiator and (R)esponse bits in the message header specify | |
1085 | which of the four messages a particular one is. | |
1086 | ||
1087 | {{ Clarif-2.2 }} The Message ID for IKE_SA_INIT messages is always | |
1088 | zero, including for retries of the message due to responses such as | |
1089 | COOKIE and INVALID_KE_PAYLOAD. | |
1090 | ||
1091 | Note that Message IDs are cryptographically protected and provide | |
1092 | protection against message replays. In the unlikely event that | |
1093 | Message IDs grow too large to fit in 32 bits, the IKE_SA MUST be | |
1094 | closed. Rekeying an IKE_SA resets the sequence numbers. | |
1095 | ||
1096 | {{ Clarif-2.3 }} When a responder receives an IKE_SA_INIT request, it | |
1097 | has to determine whether the packet is a retransmission belonging to | |
1098 | an existing "half-open" IKE_SA (in which case the responder | |
1099 | retransmits the same response), or a new request (in which case the | |
1100 | responder creates a new IKE_SA and sends a fresh response), or it is | |
1101 | a retransmission of a now-opened IKE_SA (in whcih case the responder | |
1102 | ignores it). It is not sufficient to use the initiator's SPI and/or | |
1103 | IP address to differentiate between the two cases because two | |
1104 | different peers behind a single NAT could choose the same initiator | |
1105 | SPI. Instead, a robust responder will do the IKE_SA lookup using the | |
1106 | whole packet, its hash, or the Ni payload. | |
1107 | ||
1108 | 2.3. Window Size for Overlapping Requests | |
1109 | ||
1110 | In order to maximize IKE throughput, an IKE endpoint MAY issue | |
1111 | multiple requests before getting a response to any of them if the | |
1112 | other endpoint has indicated its ability to handle such requests. | |
1113 | For simplicity, an IKE implementation MAY choose to process requests | |
1114 | strictly in order and/or wait for a response to one request before | |
1115 | issuing another. Certain rules must be followed to ensure | |
1116 | ||
1117 | ||
1118 | ||
1119 | Kaufman, et al. Expires August 27, 2006 [Page 20] | |
1120 | \f | |
1121 | Internet-Draft IKEv2bis February 2006 | |
1122 | ||
1123 | ||
1124 | interoperability between implementations using different strategies. | |
1125 | ||
1126 | After an IKE_SA is set up, either end can initiate one or more | |
1127 | requests. These requests may pass one another over the network. An | |
1128 | IKE endpoint MUST be prepared to accept and process a request while | |
1129 | it has a request outstanding in order to avoid a deadlock in this | |
1130 | situation. {{ Downgraded the SHOULD }} An IKE endpoint may also | |
1131 | accept and process multiple requests while it has a request | |
1132 | outstanding. | |
1133 | ||
1134 | An IKE endpoint MUST wait for a response to each of its messages | |
1135 | before sending a subsequent message unless it has received a | |
1136 | SET_WINDOW_SIZE Notify message from its peer informing it that the | |
1137 | peer is prepared to maintain state for multiple outstanding messages | |
1138 | in order to allow greater throughput. | |
1139 | ||
1140 | An IKE endpoint MUST NOT exceed the peer's stated window size for | |
1141 | transmitted IKE requests. In other words, if the responder stated | |
1142 | its window size is N, then when the initiator needs to make a request | |
1143 | X, it MUST wait until it has received responses to all requests up | |
1144 | through request X-N. An IKE endpoint MUST keep a copy of (or be able | |
1145 | to regenerate exactly) each request it has sent until it receives the | |
1146 | corresponding response. An IKE endpoint MUST keep a copy of (or be | |
1147 | able to regenerate exactly) the number of previous responses equal to | |
1148 | its declared window size in case its response was lost and the | |
1149 | initiator requests its retransmission by retransmitting the request. | |
1150 | ||
1151 | An IKE endpoint supporting a window size greater than one ought to be | |
1152 | capable of processing incoming requests out of order to maximize | |
1153 | performance in the event of network failures or packet reordering. | |
1154 | ||
1155 | {{ Clarif-7.3 }} The window size is normally a (possibly | |
1156 | configurable) property of a particular implementation, and is not | |
1157 | related to congestion control (unlike the window size in TCP, for | |
1158 | example). In particular, it is not defined what the responder should | |
1159 | do when it receives a SET_WINDOW_SIZE notification containing a | |
1160 | smaller value than is currently in effect. Thus, there is currently | |
1161 | no way to reduce the window size of an existing IKE_SA; you can only | |
1162 | increase it. When rekeying an IKE_SA, the new IKE_SA starts with | |
1163 | window size 1 until it is explicitly increased by sending a new | |
1164 | SET_WINDOW_SIZE notification. | |
1165 | ||
1166 | 2.4. State Synchronization and Connection Timeouts | |
1167 | ||
1168 | An IKE endpoint is allowed to forget all of its state associated with | |
1169 | an IKE_SA and the collection of corresponding CHILD_SAs at any time. | |
1170 | This is the anticipated behavior in the event of an endpoint crash | |
1171 | and restart. It is important when an endpoint either fails or | |
1172 | ||
1173 | ||
1174 | ||
1175 | Kaufman, et al. Expires August 27, 2006 [Page 21] | |
1176 | \f | |
1177 | Internet-Draft IKEv2bis February 2006 | |
1178 | ||
1179 | ||
1180 | reinitializes its state that the other endpoint detect those | |
1181 | conditions and not continue to waste network bandwidth by sending | |
1182 | packets over discarded SAs and having them fall into a black hole. | |
1183 | ||
1184 | Since IKE is designed to operate in spite of Denial of Service (DoS) | |
1185 | attacks from the network, an endpoint MUST NOT conclude that the | |
1186 | other endpoint has failed based on any routing information (e.g., | |
1187 | ICMP messages) or IKE messages that arrive without cryptographic | |
1188 | protection (e.g., Notify messages complaining about unknown SPIs). | |
1189 | An endpoint MUST conclude that the other endpoint has failed only | |
1190 | when repeated attempts to contact it have gone unanswered for a | |
1191 | timeout period or when a cryptographically protected INITIAL_CONTACT | |
1192 | notification is received on a different IKE_SA to the same | |
1193 | authenticated identity. {{ Demoted the SHOULD }} An endpoint should | |
1194 | suspect that the other endpoint has failed based on routing | |
1195 | information and initiate a request to see whether the other endpoint | |
1196 | is alive. To check whether the other side is alive, IKE specifies an | |
1197 | empty INFORMATIONAL message that (like all IKE requests) requires an | |
1198 | acknowledgement (note that within the context of an IKE_SA, an | |
1199 | "empty" message consists of an IKE header followed by an Encrypted | |
1200 | payload that contains no payloads). If a cryptographically protected | |
1201 | message has been received from the other side recently, unprotected | |
1202 | notifications MAY be ignored. Implementations MUST limit the rate at | |
1203 | which they take actions based on unprotected messages. | |
1204 | ||
1205 | Numbers of retries and lengths of timeouts are not covered in this | |
1206 | specification because they do not affect interoperability. It is | |
1207 | suggested that messages be retransmitted at least a dozen times over | |
1208 | a period of at least several minutes before giving up on an SA, but | |
1209 | different environments may require different rules. To be a good | |
1210 | network citizen, retranmission times MUST increase exponentially to | |
1211 | avoid flooding the network and making an existing congestion | |
1212 | situation worse. If there has only been outgoing traffic on all of | |
1213 | the SAs associated with an IKE_SA, it is essential to confirm | |
1214 | liveness of the other endpoint to avoid black holes. If no | |
1215 | cryptographically protected messages have been received on an IKE_SA | |
1216 | or any of its CHILD_SAs recently, the system needs to perform a | |
1217 | liveness check in order to prevent sending messages to a dead peer. | |
1218 | Receipt of a fresh cryptographically protected message on an IKE_SA | |
1219 | or any of its CHILD_SAs ensures liveness of the IKE_SA and all of its | |
1220 | CHILD_SAs. Note that this places requirements on the failure modes | |
1221 | of an IKE endpoint. An implementation MUST NOT continue sending on | |
1222 | any SA if some failure prevents it from receiving on all of the | |
1223 | associated SAs. If CHILD_SAs can fail independently from one another | |
1224 | without the associated IKE_SA being able to send a delete message, | |
1225 | then they MUST be negotiated by separate IKE_SAs. | |
1226 | ||
1227 | There is a Denial of Service attack on the initiator of an IKE_SA | |
1228 | ||
1229 | ||
1230 | ||
1231 | Kaufman, et al. Expires August 27, 2006 [Page 22] | |
1232 | \f | |
1233 | Internet-Draft IKEv2bis February 2006 | |
1234 | ||
1235 | ||
1236 | that can be avoided if the initiator takes the proper care. Since | |
1237 | the first two messages of an SA setup are not cryptographically | |
1238 | protected, an attacker could respond to the initiator's message | |
1239 | before the genuine responder and poison the connection setup attempt. | |
1240 | To prevent this, the initiator MAY be willing to accept multiple | |
1241 | responses to its first message, treat each as potentially legitimate, | |
1242 | respond to it, and then discard all the invalid half-open connections | |
1243 | when it receives a valid cryptographically protected response to any | |
1244 | one of its requests. Once a cryptographically valid response is | |
1245 | received, all subsequent responses should be ignored whether or not | |
1246 | they are cryptographically valid. | |
1247 | ||
1248 | Note that with these rules, there is no reason to negotiate and agree | |
1249 | upon an SA lifetime. If IKE presumes the partner is dead, based on | |
1250 | repeated lack of acknowledgement to an IKE message, then the IKE SA | |
1251 | and all CHILD_SAs set up through that IKE_SA are deleted. | |
1252 | ||
1253 | An IKE endpoint may at any time delete inactive CHILD_SAs to recover | |
1254 | resources used to hold their state. If an IKE endpoint chooses to | |
1255 | delete CHILD_SAs, it MUST send Delete payloads to the other end | |
1256 | notifying it of the deletion. It MAY similarly time out the IKE_SA. | |
1257 | {{ Clarified the SHOULD }} Closing the IKE_SA implicitly closes all | |
1258 | associated CHILD_SAs. In this case, an IKE endpoint SHOULD send a | |
1259 | Delete payload indicating that it has closed the IKE_SA unless the | |
1260 | other endpoint is no longer responding. | |
1261 | ||
1262 | 2.5. Version Numbers and Forward Compatibility | |
1263 | ||
1264 | This document describes version 2.0 of IKE, meaning the major version | |
1265 | number is 2 and the minor version number is 0. {{ Restated the | |
1266 | relationship to RFC 4306 }} This document is a clarification of | |
1267 | [IKEV2]. It is likely that some implementations will want to support | |
1268 | version 1.0 and version 2.0, and in the future, other versions. | |
1269 | ||
1270 | The major version number should be incremented only if the packet | |
1271 | formats or required actions have changed so dramatically that an | |
1272 | older version node would not be able to interoperate with a newer | |
1273 | version node if it simply ignored the fields it did not understand | |
1274 | and took the actions specified in the older specification. The minor | |
1275 | version number indicates new capabilities, and MUST be ignored by a | |
1276 | node with a smaller minor version number, but used for informational | |
1277 | purposes by the node with the larger minor version number. For | |
1278 | example, it might indicate the ability to process a newly defined | |
1279 | notification message. The node with the larger minor version number | |
1280 | would simply note that its correspondent would not be able to | |
1281 | understand that message and therefore would not send it. | |
1282 | ||
1283 | If an endpoint receives a message with a higher major version number, | |
1284 | ||
1285 | ||
1286 | ||
1287 | Kaufman, et al. Expires August 27, 2006 [Page 23] | |
1288 | \f | |
1289 | Internet-Draft IKEv2bis February 2006 | |
1290 | ||
1291 | ||
1292 | it MUST drop the message and SHOULD send an unauthenticated | |
1293 | notification message containing the highest version number it | |
1294 | supports. If an endpoint supports major version n, and major version | |
1295 | m, it MUST support all versions between n and m. If it receives a | |
1296 | message with a major version that it supports, it MUST respond with | |
1297 | that version number. In order to prevent two nodes from being | |
1298 | tricked into corresponding with a lower major version number than the | |
1299 | maximum that they both support, IKE has a flag that indicates that | |
1300 | the node is capable of speaking a higher major version number. | |
1301 | ||
1302 | Thus, the major version number in the IKE header indicates the | |
1303 | version number of the message, not the highest version number that | |
1304 | the transmitter supports. If the initiator is capable of speaking | |
1305 | versions n, n+1, and n+2, and the responder is capable of speaking | |
1306 | versions n and n+1, then they will negotiate speaking n+1, where the | |
1307 | initiator will set the flag indicating its ability to speak a higher | |
1308 | version. If they mistakenly (perhaps through an active attacker | |
1309 | sending error messages) negotiate to version n, then both will notice | |
1310 | that the other side can support a higher version number, and they | |
1311 | MUST break the connection and reconnect using version n+1. | |
1312 | ||
1313 | Note that IKEv1 does not follow these rules, because there is no way | |
1314 | in v1 of noting that you are capable of speaking a higher version | |
1315 | number. So an active attacker can trick two v2-capable nodes into | |
1316 | speaking v1. {{ Demoted the SHOULD }} When a v2-capable node | |
1317 | negotiates down to v1, it should note that fact in its logs. | |
1318 | ||
1319 | Also for forward compatibility, all fields marked RESERVED MUST be | |
1320 | set to zero by an implementation running version 2.0 or later, and | |
1321 | their content MUST be ignored by an implementation running version | |
1322 | 2.0 or later ("Be conservative in what you send and liberal in what | |
1323 | you receive"). In this way, future versions of the protocol can use | |
1324 | those fields in a way that is guaranteed to be ignored by | |
1325 | implementations that do not understand them. Similarly, payload | |
1326 | types that are not defined are reserved for future use; | |
1327 | implementations of a version where they are undefined MUST skip over | |
1328 | those payloads and ignore their contents. | |
1329 | ||
1330 | IKEv2 adds a "critical" flag to each payload header for further | |
1331 | flexibility for forward compatibility. If the critical flag is set | |
1332 | and the payload type is unrecognized, the message MUST be rejected | |
1333 | and the response to the IKE request containing that payload MUST | |
1334 | include a Notify payload UNSUPPORTED_CRITICAL_PAYLOAD, indicating an | |
1335 | unsupported critical payload was included. If the critical flag is | |
1336 | not set and the payload type is unsupported, that payload MUST be | |
1337 | ignored. | |
1338 | ||
1339 | {{ Demoted the SHOULD in the second clause }}Although new payload | |
1340 | ||
1341 | ||
1342 | ||
1343 | Kaufman, et al. Expires August 27, 2006 [Page 24] | |
1344 | \f | |
1345 | Internet-Draft IKEv2bis February 2006 | |
1346 | ||
1347 | ||
1348 | types may be added in the future and may appear interleaved with the | |
1349 | fields defined in this specification, implementations MUST send the | |
1350 | payloads defined in this specification in the order shown in the | |
1351 | figures in Section 2; implementations are explicitly allowed to | |
1352 | reject as invalid a message with those payloads in any other order. | |
1353 | ||
1354 | 2.6. Cookies | |
1355 | ||
1356 | The term "cookies" originates with Karn and Simpson [PHOTURIS] in | |
1357 | Photuris, an early proposal for key management with IPsec, and it has | |
1358 | persisted. The Internet Security Association and Key Management | |
1359 | Protocol (ISAKMP) [ISAKMP] fixed message header includes two eight- | |
1360 | octet fields titled "cookies", and that syntax is used by both IKEv1 | |
1361 | and IKEv2 though in IKEv2 they are referred to as the IKE SPI and | |
1362 | there is a new separate field in a Notify payload holding the cookie. | |
1363 | The initial two eight-octet fields in the header are used as a | |
1364 | connection identifier at the beginning of IKE packets. {{ Demoted the | |
1365 | SHOULD }} Each endpoint chooses one of the two SPIs and needs to | |
1366 | choose them so as to be unique identifiers of an IKE_SA. An SPI | |
1367 | value of zero is special and indicates that the remote SPI value is | |
1368 | not yet known by the sender. | |
1369 | ||
1370 | Unlike ESP and AH where only the recipient's SPI appears in the | |
1371 | header of a message, in IKE the sender's SPI is also sent in every | |
1372 | message. Since the SPI chosen by the original initiator of the | |
1373 | IKE_SA is always sent first, an endpoint with multiple IKE_SAs open | |
1374 | that wants to find the appropriate IKE_SA using the SPI it assigned | |
1375 | must look at the I(nitiator) Flag bit in the header to determine | |
1376 | whether it assigned the first or the second eight octets. | |
1377 | ||
1378 | In the first message of an initial IKE exchange, the initiator will | |
1379 | not know the responder's SPI value and will therefore set that field | |
1380 | to zero. | |
1381 | ||
1382 | An expected attack against IKE is state and CPU exhaustion, where the | |
1383 | target is flooded with session initiation requests from forged IP | |
1384 | addresses. This attack can be made less effective if an | |
1385 | implementation of a responder uses minimal CPU and commits no state | |
1386 | to an SA until it knows the initiator can receive packets at the | |
1387 | address from which it claims to be sending them. To accomplish this, | |
1388 | a responder SHOULD -- when it detects a large number of half-open | |
1389 | IKE_SAs -- reject initial IKE messages unless they contain a Notify | |
1390 | payload of type COOKIE. {{ Clarified the SHOULD }} If the responder | |
1391 | wants to set up an SA, it SHOULD instead send an unprotected IKE | |
1392 | message as a response and include COOKIE Notify payload with the | |
1393 | cookie data to be returned. Initiators who receive such responses | |
1394 | MUST retry the IKE_SA_INIT with a Notify payload of type COOKIE | |
1395 | containing the responder supplied cookie data as the first payload | |
1396 | ||
1397 | ||
1398 | ||
1399 | Kaufman, et al. Expires August 27, 2006 [Page 25] | |
1400 | \f | |
1401 | Internet-Draft IKEv2bis February 2006 | |
1402 | ||
1403 | ||
1404 | and all other payloads unchanged. The initial exchange will then be | |
1405 | as follows: | |
1406 | ||
1407 | Initiator Responder | |
1408 | ------------------------------------------------------------------- | |
1409 | HDR(A,0), SAi1, KEi, Ni --> | |
1410 | <-- HDR(A,0), N(COOKIE) | |
1411 | HDR(A,0), N(COOKIE), SAi1, | |
1412 | KEi, Ni --> | |
1413 | <-- HDR(A,B), SAr1, KEr, | |
1414 | Nr, [CERTREQ] | |
1415 | HDR(A,B), SK {IDi, [CERT,] | |
1416 | [CERTREQ,] [IDr,] AUTH, | |
1417 | SAi2, TSi, TSr} --> | |
1418 | <-- HDR(A,B), SK {IDr, [CERT,] | |
1419 | AUTH, SAr2, TSi, TSr} | |
1420 | ||
1421 | The first two messages do not affect any initiator or responder state | |
1422 | except for communicating the cookie. In particular, the message | |
1423 | sequence numbers in the first four messages will all be zero and the | |
1424 | message sequence numbers in the last two messages will be one. 'A' | |
1425 | is the SPI assigned by the initiator, while 'B' is the SPI assigned | |
1426 | by the responder. | |
1427 | ||
1428 | {{ Clarif-2.1 }} Because the responder's SPI identifies security- | |
1429 | related state held by the responder, and in this case no state is | |
1430 | created, the responder sends a zero value for the responder's SPI. | |
1431 | ||
1432 | {{ Demoted the SHOULD }} An IKE implementation should implement its | |
1433 | responder cookie generation in such a way as to not require any saved | |
1434 | state to recognize its valid cookie when the second IKE_SA_INIT | |
1435 | message arrives. The exact algorithms and syntax they use to | |
1436 | generate cookies do not affect interoperability and hence are not | |
1437 | specified here. The following is an example of how an endpoint could | |
1438 | use cookies to implement limited DOS protection. | |
1439 | ||
1440 | A good way to do this is to set the responder cookie to be: | |
1441 | ||
1442 | Cookie = <VersionIDofSecret> | Hash(Ni | IPi | SPIi | <secret>) | |
1443 | ||
1444 | where <secret> is a randomly generated secret known only to the | |
1445 | responder and periodically changed and | indicates concatenation. | |
1446 | <VersionIDofSecret> should be changed whenever <secret> is | |
1447 | regenerated. The cookie can be recomputed when the IKE_SA_INIT | |
1448 | arrives the second time and compared to the cookie in the received | |
1449 | message. If it matches, the responder knows that the cookie was | |
1450 | generated since the last change to <secret> and that IPi must be the | |
1451 | same as the source address it saw the first time. Incorporating SPIi | |
1452 | ||
1453 | ||
1454 | ||
1455 | Kaufman, et al. Expires August 27, 2006 [Page 26] | |
1456 | \f | |
1457 | Internet-Draft IKEv2bis February 2006 | |
1458 | ||
1459 | ||
1460 | into the calculation ensures that if multiple IKE_SAs are being set | |
1461 | up in parallel they will all get different cookies (assuming the | |
1462 | initiator chooses unique SPIi's). Incorporating Ni into the hash | |
1463 | ensures that an attacker who sees only message 2 can't successfully | |
1464 | forge a message 3. | |
1465 | ||
1466 | If a new value for <secret> is chosen while there are connections in | |
1467 | the process of being initialized, an IKE_SA_INIT might be returned | |
1468 | with other than the current <VersionIDofSecret>. The responder in | |
1469 | that case MAY reject the message by sending another response with a | |
1470 | new cookie or it MAY keep the old value of <secret> around for a | |
1471 | short time and accept cookies computed from either one. {{ Demoted | |
1472 | the SHOULD NOT }} The responder should not accept cookies | |
1473 | indefinitely after <secret> is changed, since that would defeat part | |
1474 | of the denial of service protection. {{ Demoted the SHOULD }} The | |
1475 | responder should change the value of <secret> frequently, especially | |
1476 | if under attack. | |
1477 | ||
1478 | {{ Clarif-2.1 }} In addition to cookies, there are several cases | |
1479 | where the IKE_SA_INIT exchange does not result in the creation of an | |
1480 | IKE_SA (such as INVALID_KE_PAYLOAD or NO_PROPOSAL_CHOSEN). In such a | |
1481 | case, sending a zero value for the Responder's SPI is correct. If | |
1482 | the responder sends a non-zero responder SPI, the initiator should | |
1483 | not reject the response for only that reason. | |
1484 | ||
1485 | {{ Clarif-2.5 }} When one party receives an IKE_SA_INIT request | |
1486 | containing a cookie whose contents do not match the value expected, | |
1487 | that party MUST ignore the cookie and process the message as if no | |
1488 | cookie had been included; usually this means sending a response | |
1489 | containing a new cookie. | |
1490 | ||
1491 | 2.6.1. Interaction of COOKIE and INVALID_KE_PAYLOAD | |
1492 | ||
1493 | {{ This section added by Clarif-2.4 }} | |
1494 | ||
1495 | There are two common reasons why the initiator may have to retry the | |
1496 | IKE_SA_INIT exchange: the responder requests a cookie or wants a | |
1497 | different Diffie-Hellman group than was included in the KEi payload. | |
1498 | If the initiator receives a cookie from the responder, the initiator | |
1499 | needs to decide whether or not to include the cookie in only the next | |
1500 | retry of the IKE_SA_INIT request, or in all subsequent retries as | |
1501 | well. | |
1502 | ||
1503 | If the initiator includes the cookie only in the next retry, one | |
1504 | additional roundtrip may be needed in some cases. An additional | |
1505 | roundtrip is needed also if the initiator includes the cookie in all | |
1506 | retries, but the responder does not support this. For instance, if | |
1507 | the responder includes the SAi1 and KEi payloads in cookie | |
1508 | ||
1509 | ||
1510 | ||
1511 | Kaufman, et al. Expires August 27, 2006 [Page 27] | |
1512 | \f | |
1513 | Internet-Draft IKEv2bis February 2006 | |
1514 | ||
1515 | ||
1516 | calculation, it will reject the request by sending a new cookie. | |
1517 | ||
1518 | If both peers support including the cookie in all retries, a slightly | |
1519 | shorter exchange can happen. Implementations SHOULD support this | |
1520 | shorter exchange, but MUST NOT fail if other implementations do not | |
1521 | support this shorter exchange. | |
1522 | ||
1523 | 2.7. Cryptographic Algorithm Negotiation | |
1524 | ||
1525 | The payload type known as "SA" indicates a proposal for a set of | |
1526 | choices of IPsec protocols (IKE, ESP, and/or AH) for the SA as well | |
1527 | as cryptographic algorithms associated with each protocol. | |
1528 | ||
1529 | An SA payload consists of one or more proposals. Each proposal | |
1530 | includes one or more protocols (usually one). Each protocol contains | |
1531 | one or more transforms -- each specifying a cryptographic algorithm. | |
1532 | Each transform contains zero or more attributes (attributes are | |
1533 | needed only if the transform identifier does not completely specify | |
1534 | the cryptographic algorithm). | |
1535 | ||
1536 | This hierarchical structure was designed to efficiently encode | |
1537 | proposals for cryptographic suites when the number of supported | |
1538 | suites is large because multiple values are acceptable for multiple | |
1539 | transforms. The responder MUST choose a single suite, which MAY be | |
1540 | any subset of the SA proposal following the rules below: | |
1541 | ||
1542 | Each proposal contains one or more protocols. If a proposal is | |
1543 | accepted, the SA response MUST contain the same protocols in the same | |
1544 | order as the proposal. The responder MUST accept a single proposal | |
1545 | or reject them all and return an error. (Example: if a single | |
1546 | proposal contains ESP and AH and that proposal is accepted, both ESP | |
1547 | and AH MUST be accepted. If ESP and AH are included in separate | |
1548 | proposals, the responder MUST accept only one of them). | |
1549 | ||
1550 | Each IPsec protocol proposal contains one or more transforms. Each | |
1551 | transform contains a transform type. The accepted cryptographic | |
1552 | suite MUST contain exactly one transform of each type included in the | |
1553 | proposal. For example: if an ESP proposal includes transforms | |
1554 | ENCR_3DES, ENCR_AES w/keysize 128, ENCR_AES w/keysize 256, | |
1555 | AUTH_HMAC_MD5, and AUTH_HMAC_SHA, the accepted suite MUST contain one | |
1556 | of the ENCR_ transforms and one of the AUTH_ transforms. Thus, six | |
1557 | combinations are acceptable. | |
1558 | ||
1559 | Since the initiator sends its Diffie-Hellman value in the | |
1560 | IKE_SA_INIT, it must guess the Diffie-Hellman group that the | |
1561 | responder will select from its list of supported groups. If the | |
1562 | initiator guesses wrong, the responder will respond with a Notify | |
1563 | payload of type INVALID_KE_PAYLOAD indicating the selected group. In | |
1564 | ||
1565 | ||
1566 | ||
1567 | Kaufman, et al. Expires August 27, 2006 [Page 28] | |
1568 | \f | |
1569 | Internet-Draft IKEv2bis February 2006 | |
1570 | ||
1571 | ||
1572 | this case, the initiator MUST retry the IKE_SA_INIT with the | |
1573 | corrected Diffie-Hellman group. The initiator MUST again propose its | |
1574 | full set of acceptable cryptographic suites because the rejection | |
1575 | message was unauthenticated and otherwise an active attacker could | |
1576 | trick the endpoints into negotiating a weaker suite than a stronger | |
1577 | one that they both prefer. | |
1578 | ||
1579 | 2.8. Rekeying | |
1580 | ||
1581 | {{ Demoted the SHOULD }} IKE, ESP, and AH security associations use | |
1582 | secret keys that should be used only for a limited amount of time and | |
1583 | to protect a limited amount of data. This limits the lifetime of the | |
1584 | entire security association. When the lifetime of a security | |
1585 | association expires, the security association MUST NOT be used. If | |
1586 | there is demand, new security associations MAY be established. | |
1587 | Reestablishment of security associations to take the place of ones | |
1588 | that expire is referred to as "rekeying". | |
1589 | ||
1590 | To allow for minimal IPsec implementations, the ability to rekey SAs | |
1591 | without restarting the entire IKE_SA is optional. An implementation | |
1592 | MAY refuse all CREATE_CHILD_SA requests within an IKE_SA. If an SA | |
1593 | has expired or is about to expire and rekeying attempts using the | |
1594 | mechanisms described here fail, an implementation MUST close the | |
1595 | IKE_SA and any associated CHILD_SAs and then MAY start new ones. {{ | |
1596 | Demoted the SHOULD }} Implementations may wish to support in-place | |
1597 | rekeying of SAs, since doing so offers better performance and is | |
1598 | likely to reduce the number of packets lost during the transition. | |
1599 | ||
1600 | To rekey a CHILD_SA within an existing IKE_SA, create a new, | |
1601 | equivalent SA (see Section 2.17 below), and when the new one is | |
1602 | established, delete the old one. To rekey an IKE_SA, establish a new | |
1603 | equivalent IKE_SA (see Section 2.18 below) with the peer to whom the | |
1604 | old IKE_SA is shared using a CREATE_CHILD_SA within the existing | |
1605 | IKE_SA. An IKE_SA so created inherits all of the original IKE_SA's | |
1606 | CHILD_SAs. Use the new IKE_SA for all control messages needed to | |
1607 | maintain the CHILD_SAs created by the old IKE_SA, and delete the old | |
1608 | IKE_SA. The Delete payload to delete itself MUST be the last request | |
1609 | sent over an IKE_SA. | |
1610 | ||
1611 | {{ Demoted the SHOULD }} SAs should be rekeyed proactively, i.e., the | |
1612 | new SA should be established before the old one expires and becomes | |
1613 | unusable. Enough time should elapse between the time the new SA is | |
1614 | established and the old one becomes unusable so that traffic can be | |
1615 | switched over to the new SA. | |
1616 | ||
1617 | A difference between IKEv1 and IKEv2 is that in IKEv1 SA lifetimes | |
1618 | were negotiated. In IKEv2, each end of the SA is responsible for | |
1619 | enforcing its own lifetime policy on the SA and rekeying the SA when | |
1620 | ||
1621 | ||
1622 | ||
1623 | Kaufman, et al. Expires August 27, 2006 [Page 29] | |
1624 | \f | |
1625 | Internet-Draft IKEv2bis February 2006 | |
1626 | ||
1627 | ||
1628 | necessary. If the two ends have different lifetime policies, the end | |
1629 | with the shorter lifetime will end up always being the one to request | |
1630 | the rekeying. If an SA bundle has been inactive for a long time and | |
1631 | if an endpoint would not initiate the SA in the absence of traffic, | |
1632 | the endpoint MAY choose to close the SA instead of rekeying it when | |
1633 | its lifetime expires. {{ Demoted the SHOULD }} It should do so if | |
1634 | there has been no traffic since the last time the SA was rekeyed. | |
1635 | ||
1636 | Note that IKEv2 deliberately allows parallel SAs with the same | |
1637 | traffic selectors between common endpoints. One of the purposes of | |
1638 | this is to support traffic quality of service (QoS) differences among | |
1639 | the SAs (see [DIFFSERVFIELD], [DIFFSERVARCH], and section 4.1 of | |
1640 | [DIFFTUNNEL]). Hence unlike IKEv1, the combination of the endpoints | |
1641 | and the traffic selectors may not uniquely identify an SA between | |
1642 | those endpoints, so the IKEv1 rekeying heuristic of deleting SAs on | |
1643 | the basis of duplicate traffic selectors SHOULD NOT be used. | |
1644 | ||
1645 | {{ Demoted the SHOULD }} The node that initiated the surviving | |
1646 | rekeyed SA should delete the replaced SA after the new one is | |
1647 | established. | |
1648 | ||
1649 | There are timing windows -- particularly in the presence of lost | |
1650 | packets -- where endpoints may not agree on the state of an SA. The | |
1651 | responder to a CREATE_CHILD_SA MUST be prepared to accept messages on | |
1652 | an SA before sending its response to the creation request, so there | |
1653 | is no ambiguity for the initiator. The initiator MAY begin sending | |
1654 | on an SA as soon as it processes the response. The initiator, | |
1655 | however, cannot receive on a newly created SA until it receives and | |
1656 | processes the response to its CREATE_CHILD_SA request. How, then, is | |
1657 | the responder to know when it is OK to send on the newly created SA? | |
1658 | ||
1659 | From a technical correctness and interoperability perspective, the | |
1660 | responder MAY begin sending on an SA as soon as it sends its response | |
1661 | to the CREATE_CHILD_SA request. In some situations, however, this | |
1662 | could result in packets unnecessarily being dropped, so an | |
1663 | implementation MAY want to defer such sending. | |
1664 | ||
1665 | The responder can be assured that the initiator is prepared to | |
1666 | receive messages on an SA if either (1) it has received a | |
1667 | cryptographically valid message on the new SA, or (2) the new SA | |
1668 | rekeys an existing SA and it receives an IKE request to close the | |
1669 | replaced SA. When rekeying an SA, the responder continues to send | |
1670 | traffic on the old SA until one of those events occurs. When | |
1671 | establishing a new SA, the responder MAY defer sending messages on a | |
1672 | new SA until either it receives one or a timeout has occurred. {{ | |
1673 | Demoted the SHOULD }} If an initiator receives a message on an SA for | |
1674 | which it has not received a response to its CREATE_CHILD_SA request, | |
1675 | it interprets that as a likely packet loss and retransmits the | |
1676 | ||
1677 | ||
1678 | ||
1679 | Kaufman, et al. Expires August 27, 2006 [Page 30] | |
1680 | \f | |
1681 | Internet-Draft IKEv2bis February 2006 | |
1682 | ||
1683 | ||
1684 | CREATE_CHILD_SA request. An initiator MAY send a dummy message on a | |
1685 | newly created SA if it has no messages queued in order to assure the | |
1686 | responder that the initiator is ready to receive messages. | |
1687 | ||
1688 | {{ Clarif-5.9 }} Throughout this document, "initiator" refers to the | |
1689 | party who initiated the exchange being described, and "original | |
1690 | initiator" refers to the party who initiated the whole IKE_SA. The | |
1691 | "original initiator" always refers to the party who initiated the | |
1692 | exchange which resulted in the current IKE_SA. In other words, if | |
1693 | the the "original responder" starts rekeying the IKE_SA, that party | |
1694 | becomes the "original initiator" of the new IKE_SA. | |
1695 | ||
1696 | 2.8.1. Simultaneous CHILD_SA rekeying | |
1697 | ||
1698 | {{ The first two paragraphs were moved, and the rest was added, based | |
1699 | on Clarif-5.11 }} | |
1700 | ||
1701 | If the two ends have the same lifetime policies, it is possible that | |
1702 | both will initiate a rekeying at the same time (which will result in | |
1703 | redundant SAs). To reduce the probability of this happening, the | |
1704 | timing of rekeying requests SHOULD be jittered (delayed by a random | |
1705 | amount of time after the need for rekeying is noticed). | |
1706 | ||
1707 | This form of rekeying may temporarily result in multiple similar SAs | |
1708 | between the same pairs of nodes. When there are two SAs eligible to | |
1709 | receive packets, a node MUST accept incoming packets through either | |
1710 | SA. If redundant SAs are created though such a collision, the SA | |
1711 | created with the lowest of the four nonces used in the two exchanges | |
1712 | SHOULD be closed by the endpoint that created it. {{ Clarif-5.10 }} | |
1713 | "Lowest" means an octet-by-octet, lexicographical comparison (instead | |
1714 | of, for instance, comparing the nonces as large integers). In other | |
1715 | words, start by comparing the first octet; if they're equal, move to | |
1716 | the next octet, and so on. If you reach the end of one nonce, that | |
1717 | nonce is the lower one. | |
1718 | ||
1719 | The following is an explanation on the impact this has on | |
1720 | implementations. Assume that hosts A and B have an existing IPsec SA | |
1721 | pair with SPIs (SPIa1,SPIb1), and both start rekeying it at the same | |
1722 | time: | |
1723 | ||
1724 | Host A Host B | |
1725 | ------------------------------------------------------------------- | |
1726 | send req1: N(REKEY_SA,SPIa1), | |
1727 | SA(..,SPIa2,..),Ni1,.. --> | |
1728 | <-- send req2: N(REKEY_SA,SPIb1), | |
1729 | SA(..,SPIb2,..),Ni2 | |
1730 | recv req2 <-- | |
1731 | ||
1732 | ||
1733 | ||
1734 | ||
1735 | Kaufman, et al. Expires August 27, 2006 [Page 31] | |
1736 | \f | |
1737 | Internet-Draft IKEv2bis February 2006 | |
1738 | ||
1739 | ||
1740 | At this point, A knows there is a simultaneous rekeying going on. | |
1741 | However, it cannot yet know which of the exchanges will have the | |
1742 | lowest nonce, so it will just note the situation and respond as | |
1743 | usual. | |
1744 | ||
1745 | send resp2: SA(..,SPIa3,..), | |
1746 | Nr1,.. --> | |
1747 | --> recv req1 | |
1748 | ||
1749 | Now B also knows that simultaneous rekeying is going on. It responds | |
1750 | as usual. | |
1751 | ||
1752 | <-- send resp1: SA(..,SPIb3,..), | |
1753 | Nr2,.. | |
1754 | recv resp1 <-- | |
1755 | --> recv resp2 | |
1756 | ||
1757 | At this point, there are three CHILD_SA pairs between A and B (the | |
1758 | old one and two new ones). A and B can now compare the nonces. | |
1759 | Suppose that the lowest nonce was Nr1 in message resp2; in this case, | |
1760 | B (the sender of req2) deletes the redundant new SA, and A (the node | |
1761 | that initiated the surviving rekeyed SA), deletes the old one. | |
1762 | ||
1763 | send req3: D(SPIa1) --> | |
1764 | <-- send req4: D(SPIb2) | |
1765 | --> recv req3 | |
1766 | <-- send resp4: D(SPIb1) | |
1767 | recv req4 <-- | |
1768 | send resp4: D(SPIa3) --> | |
1769 | ||
1770 | The rekeying is now finished. | |
1771 | ||
1772 | However, there is a second possible sequence of events that can | |
1773 | happen if some packets are lost in the network, resulting in | |
1774 | retransmissions. The rekeying begins as usual, but A's first packet | |
1775 | (req1) is lost. | |
1776 | ||
1777 | ||
1778 | ||
1779 | ||
1780 | ||
1781 | ||
1782 | ||
1783 | ||
1784 | ||
1785 | ||
1786 | ||
1787 | ||
1788 | ||
1789 | ||
1790 | ||
1791 | Kaufman, et al. Expires August 27, 2006 [Page 32] | |
1792 | \f | |
1793 | Internet-Draft IKEv2bis February 2006 | |
1794 | ||
1795 | ||
1796 | Host A Host B | |
1797 | ------------------------------------------------------------------- | |
1798 | send req1: N(REKEY_SA,SPIa1), | |
1799 | SA(..,SPIa2,..), | |
1800 | Ni1,.. --> (lost) | |
1801 | <-- send req2: N(REKEY_SA,SPIb1), | |
1802 | SA(..,SPIb2,..),Ni2 | |
1803 | recv req2 <-- | |
1804 | send resp2: SA(..,SPIa3,..), | |
1805 | Nr1,.. --> | |
1806 | --> recv resp2 | |
1807 | <-- send req3: D(SPIb1) | |
1808 | recv req3 <-- | |
1809 | send resp3: D(SPIa1) --> | |
1810 | --> recv resp3 | |
1811 | ||
1812 | From B's point of view, the rekeying is now completed, and since it | |
1813 | has not yet received A's req1, it does not even know that there was | |
1814 | simultaneous rekeying. However, A will continue retransmitting the | |
1815 | message, and eventually it will reach B. | |
1816 | ||
1817 | resend req1 --> | |
1818 | --> recv req1 | |
1819 | ||
1820 | To B, it looks like A is trying to rekey an SA that no longer exists; | |
1821 | thus, B responds to the request with something non-fatal such as | |
1822 | NO_PROPOSAL_CHOSEN. | |
1823 | ||
1824 | <-- send resp1: N(NO_PROPOSAL_CHOSEN) | |
1825 | recv resp1 <-- | |
1826 | ||
1827 | When A receives this error, it already knows there was simultaneous | |
1828 | rekeying, so it can ignore the error message. | |
1829 | ||
1830 | 2.8.2. Rekeying the IKE_SA Versus Reauthentication | |
1831 | ||
1832 | {{ Added this section from Clarif-5.2 }} | |
1833 | ||
1834 | Rekeying the IKE_SA and reauthentication are different concepts in | |
1835 | IKEv2. Rekeying the IKE_SA establishes new keys for the IKE_SA and | |
1836 | resets the Message ID counters, but it does not authenticate the | |
1837 | parties again (no AUTH or EAP payloads are involved). | |
1838 | ||
1839 | Although rekeying the IKE_SA may be important in some environments, | |
1840 | reauthentication (the verification that the parties still have access | |
1841 | to the long-term credentials) is often more important. | |
1842 | ||
1843 | IKEv2 does not have any special support for reauthentication. | |
1844 | ||
1845 | ||
1846 | ||
1847 | Kaufman, et al. Expires August 27, 2006 [Page 33] | |
1848 | \f | |
1849 | Internet-Draft IKEv2bis February 2006 | |
1850 | ||
1851 | ||
1852 | Reauthentication is done by creating a new IKE_SA from scratch (using | |
1853 | IKE_SA_INIT/IKE_AUTH exchanges, without any REKEY_SA notify | |
1854 | payloads), creating new CHILD_SAs within the new IKE_SA (without | |
1855 | REKEY_SA notify payloads), and finally deleting the old IKE_SA (which | |
1856 | deletes the old CHILD_SAs as well). | |
1857 | ||
1858 | This means that reauthentication also establishes new keys for the | |
1859 | IKE_SA and CHILD_SAs. Therefore, while rekeying can be performed | |
1860 | more often than reauthentication, the situation where "authentication | |
1861 | lifetime" is shorter than "key lifetime" does not make sense. | |
1862 | ||
1863 | While creation of a new IKE_SA can be initiated by either party | |
1864 | (initiator or responder in the original IKE_SA), the use of EAP | |
1865 | authentication and/or configuration payloads means in practice that | |
1866 | reauthentication has to be initiated by the same party as the | |
1867 | original IKE_SA. IKEv2 does not currently allow the responder to | |
1868 | request reauthentication in this case; however, there is ongoing work | |
1869 | to add this functionality [REAUTH]. | |
1870 | ||
1871 | 2.9. Traffic Selector Negotiation | |
1872 | ||
1873 | {{ Clarif-7.2 }} When an RFC4301-compliant IPsec subsystem receives | |
1874 | an IP packet and matches a "protect" selector in its Security Policy | |
1875 | Database (SPD), the subsystem protects that packet with IPsec. When | |
1876 | no SA exists yet, it is the task of IKE to create it. Maintenance of | |
1877 | a system's SPD is outside the scope of IKE (see [PFKEY] for an | |
1878 | example protocol), though some implementations might update their SPD | |
1879 | in connection with the running of IKE (for an example scenario, see | |
1880 | Section 1.1.3). | |
1881 | ||
1882 | Traffic Selector (TS) payloads allow endpoints to communicate some of | |
1883 | the information from their SPD to their peers. TS payloads specify | |
1884 | the selection criteria for packets that will be forwarded over the | |
1885 | newly set up SA. This can serve as a consistency check in some | |
1886 | scenarios to assure that the SPDs are consistent. In others, it | |
1887 | guides the dynamic update of the SPD. | |
1888 | ||
1889 | Two TS payloads appear in each of the messages in the exchange that | |
1890 | creates a CHILD_SA pair. Each TS payload contains one or more | |
1891 | Traffic Selectors. Each Traffic Selector consists of an address | |
1892 | range (IPv4 or IPv6), a port range, and an IP protocol ID. In | |
1893 | support of the scenario described in Section 1.1.3, an initiator may | |
1894 | request that the responder assign an IP address and tell the | |
1895 | initiator what it is. {{ Clarif-6.1 }} That request is done using | |
1896 | configuration payloads, not traffic selectors. An address in a TSi | |
1897 | payload in a response does not mean that the responder has assigned | |
1898 | that address to the initiator: it only means that if packets matching | |
1899 | these traffic selectors are sent by the initiator, IPsec processing | |
1900 | ||
1901 | ||
1902 | ||
1903 | Kaufman, et al. Expires August 27, 2006 [Page 34] | |
1904 | \f | |
1905 | Internet-Draft IKEv2bis February 2006 | |
1906 | ||
1907 | ||
1908 | can be performed as agreed for this SA. | |
1909 | ||
1910 | IKEv2 allows the responder to choose a subset of the traffic proposed | |
1911 | by the initiator. This could happen when the configurations of the | |
1912 | two endpoints are being updated but only one end has received the new | |
1913 | information. Since the two endpoints may be configured by different | |
1914 | people, the incompatibility may persist for an extended period even | |
1915 | in the absence of errors. It also allows for intentionally different | |
1916 | configurations, as when one end is configured to tunnel all addresses | |
1917 | and depends on the other end to have the up-to-date list. | |
1918 | ||
1919 | The first of the two TS payloads is known as TSi (Traffic Selector- | |
1920 | initiator). The second is known as TSr (Traffic Selector-responder). | |
1921 | TSi specifies the source address of traffic forwarded from (or the | |
1922 | destination address of traffic forwarded to) the initiator of the | |
1923 | CHILD_SA pair. TSr specifies the destination address of the traffic | |
1924 | forwarded to (or the source address of the traffic forwarded from) | |
1925 | the responder of the CHILD_SA pair. For example, if the original | |
1926 | initiator request the creation of a CHILD_SA pair, and wishes to | |
1927 | tunnel all traffic from subnet 192.0.1.* on the initiator's side to | |
1928 | subnet 192.0.2.* on the responder's side, the initiator would include | |
1929 | a single traffic selector in each TS payload. TSi would specify the | |
1930 | address range (192.0.1.0 - 192.0.1.255) and TSr would specify the | |
1931 | address range (192.0.2.0 - 192.0.2.255). Assuming that proposal was | |
1932 | acceptable to the responder, it would send identical TS payloads | |
1933 | back. (Note: The IP address range 192.0.2.* has been reserved for | |
1934 | use in examples in RFCs and similar documents. This document needed | |
1935 | two such ranges, and so also used 192.0.1.*. This should not be | |
1936 | confused with any actual address.) | |
1937 | ||
1938 | The responder is allowed to narrow the choices by selecting a subset | |
1939 | of the traffic, for instance by eliminating or narrowing the range of | |
1940 | one or more members of the set of traffic selectors, provided the set | |
1941 | does not become the NULL set. | |
1942 | ||
1943 | It is possible for the responder's policy to contain multiple smaller | |
1944 | ranges, all encompassed by the initiator's traffic selector, and with | |
1945 | the responder's policy being that each of those ranges should be sent | |
1946 | over a different SA. Continuing the example above, the responder | |
1947 | might have a policy of being willing to tunnel those addresses to and | |
1948 | from the initiator, but might require that each address pair be on a | |
1949 | separately negotiated CHILD_SA. If the initiator generated its | |
1950 | request in response to an incoming packet from 192.0.1.43 to | |
1951 | 192.0.2.123, there would be no way for the responder to determine | |
1952 | which pair of addresses should be included in this tunnel, and it | |
1953 | would have to make a guess or reject the request with a status of | |
1954 | SINGLE_PAIR_REQUIRED. | |
1955 | ||
1956 | ||
1957 | ||
1958 | ||
1959 | Kaufman, et al. Expires August 27, 2006 [Page 35] | |
1960 | \f | |
1961 | Internet-Draft IKEv2bis February 2006 | |
1962 | ||
1963 | ||
1964 | {{ Clarif-4.11 }} Few implementations will have policies that require | |
1965 | separate SAs for each address pair. Because of this, if only some | |
1966 | part (or parts) of the TSi/TSr proposed by the initiator is (are) | |
1967 | acceptable to the responder, responders SHOULD narrow TSi/TSr to an | |
1968 | acceptable subset rather than use SINGLE_PAIR_REQUIRED. | |
1969 | ||
1970 | To enable the responder to choose the appropriate range in this case, | |
1971 | if the initiator has requested the SA due to a data packet, the | |
1972 | initiator SHOULD include as the first traffic selector in each of TSi | |
1973 | and TSr a very specific traffic selector including the addresses in | |
1974 | the packet triggering the request. In the example, the initiator | |
1975 | would include in TSi two traffic selectors: the first containing the | |
1976 | address range (192.0.1.43 - 192.0.1.43) and the source port and IP | |
1977 | protocol from the packet and the second containing (192.0.1.0 - | |
1978 | 192.0.1.255) with all ports and IP protocols. The initiator would | |
1979 | similarly include two traffic selectors in TSr. | |
1980 | ||
1981 | If the responder's policy does not allow it to accept the entire set | |
1982 | of traffic selectors in the initiator's request, but does allow him | |
1983 | to accept the first selector of TSi and TSr, then the responder MUST | |
1984 | narrow the traffic selectors to a subset that includes the | |
1985 | initiator's first choices. In this example, the responder might | |
1986 | respond with TSi being (192.0.1.43 - 192.0.1.43) with all ports and | |
1987 | IP protocols. | |
1988 | ||
1989 | If the initiator creates the CHILD_SA pair not in response to an | |
1990 | arriving packet, but rather, say, upon startup, then there may be no | |
1991 | specific addresses the initiator prefers for the initial tunnel over | |
1992 | any other. In that case, the first values in TSi and TSr MAY be | |
1993 | ranges rather than specific values, and the responder chooses a | |
1994 | subset of the initiator's TSi and TSr that are acceptable. If more | |
1995 | than one subset is acceptable but their union is not, the responder | |
1996 | MUST accept some subset and MAY include a Notify payload of type | |
1997 | ADDITIONAL_TS_POSSIBLE to indicate that the initiator might want to | |
1998 | try again. This case will occur only when the initiator and | |
1999 | responder are configured differently from one another. If the | |
2000 | initiator and responder agree on the granularity of tunnels, the | |
2001 | initiator will never request a tunnel wider than the responder will | |
2002 | accept. {{ Demoted the SHOULD }} Such misconfigurations should be | |
2003 | recorded in error logs. | |
2004 | ||
2005 | {{ Clarif-4.10 }} A concise summary of the narrowing process is: | |
2006 | ||
2007 | o If the responder's policy does not allow any part of the traffic | |
2008 | covered by TSi/TSr, it responds with TS_UNACCEPTABLE. | |
2009 | ||
2010 | o If the responder's policy allows the entire set of traffic covered | |
2011 | by TSi/TSr, no narrowing is necessary, and the responder can | |
2012 | ||
2013 | ||
2014 | ||
2015 | Kaufman, et al. Expires August 27, 2006 [Page 36] | |
2016 | \f | |
2017 | Internet-Draft IKEv2bis February 2006 | |
2018 | ||
2019 | ||
2020 | return the same TSi/TSr values. | |
2021 | ||
2022 | o Otherwise, narrowing is needed. If the responder's policy allows | |
2023 | all traffic covered by TSi[1]/TSr[1] (the first traffic selectors | |
2024 | in TSi/TSr) but not entire TSi/TSr, the responder narrows to an | |
2025 | acceptable subset of TSi/TSr that includes TSi[1]/TSr[1]. | |
2026 | ||
2027 | o If the responder's policy does not allow all traffic covered by | |
2028 | TSi[1]/TSr[1], but does allow some parts of TSi/TSr, it narrows to | |
2029 | an acceptable subset of TSi/TSr. | |
2030 | ||
2031 | In the last two cases, there may be several subsets that are | |
2032 | acceptable (but their union is not); in this case, the responder | |
2033 | arbitrarily chooses one of them, and includes ADDITIONAL_TS_POSSIBLE | |
2034 | notification in the response. | |
2035 | ||
2036 | 2.9.1. Traffic Selectors Violating Own Policy | |
2037 | ||
2038 | {{ Clarif-4.12 }} | |
2039 | ||
2040 | When creating a new SA, the initiator needs to avoid proposing | |
2041 | traffic selectors that violate its own policy. If this rule is not | |
2042 | followed, valid traffic may be dropped. | |
2043 | ||
2044 | This is best illustrated by an example. Suppose that host A has a | |
2045 | policy whose effect is that traffic to 192.0.1.66 is sent via host B | |
2046 | encrypted using AES, and traffic to all other hosts in 192.0.1.0/24 | |
2047 | is also sent via B, but must use 3DES. Suppose also that host B | |
2048 | accepts any combination of AES and 3DES. | |
2049 | ||
2050 | If host A now proposes an SA that uses 3DES, and includes TSr | |
2051 | containing (192.0.1.0-192.0.1.0.255), this will be accepted by host | |
2052 | B. Now, host B can also use this SA to send traffic from 192.0.1.66, | |
2053 | but those packets will be dropped by A since it requires the use of | |
2054 | AES for those traffic. Even if host A creates a new SA only for | |
2055 | 192.0.1.66 that uses AES, host B may freely continue to use the first | |
2056 | SA for the traffic. In this situation, when proposing the SA, host A | |
2057 | should have followed its own policy, and included a TSr containing | |
2058 | ((192.0.1.0-192.0.1.65),(192.0.1.67-192.0.1.255)) instead. | |
2059 | ||
2060 | In general, if (1) the initiator makes a proposal "for traffic X | |
2061 | (TSi/TSr), do SA", and (2) for some subset X' of X, the initiator | |
2062 | does not actually accept traffic X' with SA, and (3) the initiator | |
2063 | would be willing to accept traffic X' with some SA' (!=SA), valid | |
2064 | traffic can be unnecessarily dropped since the responder can apply | |
2065 | either SA or SA' to traffic X'. | |
2066 | ||
2067 | ||
2068 | ||
2069 | ||
2070 | ||
2071 | Kaufman, et al. Expires August 27, 2006 [Page 37] | |
2072 | \f | |
2073 | Internet-Draft IKEv2bis February 2006 | |
2074 | ||
2075 | ||
2076 | 2.10. Nonces | |
2077 | ||
2078 | The IKE_SA_INIT messages each contain a nonce. These nonces are used | |
2079 | as inputs to cryptographic functions. The CREATE_CHILD_SA request | |
2080 | and the CREATE_CHILD_SA response also contain nonces. These nonces | |
2081 | are used to add freshness to the key derivation technique used to | |
2082 | obtain keys for CHILD_SA, and to ensure creation of strong pseudo- | |
2083 | random bits from the Diffie-Hellman key. Nonces used in IKEv2 MUST | |
2084 | be randomly chosen, MUST be at least 128 bits in size, and MUST be at | |
2085 | least half the key size of the negotiated prf. ("prf" refers to | |
2086 | "pseudo-random function", one of the cryptographic algorithms | |
2087 | negotiated in the IKE exchange.) {{ Clarif-7.4 }} However, the | |
2088 | initiator chooses the nonce before the outcome of the negotiation is | |
2089 | known. Because of that, the nonce has to be long enough for all the | |
2090 | PRFs being proposed. If the same random number source is used for | |
2091 | both keys and nonces, care must be taken to ensure that the latter | |
2092 | use does not compromise the former. | |
2093 | ||
2094 | 2.11. Address and Port Agility | |
2095 | ||
2096 | IKE runs over UDP ports 500 and 4500, and implicitly sets up ESP and | |
2097 | AH associations for the same IP addresses it runs over. The IP | |
2098 | addresses and ports in the outer header are, however, not themselves | |
2099 | cryptographically protected, and IKE is designed to work even through | |
2100 | Network Address Translation (NAT) boxes. An implementation MUST | |
2101 | accept incoming requests even if the source port is not 500 or 4500, | |
2102 | and MUST respond to the address and port from which the request was | |
2103 | received. It MUST specify the address and port at which the request | |
2104 | was received as the source address and port in the response. IKE | |
2105 | functions identically over IPv4 or IPv6. | |
2106 | ||
2107 | 2.12. Reuse of Diffie-Hellman Exponentials | |
2108 | ||
2109 | IKE generates keying material using an ephemeral Diffie-Hellman | |
2110 | exchange in order to gain the property of "perfect forward secrecy". | |
2111 | This means that once a connection is closed and its corresponding | |
2112 | keys are forgotten, even someone who has recorded all of the data | |
2113 | from the connection and gets access to all of the long-term keys of | |
2114 | the two endpoints cannot reconstruct the keys used to protect the | |
2115 | conversation without doing a brute force search of the session key | |
2116 | space. | |
2117 | ||
2118 | Achieving perfect forward secrecy requires that when a connection is | |
2119 | closed, each endpoint MUST forget not only the keys used by the | |
2120 | connection but also any information that could be used to recompute | |
2121 | those keys. In particular, it MUST forget the secrets used in the | |
2122 | Diffie-Hellman calculation and any state that may persist in the | |
2123 | state of a pseudo-random number generator that could be used to | |
2124 | ||
2125 | ||
2126 | ||
2127 | Kaufman, et al. Expires August 27, 2006 [Page 38] | |
2128 | \f | |
2129 | Internet-Draft IKEv2bis February 2006 | |
2130 | ||
2131 | ||
2132 | recompute the Diffie-Hellman secrets. | |
2133 | ||
2134 | Since the computing of Diffie-Hellman exponentials is computationally | |
2135 | expensive, an endpoint may find it advantageous to reuse those | |
2136 | exponentials for multiple connection setups. There are several | |
2137 | reasonable strategies for doing this. An endpoint could choose a new | |
2138 | exponential only periodically though this could result in less-than- | |
2139 | perfect forward secrecy if some connection lasts for less than the | |
2140 | lifetime of the exponential. Or it could keep track of which | |
2141 | exponential was used for each connection and delete the information | |
2142 | associated with the exponential only when some corresponding | |
2143 | connection was closed. This would allow the exponential to be reused | |
2144 | without losing perfect forward secrecy at the cost of maintaining | |
2145 | more state. | |
2146 | ||
2147 | Decisions as to whether and when to reuse Diffie-Hellman exponentials | |
2148 | is a private decision in the sense that it will not affect | |
2149 | interoperability. An implementation that reuses exponentials MAY | |
2150 | choose to remember the exponential used by the other endpoint on past | |
2151 | exchanges and if one is reused to avoid the second half of the | |
2152 | calculation. | |
2153 | ||
2154 | 2.13. Generating Keying Material | |
2155 | ||
2156 | In the context of the IKE_SA, four cryptographic algorithms are | |
2157 | negotiated: an encryption algorithm, an integrity protection | |
2158 | algorithm, a Diffie-Hellman group, and a pseudo-random function | |
2159 | (prf). The pseudo-random function is used for the construction of | |
2160 | keying material for all of the cryptographic algorithms used in both | |
2161 | the IKE_SA and the CHILD_SAs. | |
2162 | ||
2163 | We assume that each encryption algorithm and integrity protection | |
2164 | algorithm uses a fixed-size key and that any randomly chosen value of | |
2165 | that fixed size can serve as an appropriate key. For algorithms that | |
2166 | accept a variable length key, a fixed key size MUST be specified as | |
2167 | part of the cryptographic transform negotiated. For algorithms for | |
2168 | which not all values are valid keys (such as DES or 3DES with key | |
2169 | parity), the algorithm by which keys are derived from arbitrary | |
2170 | values MUST be specified by the cryptographic transform. For | |
2171 | integrity protection functions based on Hashed Message Authentication | |
2172 | Code (HMAC), the fixed key size is the size of the output of the | |
2173 | underlying hash function. When the prf function takes a variable | |
2174 | length key, variable length data, and produces a fixed-length output | |
2175 | (e.g., when using HMAC), the formulas in this document apply. When | |
2176 | the key for the prf function has fixed length, the data provided as a | |
2177 | key is truncated or padded with zeros as necessary unless exceptional | |
2178 | processing is explained following the formula. | |
2179 | ||
2180 | ||
2181 | ||
2182 | ||
2183 | Kaufman, et al. Expires August 27, 2006 [Page 39] | |
2184 | \f | |
2185 | Internet-Draft IKEv2bis February 2006 | |
2186 | ||
2187 | ||
2188 | Keying material will always be derived as the output of the | |
2189 | negotiated prf algorithm. Since the amount of keying material needed | |
2190 | may be greater than the size of the output of the prf algorithm, we | |
2191 | will use the prf iteratively. We will use the terminology prf+ to | |
2192 | describe the function that outputs a pseudo-random stream based on | |
2193 | the inputs to a prf as follows: (where | indicates concatenation) | |
2194 | ||
2195 | prf+ (K,S) = T1 | T2 | T3 | T4 | ... | |
2196 | ||
2197 | where: | |
2198 | T1 = prf (K, S | 0x01) | |
2199 | T2 = prf (K, T1 | S | 0x02) | |
2200 | T3 = prf (K, T2 | S | 0x03) | |
2201 | T4 = prf (K, T3 | S | 0x04) | |
2202 | ||
2203 | continuing as needed to compute all required keys. The keys are | |
2204 | taken from the output string without regard to boundaries (e.g., if | |
2205 | the required keys are a 256-bit Advanced Encryption Standard (AES) | |
2206 | key and a 160-bit HMAC key, and the prf function generates 160 bits, | |
2207 | the AES key will come from T1 and the beginning of T2, while the HMAC | |
2208 | key will come from the rest of T2 and the beginning of T3). | |
2209 | ||
2210 | The constant concatenated to the end of each string feeding the prf | |
2211 | is a single octet. prf+ in this document is not defined beyond 255 | |
2212 | times the size of the prf output. | |
2213 | ||
2214 | 2.14. Generating Keying Material for the IKE_SA | |
2215 | ||
2216 | The shared keys are computed as follows. A quantity called SKEYSEED | |
2217 | is calculated from the nonces exchanged during the IKE_SA_INIT | |
2218 | exchange and the Diffie-Hellman shared secret established during that | |
2219 | exchange. SKEYSEED is used to calculate seven other secrets: SK_d | |
2220 | used for deriving new keys for the CHILD_SAs established with this | |
2221 | IKE_SA; SK_ai and SK_ar used as a key to the integrity protection | |
2222 | algorithm for authenticating the component messages of subsequent | |
2223 | exchanges; SK_ei and SK_er used for encrypting (and of course | |
2224 | decrypting) all subsequent exchanges; and SK_pi and SK_pr, which are | |
2225 | used when generating an AUTH payload. | |
2226 | ||
2227 | SKEYSEED and its derivatives are computed as follows: | |
2228 | ||
2229 | SKEYSEED = prf(Ni | Nr, g^ir) | |
2230 | ||
2231 | {SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr } | |
2232 | = prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr ) | |
2233 | ||
2234 | (indicating that the quantities SK_d, SK_ai, SK_ar, SK_ei, SK_er, | |
2235 | SK_pi, and SK_pr are taken in order from the generated bits of the | |
2236 | ||
2237 | ||
2238 | ||
2239 | Kaufman, et al. Expires August 27, 2006 [Page 40] | |
2240 | \f | |
2241 | Internet-Draft IKEv2bis February 2006 | |
2242 | ||
2243 | ||
2244 | prf+). g^ir is the shared secret from the ephemeral Diffie-Hellman | |
2245 | exchange. g^ir is represented as a string of octets in big endian | |
2246 | order padded with zeros if necessary to make it the length of the | |
2247 | modulus. Ni and Nr are the nonces, stripped of any headers. If the | |
2248 | negotiated prf takes a fixed-length key and the lengths of Ni and Nr | |
2249 | do not add up to that length, half the bits must come from Ni and | |
2250 | half from Nr, taking the first bits of each. | |
2251 | ||
2252 | The two directions of traffic flow use different keys. The keys used | |
2253 | to protect messages from the original initiator are SK_ai and SK_ei. | |
2254 | The keys used to protect messages in the other direction are SK_ar | |
2255 | and SK_er. Each algorithm takes a fixed number of bits of keying | |
2256 | material, which is specified as part of the algorithm. For integrity | |
2257 | algorithms based on a keyed hash, the key size is always equal to the | |
2258 | length of the output of the underlying hash function. | |
2259 | ||
2260 | 2.15. Authentication of the IKE_SA | |
2261 | ||
2262 | When not using extensible authentication (see Section 2.16), the | |
2263 | peers are authenticated by having each sign (or MAC using a shared | |
2264 | secret as the key) a block of data. For the responder, the octets to | |
2265 | be signed start with the first octet of the first SPI in the header | |
2266 | of the second message and end with the last octet of the last payload | |
2267 | in the second message. Appended to this (for purposes of computing | |
2268 | the signature) are the initiator's nonce Ni (just the value, not the | |
2269 | payload containing it), and the value prf(SK_pr,IDr') where IDr' is | |
2270 | the responder's ID payload excluding the fixed header. Note that | |
2271 | neither the nonce Ni nor the value prf(SK_pr,IDr') are transmitted. | |
2272 | Similarly, the initiator signs the first message, starting with the | |
2273 | first octet of the first SPI in the header and ending with the last | |
2274 | octet of the last payload. Appended to this (for purposes of | |
2275 | computing the signature) are the responder's nonce Nr, and the value | |
2276 | prf(SK_pi,IDi'). In the above calculation, IDi' and IDr' are the | |
2277 | entire ID payloads excluding the fixed header. It is critical to the | |
2278 | security of the exchange that each side sign the other side's nonce. | |
2279 | ||
2280 | {{ Clarif-3.1 }} | |
2281 | ||
2282 | The initiator's signed octets can be described as: | |
2283 | ||
2284 | InitiatorSignedOctets = RealMessage1 | NonceRData | MACedIDForI | |
2285 | GenIKEHDR = [ four octets 0 if using port 4500 ] | RealIKEHDR | |
2286 | RealIKEHDR = SPIi | SPIr | . . . | Length | |
2287 | RealMessage1 = RealIKEHDR | RestOfMessage1 | |
2288 | NonceRPayload = PayloadHeader | NonceRData | |
2289 | InitiatorIDPayload = PayloadHeader | RestOfIDPayload | |
2290 | RestOfInitIDPayload = IDType | RESERVED | InitIDData | |
2291 | MACedIDForI = prf(SK_pi, RestOfInitIDPayload) | |
2292 | ||
2293 | ||
2294 | ||
2295 | Kaufman, et al. Expires August 27, 2006 [Page 41] | |
2296 | \f | |
2297 | Internet-Draft IKEv2bis February 2006 | |
2298 | ||
2299 | ||
2300 | The responder's signed octets can be described as: | |
2301 | ||
2302 | ResponderSignedOctets = RealMessage2 | NonceIData | MACedIDForR | |
2303 | GenIKEHDR = [ four octets 0 if using port 4500 ] | RealIKEHDR | |
2304 | RealIKEHDR = SPIi | SPIr | . . . | Length | |
2305 | RealMessage2 = RealIKEHDR | RestOfMessage2 | |
2306 | NonceIPayload = PayloadHeader | NonceIData | |
2307 | ResponderIDPayload = PayloadHeader | RestOfIDPayload | |
2308 | RestOfRespIDPayload = IDType | RESERVED | InitIDData | |
2309 | MACedIDForR = prf(SK_pr, RestOfRespIDPayload) | |
2310 | ||
2311 | Note that all of the payloads are included under the signature, | |
2312 | including any payload types not defined in this document. If the | |
2313 | first message of the exchange is sent twice (the second time with a | |
2314 | responder cookie and/or a different Diffie-Hellman group), it is the | |
2315 | second version of the message that is signed. | |
2316 | ||
2317 | Optionally, messages 3 and 4 MAY include a certificate, or | |
2318 | certificate chain providing evidence that the key used to compute a | |
2319 | digital signature belongs to the name in the ID payload. The | |
2320 | signature or MAC will be computed using algorithms dictated by the | |
2321 | type of key used by the signer, and specified by the Auth Method | |
2322 | field in the Authentication payload. There is no requirement that | |
2323 | the initiator and responder sign with the same cryptographic | |
2324 | algorithms. The choice of cryptographic algorithms depends on the | |
2325 | type of key each has. In particular, the initiator may be using a | |
2326 | shared key while the responder may have a public signature key and | |
2327 | certificate. It will commonly be the case (but it is not required) | |
2328 | that if a shared secret is used for authentication that the same key | |
2329 | is used in both directions. Note that it is a common but typically | |
2330 | insecure practice to have a shared key derived solely from a user- | |
2331 | chosen password without incorporating another source of randomness. | |
2332 | ||
2333 | This is typically insecure because user-chosen passwords are unlikely | |
2334 | to have sufficient unpredictability to resist dictionary attacks and | |
2335 | these attacks are not prevented in this authentication method. | |
2336 | (Applications using password-based authentication for bootstrapping | |
2337 | and IKE_SA should use the authentication method in Section 2.16, | |
2338 | which is designed to prevent off-line dictionary attacks.) {{ Demoted | |
2339 | the SHOULD }} The pre-shared key needs to contain as much | |
2340 | unpredictability as the strongest key being negotiated. In the case | |
2341 | of a pre-shared key, the AUTH value is computed as: | |
2342 | ||
2343 | AUTH = prf(prf(Shared Secret,"Key Pad for IKEv2"), <msg octets>) | |
2344 | ||
2345 | where the string "Key Pad for IKEv2" is 17 ASCII characters without | |
2346 | null termination. The shared secret can be variable length. The pad | |
2347 | string is added so that if the shared secret is derived from a | |
2348 | ||
2349 | ||
2350 | ||
2351 | Kaufman, et al. Expires August 27, 2006 [Page 42] | |
2352 | \f | |
2353 | Internet-Draft IKEv2bis February 2006 | |
2354 | ||
2355 | ||
2356 | password, the IKE implementation need not store the password in | |
2357 | cleartext, but rather can store the value prf(Shared Secret,"Key Pad | |
2358 | for IKEv2"), which could not be used as a password equivalent for | |
2359 | protocols other than IKEv2. As noted above, deriving the shared | |
2360 | secret from a password is not secure. This construction is used | |
2361 | because it is anticipated that people will do it anyway. The | |
2362 | management interface by which the Shared Secret is provided MUST | |
2363 | accept ASCII strings of at least 64 octets and MUST NOT add a null | |
2364 | terminator before using them as shared secrets. It MUST also accept | |
2365 | a hex encoding of the Shared Secret. The management interface MAY | |
2366 | accept other encodings if the algorithm for translating the encoding | |
2367 | to a binary string is specified. | |
2368 | ||
2369 | {{ Clarif-3.7 }} If the negotiated prf takes a fixed-size key, the | |
2370 | shared secret MUST be of that fixed size. This requirement means | |
2371 | that it is difficult to use these PRFs with shared key authentication | |
2372 | because it limits the shared secrets that can be used. Thus, PRFs | |
2373 | that require a fixed-size key SHOULD NOT be used with shared key | |
2374 | authentication. For example, PRF_AES128_CBC [PRFAES128CBC] | |
2375 | originally used fixed key sizes; that RFC has been updated to handle | |
2376 | variable key sizes in [PRFAES128CBC-bis]. Note that Section 2.13 | |
2377 | also contains text that is related to PRFs with fixed key size. | |
2378 | However, the text in that section applies only to the prf+ | |
2379 | construction. | |
2380 | ||
2381 | 2.16. Extensible Authentication Protocol Methods | |
2382 | ||
2383 | In addition to authentication using public key signatures and shared | |
2384 | secrets, IKE supports authentication using methods defined in RFC | |
2385 | 3748 [EAP]. Typically, these methods are asymmetric (designed for a | |
2386 | user authenticating to a server), and they may not be mutual. {{ In | |
2387 | the next sentence, changed "public key signature based" to "strong" | |
2388 | }} For this reason, these protocols are typically used to | |
2389 | authenticate the initiator to the responder and MUST be used in | |
2390 | conjunction with a strong authentication of the responder to the | |
2391 | initiator. These methods are often associated with mechanisms | |
2392 | referred to as "Legacy Authentication" mechanisms. | |
2393 | ||
2394 | While this memo references [EAP] with the intent that new methods can | |
2395 | be added in the future without updating this specification, some | |
2396 | simpler variations are documented here and in Section 3.16. [EAP] | |
2397 | defines an authentication protocol requiring a variable number of | |
2398 | messages. Extensible Authentication is implemented in IKE as | |
2399 | additional IKE_AUTH exchanges that MUST be completed in order to | |
2400 | initialize the IKE_SA. | |
2401 | ||
2402 | An initiator indicates a desire to use extensible authentication by | |
2403 | leaving out the AUTH payload from message 3. By including an IDi | |
2404 | ||
2405 | ||
2406 | ||
2407 | Kaufman, et al. Expires August 27, 2006 [Page 43] | |
2408 | \f | |
2409 | Internet-Draft IKEv2bis February 2006 | |
2410 | ||
2411 | ||
2412 | payload but not an AUTH payload, the initiator has declared an | |
2413 | identity but has not proven it. If the responder is willing to use | |
2414 | an extensible authentication method, it will place an Extensible | |
2415 | Authentication Protocol (EAP) payload in message 4 and defer sending | |
2416 | SAr2, TSi, and TSr until initiator authentication is complete in a | |
2417 | subsequent IKE_AUTH exchange. In the case of a minimal extensible | |
2418 | authentication, the initial SA establishment will appear as follows: | |
2419 | ||
2420 | Initiator Responder | |
2421 | ------------------------------------------------------------------- | |
2422 | HDR, SAi1, KEi, Ni --> | |
2423 | <-- HDR, SAr1, KEr, Nr, [CERTREQ] | |
2424 | HDR, SK {IDi, [CERTREQ,] | |
2425 | [IDr,] SAi2, | |
2426 | TSi, TSr} --> | |
2427 | <-- HDR, SK {IDr, [CERT,] AUTH, | |
2428 | EAP } | |
2429 | HDR, SK {EAP} --> | |
2430 | <-- HDR, SK {EAP (success)} | |
2431 | HDR, SK {AUTH} --> | |
2432 | <-- HDR, SK {AUTH, SAr2, TSi, TSr } | |
2433 | ||
2434 | {{ Clarif-3.10 }} As described in Section 2.2, when EAP is used, each | |
2435 | pair of IKE_SA initial setup messages will have their message numbers | |
2436 | incremented; the first pair of AUTH messages will have an ID of 1, | |
2437 | the second will be 2, and so on. | |
2438 | ||
2439 | For EAP methods that create a shared key as a side effect of | |
2440 | authentication, that shared key MUST be used by both the initiator | |
2441 | and responder to generate AUTH payloads in messages 7 and 8 using the | |
2442 | syntax for shared secrets specified in Section 2.15. The shared key | |
2443 | from EAP is the field from the EAP specification named MSK. The | |
2444 | shared key generated during an IKE exchange MUST NOT be used for any | |
2445 | other purpose. | |
2446 | ||
2447 | EAP methods that do not establish a shared key SHOULD NOT be used, as | |
2448 | they are subject to a number of man-in-the-middle attacks [EAPMITM] | |
2449 | if these EAP methods are used in other protocols that do not use a | |
2450 | server-authenticated tunnel. Please see the Security Considerations | |
2451 | section for more details. If EAP methods that do not generate a | |
2452 | shared key are used, the AUTH payloads in messages 7 and 8 MUST be | |
2453 | generated using SK_pi and SK_pr, respectively. | |
2454 | ||
2455 | {{ Demoted the SHOULD }} The initiator of an IKE_SA using EAP needs | |
2456 | to be capable of extending the initial protocol exchange to at least | |
2457 | ten IKE_AUTH exchanges in the event the responder sends notification | |
2458 | messages and/or retries the authentication prompt. Once the protocol | |
2459 | exchange defined by the chosen EAP authentication method has | |
2460 | ||
2461 | ||
2462 | ||
2463 | Kaufman, et al. Expires August 27, 2006 [Page 44] | |
2464 | \f | |
2465 | Internet-Draft IKEv2bis February 2006 | |
2466 | ||
2467 | ||
2468 | successfully terminated, the responder MUST send an EAP payload | |
2469 | containing the Success message. Similarly, if the authentication | |
2470 | method has failed, the responder MUST send an EAP payload containing | |
2471 | the Failure message. The responder MAY at any time terminate the IKE | |
2472 | exchange by sending an EAP payload containing the Failure message. | |
2473 | ||
2474 | Following such an extended exchange, the EAP AUTH payloads MUST be | |
2475 | included in the two messages following the one containing the EAP | |
2476 | Success message. | |
2477 | ||
2478 | {{ Clarif-3.5 }} When the initiator authentication uses EAP, it is | |
2479 | possible that the contents of the IDi payload is used only for AAA | |
2480 | routing purposes and selecting which EAP method to use. This value | |
2481 | may be different from the identity authenticated by the EAP method. | |
2482 | It is important that policy lookups and access control decisions use | |
2483 | the actual authenticated identity. Often the EAP server is | |
2484 | implemented in a separate AAA server that communicates with the IKEv2 | |
2485 | responder. In this case, the authenticated identity has to be sent | |
2486 | from the AAA server to the IKEv2 responder. | |
2487 | ||
2488 | {{ Clarif-3.8 }} The information in Section 2.17 about PRFs with | |
2489 | fixed-size keys also applies to EAP authentication. For instance, a | |
2490 | PRF that requires a 128-bit key cannot be used with EAP because | |
2491 | specifies that the MSK is at least 512 bits long. | |
2492 | ||
2493 | 2.17. Generating Keying Material for CHILD_SAs | |
2494 | ||
2495 | A single CHILD_SA is created by the IKE_AUTH exchange, and additional | |
2496 | CHILD_SAs can optionally be created in CREATE_CHILD_SA exchanges. | |
2497 | Keying material for them is generated as follows: | |
2498 | ||
2499 | KEYMAT = prf+(SK_d, Ni | Nr) | |
2500 | ||
2501 | Where Ni and Nr are the nonces from the IKE_SA_INIT exchange if this | |
2502 | request is the first CHILD_SA created or the fresh Ni and Nr from the | |
2503 | CREATE_CHILD_SA exchange if this is a subsequent creation. | |
2504 | ||
2505 | For CREATE_CHILD_SA exchanges including an optional Diffie-Hellman | |
2506 | exchange, the keying material is defined as: | |
2507 | ||
2508 | KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr ) | |
2509 | ||
2510 | where g^ir (new) is the shared secret from the ephemeral Diffie- | |
2511 | Hellman exchange of this CREATE_CHILD_SA exchange (represented as an | |
2512 | octet string in big endian order padded with zeros in the high-order | |
2513 | bits if necessary to make it the length of the modulus). | |
2514 | ||
2515 | A single CHILD_SA negotiation may result in multiple security | |
2516 | ||
2517 | ||
2518 | ||
2519 | Kaufman, et al. Expires August 27, 2006 [Page 45] | |
2520 | \f | |
2521 | Internet-Draft IKEv2bis February 2006 | |
2522 | ||
2523 | ||
2524 | associations. ESP and AH SAs exist in pairs (one in each direction), | |
2525 | and four SAs could be created in a single CHILD_SA negotiation if a | |
2526 | combination of ESP and AH is being negotiated. | |
2527 | ||
2528 | Keying material MUST be taken from the expanded KEYMAT in the | |
2529 | following order: | |
2530 | ||
2531 | o All keys for SAs carrying data from the initiator to the responder | |
2532 | are taken before SAs going in the reverse direction. | |
2533 | ||
2534 | o If multiple IPsec protocols are negotiated, keying material is | |
2535 | taken in the order in which the protocol headers will appear in | |
2536 | the encapsulated packet. | |
2537 | ||
2538 | o If a single protocol has both encryption and authentication keys, | |
2539 | the encryption key is taken from the first octets of KEYMAT and | |
2540 | the authentication key is taken from the next octets. | |
2541 | ||
2542 | Each cryptographic algorithm takes a fixed number of bits of keying | |
2543 | material specified as part of the algorithm. | |
2544 | ||
2545 | 2.18. Rekeying IKE_SAs Using a CREATE_CHILD_SA Exchange | |
2546 | ||
2547 | The CREATE_CHILD_SA exchange can be used to rekey an existing IKE_SA | |
2548 | (see Section 2.8). {{ Clarif-5.3 }} New initiator and responder SPIs | |
2549 | are supplied in the SPI fields in the Proposal structures inside the | |
2550 | Security Association (SA) payloads (not the SPI fields in the IKE | |
2551 | header). The TS payloads are omitted when rekeying an IKE_SA. | |
2552 | SKEYSEED for the new IKE_SA is computed using SK_d from the existing | |
2553 | IKE_SA as follows: | |
2554 | ||
2555 | SKEYSEED = prf(SK_d (old), [g^ir (new)] | Ni | Nr) | |
2556 | ||
2557 | where g^ir (new) is the shared secret from the ephemeral Diffie- | |
2558 | Hellman exchange of this CREATE_CHILD_SA exchange (represented as an | |
2559 | octet string in big endian order padded with zeros if necessary to | |
2560 | make it the length of the modulus) and Ni and Nr are the two nonces | |
2561 | stripped of any headers. | |
2562 | ||
2563 | {{ Clarif-5.5 }} The old and new IKE_SA may have selected a different | |
2564 | PRF. Because the rekeying exchange belongs to the old IKE_SA, it is | |
2565 | the old IKE_SA's PRF that is used. Note that this may not work if | |
2566 | the new IKE_SA's PRF has a fixed key size because the output of the | |
2567 | PRF may not be of the correct size. | |
2568 | ||
2569 | The new IKE_SA MUST reset its message counters to 0. | |
2570 | ||
2571 | SK_d, SK_ai, SK_ar, SK_ei, and SK_er are computed from SKEYSEED as | |
2572 | ||
2573 | ||
2574 | ||
2575 | Kaufman, et al. Expires August 27, 2006 [Page 46] | |
2576 | \f | |
2577 | Internet-Draft IKEv2bis February 2006 | |
2578 | ||
2579 | ||
2580 | specified in Section 2.14. | |
2581 | ||
2582 | 2.19. Requesting an Internal Address on a Remote Network | |
2583 | ||
2584 | Most commonly occurring in the endpoint-to-security-gateway scenario, | |
2585 | an endpoint may need an IP address in the network protected by the | |
2586 | security gateway and may need to have that address dynamically | |
2587 | assigned. A request for such a temporary address can be included in | |
2588 | any request to create a CHILD_SA (including the implicit request in | |
2589 | message 3) by including a CP payload. | |
2590 | ||
2591 | This function provides address allocation to an IPsec Remote Access | |
2592 | Client (IRAC) trying to tunnel into a network protected by an IPsec | |
2593 | Remote Access Server (IRAS). Since the IKE_AUTH exchange creates an | |
2594 | IKE_SA and a CHILD_SA, the IRAC MUST request the IRAS-controlled | |
2595 | address (and optionally other information concerning the protected | |
2596 | network) in the IKE_AUTH exchange. The IRAS may procure an address | |
2597 | for the IRAC from any number of sources such as a DHCP/BOOTP server | |
2598 | or its own address pool. | |
2599 | ||
2600 | Initiator Responder | |
2601 | ------------------------------------------------------------------- | |
2602 | HDR, SK {IDi, [CERT,] | |
2603 | [CERTREQ,] [IDr,] AUTH, | |
2604 | CP(CFG_REQUEST), SAi2, | |
2605 | TSi, TSr} --> | |
2606 | <-- HDR, SK {IDr, [CERT,] AUTH, | |
2607 | CP(CFG_REPLY), SAr2, | |
2608 | TSi, TSr} | |
2609 | ||
2610 | In all cases, the CP payload MUST be inserted before the SA payload. | |
2611 | In variations of the protocol where there are multiple IKE_AUTH | |
2612 | exchanges, the CP payloads MUST be inserted in the messages | |
2613 | containing the SA payloads. | |
2614 | ||
2615 | CP(CFG_REQUEST) MUST contain at least an INTERNAL_ADDRESS attribute | |
2616 | (either IPv4 or IPv6) but MAY contain any number of additional | |
2617 | attributes the initiator wants returned in the response. | |
2618 | ||
2619 | For example, message from initiator to responder: | |
2620 | ||
2621 | CP(CFG_REQUEST)= | |
2622 | INTERNAL_ADDRESS() | |
2623 | TSi = (0, 0-65535,0.0.0.0-255.255.255.255) | |
2624 | TSr = (0, 0-65535,0.0.0.0-255.255.255.255) | |
2625 | ||
2626 | NOTE: Traffic Selectors contain (protocol, port range, address | |
2627 | range). | |
2628 | ||
2629 | ||
2630 | ||
2631 | Kaufman, et al. Expires August 27, 2006 [Page 47] | |
2632 | \f | |
2633 | Internet-Draft IKEv2bis February 2006 | |
2634 | ||
2635 | ||
2636 | Message from responder to initiator: | |
2637 | ||
2638 | CP(CFG_REPLY)= | |
2639 | INTERNAL_ADDRESS(192.0.2.202) | |
2640 | INTERNAL_NETMASK(255.255.255.0) | |
2641 | INTERNAL_SUBNET(192.0.2.0/255.255.255.0) | |
2642 | TSi = (0, 0-65535,192.0.2.202-192.0.2.202) | |
2643 | TSr = (0, 0-65535,192.0.2.0-192.0.2.255) | |
2644 | ||
2645 | All returned values will be implementation dependent. As can be seen | |
2646 | in the above example, the IRAS MAY also send other attributes that | |
2647 | were not included in CP(CFG_REQUEST) and MAY ignore the non- | |
2648 | mandatory attributes that it does not support. | |
2649 | ||
2650 | The responder MUST NOT send a CFG_REPLY without having first received | |
2651 | a CP(CFG_REQUEST) from the initiator, because we do not want the IRAS | |
2652 | to perform an unnecessary configuration lookup if the IRAC cannot | |
2653 | process the REPLY. In the case where the IRAS's configuration | |
2654 | requires that CP be used for a given identity IDi, but IRAC has | |
2655 | failed to send a CP(CFG_REQUEST), IRAS MUST fail the request, and | |
2656 | terminate the IKE exchange with a FAILED_CP_REQUIRED error. | |
2657 | ||
2658 | 2.20. Requesting the Peer's Version | |
2659 | ||
2660 | An IKE peer wishing to inquire about the other peer's IKE software | |
2661 | version information MAY use the method below. This is an example of | |
2662 | a configuration request within an INFORMATIONAL exchange, after the | |
2663 | IKE_SA and first CHILD_SA have been created. | |
2664 | ||
2665 | An IKE implementation MAY decline to give out version information | |
2666 | prior to authentication or even after authentication to prevent | |
2667 | trolling in case some implementation is known to have some security | |
2668 | weakness. In that case, it MUST either return an empty string or no | |
2669 | CP payload if CP is not supported. | |
2670 | ||
2671 | Initiator Responder | |
2672 | ------------------------------------------------------------------- | |
2673 | HDR, SK{CP(CFG_REQUEST)} --> | |
2674 | <-- HDR, SK{CP(CFG_REPLY)} | |
2675 | ||
2676 | CP(CFG_REQUEST)= | |
2677 | APPLICATION_VERSION("") | |
2678 | ||
2679 | CP(CFG_REPLY) APPLICATION_VERSION("foobar v1.3beta, (c) Foo Bar | |
2680 | Inc.") | |
2681 | ||
2682 | ||
2683 | ||
2684 | ||
2685 | ||
2686 | ||
2687 | Kaufman, et al. Expires August 27, 2006 [Page 48] | |
2688 | \f | |
2689 | Internet-Draft IKEv2bis February 2006 | |
2690 | ||
2691 | ||
2692 | 2.21. Error Handling | |
2693 | ||
2694 | There are many kinds of errors that can occur during IKE processing. | |
2695 | If a request is received that is badly formatted or unacceptable for | |
2696 | reasons of policy (e.g., no matching cryptographic algorithms), the | |
2697 | response MUST contain a Notify payload indicating the error. If an | |
2698 | error occurs outside the context of an IKE request (e.g., the node is | |
2699 | getting ESP messages on a nonexistent SPI), the node SHOULD initiate | |
2700 | an INFORMATIONAL exchange with a Notify payload describing the | |
2701 | problem. | |
2702 | ||
2703 | Errors that occur before a cryptographically protected IKE_SA is | |
2704 | established must be handled very carefully. There is a trade-off | |
2705 | between wanting to be helpful in diagnosing a problem and responding | |
2706 | to it and wanting to avoid being a dupe in a denial of service attack | |
2707 | based on forged messages. | |
2708 | ||
2709 | If a node receives a message on UDP port 500 or 4500 outside the | |
2710 | context of an IKE_SA known to it (and not a request to start one), it | |
2711 | may be the result of a recent crash of the node. If the message is | |
2712 | marked as a response, the node MAY audit the suspicious event but | |
2713 | MUST NOT respond. If the message is marked as a request, the node | |
2714 | MAY audit the suspicious event and MAY send a response. If a | |
2715 | response is sent, the response MUST be sent to the IP address and | |
2716 | port from whence it came with the same IKE SPIs and the Message ID | |
2717 | copied. The response MUST NOT be cryptographically protected and | |
2718 | MUST contain a Notify payload indicating INVALID_IKE_SPI. | |
2719 | ||
2720 | A node receiving such an unprotected Notify payload MUST NOT respond | |
2721 | and MUST NOT change the state of any existing SAs. The message might | |
2722 | be a forgery or might be a response the genuine correspondent was | |
2723 | tricked into sending. {{ Demoted two SHOULDs }} A node should treat | |
2724 | such a message (and also a network message like ICMP destination | |
2725 | unreachable) as a hint that there might be problems with SAs to that | |
2726 | IP address and should initiate a liveness test for any such IKE_SA. | |
2727 | An implementation SHOULD limit the frequency of such tests to avoid | |
2728 | being tricked into participating in a denial of service attack. | |
2729 | ||
2730 | A node receiving a suspicious message from an IP address with which | |
2731 | it has an IKE_SA MAY send an IKE Notify payload in an IKE | |
2732 | INFORMATIONAL exchange over that SA. {{ Demoted the SHOULD }} The | |
2733 | recipient MUST NOT change the state of any SAs as a result, but may | |
2734 | wish to audit the event to aid in diagnosing malfunctions. A node | |
2735 | MUST limit the rate at which it will send messages in response to | |
2736 | unprotected messages. | |
2737 | ||
2738 | ||
2739 | ||
2740 | ||
2741 | ||
2742 | ||
2743 | Kaufman, et al. Expires August 27, 2006 [Page 49] | |
2744 | \f | |
2745 | Internet-Draft IKEv2bis February 2006 | |
2746 | ||
2747 | ||
2748 | 2.22. IPComp | |
2749 | ||
2750 | Use of IP compression [IPCOMP] can be negotiated as part of the setup | |
2751 | of a CHILD_SA. While IP compression involves an extra header in each | |
2752 | packet and a compression parameter index (CPI), the virtual | |
2753 | "compression association" has no life outside the ESP or AH SA that | |
2754 | contains it. Compression associations disappear when the | |
2755 | corresponding ESP or AH SA goes away. It is not explicitly mentioned | |
2756 | in any DELETE payload. | |
2757 | ||
2758 | Negotiation of IP compression is separate from the negotiation of | |
2759 | cryptographic parameters associated with a CHILD_SA. A node | |
2760 | requesting a CHILD_SA MAY advertise its support for one or more | |
2761 | compression algorithms through one or more Notify payloads of type | |
2762 | IPCOMP_SUPPORTED. The response MAY indicate acceptance of a single | |
2763 | compression algorithm with a Notify payload of type IPCOMP_SUPPORTED. | |
2764 | These payloads MUST NOT occur in messages that do not contain SA | |
2765 | payloads. | |
2766 | ||
2767 | Although there has been discussion of allowing multiple compression | |
2768 | algorithms to be accepted and to have different compression | |
2769 | algorithms available for the two directions of a CHILD_SA, | |
2770 | implementations of this specification MUST NOT accept an IPComp | |
2771 | algorithm that was not proposed, MUST NOT accept more than one, and | |
2772 | MUST NOT compress using an algorithm other than one proposed and | |
2773 | accepted in the setup of the CHILD_SA. | |
2774 | ||
2775 | A side effect of separating the negotiation of IPComp from | |
2776 | cryptographic parameters is that it is not possible to propose | |
2777 | multiple cryptographic suites and propose IP compression with some of | |
2778 | them but not others. | |
2779 | ||
2780 | 2.23. NAT Traversal | |
2781 | ||
2782 | Network Address Translation (NAT) gateways are a controversial | |
2783 | subject. This section briefly describes what they are and how they | |
2784 | are likely to act on IKE traffic. Many people believe that NATs are | |
2785 | evil and that we should not design our protocols so as to make them | |
2786 | work better. IKEv2 does specify some unintuitive processing rules in | |
2787 | order that NATs are more likely to work. | |
2788 | ||
2789 | NATs exist primarily because of the shortage of IPv4 addresses, | |
2790 | though there are other rationales. IP nodes that are "behind" a NAT | |
2791 | have IP addresses that are not globally unique, but rather are | |
2792 | assigned from some space that is unique within the network behind the | |
2793 | NAT but that are likely to be reused by nodes behind other NATs. | |
2794 | Generally, nodes behind NATs can communicate with other nodes behind | |
2795 | the same NAT and with nodes with globally unique addresses, but not | |
2796 | ||
2797 | ||
2798 | ||
2799 | Kaufman, et al. Expires August 27, 2006 [Page 50] | |
2800 | \f | |
2801 | Internet-Draft IKEv2bis February 2006 | |
2802 | ||
2803 | ||
2804 | with nodes behind other NATs. There are exceptions to that rule. | |
2805 | When those nodes make connections to nodes on the real Internet, the | |
2806 | NAT gateway "translates" the IP source address to an address that | |
2807 | will be routed back to the gateway. Messages to the gateway from the | |
2808 | Internet have their destination addresses "translated" to the | |
2809 | internal address that will route the packet to the correct endnode. | |
2810 | ||
2811 | NATs are designed to be "transparent" to endnodes. Neither software | |
2812 | on the node behind the NAT nor the node on the Internet requires | |
2813 | modification to communicate through the NAT. Achieving this | |
2814 | transparency is more difficult with some protocols than with others. | |
2815 | Protocols that include IP addresses of the endpoints within the | |
2816 | payloads of the packet will fail unless the NAT gateway understands | |
2817 | the protocol and modifies the internal references as well as those in | |
2818 | the headers. Such knowledge is inherently unreliable, is a network | |
2819 | layer violation, and often results in subtle problems. | |
2820 | ||
2821 | Opening an IPsec connection through a NAT introduces special | |
2822 | problems. If the connection runs in transport mode, changing the IP | |
2823 | addresses on packets will cause the checksums to fail and the NAT | |
2824 | cannot correct the checksums because they are cryptographically | |
2825 | protected. Even in tunnel mode, there are routing problems because | |
2826 | transparently translating the addresses of AH and ESP packets | |
2827 | requires special logic in the NAT and that logic is heuristic and | |
2828 | unreliable in nature. For that reason, IKEv2 can negotiate UDP | |
2829 | encapsulation of IKE and ESP packets. This encoding is slightly less | |
2830 | efficient but is easier for NATs to process. In addition, firewalls | |
2831 | may be configured to pass IPsec traffic over UDP but not ESP/AH or | |
2832 | vice versa. | |
2833 | ||
2834 | It is a common practice of NATs to translate TCP and UDP port numbers | |
2835 | as well as addresses and use the port numbers of inbound packets to | |
2836 | decide which internal node should get a given packet. For this | |
2837 | reason, even though IKE packets MUST be sent from and to UDP port | |
2838 | 500, they MUST be accepted coming from any port and responses MUST be | |
2839 | sent to the port from whence they came. This is because the ports | |
2840 | may be modified as the packets pass through NATs. Similarly, IP | |
2841 | addresses of the IKE endpoints are generally not included in the IKE | |
2842 | payloads because the payloads are cryptographically protected and | |
2843 | could not be transparently modified by NATs. | |
2844 | ||
2845 | Port 4500 is reserved for UDP-encapsulated ESP and IKE. When working | |
2846 | through a NAT, it is generally better to pass IKE packets over port | |
2847 | 4500 because some older NATs handle IKE traffic on port 500 cleverly | |
2848 | in an attempt to transparently establish IPsec connections between | |
2849 | endpoints that don't handle NAT traversal themselves. Such NATs may | |
2850 | interfere with the straightforward NAT traversal envisioned by this | |
2851 | document. {{ Clarif-7.6 }} An IPsec endpoint that discovers a NAT | |
2852 | ||
2853 | ||
2854 | ||
2855 | Kaufman, et al. Expires August 27, 2006 [Page 51] | |
2856 | \f | |
2857 | Internet-Draft IKEv2bis February 2006 | |
2858 | ||
2859 | ||
2860 | between it and its correspondent MUST send all subsequent traffic | |
2861 | from port 4500, which NATs should not treat specially (as they might | |
2862 | with port 500). | |
2863 | ||
2864 | The specific requirements for supporting NAT traversal [NATREQ] are | |
2865 | listed below. Support for NAT traversal is optional. In this | |
2866 | section only, requirements listed as MUST apply only to | |
2867 | implementations supporting NAT traversal. | |
2868 | ||
2869 | o IKE MUST listen on port 4500 as well as port 500. IKE MUST | |
2870 | respond to the IP address and port from which packets arrived. | |
2871 | ||
2872 | o Both IKE initiator and responder MUST include in their IKE_SA_INIT | |
2873 | packets Notify payloads of type NAT_DETECTION_SOURCE_IP and | |
2874 | NAT_DETECTION_DESTINATION_IP. Those payloads can be used to | |
2875 | detect if there is NAT between the hosts, and which end is behind | |
2876 | the NAT. The location of the payloads in the IKE_SA_INIT packets | |
2877 | are just after the Ni and Nr payloads (before the optional CERTREQ | |
2878 | payload). | |
2879 | ||
2880 | o If none of the NAT_DETECTION_SOURCE_IP payload(s) received matches | |
2881 | the hash of the source IP and port found from the IP header of the | |
2882 | packet containing the payload, it means that the other end is | |
2883 | behind NAT (i.e., someone along the route changed the source | |
2884 | address of the original packet to match the address of the NAT | |
2885 | box). In this case, this end should allow dynamic update of the | |
2886 | other ends IP address, as described later. | |
2887 | ||
2888 | o If the NAT_DETECTION_DESTINATION_IP payload received does not | |
2889 | match the hash of the destination IP and port found from the IP | |
2890 | header of the packet containing the payload, it means that this | |
2891 | end is behind a NAT. In this case, this end SHOULD start sending | |
2892 | keepalive packets as explained in [UDPENCAPS]. | |
2893 | ||
2894 | o The IKE initiator MUST check these payloads if present and if they | |
2895 | do not match the addresses in the outer packet MUST tunnel all | |
2896 | future IKE and ESP packets associated with this IKE_SA over UDP | |
2897 | port 4500. | |
2898 | ||
2899 | o To tunnel IKE packets over UDP port 4500, the IKE header has four | |
2900 | octets of zero prepended and the result immediately follows the | |
2901 | UDP header. To tunnel ESP packets over UDP port 4500, the ESP | |
2902 | header immediately follows the UDP header. Since the first four | |
2903 | bytes of the ESP header contain the SPI, and the SPI cannot | |
2904 | validly be zero, it is always possible to distinguish ESP and IKE | |
2905 | messages. | |
2906 | ||
2907 | ||
2908 | ||
2909 | ||
2910 | ||
2911 | Kaufman, et al. Expires August 27, 2006 [Page 52] | |
2912 | \f | |
2913 | Internet-Draft IKEv2bis February 2006 | |
2914 | ||
2915 | ||
2916 | o The original source and destination IP address required for the | |
2917 | transport mode TCP and UDP packet checksum fixup (see [UDPENCAPS]) | |
2918 | are obtained from the Traffic Selectors associated with the | |
2919 | exchange. In the case of NAT traversal, the Traffic Selectors | |
2920 | MUST contain exactly one IP address, which is then used as the | |
2921 | original IP address. | |
2922 | ||
2923 | o There are cases where a NAT box decides to remove mappings that | |
2924 | are still alive (for example, the keepalive interval is too long, | |
2925 | or the NAT box is rebooted). To recover in these cases, hosts | |
2926 | that are not behind a NAT SHOULD send all packets (including | |
2927 | retransmission packets) to the IP address and port from the last | |
2928 | valid authenticated packet from the other end (i.e., dynamically | |
2929 | update the address). A host behind a NAT SHOULD NOT do this | |
2930 | because it opens a DoS attack possibility. Any authenticated IKE | |
2931 | packet or any authenticated UDP-encapsulated ESP packet can be | |
2932 | used to detect that the IP address or the port has changed. | |
2933 | ||
2934 | Note that similar but probably not identical actions will likely be | |
2935 | needed to make IKE work with Mobile IP, but such processing is not | |
2936 | addressed by this document. | |
2937 | ||
2938 | 2.24. Explicit Congestion Notification (ECN) | |
2939 | ||
2940 | When IPsec tunnels behave as originally specified in [IPSECARCH-OLD], | |
2941 | ECN usage is not appropriate for the outer IP headers because tunnel | |
2942 | decapsulation processing discards ECN congestion indications to the | |
2943 | detriment of the network. ECN support for IPsec tunnels for IKEv1- | |
2944 | based IPsec requires multiple operating modes and negotiation (see | |
2945 | [ECN]). IKEv2 simplifies this situation by requiring that ECN be | |
2946 | usable in the outer IP headers of all tunnel-mode IPsec SAs created | |
2947 | by IKEv2. Specifically, tunnel encapsulators and decapsulators for | |
2948 | all tunnel-mode SAs created by IKEv2 MUST support the ECN full- | |
2949 | functionality option for tunnels specified in [ECN] and MUST | |
2950 | implement the tunnel encapsulation and decapsulation processing | |
2951 | specified in [IPSECARCH] to prevent discarding of ECN congestion | |
2952 | indications. | |
2953 | ||
2954 | ||
2955 | 3. Header and Payload Formats | |
2956 | ||
2957 | 3.1. The IKE Header | |
2958 | ||
2959 | IKE messages use UDP ports 500 and/or 4500, with one IKE message per | |
2960 | UDP datagram. Information from the beginning of the packet through | |
2961 | the UDP header is largely ignored except that the IP addresses and | |
2962 | UDP ports from the headers are reversed and used for return packets. | |
2963 | When sent on UDP port 500, IKE messages begin immediately following | |
2964 | ||
2965 | ||
2966 | ||
2967 | Kaufman, et al. Expires August 27, 2006 [Page 53] | |
2968 | \f | |
2969 | Internet-Draft IKEv2bis February 2006 | |
2970 | ||
2971 | ||
2972 | the UDP header. When sent on UDP port 4500, IKE messages have | |
2973 | prepended four octets of zero. These four octets of zero are not | |
2974 | part of the IKE message and are not included in any of the length | |
2975 | fields or checksums defined by IKE. Each IKE message begins with the | |
2976 | IKE header, denoted HDR in this memo. Following the header are one | |
2977 | or more IKE payloads each identified by a "Next Payload" field in the | |
2978 | preceding payload. Payloads are processed in the order in which they | |
2979 | appear in an IKE message by invoking the appropriate processing | |
2980 | routine according to the "Next Payload" field in the IKE header and | |
2981 | subsequently according to the "Next Payload" field in the IKE payload | |
2982 | itself until a "Next Payload" field of zero indicates that no | |
2983 | payloads follow. If a payload of type "Encrypted" is found, that | |
2984 | payload is decrypted and its contents parsed as additional payloads. | |
2985 | An Encrypted payload MUST be the last payload in a packet and an | |
2986 | Encrypted payload MUST NOT contain another Encrypted payload. | |
2987 | ||
2988 | The Recipient SPI in the header identifies an instance of an IKE | |
2989 | security association. It is therefore possible for a single instance | |
2990 | of IKE to multiplex distinct sessions with multiple peers. | |
2991 | ||
2992 | All multi-octet fields representing integers are laid out in big | |
2993 | endian order (aka most significant byte first, or network byte | |
2994 | order). | |
2995 | ||
2996 | The format of the IKE header is shown in Figure 4. | |
2997 | ||
2998 | 1 2 3 | |
2999 | 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 | |
3000 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3001 | ! IKE_SA Initiator's SPI ! | |
3002 | ! ! | |
3003 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3004 | ! IKE_SA Responder's SPI ! | |
3005 | ! ! | |
3006 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3007 | ! Next Payload ! MjVer ! MnVer ! Exchange Type ! Flags ! | |
3008 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3009 | ! Message ID ! | |
3010 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3011 | ! Length ! | |
3012 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3013 | ||
3014 | Figure 4: IKE Header Format | |
3015 | ||
3016 | o Initiator's SPI (8 octets) - A value chosen by the initiator to | |
3017 | identify a unique IKE security association. This value MUST NOT | |
3018 | be zero. | |
3019 | ||
3020 | ||
3021 | ||
3022 | ||
3023 | Kaufman, et al. Expires August 27, 2006 [Page 54] | |
3024 | \f | |
3025 | Internet-Draft IKEv2bis February 2006 | |
3026 | ||
3027 | ||
3028 | o Responder's SPI (8 octets) - A value chosen by the responder to | |
3029 | identify a unique IKE security association. This value MUST be | |
3030 | zero in the first message of an IKE Initial Exchange (including | |
3031 | repeats of that message including a cookie). {{ The phrase "and | |
3032 | MUST NOT be zero in any other message" was removed; Clarif-2.1 }} | |
3033 | ||
3034 | o Next Payload (1 octet) - Indicates the type of payload that | |
3035 | immediately follows the header. The format and value of each | |
3036 | payload are defined below. | |
3037 | ||
3038 | o Major Version (4 bits) - Indicates the major version of the IKE | |
3039 | protocol in use. Implementations based on this version of IKE | |
3040 | MUST set the Major Version to 2. Implementations based on | |
3041 | previous versions of IKE and ISAKMP MUST set the Major Version to | |
3042 | 1. Implementations based on this version of IKE MUST reject or | |
3043 | ignore messages containing a version number greater than 2. | |
3044 | ||
3045 | o Minor Version (4 bits) - Indicates the minor version of the IKE | |
3046 | protocol in use. Implementations based on this version of IKE | |
3047 | MUST set the Minor Version to 0. They MUST ignore the minor | |
3048 | version number of received messages. | |
3049 | ||
3050 | o Exchange Type (1 octet) - Indicates the type of exchange being | |
3051 | used. This constrains the payloads sent in each message and | |
3052 | orderings of messages in an exchange. | |
3053 | ||
3054 | Exchange Type Value | |
3055 | ---------------------------------- | |
3056 | RESERVED 0-33 | |
3057 | IKE_SA_INIT 34 | |
3058 | IKE_AUTH 35 | |
3059 | CREATE_CHILD_SA 36 | |
3060 | INFORMATIONAL 37 | |
3061 | RESERVED TO IANA 38-239 | |
3062 | Reserved for private use 240-255 | |
3063 | ||
3064 | o Flags (1 octet) - Indicates specific options that are set for the | |
3065 | message. Presence of options are indicated by the appropriate bit | |
3066 | in the flags field being set. The bits are defined LSB first, so | |
3067 | bit 0 would be the least significant bit of the Flags octet. In | |
3068 | the description below, a bit being 'set' means its value is '1', | |
3069 | while 'cleared' means its value is '0'. | |
3070 | ||
3071 | * X(reserved) (bits 0-2) - These bits MUST be cleared when | |
3072 | sending and MUST be ignored on receipt. | |
3073 | ||
3074 | * I(nitiator) (bit 3 of Flags) - This bit MUST be set in messages | |
3075 | sent by the original initiator of the IKE_SA and MUST be | |
3076 | ||
3077 | ||
3078 | ||
3079 | Kaufman, et al. Expires August 27, 2006 [Page 55] | |
3080 | \f | |
3081 | Internet-Draft IKEv2bis February 2006 | |
3082 | ||
3083 | ||
3084 | cleared in messages sent by the original responder. It is used | |
3085 | by the recipient to determine which eight octets of the SPI | |
3086 | were generated by the recipient. | |
3087 | ||
3088 | * V(ersion) (bit 4 of Flags) - This bit indicates that the | |
3089 | transmitter is capable of speaking a higher major version | |
3090 | number of the protocol than the one indicated in the major | |
3091 | version number field. Implementations of IKEv2 must clear this | |
3092 | bit when sending and MUST ignore it in incoming messages. | |
3093 | ||
3094 | * R(esponse) (bit 5 of Flags) - This bit indicates that this | |
3095 | message is a response to a message containing the same message | |
3096 | ID. This bit MUST be cleared in all request messages and MUST | |
3097 | be set in all responses. An IKE endpoint MUST NOT generate a | |
3098 | response to a message that is marked as being a response. | |
3099 | ||
3100 | * X(reserved) (bits 6-7 of Flags) - These bits MUST be cleared | |
3101 | when sending and MUST be ignored on receipt. | |
3102 | ||
3103 | o Message ID (4 octets) - Message identifier used to control | |
3104 | retransmission of lost packets and matching of requests and | |
3105 | responses. It is essential to the security of the protocol | |
3106 | because it is used to prevent message replay attacks. See | |
3107 | Section 2.1 and Section 2.2. | |
3108 | ||
3109 | o Length (4 octets) - Length of total message (header + payloads) in | |
3110 | octets. | |
3111 | ||
3112 | 3.2. Generic Payload Header | |
3113 | ||
3114 | Each IKE payload defined in Section 3.3 through Section 3.16 begins | |
3115 | with a generic payload header, shown in Figure 5. Figures for each | |
3116 | payload below will include the generic payload header, but for | |
3117 | brevity the description of each field will be omitted. | |
3118 | ||
3119 | 1 2 3 | |
3120 | 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 | |
3121 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3122 | ! Next Payload !C! RESERVED ! Payload Length ! | |
3123 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3124 | ||
3125 | Figure 5: Generic Payload Header | |
3126 | ||
3127 | The Generic Payload Header fields are defined as follows: | |
3128 | ||
3129 | o Next Payload (1 octet) - Identifier for the payload type of the | |
3130 | next payload in the message. If the current payload is the last | |
3131 | in the message, then this field will be 0. This field provides a | |
3132 | ||
3133 | ||
3134 | ||
3135 | Kaufman, et al. Expires August 27, 2006 [Page 56] | |
3136 | \f | |
3137 | Internet-Draft IKEv2bis February 2006 | |
3138 | ||
3139 | ||
3140 | "chaining" capability whereby additional payloads can be added to | |
3141 | a message by appending it to the end of the message and setting | |
3142 | the "Next Payload" field of the preceding payload to indicate the | |
3143 | new payload's type. An Encrypted payload, which must always be | |
3144 | the last payload of a message, is an exception. It contains data | |
3145 | structures in the format of additional payloads. In the header of | |
3146 | an Encrypted payload, the Next Payload field is set to the payload | |
3147 | type of the first contained payload (instead of 0). The payload | |
3148 | type values are: | |
3149 | ||
3150 | Next Payload Type Notation Value | |
3151 | -------------------------------------------------- | |
3152 | No Next Payload 0 | |
3153 | RESERVED 1-32 | |
3154 | Security Association SA 33 | |
3155 | Key Exchange KE 34 | |
3156 | Identification - Initiator IDi 35 | |
3157 | Identification - Responder IDr 36 | |
3158 | Certificate CERT 37 | |
3159 | Certificate Request CERTREQ 38 | |
3160 | Authentication AUTH 39 | |
3161 | Nonce Ni, Nr 40 | |
3162 | Notify N 41 | |
3163 | Delete D 42 | |
3164 | Vendor ID V 43 | |
3165 | Traffic Selector - Initiator TSi 44 | |
3166 | Traffic Selector - Responder TSr 45 | |
3167 | Encrypted E 46 | |
3168 | Configuration CP 47 | |
3169 | Extensible Authentication EAP 48 | |
3170 | RESERVED TO IANA 49-127 | |
3171 | PRIVATE USE 128-255 | |
3172 | ||
3173 | (Payload type values 1-32 should not be assigned in the | |
3174 | future so that there is no overlap with the code assignments | |
3175 | for IKEv1.) | |
3176 | ||
3177 | o Critical (1 bit) - MUST be set to zero if the sender wants the | |
3178 | recipient to skip this payload if it does not understand the | |
3179 | payload type code in the Next Payload field of the previous | |
3180 | payload. MUST be set to one if the sender wants the recipient to | |
3181 | reject this entire message if it does not understand the payload | |
3182 | type. MUST be ignored by the recipient if the recipient | |
3183 | understands the payload type code. MUST be set to zero for | |
3184 | payload types defined in this document. Note that the critical | |
3185 | bit applies to the current payload rather than the "next" payload | |
3186 | whose type code appears in the first octet. The reasoning behind | |
3187 | not setting the critical bit for payloads defined in this document | |
3188 | ||
3189 | ||
3190 | ||
3191 | Kaufman, et al. Expires August 27, 2006 [Page 57] | |
3192 | \f | |
3193 | Internet-Draft IKEv2bis February 2006 | |
3194 | ||
3195 | ||
3196 | is that all implementations MUST understand all payload types | |
3197 | defined in this document and therefore must ignore the Critical | |
3198 | bit's value. Skipped payloads are expected to have valid Next | |
3199 | Payload and Payload Length fields. | |
3200 | ||
3201 | o RESERVED (7 bits) - MUST be sent as zero; MUST be ignored on | |
3202 | receipt. | |
3203 | ||
3204 | o Payload Length (2 octets) - Length in octets of the current | |
3205 | payload, including the generic payload header. | |
3206 | ||
3207 | 3.3. Security Association Payload | |
3208 | ||
3209 | The Security Association Payload, denoted SA in this memo, is used to | |
3210 | negotiate attributes of a security association. Assembly of Security | |
3211 | Association Payloads requires great peace of mind. An SA payload MAY | |
3212 | contain multiple proposals. If there is more than one, they MUST be | |
3213 | ordered from most preferred to least preferred. Each proposal may | |
3214 | contain multiple IPsec protocols (where a protocol is IKE, ESP, or | |
3215 | AH), each protocol MAY contain multiple transforms, and each | |
3216 | transform MAY contain multiple attributes. When parsing an SA, an | |
3217 | implementation MUST check that the total Payload Length is consistent | |
3218 | with the payload's internal lengths and counts. Proposals, | |
3219 | Transforms, and Attributes each have their own variable length | |
3220 | encodings. They are nested such that the Payload Length of an SA | |
3221 | includes the combined contents of the SA, Proposal, Transform, and | |
3222 | Attribute information. The length of a Proposal includes the lengths | |
3223 | of all Transforms and Attributes it contains. The length of a | |
3224 | Transform includes the lengths of all Attributes it contains. | |
3225 | ||
3226 | The syntax of Security Associations, Proposals, Transforms, and | |
3227 | Attributes is based on ISAKMP; however the semantics are somewhat | |
3228 | different. The reason for the complexity and the hierarchy is to | |
3229 | allow for multiple possible combinations of algorithms to be encoded | |
3230 | in a single SA. Sometimes there is a choice of multiple algorithms, | |
3231 | whereas other times there is a combination of algorithms. For | |
3232 | example, an initiator might want to propose using (AH w/MD5 and ESP | |
3233 | w/3DES) OR (ESP w/MD5 and 3DES). | |
3234 | ||
3235 | One of the reasons the semantics of the SA payload has changed from | |
3236 | ISAKMP and IKEv1 is to make the encodings more compact in common | |
3237 | cases. | |
3238 | ||
3239 | The Proposal structure contains within it a Proposal # and an IPsec | |
3240 | protocol ID. Each structure MUST have the same Proposal # as the | |
3241 | previous one or be one (1) greater. The first Proposal MUST have a | |
3242 | Proposal # of one (1). If two successive structures have the same | |
3243 | Proposal number, it means that the proposal consists of the first | |
3244 | ||
3245 | ||
3246 | ||
3247 | Kaufman, et al. Expires August 27, 2006 [Page 58] | |
3248 | \f | |
3249 | Internet-Draft IKEv2bis February 2006 | |
3250 | ||
3251 | ||
3252 | structure AND the second. So a proposal of AH AND ESP would have two | |
3253 | proposal structures, one for AH and one for ESP and both would have | |
3254 | Proposal #1. A proposal of AH OR ESP would have two proposal | |
3255 | structures, one for AH with Proposal #1 and one for ESP with Proposal | |
3256 | #2. | |
3257 | ||
3258 | Each Proposal/Protocol structure is followed by one or more transform | |
3259 | structures. The number of different transforms is generally | |
3260 | determined by the Protocol. AH generally has a single transform: an | |
3261 | integrity check algorithm. ESP generally has two: an encryption | |
3262 | algorithm and an integrity check algorithm. IKE generally has four | |
3263 | transforms: a Diffie-Hellman group, an integrity check algorithm, a | |
3264 | prf algorithm, and an encryption algorithm. If an algorithm that | |
3265 | combines encryption and integrity protection is proposed, it MUST be | |
3266 | proposed as an encryption algorithm and an integrity protection | |
3267 | algorithm MUST NOT be proposed. For each Protocol, the set of | |
3268 | permissible transforms is assigned transform ID numbers, which appear | |
3269 | in the header of each transform. | |
3270 | ||
3271 | If there are multiple transforms with the same Transform Type, the | |
3272 | proposal is an OR of those transforms. If there are multiple | |
3273 | Transforms with different Transform Types, the proposal is an AND of | |
3274 | the different groups. For example, to propose ESP with (3DES or | |
3275 | IDEA) and (HMAC_MD5 or HMAC_SHA), the ESP proposal would contain two | |
3276 | Transform Type 1 candidates (one for 3DES and one for IDEA) and two | |
3277 | Transform Type 2 candidates (one for HMAC_MD5 and one for HMAC_SHA). | |
3278 | This effectively proposes four combinations of algorithms. If the | |
3279 | initiator wanted to propose only a subset of those, for example (3DES | |
3280 | and HMAC_MD5) or (IDEA and HMAC_SHA), there is no way to encode that | |
3281 | as multiple transforms within a single Proposal. Instead, the | |
3282 | initiator would have to construct two different Proposals, each with | |
3283 | two transforms. | |
3284 | ||
3285 | A given transform MAY have one or more Attributes. Attributes are | |
3286 | necessary when the transform can be used in more than one way, as | |
3287 | when an encryption algorithm has a variable key size. The transform | |
3288 | would specify the algorithm and the attribute would specify the key | |
3289 | size. Most transforms do not have attributes. A transform MUST NOT | |
3290 | have multiple attributes of the same type. To propose alternate | |
3291 | values for an attribute (for example, multiple key sizes for the AES | |
3292 | encryption algorithm), and implementation MUST include multiple | |
3293 | Transforms with the same Transform Type each with a single Attribute. | |
3294 | ||
3295 | Note that the semantics of Transforms and Attributes are quite | |
3296 | different from those in IKEv1. In IKEv1, a single Transform carried | |
3297 | multiple algorithms for a protocol with one carried in the Transform | |
3298 | and the others carried in the Attributes. | |
3299 | ||
3300 | ||
3301 | ||
3302 | ||
3303 | Kaufman, et al. Expires August 27, 2006 [Page 59] | |
3304 | \f | |
3305 | Internet-Draft IKEv2bis February 2006 | |
3306 | ||
3307 | ||
3308 | 1 2 3 | |
3309 | 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 | |
3310 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3311 | ! Next Payload !C! RESERVED ! Payload Length ! | |
3312 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3313 | ! ! | |
3314 | ~ <Proposals> ~ | |
3315 | ! ! | |
3316 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3317 | ||
3318 | Figure 6: Security Association Payload | |
3319 | ||
3320 | o Proposals (variable) - One or more proposal substructures. | |
3321 | ||
3322 | The payload type for the Security Association Payload is thirty three | |
3323 | (33). | |
3324 | ||
3325 | 3.3.1. Proposal Substructure | |
3326 | ||
3327 | 1 2 3 | |
3328 | 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 | |
3329 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3330 | ! 0 (last) or 2 ! RESERVED ! Proposal Length ! | |
3331 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3332 | ! Proposal # ! Protocol ID ! SPI Size !# of Transforms! | |
3333 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3334 | ~ SPI (variable) ~ | |
3335 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3336 | ! ! | |
3337 | ~ <Transforms> ~ | |
3338 | ! ! | |
3339 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3340 | ||
3341 | Figure 7: Proposal Substructure | |
3342 | ||
3343 | o 0 (last) or 2 (more) (1 octet) - Specifies whether this is the | |
3344 | last Proposal Substructure in the SA. This syntax is inherited | |
3345 | from ISAKMP, but is unnecessary because the last Proposal could be | |
3346 | identified from the length of the SA. The value (2) corresponds | |
3347 | to a Payload Type of Proposal in IKEv1, and the first four octets | |
3348 | of the Proposal structure are designed to look somewhat like the | |
3349 | header of a Payload. | |
3350 | ||
3351 | o RESERVED (1 octet) - MUST be sent as zero; MUST be ignored on | |
3352 | receipt. | |
3353 | ||
3354 | o Proposal Length (2 octets) - Length of this proposal, including | |
3355 | all transforms and attributes that follow. | |
3356 | ||
3357 | ||
3358 | ||
3359 | Kaufman, et al. Expires August 27, 2006 [Page 60] | |
3360 | \f | |
3361 | Internet-Draft IKEv2bis February 2006 | |
3362 | ||
3363 | ||
3364 | o Proposal # (1 octet) - When a proposal is made, the first proposal | |
3365 | in an SA payload MUST be #1, and subsequent proposals MUST either | |
3366 | be the same as the previous proposal (indicating an AND of the two | |
3367 | proposals) or one more than the previous proposal (indicating an | |
3368 | OR of the two proposals). When a proposal is accepted, all of the | |
3369 | proposal numbers in the SA payload MUST be the same and MUST match | |
3370 | the number on the proposal sent that was accepted. | |
3371 | ||
3372 | o Protocol ID (1 octet) - Specifies the IPsec protocol identifier | |
3373 | for the current negotiation. The defined values are: | |
3374 | ||
3375 | Protocol Protocol ID | |
3376 | ----------------------------------- | |
3377 | RESERVED 0 | |
3378 | IKE 1 | |
3379 | AH 2 | |
3380 | ESP 3 | |
3381 | RESERVED TO IANA 4-200 | |
3382 | PRIVATE USE 201-255 | |
3383 | ||
3384 | o SPI Size (1 octet) - For an initial IKE_SA negotiation, this field | |
3385 | MUST be zero; the SPI is obtained from the outer header. During | |
3386 | subsequent negotiations, it is equal to the size, in octets, of | |
3387 | the SPI of the corresponding protocol (8 for IKE, 4 for ESP and | |
3388 | AH). | |
3389 | ||
3390 | o # of Transforms (1 octet) - Specifies the number of transforms in | |
3391 | this proposal. | |
3392 | ||
3393 | o SPI (variable) - The sending entity's SPI. Even if the SPI Size | |
3394 | is not a multiple of 4 octets, there is no padding applied to the | |
3395 | payload. When the SPI Size field is zero, this field is not | |
3396 | present in the Security Association payload. | |
3397 | ||
3398 | o Transforms (variable) - One or more transform substructures. | |
3399 | ||
3400 | ||
3401 | ||
3402 | ||
3403 | ||
3404 | ||
3405 | ||
3406 | ||
3407 | ||
3408 | ||
3409 | ||
3410 | ||
3411 | ||
3412 | ||
3413 | ||
3414 | ||
3415 | Kaufman, et al. Expires August 27, 2006 [Page 61] | |
3416 | \f | |
3417 | Internet-Draft IKEv2bis February 2006 | |
3418 | ||
3419 | ||
3420 | 3.3.2. Transform Substructure | |
3421 | ||
3422 | 1 2 3 | |
3423 | 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 | |
3424 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3425 | ! 0 (last) or 3 ! RESERVED ! Transform Length ! | |
3426 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3427 | !Transform Type ! RESERVED ! Transform ID ! | |
3428 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3429 | ! ! | |
3430 | ~ Transform Attributes ~ | |
3431 | ! ! | |
3432 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3433 | ||
3434 | Figure 8: Transform Substructure | |
3435 | ||
3436 | o 0 (last) or 3 (more) (1 octet) - Specifies whether this is the | |
3437 | last Transform Substructure in the Proposal. This syntax is | |
3438 | inherited from ISAKMP, but is unnecessary because the last | |
3439 | Proposal could be identified from the length of the SA. The value | |
3440 | (3) corresponds to a Payload Type of Transform in IKEv1, and the | |
3441 | first four octets of the Transform structure are designed to look | |
3442 | somewhat like the header of a Payload. | |
3443 | ||
3444 | o RESERVED - MUST be sent as zero; MUST be ignored on receipt. | |
3445 | ||
3446 | o Transform Length - The length (in octets) of the Transform | |
3447 | Substructure including Header and Attributes. | |
3448 | ||
3449 | o Transform Type (1 octet) - The type of transform being specified | |
3450 | in this transform. Different protocols support different | |
3451 | transform types. For some protocols, some of the transforms may | |
3452 | be optional. If a transform is optional and the initiator wishes | |
3453 | to propose that the transform be omitted, no transform of the | |
3454 | given type is included in the proposal. If the initiator wishes | |
3455 | to make use of the transform optional to the responder, it | |
3456 | includes a transform substructure with transform ID = 0 as one of | |
3457 | the options. | |
3458 | ||
3459 | o Transform ID (2 octets) - The specific instance of the transform | |
3460 | type being proposed. | |
3461 | ||
3462 | The tranform type values are: | |
3463 | ||
3464 | ||
3465 | ||
3466 | ||
3467 | ||
3468 | ||
3469 | ||
3470 | ||
3471 | Kaufman, et al. Expires August 27, 2006 [Page 62] | |
3472 | \f | |
3473 | Internet-Draft IKEv2bis February 2006 | |
3474 | ||
3475 | ||
3476 | Description Trans. Used In | |
3477 | Type | |
3478 | ------------------------------------------------------------------ | |
3479 | RESERVED 0 | |
3480 | Encryption Algorithm (ENCR) 1 IKE and ESP | |
3481 | Pseudo-random Function (PRF) 2 IKE | |
3482 | Integrity Algorithm (INTEG) 3 IKE, AH, optional in ESP | |
3483 | Diffie-Hellman Group (D-H) 4 IKE, optional in AH & ESP | |
3484 | Extended Sequence Numbers (ESN) 5 AH and ESP | |
3485 | RESERVED TO IANA 6-240 | |
3486 | PRIVATE USE 241-255 | |
3487 | ||
3488 | For Transform Type 1 (Encryption Algorithm), defined Transform IDs | |
3489 | are: | |
3490 | ||
3491 | Name Number Defined In | |
3492 | --------------------------------------------------- | |
3493 | RESERVED 0 | |
3494 | ENCR_DES_IV64 1 (RFC1827) | |
3495 | ENCR_DES 2 (RFC2405), [DES] | |
3496 | ENCR_3DES 3 (RFC2451) | |
3497 | ENCR_RC5 4 (RFC2451) | |
3498 | ENCR_IDEA 5 (RFC2451), [IDEA] | |
3499 | ENCR_CAST 6 (RFC2451) | |
3500 | ENCR_BLOWFISH 7 (RFC2451) | |
3501 | ENCR_3IDEA 8 (RFC2451) | |
3502 | ENCR_DES_IV32 9 | |
3503 | RESERVED 10 | |
3504 | ENCR_NULL 11 (RFC2410) | |
3505 | ENCR_AES_CBC 12 (RFC3602) | |
3506 | ENCR_AES_CTR 13 (RFC3664) | |
3507 | RESERVED TO IANA 14-1023 | |
3508 | PRIVATE USE 1024-65535 | |
3509 | ||
3510 | For Transform Type 2 (Pseudo-random Function), defined Transform IDs | |
3511 | are: | |
3512 | ||
3513 | Name Number Defined In | |
3514 | ------------------------------------------------------ | |
3515 | RESERVED 0 | |
3516 | PRF_HMAC_MD5 1 (RFC2104), [MD5] | |
3517 | PRF_HMAC_SHA1 2 (RFC2104), [SHA] | |
3518 | PRF_HMAC_TIGER 3 (RFC2104) | |
3519 | PRF_AES128_XCBC 4 (RFC3664) | |
3520 | RESERVED TO IANA 5-1023 | |
3521 | PRIVATE USE 1024-65535 | |
3522 | ||
3523 | For Transform Type 3 (Integrity Algorithm), defined Transform IDs | |
3524 | ||
3525 | ||
3526 | ||
3527 | Kaufman, et al. Expires August 27, 2006 [Page 63] | |
3528 | \f | |
3529 | Internet-Draft IKEv2bis February 2006 | |
3530 | ||
3531 | ||
3532 | are: | |
3533 | ||
3534 | Name Number Defined In | |
3535 | ---------------------------------------- | |
3536 | NONE 0 | |
3537 | AUTH_HMAC_MD5_96 1 (RFC2403) | |
3538 | AUTH_HMAC_SHA1_96 2 (RFC2404) | |
3539 | AUTH_DES_MAC 3 | |
3540 | AUTH_KPDK_MD5 4 (RFC1826) | |
3541 | AUTH_AES_XCBC_96 5 (RFC3566) | |
3542 | RESERVED TO IANA 6-1023 | |
3543 | PRIVATE USE 1024-65535 | |
3544 | ||
3545 | For Transform Type 4 (Diffie-Hellman Group), defined Transform IDs | |
3546 | are: | |
3547 | ||
3548 | Name Number | |
3549 | -------------------------------------- | |
3550 | NONE 0 | |
3551 | Defined in Appendix B 1 - 2 | |
3552 | RESERVED 3 - 4 | |
3553 | Defined in [ADDGROUP] 5 | |
3554 | RESERVED TO IANA 6 - 13 | |
3555 | Defined in [ADDGROUP] 14 - 18 | |
3556 | RESERVED TO IANA 19 - 1023 | |
3557 | PRIVATE USE 1024-65535 | |
3558 | ||
3559 | For Transform Type 5 (Extended Sequence Numbers), defined Transform | |
3560 | IDs are: | |
3561 | ||
3562 | Name Number | |
3563 | -------------------------------------------- | |
3564 | No Extended Sequence Numbers 0 | |
3565 | Extended Sequence Numbers 1 | |
3566 | RESERVED 2 - 65535 | |
3567 | ||
3568 | 3.3.3. Valid Transform Types by Protocol | |
3569 | ||
3570 | The number and type of transforms that accompany an SA payload are | |
3571 | dependent on the protocol in the SA itself. An SA payload proposing | |
3572 | the establishment of an SA has the following mandatory and optional | |
3573 | transform types. A compliant implementation MUST understand all | |
3574 | mandatory and optional types for each protocol it supports (though it | |
3575 | need not accept proposals with unacceptable suites). A proposal MAY | |
3576 | omit the optional types if the only value for them it will accept is | |
3577 | NONE. | |
3578 | ||
3579 | ||
3580 | ||
3581 | ||
3582 | ||
3583 | Kaufman, et al. Expires August 27, 2006 [Page 64] | |
3584 | \f | |
3585 | Internet-Draft IKEv2bis February 2006 | |
3586 | ||
3587 | ||
3588 | Protocol Mandatory Types Optional Types | |
3589 | --------------------------------------------------- | |
3590 | IKE ENCR, PRF, INTEG, D-H | |
3591 | ESP ENCR, ESN INTEG, D-H | |
3592 | AH INTEG, ESN D-H | |
3593 | ||
3594 | 3.3.4. Mandatory Transform IDs | |
3595 | ||
3596 | The specification of suites that MUST and SHOULD be supported for | |
3597 | interoperability has been removed from this document because they are | |
3598 | likely to change more rapidly than this document evolves. | |
3599 | ||
3600 | An important lesson learned from IKEv1 is that no system should only | |
3601 | implement the mandatory algorithms and expect them to be the best | |
3602 | choice for all customers. For example, at the time that this | |
3603 | document was written, many IKEv1 implementers were starting to | |
3604 | migrate to AES in Cipher Block Chaining (CBC) mode for Virtual | |
3605 | Private Network (VPN) applications. Many IPsec systems based on | |
3606 | IKEv2 will implement AES, additional Diffie-Hellman groups, and | |
3607 | additional hash algorithms, and some IPsec customers already require | |
3608 | these algorithms in addition to the ones listed above. | |
3609 | ||
3610 | It is likely that IANA will add additional transforms in the future, | |
3611 | and some users may want to use private suites, especially for IKE | |
3612 | where implementations should be capable of supporting different | |
3613 | parameters, up to certain size limits. In support of this goal, all | |
3614 | implementations of IKEv2 SHOULD include a management facility that | |
3615 | allows specification (by a user or system administrator) of Diffie- | |
3616 | Hellman (DH) parameters (the generator, modulus, and exponent lengths | |
3617 | and values) for new DH groups. Implementations SHOULD provide a | |
3618 | management interface through which these parameters and the | |
3619 | associated transform IDs may be entered (by a user or system | |
3620 | administrator), to enable negotiating such groups. | |
3621 | ||
3622 | All implementations of IKEv2 MUST include a management facility that | |
3623 | enables a user or system administrator to specify the suites that are | |
3624 | acceptable for use with IKE. Upon receipt of a payload with a set of | |
3625 | transform IDs, the implementation MUST compare the transmitted | |
3626 | transform IDs against those locally configured via the management | |
3627 | controls, to verify that the proposed suite is acceptable based on | |
3628 | local policy. The implementation MUST reject SA proposals that are | |
3629 | not authorized by these IKE suite controls. Note that cryptographic | |
3630 | suites that MUST be implemented need not be configured as acceptable | |
3631 | to local policy. | |
3632 | ||
3633 | ||
3634 | ||
3635 | ||
3636 | ||
3637 | ||
3638 | ||
3639 | Kaufman, et al. Expires August 27, 2006 [Page 65] | |
3640 | \f | |
3641 | Internet-Draft IKEv2bis February 2006 | |
3642 | ||
3643 | ||
3644 | 3.3.5. Transform Attributes | |
3645 | ||
3646 | Each transform in a Security Association payload may include | |
3647 | attributes that modify or complete the specification of the | |
3648 | transform. These attributes are type/value pairs and are defined | |
3649 | below. For example, if an encryption algorithm has a variable-length | |
3650 | key, the key length to be used may be specified as an attribute. | |
3651 | Attributes can have a value with a fixed two octet length or a | |
3652 | variable-length value. For the latter, the attribute is encoded as | |
3653 | type/length/value. | |
3654 | ||
3655 | 1 2 3 | |
3656 | 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 | |
3657 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3658 | !A! Attribute Type ! AF=0 Attribute Length ! | |
3659 | !F! ! AF=1 Attribute Value ! | |
3660 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3661 | ! AF=0 Attribute Value ! | |
3662 | ! AF=1 Not Transmitted ! | |
3663 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3664 | ||
3665 | Figure 9: Data Attributes | |
3666 | ||
3667 | o Attribute Type (2 octets) - Unique identifier for each type of | |
3668 | attribute (see below). The most significant bit of this field is | |
3669 | the Attribute Format bit (AF). It indicates whether the data | |
3670 | attributes follow the Type/Length/Value (TLV) format or a | |
3671 | shortened Type/Value (TV) format. If the AF bit is zero (0), then | |
3672 | the Data Attributes are of the Type/Length/Value (TLV) form. If | |
3673 | the AF bit is a one (1), then the Data Attributes are of the Type/ | |
3674 | Value form. | |
3675 | ||
3676 | o Attribute Length (2 octets) - Length in octets of the Attribute | |
3677 | Value. When the AF bit is a one (1), the Attribute Value is only | |
3678 | 2 octets and the Attribute Length field is not present. | |
3679 | ||
3680 | o Attribute Value (variable length) - Value of the Attribute | |
3681 | associated with the Attribute Type. If the AF bit is a zero (0), | |
3682 | this field has a variable length defined by the Attribute Length | |
3683 | field. If the AF bit is a one (1), the Attribute Value has a | |
3684 | length of 2 octets. | |
3685 | ||
3686 | o Key Length - When using an Encryption Algorithm that has a | |
3687 | variable-length key, this attribute specifies the key length in | |
3688 | bits (MUST use network byte order). This attribute MUST NOT be | |
3689 | used when the specified Encryption Algorithm uses a fixed-length | |
3690 | key. | |
3691 | ||
3692 | ||
3693 | ||
3694 | ||
3695 | Kaufman, et al. Expires August 27, 2006 [Page 66] | |
3696 | \f | |
3697 | Internet-Draft IKEv2bis February 2006 | |
3698 | ||
3699 | ||
3700 | Note that only a single attribute type (Key Length) is defined, and | |
3701 | it is fixed length. The variable-length encoding specification is | |
3702 | included only for future extensions. {{ Clarif-7.11 removed the | |
3703 | sentence that listed, incorrectly, the algorithms defined in the | |
3704 | document that accept attributes. }} | |
3705 | ||
3706 | Attributes described as basic MUST NOT be encoded using the variable- | |
3707 | length encoding. Variable-length attributes MUST NOT be encoded as | |
3708 | basic even if their value can fit into two octets. NOTE: This is a | |
3709 | change from IKEv1, where increased flexibility may have simplified | |
3710 | the composer of messages but certainly complicated the parser. | |
3711 | ||
3712 | Attribute Type Value Attribute Format | |
3713 | ------------------------------------------------------------ | |
3714 | RESERVED 0-13 | |
3715 | Key Length (in bits) 14 TV | |
3716 | RESERVED 15-17 | |
3717 | RESERVED TO IANA 18-16383 | |
3718 | PRIVATE USE 16384-32767 | |
3719 | Values 0-13 and 15-17 were used in a similar context in | |
3720 | IKEv1, and should not be assigned except to matching values. | |
3721 | ||
3722 | 3.3.6. Attribute Negotiation | |
3723 | ||
3724 | During security association negotiation initiators present offers to | |
3725 | responders. Responders MUST select a single complete set of | |
3726 | parameters from the offers (or reject all offers if none are | |
3727 | acceptable). If there are multiple proposals, the responder MUST | |
3728 | choose a single proposal number and return all of the Proposal | |
3729 | substructures with that Proposal number. If there are multiple | |
3730 | Transforms with the same type, the responder MUST choose a single | |
3731 | one. Any attributes of a selected transform MUST be returned | |
3732 | unmodified. The initiator of an exchange MUST check that the | |
3733 | accepted offer is consistent with one of its proposals, and if not | |
3734 | that response MUST be rejected. | |
3735 | ||
3736 | Negotiating Diffie-Hellman groups presents some special challenges. | |
3737 | SA offers include proposed attributes and a Diffie-Hellman public | |
3738 | number (KE) in the same message. If in the initial exchange the | |
3739 | initiator offers to use one of several Diffie-Hellman groups, it | |
3740 | SHOULD pick the one the responder is most likely to accept and | |
3741 | include a KE corresponding to that group. If the guess turns out to | |
3742 | be wrong, the responder will indicate the correct group in the | |
3743 | response and the initiator SHOULD pick an element of that group for | |
3744 | its KE value when retrying the first message. It SHOULD, however, | |
3745 | continue to propose its full supported set of groups in order to | |
3746 | prevent a man-in-the-middle downgrade attack. | |
3747 | ||
3748 | ||
3749 | ||
3750 | ||
3751 | Kaufman, et al. Expires August 27, 2006 [Page 67] | |
3752 | \f | |
3753 | Internet-Draft IKEv2bis February 2006 | |
3754 | ||
3755 | ||
3756 | Implementation Note: | |
3757 | ||
3758 | Certain negotiable attributes can have ranges or could have multiple | |
3759 | acceptable values. These include the key length of a variable key | |
3760 | length symmetric cipher. To further interoperability and to support | |
3761 | upgrading endpoints independently, implementers of this protocol | |
3762 | SHOULD accept values that they deem to supply greater security. For | |
3763 | instance, if a peer is configured to accept a variable-length cipher | |
3764 | with a key length of X bits and is offered that cipher with a larger | |
3765 | key length, the implementation SHOULD accept the offer if it supports | |
3766 | use of the longer key. | |
3767 | ||
3768 | Support of this capability allows an implementation to express a | |
3769 | concept of "at least" a certain level of security-- "a key length of | |
3770 | _at least_ X bits for cipher Y". | |
3771 | ||
3772 | 3.4. Key Exchange Payload | |
3773 | ||
3774 | The Key Exchange Payload, denoted KE in this memo, is used to | |
3775 | exchange Diffie-Hellman public numbers as part of a Diffie-Hellman | |
3776 | key exchange. The Key Exchange Payload consists of the IKE generic | |
3777 | payload header followed by the Diffie-Hellman public value itself. | |
3778 | ||
3779 | 1 2 3 | |
3780 | 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 | |
3781 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3782 | ! Next Payload !C! RESERVED ! Payload Length ! | |
3783 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3784 | ! DH Group # ! RESERVED ! | |
3785 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3786 | ! ! | |
3787 | ~ Key Exchange Data ~ | |
3788 | ! ! | |
3789 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3790 | ||
3791 | Figure 10: Key Exchange Payload Format | |
3792 | ||
3793 | A key exchange payload is constructed by copying one's Diffie-Hellman | |
3794 | public value into the "Key Exchange Data" portion of the payload. | |
3795 | The length of the Diffie-Hellman public value MUST be equal to the | |
3796 | length of the prime modulus over which the exponentiation was | |
3797 | performed, prepending zero bits to the value if necessary. | |
3798 | ||
3799 | The DH Group # identifies the Diffie-Hellman group in which the Key | |
3800 | Exchange Data was computed (see Section 3.3.2). If the selected | |
3801 | proposal uses a different Diffie-Hellman group, the message MUST be | |
3802 | rejected with a Notify payload of type INVALID_KE_PAYLOAD. | |
3803 | ||
3804 | ||
3805 | ||
3806 | ||
3807 | Kaufman, et al. Expires August 27, 2006 [Page 68] | |
3808 | \f | |
3809 | Internet-Draft IKEv2bis February 2006 | |
3810 | ||
3811 | ||
3812 | The payload type for the Key Exchange payload is thirty four (34). | |
3813 | ||
3814 | 3.5. Identification Payloads | |
3815 | ||
3816 | The Identification Payloads, denoted IDi and IDr in this memo, allow | |
3817 | peers to assert an identity to one another. This identity may be | |
3818 | used for policy lookup, but does not necessarily have to match | |
3819 | anything in the CERT payload; both fields may be used by an | |
3820 | implementation to perform access control decisions. {{ Clarif-7.1 }} | |
3821 | When using the ID_IPV4_ADDR/ID_IPV6_ADDR identity types in IDi/IDr | |
3822 | payloads, IKEv2 does not require this address to match the address in | |
3823 | the IP header of IKEv2 packets, or anything in the TSi/TSr payloads. | |
3824 | The contents of IDi/IDr is used purely to fetch the policy and | |
3825 | authentication data related to the other party. | |
3826 | ||
3827 | NOTE: In IKEv1, two ID payloads were used in each direction to hold | |
3828 | Traffic Selector (TS) information for data passing over the SA. In | |
3829 | IKEv2, this information is carried in TS payloads (see Section 3.13). | |
3830 | ||
3831 | The Identification Payload consists of the IKE generic payload header | |
3832 | followed by identification fields as follows: | |
3833 | ||
3834 | 1 2 3 | |
3835 | 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 | |
3836 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3837 | ! Next Payload !C! RESERVED ! Payload Length ! | |
3838 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3839 | ! ID Type ! RESERVED | | |
3840 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3841 | ! ! | |
3842 | ~ Identification Data ~ | |
3843 | ! ! | |
3844 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3845 | ||
3846 | Figure 11: Identification Payload Format | |
3847 | ||
3848 | o ID Type (1 octet) - Specifies the type of Identification being | |
3849 | used. | |
3850 | ||
3851 | o RESERVED - MUST be sent as zero; MUST be ignored on receipt. | |
3852 | ||
3853 | o Identification Data (variable length) - Value, as indicated by the | |
3854 | Identification Type. The length of the Identification Data is | |
3855 | computed from the size in the ID payload header. | |
3856 | ||
3857 | The payload types for the Identification Payload are thirty five (35) | |
3858 | for IDi and thirty six (36) for IDr. | |
3859 | ||
3860 | ||
3861 | ||
3862 | ||
3863 | Kaufman, et al. Expires August 27, 2006 [Page 69] | |
3864 | \f | |
3865 | Internet-Draft IKEv2bis February 2006 | |
3866 | ||
3867 | ||
3868 | The following table lists the assigned values for the Identification | |
3869 | Type field: | |
3870 | ||
3871 | ID Type Value | |
3872 | ------------------------------------------------------------------- | |
3873 | RESERVED 0 | |
3874 | ||
3875 | ID_IPV4_ADDR 1 | |
3876 | A single four (4) octet IPv4 address. | |
3877 | ||
3878 | ID_FQDN 2 | |
3879 | A fully-qualified domain name string. An example of a ID_FQDN | |
3880 | is, "example.com". The string MUST not contain any terminators | |
3881 | (e.g., NULL, CR, etc.). | |
3882 | ||
3883 | ID_RFC822_ADDR 3 | |
3884 | A fully-qualified RFC822 email address string, An example of a | |
3885 | ID_RFC822_ADDR is, "jsmith@example.com". The string MUST not | |
3886 | contain any terminators. | |
3887 | ||
3888 | RESERVED TO IANA 4 | |
3889 | ||
3890 | ID_IPV6_ADDR 5 | |
3891 | A single sixteen (16) octet IPv6 address. | |
3892 | ||
3893 | RESERVED TO IANA 6 - 8 | |
3894 | ||
3895 | ID_DER_ASN1_DN 9 | |
3896 | The binary Distinguished Encoding Rules (DER) encoding of an | |
3897 | ASN.1 X.500 Distinguished Name [X.501]. | |
3898 | ||
3899 | ID_DER_ASN1_GN 10 | |
3900 | The binary DER encoding of an ASN.1 X.500 GeneralName [X.509]. | |
3901 | ||
3902 | ID_KEY_ID 11 | |
3903 | An opaque octet stream which may be used to pass vendor- | |
3904 | specific information necessary to do certain proprietary | |
3905 | types of identification. | |
3906 | ||
3907 | RESERVED TO IANA 12-200 | |
3908 | ||
3909 | PRIVATE USE 201-255 | |
3910 | ||
3911 | Two implementations will interoperate only if each can generate a | |
3912 | type of ID acceptable to the other. To assure maximum | |
3913 | interoperability, implementations MUST be configurable to send at | |
3914 | least one of ID_IPV4_ADDR, ID_FQDN, ID_RFC822_ADDR, or ID_KEY_ID, and | |
3915 | MUST be configurable to accept all of these types. Implementations | |
3916 | ||
3917 | ||
3918 | ||
3919 | Kaufman, et al. Expires August 27, 2006 [Page 70] | |
3920 | \f | |
3921 | Internet-Draft IKEv2bis February 2006 | |
3922 | ||
3923 | ||
3924 | SHOULD be capable of generating and accepting all of these types. | |
3925 | IPv6-capable implementations MUST additionally be configurable to | |
3926 | accept ID_IPV6_ADDR. IPv6-only implementations MAY be configurable | |
3927 | to send only ID_IPV6_ADDR. | |
3928 | ||
3929 | {{ Clarif-3.4 }} EAP [EAP] does not mandate the use of any particular | |
3930 | type of identifier, but often EAP is used with Network Access | |
3931 | Identifiers (NAIs) defined in [NAI]. Although NAIs look a bit like | |
3932 | email addresses (e.g., "joe@example.com"), the syntax is not exactly | |
3933 | the same as the syntax of email address in [MAILFORMAT]. For those | |
3934 | NAIs that include the realm component, the ID_RFC822_ADDR | |
3935 | identification type SHOULD be used. Responder implementations should | |
3936 | not attempt to verify that the contents actually conform to the exact | |
3937 | syntax given in [MAILFORMAT], but instead should accept any | |
3938 | reasonable-looking NAI. For NAIs that do not include the realm | |
3939 | component,the ID_KEY_ID identification type SHOULD be used. | |
3940 | ||
3941 | 3.6. Certificate Payload | |
3942 | ||
3943 | The Certificate Payload, denoted CERT in this memo, provides a means | |
3944 | to transport certificates or other authentication-related information | |
3945 | via IKE. Certificate payloads SHOULD be included in an exchange if | |
3946 | certificates are available to the sender unless the peer has | |
3947 | indicated an ability to retrieve this information from elsewhere | |
3948 | using an HTTP_CERT_LOOKUP_SUPPORTED Notify payload. Note that the | |
3949 | term "Certificate Payload" is somewhat misleading, because not all | |
3950 | authentication mechanisms use certificates and data other than | |
3951 | certificates may be passed in this payload. | |
3952 | ||
3953 | The Certificate Payload is defined as follows: | |
3954 | ||
3955 | 1 2 3 | |
3956 | 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 | |
3957 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3958 | ! Next Payload !C! RESERVED ! Payload Length ! | |
3959 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3960 | ! Cert Encoding ! ! | |
3961 | +-+-+-+-+-+-+-+-+ ! | |
3962 | ~ Certificate Data ~ | |
3963 | ! ! | |
3964 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
3965 | ||
3966 | Figure 12: Certificate Payload Format | |
3967 | ||
3968 | o Certificate Encoding (1 octet) - This field indicates the type of | |
3969 | certificate or certificate-related information contained in the | |
3970 | Certificate Data field. | |
3971 | ||
3972 | ||
3973 | ||
3974 | ||
3975 | Kaufman, et al. Expires August 27, 2006 [Page 71] | |
3976 | \f | |
3977 | Internet-Draft IKEv2bis February 2006 | |
3978 | ||
3979 | ||
3980 | Certificate Encoding Value | |
3981 | ------------------------------------------------- | |
3982 | RESERVED 0 | |
3983 | PKCS #7 wrapped X.509 certificate 1 | |
3984 | PGP Certificate 2 | |
3985 | DNS Signed Key 3 | |
3986 | X.509 Certificate - Signature 4 | |
3987 | Kerberos Token 6 | |
3988 | Certificate Revocation List (CRL) 7 | |
3989 | Authority Revocation List (ARL) 8 | |
3990 | SPKI Certificate 9 | |
3991 | X.509 Certificate - Attribute 10 | |
3992 | Raw RSA Key 11 | |
3993 | Hash and URL of X.509 certificate 12 | |
3994 | Hash and URL of X.509 bundle 13 | |
3995 | RESERVED to IANA 14 - 200 | |
3996 | PRIVATE USE 201 - 255 | |
3997 | ||
3998 | o Certificate Data (variable length) - Actual encoding of | |
3999 | certificate data. The type of certificate is indicated by the | |
4000 | Certificate Encoding field. | |
4001 | ||
4002 | The payload type for the Certificate Payload is thirty seven (37). | |
4003 | ||
4004 | Specific syntax is for some of the certificate type codes above is | |
4005 | not defined in this document. The types whose syntax is defined in | |
4006 | this document are: | |
4007 | ||
4008 | o X.509 Certificate - Signature (4) contains a DER encoded X.509 | |
4009 | certificate whose public key is used to validate the sender's AUTH | |
4010 | payload. | |
4011 | ||
4012 | o Certificate Revocation List (7) contains a DER encoded X.509 | |
4013 | certificate revocation list. | |
4014 | ||
4015 | o {{ Added "DER-encoded RSAPublicKey structure" from Clarif-3.6 }} | |
4016 | Raw RSA Key (11) contains a PKCS #1 encoded RSA key, that is, a | |
4017 | DER-encoded RSAPublicKey structure (see [RSA] and [PKCS1]). | |
4018 | ||
4019 | o Hash and URL encodings (12-13) allow IKE messages to remain short | |
4020 | by replacing long data structures with a 20 octet SHA-1 hash (see | |
4021 | [SHA]) of the replaced value followed by a variable-length URL | |
4022 | that resolves to the DER encoded data structure itself. This | |
4023 | improves efficiency when the endpoints have certificate data | |
4024 | cached and makes IKE less subject to denial of service attacks | |
4025 | that become easier to mount when IKE messages are large enough to | |
4026 | require IP fragmentation [DOSUDPPROT]. | |
4027 | ||
4028 | ||
4029 | ||
4030 | ||
4031 | Kaufman, et al. Expires August 27, 2006 [Page 72] | |
4032 | \f | |
4033 | Internet-Draft IKEv2bis February 2006 | |
4034 | ||
4035 | ||
4036 | Use the following ASN.1 definition for an X.509 bundle: | |
4037 | ||
4038 | CertBundle | |
4039 | { iso(1) identified-organization(3) dod(6) internet(1) | |
4040 | security(5) mechanisms(5) pkix(7) id-mod(0) | |
4041 | id-mod-cert-bundle(34) } | |
4042 | ||
4043 | DEFINITIONS EXPLICIT TAGS ::= | |
4044 | BEGIN | |
4045 | ||
4046 | IMPORTS | |
4047 | Certificate, CertificateList | |
4048 | FROM PKIX1Explicit88 | |
4049 | { iso(1) identified-organization(3) dod(6) | |
4050 | internet(1) security(5) mechanisms(5) pkix(7) | |
4051 | id-mod(0) id-pkix1-explicit(18) } ; | |
4052 | ||
4053 | CertificateOrCRL ::= CHOICE { | |
4054 | cert [0] Certificate, | |
4055 | crl [1] CertificateList } | |
4056 | ||
4057 | CertificateBundle ::= SEQUENCE OF CertificateOrCRL | |
4058 | ||
4059 | END | |
4060 | ||
4061 | Implementations MUST be capable of being configured to send and | |
4062 | accept up to four X.509 certificates in support of authentication, | |
4063 | and also MUST be capable of being configured to send and accept the | |
4064 | first two Hash and URL formats (with HTTP URLs). Implementations | |
4065 | SHOULD be capable of being configured to send and accept Raw RSA | |
4066 | keys. If multiple certificates are sent, the first certificate MUST | |
4067 | contain the public key used to sign the AUTH payload. The other | |
4068 | certificates may be sent in any order. | |
4069 | ||
4070 | {{ Clarif-3.6 }} Because the contents and use of some of the | |
4071 | certificate types are not defined, they SHOULD NOT be used. In | |
4072 | specific, implementations SHOULD NOT use the following types unless | |
4073 | they are later defined in a standards-track document: | |
4074 | ||
4075 | PKCS #7 wrapped X.509 certificate 1 | |
4076 | PGP Certificate 2 | |
4077 | DNS Signed Key 3 | |
4078 | Kerberos Token 6 | |
4079 | SPKI Certificate 9 | |
4080 | ||
4081 | ||
4082 | ||
4083 | ||
4084 | ||
4085 | ||
4086 | ||
4087 | Kaufman, et al. Expires August 27, 2006 [Page 73] | |
4088 | \f | |
4089 | Internet-Draft IKEv2bis February 2006 | |
4090 | ||
4091 | ||
4092 | 3.7. Certificate Request Payload | |
4093 | ||
4094 | The Certificate Request Payload, denoted CERTREQ in this memo, | |
4095 | provides a means to request preferred certificates via IKE and can | |
4096 | appear in the IKE_INIT_SA response and/or the IKE_AUTH request. | |
4097 | Certificate Request payloads MAY be included in an exchange when the | |
4098 | sender needs to get the certificate of the receiver. If multiple CAs | |
4099 | are trusted and the cert encoding does not allow a list, then | |
4100 | multiple Certificate Request payloads SHOULD be transmitted. | |
4101 | ||
4102 | The Certificate Request Payload is defined as follows: | |
4103 | ||
4104 | 1 2 3 | |
4105 | 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 | |
4106 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4107 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4108 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4109 | ! Cert Encoding ! ! | |
4110 | +-+-+-+-+-+-+-+-+ ! | |
4111 | ~ Certification Authority ~ | |
4112 | ! ! | |
4113 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4114 | ||
4115 | Figure 13: Certificate Request Payload Format | |
4116 | ||
4117 | o Certificate Encoding (1 octet) - Contains an encoding of the type | |
4118 | or format of certificate requested. Values are listed in | |
4119 | Section 3.6. | |
4120 | ||
4121 | o Certification Authority (variable length) - Contains an encoding | |
4122 | of an acceptable certification authority for the type of | |
4123 | certificate requested. | |
4124 | ||
4125 | The payload type for the Certificate Request Payload is thirty eight | |
4126 | (38). | |
4127 | ||
4128 | The Certificate Encoding field has the same values as those defined | |
4129 | in Section 3.6. The Certification Authority field contains an | |
4130 | indicator of trusted authorities for this certificate type. The | |
4131 | Certification Authority value is a concatenated list of SHA-1 hashes | |
4132 | of the public keys of trusted Certification Authorities (CAs). Each | |
4133 | is encoded as the SHA-1 hash of the Subject Public Key Info element | |
4134 | (see section 4.1.2.7 of [PKIX]) from each Trust Anchor certificate. | |
4135 | The twenty-octet hashes are concatenated and included with no other | |
4136 | formatting. | |
4137 | ||
4138 | {{ Clarif-3.6 }} The contents of the "Certification Authority" field | |
4139 | are defined only for X.509 certificates, which are types 4, 10, 12, | |
4140 | ||
4141 | ||
4142 | ||
4143 | Kaufman, et al. Expires August 27, 2006 [Page 74] | |
4144 | \f | |
4145 | Internet-Draft IKEv2bis February 2006 | |
4146 | ||
4147 | ||
4148 | and 13. Other values SHOULD NOT be used until standards-track | |
4149 | specifications that specify their use are published. | |
4150 | ||
4151 | Note that the term "Certificate Request" is somewhat misleading, in | |
4152 | that values other than certificates are defined in a "Certificate" | |
4153 | payload and requests for those values can be present in a Certificate | |
4154 | Request Payload. The syntax of the Certificate Request payload in | |
4155 | such cases is not defined in this document. | |
4156 | ||
4157 | The Certificate Request Payload is processed by inspecting the "Cert | |
4158 | Encoding" field to determine whether the processor has any | |
4159 | certificates of this type. If so, the "Certification Authority" | |
4160 | field is inspected to determine if the processor has any certificates | |
4161 | that can be validated up to one of the specified certification | |
4162 | authorities. This can be a chain of certificates. | |
4163 | ||
4164 | If an end-entity certificate exists that satisfies the criteria | |
4165 | specified in the CERTREQ, a certificate or certificate chain SHOULD | |
4166 | be sent back to the certificate requestor if the recipient of the | |
4167 | CERTREQ: | |
4168 | ||
4169 | o is configured to use certificate authentication, | |
4170 | ||
4171 | o is allowed to send a CERT payload, | |
4172 | ||
4173 | o has matching CA trust policy governing the current negotiation, | |
4174 | and | |
4175 | ||
4176 | o has at least one time-wise and usage appropriate end-entity | |
4177 | certificate chaining to a CA provided in the CERTREQ. | |
4178 | ||
4179 | Certificate revocation checking must be considered during the | |
4180 | chaining process used to select a certificate. Note that even if two | |
4181 | peers are configured to use two different CAs, cross-certification | |
4182 | relationships should be supported by appropriate selection logic. | |
4183 | ||
4184 | The intent is not to prevent communication through the strict | |
4185 | adherence of selection of a certificate based on CERTREQ, when an | |
4186 | alternate certificate could be selected by the sender that would | |
4187 | still enable the recipient to successfully validate and trust it | |
4188 | through trust conveyed by cross-certification, CRLs, or other out-of- | |
4189 | band configured means. Thus, the processing of a CERTREQ should be | |
4190 | seen as a suggestion for a certificate to select, not a mandated one. | |
4191 | If no certificates exist, then the CERTREQ is ignored. This is not | |
4192 | an error condition of the protocol. There may be cases where there | |
4193 | is a preferred CA sent in the CERTREQ, but an alternate might be | |
4194 | acceptable (perhaps after prompting a human operator). | |
4195 | ||
4196 | ||
4197 | ||
4198 | ||
4199 | Kaufman, et al. Expires August 27, 2006 [Page 75] | |
4200 | \f | |
4201 | Internet-Draft IKEv2bis February 2006 | |
4202 | ||
4203 | ||
4204 | 3.8. Authentication Payload | |
4205 | ||
4206 | The Authentication Payload, denoted AUTH in this memo, contains data | |
4207 | used for authentication purposes. The syntax of the Authentication | |
4208 | data varies according to the Auth Method as specified below. | |
4209 | ||
4210 | The Authentication Payload is defined as follows: | |
4211 | ||
4212 | 1 2 3 | |
4213 | 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 | |
4214 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4215 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4216 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4217 | ! Auth Method ! RESERVED ! | |
4218 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4219 | ! ! | |
4220 | ~ Authentication Data ~ | |
4221 | ! ! | |
4222 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4223 | ||
4224 | Figure 14: Authentication Payload Format | |
4225 | ||
4226 | o Auth Method (1 octet) - Specifies the method of authentication | |
4227 | used. Values defined are: | |
4228 | ||
4229 | * RSA Digital Signature (1) - Computed as specified in | |
4230 | Section 2.15 using an RSA private key over a PKCS#1 padded hash | |
4231 | (see [RSA] and [PKCS1]). {{ Clarif-3.2 }} To promote | |
4232 | interoperability, implementations that support this type SHOULD | |
4233 | support signatures that use SHA-1 as the hash function and | |
4234 | SHOULD use SHA-1 as the default hash function when generating | |
4235 | signatures. {{ Clarif-3.3 }} A newer version of PKCS#1 (v2.1) | |
4236 | defines two different encoding methods (ways of "padding the | |
4237 | hash") for signatures. However, IKEv2 and this document point | |
4238 | specifically to the PKCS#1 v2.0 which has only one encoding | |
4239 | method for signatures (EMSA-PKCS1- v1_5). | |
4240 | ||
4241 | * Shared Key Message Integrity Code (2) - Computed as specified | |
4242 | in Section 2.15 using the shared key associated with the | |
4243 | identity in the ID payload and the negotiated prf function | |
4244 | ||
4245 | * DSS Digital Signature (3) - Computed as specified in | |
4246 | Section 2.15 using a DSS private key (see [DSS]) over a SHA-1 | |
4247 | hash. | |
4248 | ||
4249 | * The values 0 and 4-200 are reserved to IANA. The values 201- | |
4250 | 255 are available for private use. | |
4251 | ||
4252 | ||
4253 | ||
4254 | ||
4255 | Kaufman, et al. Expires August 27, 2006 [Page 76] | |
4256 | \f | |
4257 | Internet-Draft IKEv2bis February 2006 | |
4258 | ||
4259 | ||
4260 | o Authentication Data (variable length) - see Section 2.15. | |
4261 | ||
4262 | The payload type for the Authentication Payload is thirty nine (39). | |
4263 | ||
4264 | 3.9. Nonce Payload | |
4265 | ||
4266 | The Nonce Payload, denoted Ni and Nr in this memo for the initiator's | |
4267 | and responder's nonce respectively, contains random data used to | |
4268 | guarantee liveness during an exchange and protect against replay | |
4269 | attacks. | |
4270 | ||
4271 | The Nonce Payload is defined as follows: | |
4272 | ||
4273 | 1 2 3 | |
4274 | 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 | |
4275 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4276 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4277 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4278 | ! ! | |
4279 | ~ Nonce Data ~ | |
4280 | ! ! | |
4281 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4282 | ||
4283 | Figure 15: Nonce Payload Format | |
4284 | ||
4285 | o Nonce Data (variable length) - Contains the random data generated | |
4286 | by the transmitting entity. | |
4287 | ||
4288 | The payload type for the Nonce Payload is forty (40). | |
4289 | ||
4290 | The size of a Nonce MUST be between 16 and 256 octets inclusive. | |
4291 | Nonce values MUST NOT be reused. | |
4292 | ||
4293 | 3.10. Notify Payload | |
4294 | ||
4295 | The Notify Payload, denoted N in this document, is used to transmit | |
4296 | informational data, such as error conditions and state transitions, | |
4297 | to an IKE peer. A Notify Payload may appear in a response message | |
4298 | (usually specifying why a request was rejected), in an INFORMATIONAL | |
4299 | Exchange (to report an error not in an IKE request), or in any other | |
4300 | message to indicate sender capabilities or to modify the meaning of | |
4301 | the request. | |
4302 | ||
4303 | The Notify Payload is defined as follows: | |
4304 | ||
4305 | ||
4306 | ||
4307 | ||
4308 | ||
4309 | ||
4310 | ||
4311 | Kaufman, et al. Expires August 27, 2006 [Page 77] | |
4312 | \f | |
4313 | Internet-Draft IKEv2bis February 2006 | |
4314 | ||
4315 | ||
4316 | 1 2 3 | |
4317 | 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 | |
4318 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4319 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4320 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4321 | ! Protocol ID ! SPI Size ! Notify Message Type ! | |
4322 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4323 | ! ! | |
4324 | ~ Security Parameter Index (SPI) ~ | |
4325 | ! ! | |
4326 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4327 | ! ! | |
4328 | ~ Notification Data ~ | |
4329 | ! ! | |
4330 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4331 | ||
4332 | Figure 16: Notify Payload Format | |
4333 | ||
4334 | o Protocol ID (1 octet) - If this notification concerns an existing | |
4335 | SA, this field indicates the type of that SA. For IKE_SA | |
4336 | notifications, this field MUST be one (1). For notifications | |
4337 | concerning IPsec SAs this field MUST contain either (2) to | |
4338 | indicate AH or (3) to indicate ESP. {{ Clarif-7.8 }} For | |
4339 | notifications that do not relate to an existing SA, this field | |
4340 | MUST be sent as zero and MUST be ignored on receipt; this is | |
4341 | currently only true for the INVALID_SELECTORS and REKEY_SA | |
4342 | notifications. All other values for this field are reserved to | |
4343 | IANA for future assignment. | |
4344 | ||
4345 | o SPI Size (1 octet) - Length in octets of the SPI as defined by the | |
4346 | IPsec protocol ID or zero if no SPI is applicable. For a | |
4347 | notification concerning the IKE_SA, the SPI Size MUST be zero. | |
4348 | ||
4349 | o Notify Message Type (2 octets) - Specifies the type of | |
4350 | notification message. | |
4351 | ||
4352 | o SPI (variable length) - Security Parameter Index. | |
4353 | ||
4354 | o Notification Data (variable length) - Informational or error data | |
4355 | transmitted in addition to the Notify Message Type. Values for | |
4356 | this field are type specific (see below). | |
4357 | ||
4358 | The payload type for the Notify Payload is forty one (41). | |
4359 | ||
4360 | 3.10.1. Notify Message Types | |
4361 | ||
4362 | Notification information can be error messages specifying why an SA | |
4363 | could not be established. It can also be status data that a process | |
4364 | ||
4365 | ||
4366 | ||
4367 | Kaufman, et al. Expires August 27, 2006 [Page 78] | |
4368 | \f | |
4369 | Internet-Draft IKEv2bis February 2006 | |
4370 | ||
4371 | ||
4372 | managing an SA database wishes to communicate with a peer process. | |
4373 | The table below lists the Notification messages and their | |
4374 | corresponding values. The number of different error statuses was | |
4375 | greatly reduced from IKEv1 both for simplification and to avoid | |
4376 | giving configuration information to probers. | |
4377 | ||
4378 | Types in the range 0 - 16383 are intended for reporting errors. An | |
4379 | implementation receiving a Notify payload with one of these types | |
4380 | that it does not recognize in a response MUST assume that the | |
4381 | corresponding request has failed entirely. {{ Demoted the SHOULD }} | |
4382 | Unrecognized error types in a request and status types in a request | |
4383 | or response MUST be ignored, and they should be logged. | |
4384 | ||
4385 | Notify payloads with status types MAY be added to any message and | |
4386 | MUST be ignored if not recognized. They are intended to indicate | |
4387 | capabilities, and as part of SA negotiation are used to negotiate | |
4388 | non-cryptographic parameters. | |
4389 | ||
4390 | NOTIFY messages: error types Value | |
4391 | ------------------------------------------------------------------- | |
4392 | ||
4393 | RESERVED 0 | |
4394 | ||
4395 | UNSUPPORTED_CRITICAL_PAYLOAD 1 | |
4396 | Sent if the payload has the "critical" bit set and the payload | |
4397 | type is not recognized. Notification Data contains the one-octet | |
4398 | payload type. | |
4399 | ||
4400 | INVALID_IKE_SPI 4 | |
4401 | Indicates an IKE message was received with an unrecognized | |
4402 | destination SPI. This usually indicates that the recipient has | |
4403 | rebooted and forgotten the existence of an IKE_SA. | |
4404 | ||
4405 | INVALID_MAJOR_VERSION 5 | |
4406 | Indicates the recipient cannot handle the version of IKE | |
4407 | specified in the header. The closest version number that the | |
4408 | recipient can support will be in the reply header. | |
4409 | ||
4410 | INVALID_SYNTAX 7 | |
4411 | Indicates the IKE message that was received was invalid because | |
4412 | some type, length, or value was out of range or because the | |
4413 | request was rejected for policy reasons. To avoid a denial of | |
4414 | service attack using forged messages, this status may only be | |
4415 | returned for and in an encrypted packet if the message ID and | |
4416 | cryptographic checksum were valid. To avoid leaking information | |
4417 | to someone probing a node, this status MUST be sent in response | |
4418 | to any error not covered by one of the other status types. | |
4419 | {{ Demoted the SHOULD }} To aid debugging, more detailed error | |
4420 | ||
4421 | ||
4422 | ||
4423 | Kaufman, et al. Expires August 27, 2006 [Page 79] | |
4424 | \f | |
4425 | Internet-Draft IKEv2bis February 2006 | |
4426 | ||
4427 | ||
4428 | information should be written to a console or log. | |
4429 | ||
4430 | INVALID_MESSAGE_ID 9 | |
4431 | Sent when an IKE message ID outside the supported window is | |
4432 | received. This Notify MUST NOT be sent in a response; the invalid | |
4433 | request MUST NOT be acknowledged. Instead, inform the other side | |
4434 | by initiating an INFORMATIONAL exchange with Notification data | |
4435 | containing the four octet invalid message ID. Sending this | |
4436 | notification is optional, and notifications of this type MUST be | |
4437 | rate limited. | |
4438 | ||
4439 | INVALID_SPI 11 | |
4440 | MAY be sent in an IKE INFORMATIONAL exchange when a node receives | |
4441 | an ESP or AH packet with an invalid SPI. The Notification Data | |
4442 | contains the SPI of the invalid packet. This usually indicates a | |
4443 | node has rebooted and forgotten an SA. If this Informational | |
4444 | Message is sent outside the context of an IKE_SA, it should only | |
4445 | be used by the recipient as a "hint" that something might be | |
4446 | wrong (because it could easily be forged). | |
4447 | ||
4448 | NO_PROPOSAL_CHOSEN 14 | |
4449 | None of the proposed crypto suites was acceptable. | |
4450 | ||
4451 | INVALID_KE_PAYLOAD 17 | |
4452 | The D-H Group # field in the KE payload is not the group # | |
4453 | selected by the responder for this exchange. There are two octets | |
4454 | of data associated with this notification: the accepted D-H Group | |
4455 | # in big endian order. | |
4456 | ||
4457 | AUTHENTICATION_FAILED 24 | |
4458 | Sent in the response to an IKE_AUTH message when for some reason | |
4459 | the authentication failed. There is no associated data. | |
4460 | ||
4461 | SINGLE_PAIR_REQUIRED 34 | |
4462 | This error indicates that a CREATE_CHILD_SA request is | |
4463 | unacceptable because its sender is only willing to accept traffic | |
4464 | selectors specifying a single pair of addresses. The requestor is | |
4465 | expected to respond by requesting an SA for only the specific | |
4466 | traffic it is trying to forward. | |
4467 | ||
4468 | NO_ADDITIONAL_SAS 35 | |
4469 | This error indicates that a CREATE_CHILD_SA request is | |
4470 | unacceptable because the responder is unwilling to accept any | |
4471 | more CHILD_SAs on this IKE_SA. Some minimal implementations may | |
4472 | only accept a single CHILD_SA setup in the context of an initial | |
4473 | IKE exchange and reject any subsequent attempts to add more. | |
4474 | ||
4475 | INTERNAL_ADDRESS_FAILURE 36 | |
4476 | ||
4477 | ||
4478 | ||
4479 | Kaufman, et al. Expires August 27, 2006 [Page 80] | |
4480 | \f | |
4481 | Internet-Draft IKEv2bis February 2006 | |
4482 | ||
4483 | ||
4484 | Indicates an error assigning an internal address (i.e., | |
4485 | INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS) during the | |
4486 | processing of a Configuration Payload by a responder. If this | |
4487 | error is generated within an IKE_AUTH exchange, no CHILD_SA will | |
4488 | be created. | |
4489 | ||
4490 | FAILED_CP_REQUIRED 37 | |
4491 | Sent by responder in the case where CP(CFG_REQUEST) was expected | |
4492 | but not received, and so is a conflict with locally configured | |
4493 | policy. There is no associated data. | |
4494 | ||
4495 | TS_UNACCEPTABLE 38 | |
4496 | Indicates that none of the addresses/protocols/ports in the | |
4497 | supplied traffic selectors is acceptable. | |
4498 | ||
4499 | INVALID_SELECTORS 39 | |
4500 | MAY be sent in an IKE INFORMATIONAL exchange when a node receives | |
4501 | an ESP or AH packet whose selectors do not match those of the SA | |
4502 | on which it was delivered (and that caused the packet to be | |
4503 | dropped). The Notification Data contains the start of the | |
4504 | offending packet (as in ICMP messages) and the SPI field of the | |
4505 | notification is set to match the SPI of the IPsec SA. | |
4506 | ||
4507 | RESERVED TO IANA 40-8191 | |
4508 | ||
4509 | PRIVATE USE 8192-16383 | |
4510 | ||
4511 | ||
4512 | NOTIFY messages: status types Value | |
4513 | ------------------------------------------------------------------- | |
4514 | ||
4515 | INITIAL_CONTACT 16384 | |
4516 | This notification asserts that this IKE_SA is the only IKE_SA | |
4517 | currently active between the authenticated identities. It MAY be | |
4518 | sent when an IKE_SA is established after a crash, and the | |
4519 | recipient MAY use this information to delete any other IKE_SAs it | |
4520 | has to the same authenticated identity without waiting for a | |
4521 | timeout. This notification MUST NOT be sent by an entity that may | |
4522 | be replicated (e.g., a roaming user's credentials where the user | |
4523 | is allowed to connect to the corporate firewall from two remote | |
4524 | systems at the same time). {{ Clarif-7.9 }} The INITIAL_CONTACT | |
4525 | notification, if sent, SHOULD be in the first IKE_AUTH request, | |
4526 | not as a separate exchange afterwards; however, receiving | |
4527 | parties need to deal with it in other requests. | |
4528 | ||
4529 | SET_WINDOW_SIZE 16385 | |
4530 | This notification asserts that the sending endpoint is capable of | |
4531 | keeping state for multiple outstanding exchanges, permitting the | |
4532 | ||
4533 | ||
4534 | ||
4535 | Kaufman, et al. Expires August 27, 2006 [Page 81] | |
4536 | \f | |
4537 | Internet-Draft IKEv2bis February 2006 | |
4538 | ||
4539 | ||
4540 | recipient to send multiple requests before getting a response to | |
4541 | the first. The data associated with a SET_WINDOW_SIZE | |
4542 | notification MUST be 4 octets long and contain the big endian | |
4543 | representation of the number of messages the sender promises to | |
4544 | keep. Window size is always one until the initial exchanges | |
4545 | complete. | |
4546 | ||
4547 | ADDITIONAL_TS_POSSIBLE 16386 | |
4548 | This notification asserts that the sending endpoint narrowed the | |
4549 | proposed traffic selectors but that other traffic selectors would | |
4550 | also have been acceptable, though only in a separate SA (see | |
4551 | section 2.9). There is no data associated with this Notify type. | |
4552 | It may be sent only as an additional payload in a message | |
4553 | including accepted TSs. | |
4554 | ||
4555 | IPCOMP_SUPPORTED 16387 | |
4556 | This notification may be included only in a message containing an | |
4557 | SA payload negotiating a CHILD_SA and indicates a willingness by | |
4558 | its sender to use IPComp on this SA. The data associated with | |
4559 | this notification includes a two-octet IPComp CPI followed by a | |
4560 | one-octet transform ID optionally followed by attributes whose | |
4561 | length and format are defined by that transform ID. A message | |
4562 | proposing an SA may contain multiple IPCOMP_SUPPORTED | |
4563 | notifications to indicate multiple supported algorithms. A | |
4564 | message accepting an SA may contain at most one. | |
4565 | ||
4566 | The transform IDs currently defined are: | |
4567 | ||
4568 | Name Number Defined In | |
4569 | ------------------------------------- | |
4570 | RESERVED 0 | |
4571 | IPCOMP_OUI 1 | |
4572 | IPCOMP_DEFLATE 2 RFC 2394 | |
4573 | IPCOMP_LZS 3 RFC 2395 | |
4574 | IPCOMP_LZJH 4 RFC 3051 | |
4575 | RESERVED TO IANA 5-240 | |
4576 | PRIVATE USE 241-255 | |
4577 | ||
4578 | NAT_DETECTION_SOURCE_IP 16388 | |
4579 | This notification is used by its recipient to determine whether | |
4580 | the source is behind a NAT box. The data associated with this | |
4581 | notification is a SHA-1 digest of the SPIs (in the order they | |
4582 | appear in the header), IP address, and port on which this packet | |
4583 | was sent. There MAY be multiple Notify payloads of this type in a | |
4584 | message if the sender does not know which of several network | |
4585 | attachments will be used to send the packet. The recipient of | |
4586 | this notification MAY compare the supplied value to a SHA-1 hash | |
4587 | of the SPIs, source IP address, and port, and if they don't match | |
4588 | ||
4589 | ||
4590 | ||
4591 | Kaufman, et al. Expires August 27, 2006 [Page 82] | |
4592 | \f | |
4593 | Internet-Draft IKEv2bis February 2006 | |
4594 | ||
4595 | ||
4596 | it SHOULD enable NAT traversal (see section 2.23). Alternately, | |
4597 | it MAY reject the connection attempt if NAT traversal is not | |
4598 | supported. | |
4599 | ||
4600 | NAT_DETECTION_DESTINATION_IP 16389 | |
4601 | This notification is used by its recipient to determine whether | |
4602 | it is behind a NAT box. The data associated with this | |
4603 | notification is a SHA-1 digest of the SPIs (in the order they | |
4604 | appear in the header), IP address, and port to which this packet | |
4605 | was sent. The recipient of this notification MAY compare the | |
4606 | supplied value to a hash of the SPIs, destination IP address, and | |
4607 | port, and if they don't match it SHOULD invoke NAT traversal (see | |
4608 | section 2.23). If they don't match, it means that this end is | |
4609 | behind a NAT and this end SHOULD start sending keepalive packets | |
4610 | as defined in [UDPENCAPS]. Alternately, it MAY reject the | |
4611 | connection attempt if NAT traversal is not supported. | |
4612 | ||
4613 | COOKIE 16390 | |
4614 | This notification MAY be included in an IKE_SA_INIT response. It | |
4615 | indicates that the request should be retried with a copy of this | |
4616 | notification as the first payload. This notification MUST be | |
4617 | included in an IKE_SA_INIT request retry if a COOKIE notification | |
4618 | was included in the initial response. The data associated with | |
4619 | this notification MUST be between 1 and 64 octets in length | |
4620 | (inclusive). | |
4621 | ||
4622 | USE_TRANSPORT_MODE 16391 | |
4623 | This notification MAY be included in a request message that also | |
4624 | includes an SA payload requesting a CHILD_SA. It requests that | |
4625 | the CHILD_SA use transport mode rather than tunnel mode for the | |
4626 | SA created. If the request is accepted, the response MUST also | |
4627 | include a notification of type USE_TRANSPORT_MODE. If the | |
4628 | responder declines the request, the CHILD_SA will be established | |
4629 | in tunnel mode. If this is unacceptable to the initiator, the | |
4630 | initiator MUST delete the SA. Note: Except when using this option | |
4631 | to negotiate transport mode, all CHILD_SAs will use tunnel mode. | |
4632 | ||
4633 | Note: The ECN decapsulation modifications specified in | |
4634 | [IPSECARCH] MUST be performed for every tunnel mode SA created | |
4635 | by IKEv2. | |
4636 | ||
4637 | HTTP_CERT_LOOKUP_SUPPORTED 16392 | |
4638 | This notification MAY be included in any message that can include | |
4639 | a CERTREQ payload and indicates that the sender is capable of | |
4640 | looking up certificates based on an HTTP-based URL (and hence | |
4641 | presumably would prefer to receive certificate specifications in | |
4642 | that format). | |
4643 | ||
4644 | ||
4645 | ||
4646 | ||
4647 | Kaufman, et al. Expires August 27, 2006 [Page 83] | |
4648 | \f | |
4649 | Internet-Draft IKEv2bis February 2006 | |
4650 | ||
4651 | ||
4652 | REKEY_SA 16393 | |
4653 | This notification MUST be included in a CREATE_CHILD_SA exchange | |
4654 | if the purpose of the exchange is to replace an existing ESP or | |
4655 | AH SA. The SPI field identifies the SA being rekeyed. | |
4656 | {{ Clarif-5.4 }} The SPI placed in the REKEY_SA | |
4657 | notification is the SPI the exchange initiator would expect in | |
4658 | inbound ESP or AH packets. There is no data. | |
4659 | ||
4660 | ESP_TFC_PADDING_NOT_SUPPORTED 16394 | |
4661 | This notification asserts that the sending endpoint will NOT | |
4662 | accept packets that contain Flow Confidentiality (TFC) padding. | |
4663 | {{ Clarif-4.5 }} The scope of this message is a single | |
4664 | CHILD_SA, and thus this notification is included in messages | |
4665 | containing an SA payload negotiating a CHILD_SA. If neither | |
4666 | endpoint accepts TFC padding, this notification SHOULD be | |
4667 | included in both the request proposing an SA and the response | |
4668 | accepting it. If this notification is included in only one of | |
4669 | the messages, TFC padding can still be sent in the other | |
4670 | direction. | |
4671 | ||
4672 | NON_FIRST_FRAGMENTS_ALSO 16395 | |
4673 | Used for fragmentation control. See [IPSECARCH] for explanation. | |
4674 | {{ Clarif-4.6 }} Sending non-first fragments is | |
4675 | enabled only if NON_FIRST_FRAGMENTS_ALSO notification is | |
4676 | included in both the request proposing an SA and the response | |
4677 | accepting it. If the peer rejects this proposal, the peer only | |
4678 | omits NON_FIRST_FRAGMENTS_ALSO notification from the response, | |
4679 | but does not reject the whole CHILD_SA creation. | |
4680 | ||
4681 | RESERVED TO IANA 16396-40959 | |
4682 | ||
4683 | PRIVATE USE 40960-65535 | |
4684 | ||
4685 | 3.11. Delete Payload | |
4686 | ||
4687 | The Delete Payload, denoted D in this memo, contains a protocol | |
4688 | specific security association identifier that the sender has removed | |
4689 | from its security association database and is, therefore, no longer | |
4690 | valid. Figure 17 shows the format of the Delete Payload. It is | |
4691 | possible to send multiple SPIs in a Delete payload; however, each SPI | |
4692 | MUST be for the same protocol. Mixing of protocol identifiers MUST | |
4693 | NOT be performed in the Delete payload. It is permitted, however, to | |
4694 | include multiple Delete payloads in a single INFORMATIONAL exchange | |
4695 | where each Delete payload lists SPIs for a different protocol. | |
4696 | ||
4697 | Deletion of the IKE_SA is indicated by a protocol ID of 1 (IKE) but | |
4698 | no SPIs. Deletion of a CHILD_SA, such as ESP or AH, will contain the | |
4699 | IPsec protocol ID of that protocol (2 for AH, 3 for ESP), and the SPI | |
4700 | ||
4701 | ||
4702 | ||
4703 | Kaufman, et al. Expires August 27, 2006 [Page 84] | |
4704 | \f | |
4705 | Internet-Draft IKEv2bis February 2006 | |
4706 | ||
4707 | ||
4708 | is the SPI the sending endpoint would expect in inbound ESP or AH | |
4709 | packets. | |
4710 | ||
4711 | The Delete Payload is defined as follows: | |
4712 | ||
4713 | 1 2 3 | |
4714 | 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 | |
4715 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4716 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4717 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4718 | ! Protocol ID ! SPI Size ! # of SPIs ! | |
4719 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4720 | ! ! | |
4721 | ~ Security Parameter Index(es) (SPI) ~ | |
4722 | ! ! | |
4723 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4724 | ||
4725 | Figure 17: Delete Payload Format | |
4726 | ||
4727 | o Protocol ID (1 octet) - Must be 1 for an IKE_SA, 2 for AH, or 3 | |
4728 | for ESP. | |
4729 | ||
4730 | o SPI Size (1 octet) - Length in octets of the SPI as defined by the | |
4731 | protocol ID. It MUST be zero for IKE (SPI is in message header) | |
4732 | or four for AH and ESP. | |
4733 | ||
4734 | o # of SPIs (2 octets) - The number of SPIs contained in the Delete | |
4735 | payload. The size of each SPI is defined by the SPI Size field. | |
4736 | ||
4737 | o Security Parameter Index(es) (variable length) - Identifies the | |
4738 | specific security association(s) to delete. The length of this | |
4739 | field is determined by the SPI Size and # of SPIs fields. | |
4740 | ||
4741 | The payload type for the Delete Payload is forty two (42). | |
4742 | ||
4743 | 3.12. Vendor ID Payload | |
4744 | ||
4745 | The Vendor ID Payload, denoted V in this memo, contains a vendor | |
4746 | defined constant. The constant is used by vendors to identify and | |
4747 | recognize remote instances of their implementations. This mechanism | |
4748 | allows a vendor to experiment with new features while maintaining | |
4749 | backward compatibility. | |
4750 | ||
4751 | A Vendor ID payload MAY announce that the sender is capable to | |
4752 | accepting certain extensions to the protocol, or it MAY simply | |
4753 | identify the implementation as an aid in debugging. A Vendor ID | |
4754 | payload MUST NOT change the interpretation of any information defined | |
4755 | in this specification (i.e., the critical bit MUST be set to 0). | |
4756 | ||
4757 | ||
4758 | ||
4759 | Kaufman, et al. Expires August 27, 2006 [Page 85] | |
4760 | \f | |
4761 | Internet-Draft IKEv2bis February 2006 | |
4762 | ||
4763 | ||
4764 | Multiple Vendor ID payloads MAY be sent. An implementation is NOT | |
4765 | REQUIRED to send any Vendor ID payload at all. | |
4766 | ||
4767 | A Vendor ID payload may be sent as part of any message. Reception of | |
4768 | a familiar Vendor ID payload allows an implementation to make use of | |
4769 | Private USE numbers described throughout this memo-- private | |
4770 | payloads, private exchanges, private notifications, etc. Unfamiliar | |
4771 | Vendor IDs MUST be ignored. | |
4772 | ||
4773 | Writers of Internet-Drafts who wish to extend this protocol MUST | |
4774 | define a Vendor ID payload to announce the ability to implement the | |
4775 | extension in the Internet-Draft. It is expected that Internet-Drafts | |
4776 | that gain acceptance and are standardized will be given "magic | |
4777 | numbers" out of the Future Use range by IANA, and the requirement to | |
4778 | use a Vendor ID will go away. | |
4779 | ||
4780 | The Vendor ID Payload fields are defined as follows: | |
4781 | ||
4782 | 1 2 3 | |
4783 | 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 | |
4784 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4785 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4786 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4787 | ! ! | |
4788 | ~ Vendor ID (VID) ~ | |
4789 | ! ! | |
4790 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4791 | ||
4792 | Figure 18: Vendor ID Payload Format | |
4793 | ||
4794 | o Vendor ID (variable length) - It is the responsibility of the | |
4795 | person choosing the Vendor ID to assure its uniqueness in spite of | |
4796 | the absence of any central registry for IDs. Good practice is to | |
4797 | include a company name, a person name, or some such. If you want | |
4798 | to show off, you might include the latitude and longitude and time | |
4799 | where you were when you chose the ID and some random input. A | |
4800 | message digest of a long unique string is preferable to the long | |
4801 | unique string itself. | |
4802 | ||
4803 | The payload type for the Vendor ID Payload is forty three (43). | |
4804 | ||
4805 | 3.13. Traffic Selector Payload | |
4806 | ||
4807 | The Traffic Selector Payload, denoted TS in this memo, allows peers | |
4808 | to identify packet flows for processing by IPsec security services. | |
4809 | The Traffic Selector Payload consists of the IKE generic payload | |
4810 | header followed by individual traffic selectors as follows: | |
4811 | ||
4812 | ||
4813 | ||
4814 | ||
4815 | Kaufman, et al. Expires August 27, 2006 [Page 86] | |
4816 | \f | |
4817 | Internet-Draft IKEv2bis February 2006 | |
4818 | ||
4819 | ||
4820 | 1 2 3 | |
4821 | 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 | |
4822 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4823 | ! Next Payload !C! RESERVED ! Payload Length ! | |
4824 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4825 | ! Number of TSs ! RESERVED ! | |
4826 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4827 | ! ! | |
4828 | ~ <Traffic Selectors> ~ | |
4829 | ! ! | |
4830 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4831 | ||
4832 | Figure 19: Traffic Selectors Payload Format | |
4833 | ||
4834 | o Number of TSs (1 octet) - Number of traffic selectors being | |
4835 | provided. | |
4836 | ||
4837 | o RESERVED - This field MUST be sent as zero and MUST be ignored on | |
4838 | receipt. | |
4839 | ||
4840 | o Traffic Selectors (variable length) - One or more individual | |
4841 | traffic selectors. | |
4842 | ||
4843 | The length of the Traffic Selector payload includes the TS header and | |
4844 | all the traffic selectors. | |
4845 | ||
4846 | The payload type for the Traffic Selector payload is forty four (44) | |
4847 | for addresses at the initiator's end of the SA and forty five (45) | |
4848 | for addresses at the responder's end. | |
4849 | ||
4850 | {{ Clarif-4.7 }} There is no requirement that TSi and TSr contain the | |
4851 | same number of individual traffic selectors. Thus, they are | |
4852 | interpreted as follows: a packet matches a given TSi/TSr if it | |
4853 | matches at least one of the individual selectors in TSi, and at least | |
4854 | one of the individual selectors in TSr. | |
4855 | ||
4856 | For instance, the following traffic selectors: | |
4857 | ||
4858 | TSi = ((17, 100, 192.0.1.66-192.0.1.66), | |
4859 | (17, 200, 192.0.1.66-192.0.1.66)) | |
4860 | TSr = ((17, 300, 0.0.0.0-255.255.255.255), | |
4861 | (17, 400, 0.0.0.0-255.255.255.255)) | |
4862 | ||
4863 | would match UDP packets from 192.0.1.66 to anywhere, with any of the | |
4864 | four combinations of source/destination ports (100,300), (100,400), | |
4865 | (200,300), and (200, 400). | |
4866 | ||
4867 | Thus, some types of policies may require several CHILD_SA pairs. For | |
4868 | ||
4869 | ||
4870 | ||
4871 | Kaufman, et al. Expires August 27, 2006 [Page 87] | |
4872 | \f | |
4873 | Internet-Draft IKEv2bis February 2006 | |
4874 | ||
4875 | ||
4876 | instance, a policy matching only source/destination ports (100,300) | |
4877 | and (200,400), but not the other two combinations, cannot be | |
4878 | negotiated as a single CHILD_SA pair. | |
4879 | ||
4880 | 3.13.1. Traffic Selector | |
4881 | ||
4882 | 1 2 3 | |
4883 | 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 | |
4884 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4885 | ! TS Type !IP Protocol ID*| Selector Length | | |
4886 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4887 | | Start Port* | End Port* | | |
4888 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4889 | ! ! | |
4890 | ~ Starting Address* ~ | |
4891 | ! ! | |
4892 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4893 | ! ! | |
4894 | ~ Ending Address* ~ | |
4895 | ! ! | |
4896 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
4897 | ||
4898 | Figure 20: Traffic Selector | |
4899 | ||
4900 | *Note: All fields other than TS Type and Selector Length depend on | |
4901 | the TS Type. The fields shown are for TS Types 7 and 8, the only two | |
4902 | values currently defined. | |
4903 | ||
4904 | o TS Type (one octet) - Specifies the type of traffic selector. | |
4905 | ||
4906 | o IP protocol ID (1 octet) - Value specifying an associated IP | |
4907 | protocol ID (e.g., UDP/TCP/ICMP). A value of zero means that the | |
4908 | protocol ID is not relevant to this traffic selector-- the SA can | |
4909 | carry all protocols. | |
4910 | ||
4911 | o Selector Length - Specifies the length of this Traffic Selector | |
4912 | Substructure including the header. | |
4913 | ||
4914 | o Start Port (2 octets) - Value specifying the smallest port number | |
4915 | allowed by this Traffic Selector. For protocols for which port is | |
4916 | undefined, or if all ports are allowed, this field MUST be zero. | |
4917 | For the ICMP protocol, the two one-octet fields Type and Code are | |
4918 | treated as a single 16-bit integer (with Type in the most | |
4919 | significant eight bits and Code in the least significant eight | |
4920 | bits) port number for the purposes of filtering based on this | |
4921 | field. | |
4922 | ||
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | Kaufman, et al. Expires August 27, 2006 [Page 88] | |
4928 | \f | |
4929 | Internet-Draft IKEv2bis February 2006 | |
4930 | ||
4931 | ||
4932 | o End Port (2 octets) - Value specifying the largest port number | |
4933 | allowed by this Traffic Selector. For protocols for which port is | |
4934 | undefined, or if all ports are allowed, this field MUST be 65535. | |
4935 | For the ICMP protocol, the two one-octet fields Type and Code are | |
4936 | treated as a single 16-bit integer (with Type in the most | |
4937 | significant eight bits and Code in the least significant eight | |
4938 | bits) port number for the purposed of filtering based on this | |
4939 | field. | |
4940 | ||
4941 | o Starting Address - The smallest address included in this Traffic | |
4942 | Selector (length determined by TS type). | |
4943 | ||
4944 | o Ending Address - The largest address included in this Traffic | |
4945 | Selector (length determined by TS type). | |
4946 | ||
4947 | Systems that are complying with [IPSECARCH] that wish to indicate | |
4948 | "ANY" ports MUST set the start port to 0 and the end port to 65535; | |
4949 | note that according to [IPSECARCH], "ANY" includes "OPAQUE". Systems | |
4950 | working with [IPSECARCH] that wish to indicate "OPAQUE" ports, but | |
4951 | not "ANY" ports, MUST set the start port to 65535 and the end port to | |
4952 | 0. | |
4953 | ||
4954 | {{ Added from Clarif-4.8 }} The traffic selector types 7 and 8 can | |
4955 | also refer to ICMP type and code fields. Note, however, that ICMP | |
4956 | packets do not have separate source and destination port fields. The | |
4957 | method for specifying the traffic selectors for ICMP is shown by | |
4958 | example in Section 4.4.1.3 of [IPSECARCH]. | |
4959 | ||
4960 | {{ Added from Clarif-4.9 }} Traffic selectors can use IP Protocol ID | |
4961 | 135 to match the IPv6 mobility header [MIPV6]. This document does | |
4962 | not specify how to represent the "MH Type" field in traffic | |
4963 | selectors, although it is likely that a different document will | |
4964 | specify this in the future. Note that [IPSECARCH] says that the IPv6 | |
4965 | mobility header (MH) message type is placed in the most significant | |
4966 | eight bits of the 16-bit local port selector. The direction | |
4967 | semantics of TSi/TSr port fields are the same as for ICMP. | |
4968 | ||
4969 | The following table lists the assigned values for the Traffic | |
4970 | Selector Type field and the corresponding Address Selector Data. | |
4971 | ||
4972 | ||
4973 | ||
4974 | ||
4975 | ||
4976 | ||
4977 | ||
4978 | ||
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | Kaufman, et al. Expires August 27, 2006 [Page 89] | |
4984 | \f | |
4985 | Internet-Draft IKEv2bis February 2006 | |
4986 | ||
4987 | ||
4988 | TS Type Value | |
4989 | ------------------------------------------------------------------- | |
4990 | RESERVED 0-6 | |
4991 | ||
4992 | TS_IPV4_ADDR_RANGE 7 | |
4993 | ||
4994 | A range of IPv4 addresses, represented by two four-octet | |
4995 | values. The first value is the beginning IPv4 address | |
4996 | (inclusive) and the second value is the ending IPv4 address | |
4997 | (inclusive). All addresses falling between the two specified | |
4998 | addresses are considered to be within the list. | |
4999 | ||
5000 | TS_IPV6_ADDR_RANGE 8 | |
5001 | ||
5002 | A range of IPv6 addresses, represented by two sixteen-octet | |
5003 | values. The first value is the beginning IPv6 address | |
5004 | (inclusive) and the second value is the ending IPv6 address | |
5005 | (inclusive). All addresses falling between the two specified | |
5006 | addresses are considered to be within the list. | |
5007 | ||
5008 | RESERVED TO IANA 9-240 | |
5009 | PRIVATE USE 241-255 | |
5010 | ||
5011 | 3.14. Encrypted Payload | |
5012 | ||
5013 | The Encrypted Payload, denoted SK{...} or E in this memo, contains | |
5014 | other payloads in encrypted form. The Encrypted Payload, if present | |
5015 | in a message, MUST be the last payload in the message. Often, it is | |
5016 | the only payload in the message. | |
5017 | ||
5018 | The algorithms for encryption and integrity protection are negotiated | |
5019 | during IKE_SA setup, and the keys are computed as specified in | |
5020 | Section 2.14 and Section 2.18. | |
5021 | ||
5022 | The encryption and integrity protection algorithms are modeled after | |
5023 | the ESP algorithms described in RFCs 2104 [HMAC], 4303 [ESP], and | |
5024 | 2451 [ESPCBC]. This document completely specifies the cryptographic | |
5025 | processing of IKE data, but those documents should be consulted for | |
5026 | design rationale. We require a block cipher with a fixed block size | |
5027 | and an integrity check algorithm that computes a fixed-length | |
5028 | checksum over a variable size message. | |
5029 | ||
5030 | The payload type for an Encrypted payload is forty six (46). The | |
5031 | Encrypted Payload consists of the IKE generic payload header followed | |
5032 | by individual fields as follows: | |
5033 | ||
5034 | ||
5035 | ||
5036 | ||
5037 | ||
5038 | ||
5039 | Kaufman, et al. Expires August 27, 2006 [Page 90] | |
5040 | \f | |
5041 | Internet-Draft IKEv2bis February 2006 | |
5042 | ||
5043 | ||
5044 | 1 2 3 | |
5045 | 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 | |
5046 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5047 | ! Next Payload !C! RESERVED ! Payload Length ! | |
5048 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5049 | ! Initialization Vector ! | |
5050 | ! (length is block size for encryption algorithm) ! | |
5051 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5052 | ~ Encrypted IKE Payloads ~ | |
5053 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5054 | ! ! Padding (0-255 octets) ! | |
5055 | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | |
5056 | ! ! Pad Length ! | |
5057 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5058 | ~ Integrity Checksum Data ~ | |
5059 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5060 | ||
5061 | Figure 21: Encrypted Payload Format | |
5062 | ||
5063 | o Next Payload - The payload type of the first embedded payload. | |
5064 | Note that this is an exception in the standard header format, | |
5065 | since the Encrypted payload is the last payload in the message and | |
5066 | therefore the Next Payload field would normally be zero. But | |
5067 | because the content of this payload is embedded payloads and there | |
5068 | was no natural place to put the type of the first one, that type | |
5069 | is placed here. | |
5070 | ||
5071 | o Payload Length - Includes the lengths of the header, IV, Encrypted | |
5072 | IKE Payloads, Padding, Pad Length, and Integrity Checksum Data. | |
5073 | ||
5074 | o Initialization Vector - A randomly chosen value whose length is | |
5075 | equal to the block length of the underlying encryption algorithm. | |
5076 | Recipients MUST accept any value. Senders SHOULD either pick this | |
5077 | value pseudo-randomly and independently for each message or use | |
5078 | the final ciphertext block of the previous message sent. Senders | |
5079 | MUST NOT use the same value for each message, use a sequence of | |
5080 | values with low hamming distance (e.g., a sequence number), or use | |
5081 | ciphertext from a received message. | |
5082 | ||
5083 | o IKE Payloads are as specified earlier in this section. This field | |
5084 | is encrypted with the negotiated cipher. | |
5085 | ||
5086 | o Padding MAY contain any value chosen by the sender, and MUST have | |
5087 | a length that makes the combination of the Payloads, the Padding, | |
5088 | and the Pad Length to be a multiple of the encryption block size. | |
5089 | This field is encrypted with the negotiated cipher. | |
5090 | ||
5091 | ||
5092 | ||
5093 | ||
5094 | ||
5095 | Kaufman, et al. Expires August 27, 2006 [Page 91] | |
5096 | \f | |
5097 | Internet-Draft IKEv2bis February 2006 | |
5098 | ||
5099 | ||
5100 | o Pad Length is the length of the Padding field. The sender SHOULD | |
5101 | set the Pad Length to the minimum value that makes the combination | |
5102 | of the Payloads, the Padding, and the Pad Length a multiple of the | |
5103 | block size, but the recipient MUST accept any length that results | |
5104 | in proper alignment. This field is encrypted with the negotiated | |
5105 | cipher. | |
5106 | ||
5107 | o Integrity Checksum Data is the cryptographic checksum of the | |
5108 | entire message starting with the Fixed IKE Header through the Pad | |
5109 | Length. The checksum MUST be computed over the encrypted message. | |
5110 | Its length is determined by the integrity algorithm negotiated. | |
5111 | ||
5112 | 3.15. Configuration Payload | |
5113 | ||
5114 | The Configuration payload, denoted CP in this document, is used to | |
5115 | exchange configuration information between IKE peers. The exchange | |
5116 | is for an IRAC to request an internal IP address from an IRAS and to | |
5117 | exchange other information of the sort that one would acquire with | |
5118 | Dynamic Host Configuration Protocol (DHCP) if the IRAC were directly | |
5119 | connected to a LAN. | |
5120 | ||
5121 | Configuration payloads are of type CFG_REQUEST/CFG_REPLY or CFG_SET/ | |
5122 | CFG_ACK (see CFG Type in the payload description below). CFG_REQUEST | |
5123 | and CFG_SET payloads may optionally be added to any IKE request. The | |
5124 | IKE response MUST include either a corresponding CFG_REPLY or CFG_ACK | |
5125 | or a Notify payload with an error type indicating why the request | |
5126 | could not be honored. An exception is that a minimal implementation | |
5127 | MAY ignore all CFG_REQUEST and CFG_SET payloads, so a response | |
5128 | message without a corresponding CFG_REPLY or CFG_ACK MUST be accepted | |
5129 | as an indication that the request was not supported. | |
5130 | ||
5131 | "CFG_REQUEST/CFG_REPLY" allows an IKE endpoint to request information | |
5132 | from its peer. If an attribute in the CFG_REQUEST Configuration | |
5133 | Payload is not zero-length, it is taken as a suggestion for that | |
5134 | attribute. The CFG_REPLY Configuration Payload MAY return that | |
5135 | value, or a new one. It MAY also add new attributes and not include | |
5136 | some requested ones. Requestors MUST ignore returned attributes that | |
5137 | they do not recognize. | |
5138 | ||
5139 | Some attributes MAY be multi-valued, in which case multiple attribute | |
5140 | values of the same type are sent and/or returned. Generally, all | |
5141 | values of an attribute are returned when the attribute is requested. | |
5142 | For some attributes (in this version of the specification only | |
5143 | internal addresses), multiple requests indicates a request that | |
5144 | multiple values be assigned. For these attributes, the number of | |
5145 | values returned SHOULD NOT exceed the number requested. | |
5146 | ||
5147 | If the data type requested in a CFG_REQUEST is not recognized or not | |
5148 | ||
5149 | ||
5150 | ||
5151 | Kaufman, et al. Expires August 27, 2006 [Page 92] | |
5152 | \f | |
5153 | Internet-Draft IKEv2bis February 2006 | |
5154 | ||
5155 | ||
5156 | supported, the responder MUST NOT return an error type but rather | |
5157 | MUST either send a CFG_REPLY that MAY be empty or a reply not | |
5158 | containing a CFG_REPLY payload at all. Error returns are reserved | |
5159 | for cases where the request is recognized but cannot be performed as | |
5160 | requested or the request is badly formatted. | |
5161 | ||
5162 | "CFG_SET/CFG_ACK" allows an IKE endpoint to push configuration data | |
5163 | to its peer. In this case, the CFG_SET Configuration Payload | |
5164 | contains attributes the initiator wants its peer to alter. The | |
5165 | responder MUST return a Configuration Payload if it accepted any of | |
5166 | the configuration data and it MUST contain the attributes that the | |
5167 | responder accepted with zero-length data. Those attributes that it | |
5168 | did not accept MUST NOT be in the CFG_ACK Configuration Payload. If | |
5169 | no attributes were accepted, the responder MUST return either an | |
5170 | empty CFG_ACK payload or a response message without a CFG_ACK | |
5171 | payload. There are currently no defined uses for the CFG_SET/CFG_ACK | |
5172 | exchange, though they may be used in connection with extensions based | |
5173 | on Vendor IDs. An minimal implementation of this specification MAY | |
5174 | ignore CFG_SET payloads. | |
5175 | ||
5176 | {{ Demoted the SHOULD }} Extensions via the CP payload should not be | |
5177 | used for general purpose management. Its main intent is to provide a | |
5178 | bootstrap mechanism to exchange information within IPsec from IRAS to | |
5179 | IRAC. While it MAY be useful to use such a method to exchange | |
5180 | information between some Security Gateways (SGW) or small networks, | |
5181 | existing management protocols such as DHCP [DHCP], RADIUS [RADIUS], | |
5182 | SNMP, or LDAP [LDAP] should be preferred for enterprise management as | |
5183 | well as subsequent information exchanges. | |
5184 | ||
5185 | The Configuration Payload is defined as follows: | |
5186 | ||
5187 | 1 2 3 | |
5188 | 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 | |
5189 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5190 | ! Next Payload !C! RESERVED ! Payload Length ! | |
5191 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5192 | ! CFG Type ! RESERVED ! | |
5193 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5194 | ! ! | |
5195 | ~ Configuration Attributes ~ | |
5196 | ! ! | |
5197 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5198 | ||
5199 | Figure 22: Configuration Payload Format | |
5200 | ||
5201 | The payload type for the Configuration Payload is forty seven (47). | |
5202 | ||
5203 | ||
5204 | ||
5205 | ||
5206 | ||
5207 | Kaufman, et al. Expires August 27, 2006 [Page 93] | |
5208 | \f | |
5209 | Internet-Draft IKEv2bis February 2006 | |
5210 | ||
5211 | ||
5212 | o CFG Type (1 octet) - The type of exchange represented by the | |
5213 | Configuration Attributes. | |
5214 | ||
5215 | CFG Type Value | |
5216 | -------------------------- | |
5217 | RESERVED 0 | |
5218 | CFG_REQUEST 1 | |
5219 | CFG_REPLY 2 | |
5220 | CFG_SET 3 | |
5221 | CFG_ACK 4 | |
5222 | RESERVED TO IANA 5-127 | |
5223 | PRIVATE USE 128-255 | |
5224 | ||
5225 | o RESERVED (3 octets) - MUST be sent as zero; MUST be ignored on | |
5226 | receipt. | |
5227 | ||
5228 | o Configuration Attributes (variable length) - These are type length | |
5229 | values specific to the Configuration Payload and are defined | |
5230 | below. There may be zero or more Configuration Attributes in this | |
5231 | payload. | |
5232 | ||
5233 | 3.15.1. Configuration Attributes | |
5234 | ||
5235 | 1 2 3 | |
5236 | 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 | |
5237 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5238 | !R| Attribute Type ! Length | | |
5239 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5240 | | | | |
5241 | ~ Value ~ | |
5242 | | | | |
5243 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5244 | ||
5245 | Figure 23: Configuration Attribute Format | |
5246 | ||
5247 | o Reserved (1 bit) - This bit MUST be set to zero and MUST be | |
5248 | ignored on receipt. | |
5249 | ||
5250 | o Attribute Type (15 bits) - A unique identifier for each of the | |
5251 | Configuration Attribute Types. | |
5252 | ||
5253 | o Length (2 octets) - Length in octets of Value. | |
5254 | ||
5255 | o Value (0 or more octets) - The variable-length value of this | |
5256 | Configuration Attribute. The following attribute types have been | |
5257 | defined: | |
5258 | ||
5259 | ||
5260 | ||
5261 | ||
5262 | ||
5263 | Kaufman, et al. Expires August 27, 2006 [Page 94] | |
5264 | \f | |
5265 | Internet-Draft IKEv2bis February 2006 | |
5266 | ||
5267 | ||
5268 | Multi- | |
5269 | Attribute Type Value Valued Length | |
5270 | ------------------------------------------------------- | |
5271 | RESERVED 0 | |
5272 | INTERNAL_IP4_ADDRESS 1 YES* 0 or 4 octets | |
5273 | INTERNAL_IP4_NETMASK 2 NO 0 or 4 octets | |
5274 | INTERNAL_IP4_DNS 3 YES 0 or 4 octets | |
5275 | INTERNAL_IP4_NBNS 4 YES 0 or 4 octets | |
5276 | INTERNAL_ADDRESS_EXPIRY 5 NO 0 or 4 octets | |
5277 | INTERNAL_IP4_DHCP 6 YES 0 or 4 octets | |
5278 | APPLICATION_VERSION 7 NO 0 or more | |
5279 | INTERNAL_IP6_ADDRESS 8 YES* 0 or 17 octets | |
5280 | RESERVED 9 | |
5281 | INTERNAL_IP6_DNS 10 YES 0 or 16 octets | |
5282 | INTERNAL_IP6_NBNS 11 YES 0 or 16 octets | |
5283 | INTERNAL_IP6_DHCP 12 YES 0 or 16 octets | |
5284 | INTERNAL_IP4_SUBNET 13 YES 0 or 8 octets | |
5285 | SUPPORTED_ATTRIBUTES 14 NO Multiple of 2 | |
5286 | INTERNAL_IP6_SUBNET 15 YES 17 octets | |
5287 | RESERVED TO IANA 16-16383 | |
5288 | PRIVATE USE 16384-32767 | |
5289 | ||
5290 | * These attributes may be multi-valued on return only if | |
5291 | multiple values were requested. | |
5292 | ||
5293 | o INTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS - An address on the | |
5294 | internal network, sometimes called a red node address or private | |
5295 | address and MAY be a private address on the Internet. {{ | |
5296 | Clarif-6.2}} In a request message, the address specified is a | |
5297 | requested address (or a zero-length address if no specific address | |
5298 | is requested). If a specific address is requested, it likely | |
5299 | indicates that a previous connection existed with this address and | |
5300 | the requestor would like to reuse that address. With IPv6, a | |
5301 | requestor MAY supply the low-order address bytes it wants to use. | |
5302 | Multiple internal addresses MAY be requested by requesting | |
5303 | multiple internal address attributes. The responder MAY only send | |
5304 | up to the number of addresses requested. The INTERNAL_IP6_ADDRESS | |
5305 | is made up of two fields: the first is a 16-octet IPv6 address, | |
5306 | and the second is a one-octet prefix-length as defined in | |
5307 | [ADDRIPV6]. | |
5308 | ||
5309 | The requested address is valid until the expiry time defined with | |
5310 | the INTERNAL_ADDRESS_EXPIRY attribute or there are no IKE_SAs | |
5311 | between the peers. | |
5312 | ||
5313 | o INTERNAL_IP4_NETMASK - The internal network's netmask. Only one | |
5314 | netmask is allowed in the request and reply messages (e.g., | |
5315 | 255.255.255.0), and it MUST be used only with an | |
5316 | ||
5317 | ||
5318 | ||
5319 | Kaufman, et al. Expires August 27, 2006 [Page 95] | |
5320 | \f | |
5321 | Internet-Draft IKEv2bis February 2006 | |
5322 | ||
5323 | ||
5324 | INTERNAL_IP4_ADDRESS attribute. {{ Clarif-6.4 }} | |
5325 | INTERNAL_IP4_NETMASK in a CFG_REPLY means roughly the same thing | |
5326 | as INTERNAL_IP4_SUBNET containing the same information ("send | |
5327 | traffic to these addresses through me"), but also implies a link | |
5328 | boundary. For instance, the client could use its own address and | |
5329 | the netmask to calculate the broadcast address of the link. An | |
5330 | empty INTERNAL_IP4_NETMASK attribute can be included in a | |
5331 | CFG_REQUEST to request this information (although the gateway can | |
5332 | send the information even when not requested). Non-empty values | |
5333 | for this attribute in a CFG_REQUEST do not make sense and thus | |
5334 | MUST NOT be included. | |
5335 | ||
5336 | o INTERNAL_IP4_DNS, INTERNAL_IP6_DNS - Specifies an address of a DNS | |
5337 | server within the network. Multiple DNS servers MAY be requested. | |
5338 | The responder MAY respond with zero or more DNS server attributes. | |
5339 | ||
5340 | o INTERNAL_IP4_NBNS, INTERNAL_IP6_NBNS - Specifies an address of a | |
5341 | NetBios Name Server (WINS) within the network. Multiple NBNS | |
5342 | servers MAY be requested. The responder MAY respond with zero or | |
5343 | more NBNS server attributes. {{ Clarif-6.6 }} NetBIOS is not | |
5344 | defined for IPv6; therefore, INTERNAL_IP6_NBNS SHOULD NOT be used. | |
5345 | ||
5346 | o INTERNAL_ADDRESS_EXPIRY - Specifies the number of seconds that the | |
5347 | host can use the internal IP address. The host MUST renew the IP | |
5348 | address before this expiry time. Only one of these attributes MAY | |
5349 | be present in the reply. {{ Clarif-6.7 }} Expiry times and | |
5350 | explicit renewals are primarily useful in environments like DHCP, | |
5351 | where the server cannot reliably know when the client has gone | |
5352 | away. However, in IKEv2, this is known, and the gateway can | |
5353 | simply free the address when the IKE_SA is deleted. Further, | |
5354 | supporting renewals is not mandatory. Thus | |
5355 | INTERNAL_ADDRESS_EXPIRY attribute MUST NOT be used. | |
5356 | ||
5357 | o INTERNAL_IP4_DHCP, INTERNAL_IP6_DHCP - Instructs the host to send | |
5358 | any internal DHCP requests to the address contained within the | |
5359 | attribute. Multiple DHCP servers MAY be requested. The responder | |
5360 | MAY respond with zero or more DHCP server attributes. | |
5361 | ||
5362 | o APPLICATION_VERSION - The version or application information of | |
5363 | the IPsec host. This is a string of printable ASCII characters | |
5364 | that is NOT null terminated. | |
5365 | ||
5366 | o INTERNAL_IP4_SUBNET - The protected sub-networks that this edge- | |
5367 | device protects. This attribute is made up of two fields: the | |
5368 | first being an IP address and the second being a netmask. | |
5369 | Multiple sub-networks MAY be requested. The responder MAY respond | |
5370 | with zero or more sub-network attributes. | |
5371 | ||
5372 | ||
5373 | ||
5374 | ||
5375 | Kaufman, et al. Expires August 27, 2006 [Page 96] | |
5376 | \f | |
5377 | Internet-Draft IKEv2bis February 2006 | |
5378 | ||
5379 | ||
5380 | o SUPPORTED_ATTRIBUTES - When used within a Request, this attribute | |
5381 | MUST be zero-length and specifies a query to the responder to | |
5382 | reply back with all of the attributes that it supports. The | |
5383 | response contains an attribute that contains a set of attribute | |
5384 | identifiers each in 2 octets. The length divided by 2 (octets) | |
5385 | would state the number of supported attributes contained in the | |
5386 | response. | |
5387 | ||
5388 | o INTERNAL_IP6_SUBNET - The protected sub-networks that this edge- | |
5389 | device protects. This attribute is made up of two fields: the | |
5390 | first is a 16-octet IPv6 address, and the second is a one-octet | |
5391 | prefix-length as defined in [ADDRIPV6]. Multiple sub-networks MAY | |
5392 | be requested. The responder MAY respond with zero or more sub- | |
5393 | network attributes. | |
5394 | ||
5395 | Note that no recommendations are made in this document as to how an | |
5396 | implementation actually figures out what information to send in a | |
5397 | reply. That is, we do not recommend any specific method of an IRAS | |
5398 | determining which DNS server should be returned to a requesting IRAC. | |
5399 | ||
5400 | 3.15.2. Meaning of INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET | |
5401 | ||
5402 | {{ Section added based on Clarif-6.3 }} | |
5403 | ||
5404 | INTERNAL_IP4/6_SUBNET attributes can indicate additional subnets, | |
5405 | ones that need one or more separate SAs, that can be reached through | |
5406 | the gateway that announces the attributes. INTERNAL_IP4/6_SUBNET | |
5407 | attributes may also express the gateway's policy about what traffic | |
5408 | should be sent through the gateway; the client can choose whether | |
5409 | other traffic (covered by TSr, but not in INTERNAL_IP4/6_SUBNET) is | |
5410 | sent through the gateway or directly to the destination. Thus, | |
5411 | traffic to the addresses listed in the INTERNAL_IP4/6_SUBNET | |
5412 | attributes should be sent through the gateway that announces the | |
5413 | attributes. If there are no existing IPsec SAs whose traffic | |
5414 | selectors cover the address in question, new SAs need to be created. | |
5415 | ||
5416 | For instance, if there are two subnets, 192.0.1.0/26 and | |
5417 | 192.0.2.0/24, and the client's request contains the following: | |
5418 | ||
5419 | CP(CFG_REQUEST) = | |
5420 | INTERNAL_IP4_ADDRESS() | |
5421 | TSi = (0, 0-65535, 0.0.0.0-255.255.255.255) | |
5422 | TSr = (0, 0-65535, 0.0.0.0-255.255.255.255) | |
5423 | ||
5424 | then a valid response could be the following (in which TSr and | |
5425 | INTERNAL_IP4_SUBNET contain the same information): | |
5426 | ||
5427 | ||
5428 | ||
5429 | ||
5430 | ||
5431 | Kaufman, et al. Expires August 27, 2006 [Page 97] | |
5432 | \f | |
5433 | Internet-Draft IKEv2bis February 2006 | |
5434 | ||
5435 | ||
5436 | CP(CFG_REPLY) = | |
5437 | INTERNAL_IP4_ADDRESS(192.0.1.234) | |
5438 | INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) | |
5439 | INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) | |
5440 | TSi = (0, 0-65535, 192.0.1.234-192.0.1.234) | |
5441 | TSr = ((0, 0-65535, 192.0.1.0-192.0.1.63), | |
5442 | (0, 0-65535, 192.0.2.0-192.0.2.255)) | |
5443 | ||
5444 | In these cases, the INTERNAL_IP4_SUBNET does not really carry any | |
5445 | useful information. | |
5446 | ||
5447 | A different possible reply would have been this: | |
5448 | ||
5449 | CP(CFG_REPLY) = | |
5450 | INTERNAL_IP4_ADDRESS(192.0.1.234) | |
5451 | INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) | |
5452 | INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) | |
5453 | TSi = (0, 0-65535, 192.0.1.234-192.0.1.234) | |
5454 | TSr = (0, 0-65535, 0.0.0.0-255.255.255.255) | |
5455 | ||
5456 | That reply would mean that the client can send all its traffic | |
5457 | through the gateway, but the gateway does not mind if the client | |
5458 | sends traffic not included by INTERNAL_IP4_SUBNET directly to the | |
5459 | destination (without going through the gateway). | |
5460 | ||
5461 | A different situation arises if the gateway has a policy that | |
5462 | requires the traffic for the two subnets to be carried in separate | |
5463 | SAs. Then a response like this would indicate to the client that if | |
5464 | it wants access to the second subnet, it needs to create a separate | |
5465 | SA: | |
5466 | ||
5467 | CP(CFG_REPLY) = | |
5468 | INTERNAL_IP4_ADDRESS(192.0.1.234) | |
5469 | INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) | |
5470 | INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) | |
5471 | TSi = (0, 0-65535, 192.0.1.234-192.0.1.234) | |
5472 | TSr = (0, 0-65535, 192.0.1.0-192.0.1.63) | |
5473 | ||
5474 | INTERNAL_IP4_SUBNET can also be useful if the client's TSr included | |
5475 | only part of the address space. For instance, if the client requests | |
5476 | the following: | |
5477 | ||
5478 | CP(CFG_REQUEST) = | |
5479 | INTERNAL_IP4_ADDRESS() | |
5480 | TSi = (0, 0-65535, 0.0.0.0-255.255.255.255) | |
5481 | TSr = (0, 0-65535, 192.0.2.155-192.0.2.155) | |
5482 | ||
5483 | then the gateway's reply might be: | |
5484 | ||
5485 | ||
5486 | ||
5487 | Kaufman, et al. Expires August 27, 2006 [Page 98] | |
5488 | \f | |
5489 | Internet-Draft IKEv2bis February 2006 | |
5490 | ||
5491 | ||
5492 | CP(CFG_REPLY) = | |
5493 | INTERNAL_IP4_ADDRESS(192.0.1.234) | |
5494 | INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) | |
5495 | INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) | |
5496 | TSi = (0, 0-65535, 192.0.1.234-192.0.1.234) | |
5497 | TSr = (0, 0-65535, 192.0.2.155-192.0.2.155) | |
5498 | ||
5499 | Because the meaning of INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET is in | |
5500 | CFG_REQUESTs is unclear, they cannot be used reliably in | |
5501 | CFG_REQUESTs. | |
5502 | ||
5503 | 3.15.3. Configuration payloads for IPv6 | |
5504 | ||
5505 | {{ Added this section from Clarif-6.5 }} | |
5506 | ||
5507 | The configuration payloads for IPv6 are based on the corresponding | |
5508 | IPv4 payloads, and do not fully follow the "normal IPv6 way of doing | |
5509 | things". In particular, IPv6 stateless autoconfiguration or router | |
5510 | advertisement messages are not used; neither is neighbor discovery. | |
5511 | ||
5512 | A client can be assigned an IPv6 address using the | |
5513 | INTERNAL_IP6_ADDRESS configuration payload. A minimal exchange might | |
5514 | look like this: | |
5515 | ||
5516 | CP(CFG_REQUEST) = | |
5517 | INTERNAL_IP6_ADDRESS() | |
5518 | INTERNAL_IP6_DNS() | |
5519 | TSi = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) | |
5520 | TSr = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) | |
5521 | ||
5522 | CP(CFG_REPLY) = | |
5523 | INTERNAL_IP6_ADDRESS(2001:DB8:0:1:2:3:4:5/64) | |
5524 | INTERNAL_IP6_DNS(2001:DB8:99:88:77:66:55:44) | |
5525 | TSi = (0, 0-65535, 2001:DB8:0:1:2:3:4:5 - 2001:DB8:0:1:2:3:4:5) | |
5526 | TSr = (0, 0-65535, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) | |
5527 | ||
5528 | The client MAY send a non-empty INTERNAL_IP6_ADDRESS attribute in the | |
5529 | CFG_REQUEST to request a specific address or interface identifier. | |
5530 | The gateway first checks if the specified address is acceptable, and | |
5531 | if it is, returns that one. If the address was not acceptable, the | |
5532 | gateway attempts to use the interface identifier with some other | |
5533 | prefix; if even that fails, the gateway selects another interface | |
5534 | identifier. | |
5535 | ||
5536 | The INTERNAL_IP6_ADDRESS attribute also contains a prefix length | |
5537 | field. When used in a CFG_REPLY, this corresponds to the | |
5538 | INTERNAL_IP4_NETMASK attribute in the IPv4 case. | |
5539 | ||
5540 | ||
5541 | ||
5542 | ||
5543 | Kaufman, et al. Expires August 27, 2006 [Page 99] | |
5544 | \f | |
5545 | Internet-Draft IKEv2bis February 2006 | |
5546 | ||
5547 | ||
5548 | Although this approach to configuring IPv6 addresses is reasonably | |
5549 | simple, it has some limitations. IPsec tunnels configured using | |
5550 | IKEv2 are not fully-featured "interfaces" in the IPv6 addressing | |
5551 | architecture sense [IPV6ADDR]. In particular, they do not | |
5552 | necessarily have link-local addresses, and this may complicate the | |
5553 | use of protocols that assume them, such as [MLDV2]. | |
5554 | ||
5555 | 3.15.4. Address Assignment Failures | |
5556 | ||
5557 | {{ Added this section from Clarif-6.8 }} | |
5558 | ||
5559 | If the responder encounters an error while attempting to assign an IP | |
5560 | address to the initiator, it responds with an | |
5561 | INTERNAL_ADDRESS_FAILURE notification. However, there are some more | |
5562 | complex error cases. | |
5563 | ||
5564 | If the responder does not support configuration payloads at all, it | |
5565 | can simply ignore all configuration payloads. This type of | |
5566 | implementation never sends INTERNAL_ADDRESS_FAILURE notifications. | |
5567 | If the initiator requires the assignment of an IP address, it will | |
5568 | treat a response without CFG_REPLY as an error. | |
5569 | ||
5570 | The initiator may request a particular type of address (IPv4 or IPv6) | |
5571 | that the responder does not support, even though the responder | |
5572 | supports configuration payloads. In this case, the responder simply | |
5573 | ignores the type of address it does not support and processes the | |
5574 | rest of the request as usual. | |
5575 | ||
5576 | If the initiator requests multiple addresses of a type that the | |
5577 | responder supports, and some (but not all) of the requests fail, the | |
5578 | responder replies with the successful addresses only. The responder | |
5579 | sends INTERNAL_ADDRESS_FAILURE only if no addresses can be assigned. | |
5580 | ||
5581 | 3.16. Extensible Authentication Protocol (EAP) Payload | |
5582 | ||
5583 | The Extensible Authentication Protocol Payload, denoted EAP in this | |
5584 | memo, allows IKE_SAs to be authenticated using the protocol defined | |
5585 | in RFC 3748 [EAP] and subsequent extensions to that protocol. The | |
5586 | full set of acceptable values for the payload is defined elsewhere, | |
5587 | but a short summary of RFC 3748 is included here to make this | |
5588 | document stand alone in the common cases. | |
5589 | ||
5590 | ||
5591 | ||
5592 | ||
5593 | ||
5594 | ||
5595 | ||
5596 | ||
5597 | ||
5598 | ||
5599 | Kaufman, et al. Expires August 27, 2006 [Page 100] | |
5600 | \f | |
5601 | Internet-Draft IKEv2bis February 2006 | |
5602 | ||
5603 | ||
5604 | 1 2 3 | |
5605 | 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 | |
5606 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5607 | ! Next Payload !C! RESERVED ! Payload Length ! | |
5608 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5609 | ! ! | |
5610 | ~ EAP Message ~ | |
5611 | ! ! | |
5612 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5613 | ||
5614 | Figure 24: EAP Payload Format | |
5615 | ||
5616 | The payload type for an EAP Payload is forty eight (48). | |
5617 | ||
5618 | 1 2 3 | |
5619 | 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 | |
5620 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5621 | ! Code ! Identifier ! Length ! | |
5622 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
5623 | ! Type ! Type_Data... | |
5624 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- | |
5625 | ||
5626 | Figure 25: EAP Message Format | |
5627 | ||
5628 | o Code (1 octet) indicates whether this message is a Request (1), | |
5629 | Response (2), Success (3), or Failure (4). | |
5630 | ||
5631 | o Identifier (1 octet) is used in PPP to distinguish replayed | |
5632 | messages from repeated ones. Since in IKE, EAP runs over a | |
5633 | reliable protocol, it serves no function here. In a response | |
5634 | message, this octet MUST be set to match the identifier in the | |
5635 | corresponding request. In other messages, this field MAY be set | |
5636 | to any value. | |
5637 | ||
5638 | o Length (2 octets) is the length of the EAP message and MUST be | |
5639 | four less than the Payload Length of the encapsulating payload. | |
5640 | ||
5641 | o Type (1 octet) is present only if the Code field is Request (1) or | |
5642 | Response (2). For other codes, the EAP message length MUST be | |
5643 | four octets and the Type and Type_Data fields MUST NOT be present. | |
5644 | In a Request (1) message, Type indicates the data being requested. | |
5645 | In a Response (2) message, Type MUST either be Nak or match the | |
5646 | type of the data requested. The following types are defined in | |
5647 | RFC 3748: | |
5648 | ||
5649 | ||
5650 | ||
5651 | ||
5652 | ||
5653 | ||
5654 | ||
5655 | Kaufman, et al. Expires August 27, 2006 [Page 101] | |
5656 | \f | |
5657 | Internet-Draft IKEv2bis February 2006 | |
5658 | ||
5659 | ||
5660 | 1 Identity | |
5661 | 2 Notification | |
5662 | 3 Nak (Response Only) | |
5663 | 4 MD5-Challenge | |
5664 | 5 One-Time Password (OTP) | |
5665 | 6 Generic Token Card | |
5666 | ||
5667 | o Type_Data (Variable Length) varies with the Type of Request and | |
5668 | the associated Response. For the documentation of the EAP | |
5669 | methods, see [EAP]. | |
5670 | ||
5671 | {{ Demoted the SHOULD NOT and SHOULD }} Note that since IKE passes an | |
5672 | indication of initiator identity in message 3 of the protocol, the | |
5673 | responder should not send EAP Identity requests. The initiator may, | |
5674 | however, respond to such requests if it receives them. | |
5675 | ||
5676 | ||
5677 | 4. Conformance Requirements | |
5678 | ||
5679 | In order to assure that all implementations of IKEv2 can | |
5680 | interoperate, there are "MUST support" requirements in addition to | |
5681 | those listed elsewhere. Of course, IKEv2 is a security protocol, and | |
5682 | one of its major functions is to allow only authorized parties to | |
5683 | successfully complete establishment of SAs. So a particular | |
5684 | implementation may be configured with any of a number of restrictions | |
5685 | concerning algorithms and trusted authorities that will prevent | |
5686 | universal interoperability. | |
5687 | ||
5688 | IKEv2 is designed to permit minimal implementations that can | |
5689 | interoperate with all compliant implementations. There are a series | |
5690 | of optional features that can easily be ignored by a particular | |
5691 | implementation if it does not support that feature. Those features | |
5692 | include: | |
5693 | ||
5694 | o Ability to negotiate SAs through a NAT and tunnel the resulting | |
5695 | ESP SA over UDP. | |
5696 | ||
5697 | o Ability to request (and respond to a request for) a temporary IP | |
5698 | address on the remote end of a tunnel. | |
5699 | ||
5700 | o Ability to support various types of legacy authentication. | |
5701 | ||
5702 | o Ability to support window sizes greater than one. | |
5703 | ||
5704 | o Ability to establish multiple ESP and/or AH SAs within a single | |
5705 | IKE_SA. | |
5706 | ||
5707 | ||
5708 | ||
5709 | ||
5710 | ||
5711 | Kaufman, et al. Expires August 27, 2006 [Page 102] | |
5712 | \f | |
5713 | Internet-Draft IKEv2bis February 2006 | |
5714 | ||
5715 | ||
5716 | o Ability to rekey SAs. | |
5717 | ||
5718 | To assure interoperability, all implementations MUST be capable of | |
5719 | parsing all payload types (if only to skip over them) and to ignore | |
5720 | payload types that it does not support unless the critical bit is set | |
5721 | in the payload header. If the critical bit is set in an unsupported | |
5722 | payload header, all implementations MUST reject the messages | |
5723 | containing those payloads. | |
5724 | ||
5725 | Every implementation MUST be capable of doing four-message | |
5726 | IKE_SA_INIT and IKE_AUTH exchanges establishing two SAs (one for IKE, | |
5727 | one for ESP and/or AH). Implementations MAY be initiate-only or | |
5728 | respond-only if appropriate for their platform. Every implementation | |
5729 | MUST be capable of responding to an INFORMATIONAL exchange, but a | |
5730 | minimal implementation MAY respond to any INFORMATIONAL message with | |
5731 | an empty INFORMATIONAL reply (note that within the context of an | |
5732 | IKE_SA, an "empty" message consists of an IKE header followed by an | |
5733 | Encrypted payload with no payloads contained in it). A minimal | |
5734 | implementation MAY support the CREATE_CHILD_SA exchange only in so | |
5735 | far as to recognize requests and reject them with a Notify payload of | |
5736 | type NO_ADDITIONAL_SAS. A minimal implementation need not be able to | |
5737 | initiate CREATE_CHILD_SA or INFORMATIONAL exchanges. When an SA | |
5738 | expires (based on locally configured values of either lifetime or | |
5739 | octets passed), and implementation MAY either try to renew it with a | |
5740 | CREATE_CHILD_SA exchange or it MAY delete (close) the old SA and | |
5741 | create a new one. If the responder rejects the CREATE_CHILD_SA | |
5742 | request with a NO_ADDITIONAL_SAS notification, the implementation | |
5743 | MUST be capable of instead deleting the old SA and creating a new | |
5744 | one. | |
5745 | ||
5746 | Implementations are not required to support requesting temporary IP | |
5747 | addresses or responding to such requests. If an implementation does | |
5748 | support issuing such requests, it MUST include a CP payload in | |
5749 | message 3 containing at least a field of type INTERNAL_IP4_ADDRESS or | |
5750 | INTERNAL_IP6_ADDRESS. All other fields are optional. If an | |
5751 | implementation supports responding to such requests, it MUST parse | |
5752 | the CP payload of type CFG_REQUEST in message 3 and recognize a field | |
5753 | of type INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS. If it supports | |
5754 | leasing an address of the appropriate type, it MUST return a CP | |
5755 | payload of type CFG_REPLY containing an address of the requested | |
5756 | type. {{ Demoted the SHOULD }} The responder may include any other | |
5757 | related attributes. | |
5758 | ||
5759 | A minimal IPv4 responder implementation will ignore the contents of | |
5760 | the CP payload except to determine that it includes an | |
5761 | INTERNAL_IP4_ADDRESS attribute and will respond with the address and | |
5762 | other related attributes regardless of whether the initiator | |
5763 | requested them. | |
5764 | ||
5765 | ||
5766 | ||
5767 | Kaufman, et al. Expires August 27, 2006 [Page 103] | |
5768 | \f | |
5769 | Internet-Draft IKEv2bis February 2006 | |
5770 | ||
5771 | ||
5772 | A minimal IPv4 initiator will generate a CP payload containing only | |
5773 | an INTERNAL_IP4_ADDRESS attribute and will parse the response | |
5774 | ignoring attributes it does not know how to use. {{ Clarif-6.7 | |
5775 | removes the sentence about processing INTERNAL_ADDRESS_EXPIRY. }} | |
5776 | Minimal initiators need not be able to request lease renewals and | |
5777 | minimal responders need not respond to them. | |
5778 | ||
5779 | For an implementation to be called conforming to this specification, | |
5780 | it MUST be possible to configure it to accept the following: | |
5781 | ||
5782 | o PKIX Certificates containing and signed by RSA keys of size 1024 | |
5783 | or 2048 bits, where the ID passed is any of ID_KEY_ID, ID_FQDN, | |
5784 | ID_RFC822_ADDR, or ID_DER_ASN1_DN. | |
5785 | ||
5786 | o Shared key authentication where the ID passes is any of ID_KEY_ID, | |
5787 | ID_FQDN, or ID_RFC822_ADDR. | |
5788 | ||
5789 | o Authentication where the responder is authenticated using PKIX | |
5790 | Certificates and the initiator is authenticated using shared key | |
5791 | authentication. | |
5792 | ||
5793 | ||
5794 | 5. Security Considerations | |
5795 | ||
5796 | While this protocol is designed to minimize disclosure of | |
5797 | configuration information to unauthenticated peers, some such | |
5798 | disclosure is unavoidable. One peer or the other must identify | |
5799 | itself first and prove its identity first. To avoid probing, the | |
5800 | initiator of an exchange is required to identify itself first, and | |
5801 | usually is required to authenticate itself first. The initiator can, | |
5802 | however, learn that the responder supports IKE and what cryptographic | |
5803 | protocols it supports. The responder (or someone impersonating the | |
5804 | responder) can probe the initiator not only for its identity, but | |
5805 | using CERTREQ payloads may be able to determine what certificates the | |
5806 | initiator is willing to use. | |
5807 | ||
5808 | Use of EAP authentication changes the probing possibilities somewhat. | |
5809 | When EAP authentication is used, the responder proves its identity | |
5810 | before the initiator does, so an initiator that knew the name of a | |
5811 | valid initiator could probe the responder for both its name and | |
5812 | certificates. | |
5813 | ||
5814 | Repeated rekeying using CREATE_CHILD_SA without additional Diffie- | |
5815 | Hellman exchanges leaves all SAs vulnerable to cryptanalysis of a | |
5816 | single key or overrun of either endpoint. Implementers should take | |
5817 | note of this fact and set a limit on CREATE_CHILD_SA exchanges | |
5818 | between exponentiations. This memo does not prescribe such a limit. | |
5819 | ||
5820 | ||
5821 | ||
5822 | ||
5823 | Kaufman, et al. Expires August 27, 2006 [Page 104] | |
5824 | \f | |
5825 | Internet-Draft IKEv2bis February 2006 | |
5826 | ||
5827 | ||
5828 | The strength of a key derived from a Diffie-Hellman exchange using | |
5829 | any of the groups defined here depends on the inherent strength of | |
5830 | the group, the size of the exponent used, and the entropy provided by | |
5831 | the random number generator used. Due to these inputs, it is | |
5832 | difficult to determine the strength of a key for any of the defined | |
5833 | groups. Diffie-Hellman group number two, when used with a strong | |
5834 | random number generator and an exponent no less than 200 bits, is | |
5835 | common for use with 3DES. Group five provides greater security than | |
5836 | group two. Group one is for historic purposes only and does not | |
5837 | provide sufficient strength except for use with DES, which is also | |
5838 | for historic use only. Implementations should make note of these | |
5839 | estimates when establishing policy and negotiating security | |
5840 | parameters. | |
5841 | ||
5842 | Note that these limitations are on the Diffie-Hellman groups | |
5843 | themselves. There is nothing in IKE that prohibits using stronger | |
5844 | groups nor is there anything that will dilute the strength obtained | |
5845 | from stronger groups (limited by the strength of the other algorithms | |
5846 | negotiated including the prf function). In fact, the extensible | |
5847 | framework of IKE encourages the definition of more groups; use of | |
5848 | elliptical curve groups may greatly increase strength using much | |
5849 | smaller numbers. | |
5850 | ||
5851 | It is assumed that all Diffie-Hellman exponents are erased from | |
5852 | memory after use. In particular, these exponents MUST NOT be derived | |
5853 | from long-lived secrets like the seed to a pseudo-random generator | |
5854 | that is not erased after use. | |
5855 | ||
5856 | The strength of all keys is limited by the size of the output of the | |
5857 | negotiated prf function. For this reason, a prf function whose | |
5858 | output is less than 128 bits (e.g., 3DES-CBC) MUST NOT be used with | |
5859 | this protocol. | |
5860 | ||
5861 | The security of this protocol is critically dependent on the | |
5862 | randomness of the randomly chosen parameters. These should be | |
5863 | generated by a strong random or properly seeded pseudo-random source | |
5864 | (see [RANDOMNESS]). Implementers should take care to ensure that use | |
5865 | of random numbers for both keys and nonces is engineered in a fashion | |
5866 | that does not undermine the security of the keys. | |
5867 | ||
5868 | For information on the rationale of many of the cryptographic design | |
5869 | choices in this protocol, see [SIGMA] and [SKEME]. Though the | |
5870 | security of negotiated CHILD_SAs does not depend on the strength of | |
5871 | the encryption and integrity protection negotiated in the IKE_SA, | |
5872 | implementations MUST NOT negotiate NONE as the IKE integrity | |
5873 | protection algorithm or ENCR_NULL as the IKE encryption algorithm. | |
5874 | ||
5875 | When using pre-shared keys, a critical consideration is how to assure | |
5876 | ||
5877 | ||
5878 | ||
5879 | Kaufman, et al. Expires August 27, 2006 [Page 105] | |
5880 | \f | |
5881 | Internet-Draft IKEv2bis February 2006 | |
5882 | ||
5883 | ||
5884 | the randomness of these secrets. The strongest practice is to ensure | |
5885 | that any pre-shared key contain as much randomness as the strongest | |
5886 | key being negotiated. Deriving a shared secret from a password, | |
5887 | name, or other low-entropy source is not secure. These sources are | |
5888 | subject to dictionary and social engineering attacks, among others. | |
5889 | ||
5890 | The NAT_DETECTION_*_IP notifications contain a hash of the addresses | |
5891 | and ports in an attempt to hide internal IP addresses behind a NAT. | |
5892 | Since the IPv4 address space is only 32 bits, and it is usually very | |
5893 | sparse, it would be possible for an attacker to find out the internal | |
5894 | address used behind the NAT box by trying all possible IP addresses | |
5895 | and trying to find the matching hash. The port numbers are normally | |
5896 | fixed to 500, and the SPIs can be extracted from the packet. This | |
5897 | reduces the number of hash calculations to 2^32. With an educated | |
5898 | guess of the use of private address space, the number of hash | |
5899 | calculations is much smaller. Designers should therefore not assume | |
5900 | that use of IKE will not leak internal address information. | |
5901 | ||
5902 | When using an EAP authentication method that does not generate a | |
5903 | shared key for protecting a subsequent AUTH payload, certain man-in- | |
5904 | the-middle and server impersonation attacks are possible [EAPMITM]. | |
5905 | These vulnerabilities occur when EAP is also used in protocols that | |
5906 | are not protected with a secure tunnel. Since EAP is a general- | |
5907 | purpose authentication protocol, which is often used to provide | |
5908 | single-signon facilities, a deployed IPsec solution that relies on an | |
5909 | EAP authentication method that does not generate a shared key (also | |
5910 | known as a non-key-generating EAP method) can become compromised due | |
5911 | to the deployment of an entirely unrelated application that also | |
5912 | happens to use the same non-key-generating EAP method, but in an | |
5913 | unprotected fashion. Note that this vulnerability is not limited to | |
5914 | just EAP, but can occur in other scenarios where an authentication | |
5915 | infrastructure is reused. For example, if the EAP mechanism used by | |
5916 | IKEv2 utilizes a token authenticator, a man-in-the-middle attacker | |
5917 | could impersonate the web server, intercept the token authentication | |
5918 | exchange, and use it to initiate an IKEv2 connection. For this | |
5919 | reason, use of non-key-generating EAP methods SHOULD be avoided where | |
5920 | possible. Where they are used, it is extremely important that all | |
5921 | usages of these EAP methods SHOULD utilize a protected tunnel, where | |
5922 | the initiator validates the responder's certificate before initiating | |
5923 | the EAP exchange. {{ Demoted the SHOULD }} Implementers should | |
5924 | describe the vulnerabilities of using non-key-generating EAP methods | |
5925 | in the documentation of their implementations so that the | |
5926 | administrators deploying IPsec solutions are aware of these dangers. | |
5927 | ||
5928 | An implementation using EAP MUST also use a public-key-based | |
5929 | authentication of the server to the client before the EAP exchange | |
5930 | begins, even if the EAP method offers mutual authentication. This | |
5931 | avoids having additional IKEv2 protocol variations and protects the | |
5932 | ||
5933 | ||
5934 | ||
5935 | Kaufman, et al. Expires August 27, 2006 [Page 106] | |
5936 | \f | |
5937 | Internet-Draft IKEv2bis February 2006 | |
5938 | ||
5939 | ||
5940 | EAP data from active attackers. | |
5941 | ||
5942 | If the messages of IKEv2 are long enough that IP-level fragmentation | |
5943 | is necessary, it is possible that attackers could prevent the | |
5944 | exchange from completing by exhausting the reassembly buffers. The | |
5945 | chances of this can be minimized by using the Hash and URL encodings | |
5946 | instead of sending certificates (see Section 3.6). Additional | |
5947 | mitigations are discussed in [DOSUDPPROT]. | |
5948 | ||
5949 | 5.1. Traffic selector authorization | |
5950 | ||
5951 | {{ Added this section from Clarif-4.13 }} | |
5952 | ||
5953 | IKEv2 relies on information in the Peer Authorization Database (PAD) | |
5954 | when determining what kind of IPsec SAs a peer is allowed to create. | |
5955 | This process is described in [IPSECARCH] Section 4.4.3. When a peer | |
5956 | requests the creation of an IPsec SA with some traffic selectors, the | |
5957 | PAD must contain "Child SA Authorization Data" linking the identity | |
5958 | authenticated by IKEv2 and the addresses permitted for traffic | |
5959 | selectors. | |
5960 | ||
5961 | For example, the PAD might be configured so that authenticated | |
5962 | identity "sgw23.example.com" is allowed to create IPsec SAs for | |
5963 | 192.0.2.0/24, meaning this security gateway is a valid | |
5964 | "representative" for these addresses. Host-to-host IPsec requires | |
5965 | similar entries, linking, for example, "fooserver4.example.com" with | |
5966 | 192.0.1.66/32, meaning this identity a valid "owner" or | |
5967 | "representative" of the address in question. | |
5968 | ||
5969 | As noted in [IPSECARCH], "It is necessary to impose these constraints | |
5970 | on creation of child SAs to prevent an authenticated peer from | |
5971 | spoofing IDs associated with other, legitimate peers." In the | |
5972 | example given above, a correct configuration of the PAD prevents | |
5973 | sgw23 from creating IPsec SAs with address 192.0.1.66, and prevents | |
5974 | fooserver4 from creating IPsec SAs with addresses from 192.0.2.0/24. | |
5975 | ||
5976 | It is important to note that simply sending IKEv2 packets using some | |
5977 | particular address does not imply a permission to create IPsec SAs | |
5978 | with that address in the traffic selectors. For example, even if | |
5979 | sgw23 would be able to spoof its IP address as 192.0.1.66, it could | |
5980 | not create IPsec SAs matching fooserver4's traffic. | |
5981 | ||
5982 | The IKEv2 specification does not specify how exactly IP address | |
5983 | assignment using configuration payloads interacts with the PAD. Our | |
5984 | interpretation is that when a security gateway assigns an address | |
5985 | using configuration payloads, it also creates a temporary PAD entry | |
5986 | linking the authenticated peer identity and the newly allocated inner | |
5987 | address. | |
5988 | ||
5989 | ||
5990 | ||
5991 | Kaufman, et al. Expires August 27, 2006 [Page 107] | |
5992 | \f | |
5993 | Internet-Draft IKEv2bis February 2006 | |
5994 | ||
5995 | ||
5996 | It has been recognized that configuring the PAD correctly may be | |
5997 | difficult in some environments. For instance, if IPsec is used | |
5998 | between a pair of hosts whose addresses are allocated dynamically | |
5999 | using DHCP, it is extremely difficult to ensure that the PAD | |
6000 | specifies the correct "owner" for each IP address. This would | |
6001 | require a mechanism to securely convey address assignments from the | |
6002 | DHCP server, and link them to identities authenticated using IKEv2. | |
6003 | ||
6004 | Due to this limitation, some vendors have been known to configure | |
6005 | their PADs to allow an authenticated peer to create IPsec SAs with | |
6006 | traffic selectors containing the same address that was used for the | |
6007 | IKEv2 packets. In environments where IP spoofing is possible (i.e., | |
6008 | almost everywhere) this essentially allows any peer to create IPsec | |
6009 | SAs with any traffic selectors. This is not an appropriate or secure | |
6010 | configuration in most circumstances. See [H2HIPSEC] for an extensive | |
6011 | discussion about this issue, and the limitations of host-to-host | |
6012 | IPsec in general. | |
6013 | ||
6014 | ||
6015 | 6. IANA Considerations | |
6016 | ||
6017 | {{ This section was changed to not re-define any new IANA registries. | |
6018 | }} | |
6019 | ||
6020 | [IKEV2] defined many field types and values. IANA has already | |
6021 | registered those types and values, so the are not listed here again. | |
6022 | No new types or values are registered in this document. | |
6023 | ||
6024 | ||
6025 | 7. Acknowledgements | |
6026 | ||
6027 | The acknowledgements from the IKEv2 document were: | |
6028 | ||
6029 | This document is a collaborative effort of the entire IPsec WG. If | |
6030 | there were no limit to the number of authors that could appear on an | |
6031 | RFC, the following, in alphabetical order, would have been listed: | |
6032 | Bill Aiello, Stephane Beaulieu, Steve Bellovin, Sara Bitan, Matt | |
6033 | Blaze, Ran Canetti, Darren Dukes, Dan Harkins, Paul Hoffman, John | |
6034 | Ioannidis, Charlie Kaufman, Steve Kent, Angelos Keromytis, Tero | |
6035 | Kivinen, Hugo Krawczyk, Andrew Krywaniuk, Radia Perlman, Omer | |
6036 | Reingold, and Michael Richardson. Many other people contributed to | |
6037 | the design. It is an evolution of IKEv1, ISAKMP, and the IPsec DOI, | |
6038 | each of which has its own list of authors. Hugh Daniel suggested the | |
6039 | feature of having the initiator, in message 3, specify a name for the | |
6040 | responder, and gave the feature the cute name "You Tarzan, Me Jane". | |
6041 | David Faucher and Valery Smyzlov helped refine the design of the | |
6042 | traffic selector negotiation. | |
6043 | ||
6044 | ||
6045 | ||
6046 | ||
6047 | Kaufman, et al. Expires August 27, 2006 [Page 108] | |
6048 | \f | |
6049 | Internet-Draft IKEv2bis February 2006 | |
6050 | ||
6051 | ||
6052 | This paragraph lists references that appear only in figures. The | |
6053 | section is only here to keep the 'xml2rfc' program happy, and will be | |
6054 | removed when the document is published. Feel free to ignore it. | |
6055 | [DES] [IDEA] [MD5] [X.501] [X.509] | |
6056 | ||
6057 | ||
6058 | 8. References | |
6059 | ||
6060 | 8.1. Normative References | |
6061 | ||
6062 | [ADDGROUP] | |
6063 | Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) | |
6064 | Diffie-Hellman groups for Internet Key Exchange (IKE)", | |
6065 | RFC 3526, May 2003. | |
6066 | ||
6067 | [ADDRIPV6] | |
6068 | Hinden, R. and S. Deering, "Internet Protocol Version 6 | |
6069 | (IPv6) Addressing Architecture", RFC 3513, April 2003. | |
6070 | ||
6071 | [Clarif] "IKEv2 Clarifications and Implementation Guidelines", | |
6072 | draft-eronen-ipsec-ikev2-clarifications (work in | |
6073 | progress). | |
6074 | ||
6075 | [EAP] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. | |
6076 | Levkowetz, "Extensible Authentication Protocol (EAP)", | |
6077 | RFC 3748, June 2004. | |
6078 | ||
6079 | [ECN] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition | |
6080 | of Explicit Congestion Notification (ECN) to IP", | |
6081 | RFC 3168, September 2001. | |
6082 | ||
6083 | [ESPCBC] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher | |
6084 | Algorithms", RFC 2451, November 1998. | |
6085 | ||
6086 | [IANACONS] | |
6087 | Narten, T. and H. Alvestrand, "Guidelines for Writing an | |
6088 | IANA Considerations Section in RFCs", BCP 26, RFC 2434. | |
6089 | ||
6090 | [IKEV2] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", | |
6091 | RFC 4306, December 2005. | |
6092 | ||
6093 | [IPSECARCH] | |
6094 | Kent, S. and K. Seo, "Security Architecture for the | |
6095 | Internet Protocol", RFC 4301, December 2005. | |
6096 | ||
6097 | [MUSTSHOULD] | |
6098 | Bradner, S., "Key Words for use in RFCs to indicate | |
6099 | Requirement Levels", BCP 14, RFC 2119, March 1997. | |
6100 | ||
6101 | ||
6102 | ||
6103 | Kaufman, et al. Expires August 27, 2006 [Page 109] | |
6104 | \f | |
6105 | Internet-Draft IKEv2bis February 2006 | |
6106 | ||
6107 | ||
6108 | [PKIX] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet | |
6109 | X.509 Public Key Infrastructure Certificate and | |
6110 | Certificate Revocation List (CRL) Profile", RFC 3280, | |
6111 | April 2002. | |
6112 | ||
6113 | [UDPENCAPS] | |
6114 | Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. | |
6115 | Stenberg, "UDP Encapsulation of IPsec ESP Packets", | |
6116 | RFC 3948, January 2005. | |
6117 | ||
6118 | 8.2. Informative References | |
6119 | ||
6120 | [AH] Kent, S., "IP Authentication Header", RFC 4302, | |
6121 | December 2005. | |
6122 | ||
6123 | [ARCHGUIDEPHIL] | |
6124 | Bush, R. and D. Meyer, "Some Internet Architectural | |
6125 | Guidelines and Philosophy", RFC 3439, December 2002. | |
6126 | ||
6127 | [ARCHPRINC] | |
6128 | Carpenter, B., "Architectural Principles of the Internet", | |
6129 | RFC 1958, June 1996. | |
6130 | ||
6131 | [DES] American National Standards Institute, "American National | |
6132 | Standard for Information Systems-Data Link Encryption", | |
6133 | ANSI X3.106, 1983. | |
6134 | ||
6135 | [DH] Diffie, W. and M. Hellman, "New Directions in | |
6136 | Cryptography", IEEE Transactions on Information Theory, | |
6137 | V.IT-22 n. 6, June 1977. | |
6138 | ||
6139 | [DHCP] Droms, R., "Dynamic Host Configuration Protocol", | |
6140 | RFC 2131, March 1997. | |
6141 | ||
6142 | [DIFFSERVARCH] | |
6143 | Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., | |
6144 | and W. Weiss, "An Architecture for Differentiated | |
6145 | Services", RFC 2475. | |
6146 | ||
6147 | [DIFFSERVFIELD] | |
6148 | Nichols, K., Blake, S., Baker, F., and D. Black, | |
6149 | "Definition of the Differentiated Services Field (DS | |
6150 | Field) in the IPv4 and IPv6 Headers", RFC 2474, | |
6151 | December 1998. | |
6152 | ||
6153 | [DIFFTUNNEL] | |
6154 | Black, D., "Differentiated Services and Tunnels", | |
6155 | RFC 2983, October 2000. | |
6156 | ||
6157 | ||
6158 | ||
6159 | Kaufman, et al. Expires August 27, 2006 [Page 110] | |
6160 | \f | |
6161 | Internet-Draft IKEv2bis February 2006 | |
6162 | ||
6163 | ||
6164 | [DOI] Piper, D., "The Internet IP Security Domain of | |
6165 | Interpretation for ISAKMP", RFC 2407, November 1998. | |
6166 | ||
6167 | [DOSUDPPROT] | |
6168 | C. Kaufman, R. Perlman, and B. Sommerfeld, "DoS protection | |
6169 | for UDP-based protocols", ACM Conference on Computer and | |
6170 | Communications Security , October 2003. | |
6171 | ||
6172 | [DSS] National Institute of Standards and Technology, U.S. | |
6173 | Department of Commerce, "Digital Signature Standard", | |
6174 | FIPS 186, May 1994. | |
6175 | ||
6176 | [EAPMITM] N. Asokan, V. Nierni, and K. Nyberg, "Man-in-the-Middle in | |
6177 | Tunneled Authentication Protocols", November 2002, | |
6178 | <http://eprint.iacr.org/2002/163>. | |
6179 | ||
6180 | [ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", | |
6181 | RFC 4303, December 2005. | |
6182 | ||
6183 | [EXCHANGEANALYSIS] | |
6184 | R. Perlman and C. Kaufman, "Analysis of the IPsec key | |
6185 | exchange Standard", WET-ICE Security Conference, MIT , | |
6186 | 2001, | |
6187 | <http://sec.femto.org/wetice-2001/papers/radia-paper.pdf>. | |
6188 | ||
6189 | [H2HIPSEC] | |
6190 | Aura, T., Roe, M., and A. Mohammed, "Experiences with | |
6191 | Host-to-Host IPsec", 13th International Workshop on | |
6192 | Security Protocols, Cambridge, UK, April 2005. | |
6193 | ||
6194 | [HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | |
6195 | Hashing for Message Authentication", RFC 2104, | |
6196 | February 1997. | |
6197 | ||
6198 | [IDEA] X. Lai, "On the Design and Security of Block Ciphers", ETH | |
6199 | Series in Information Processing, v. 1, Konstanz: Hartung- | |
6200 | Gorre Verlag, 1992. | |
6201 | ||
6202 | [IKEV1] Harkins, D. and D. Carrel, "The Internet Key Exchange | |
6203 | (IKE)", RFC 2409, November 1998. | |
6204 | ||
6205 | [IPCOMP] Shacham, A., Monsour, B., Pereira, R., and M. Thomas, "IP | |
6206 | Payload Compression Protocol (IPComp)", RFC 3173, | |
6207 | September 2001. | |
6208 | ||
6209 | [IPSECARCH-OLD] | |
6210 | Kent, S. and R. Atkinson, "Security Architecture for the | |
6211 | Internet Protocol", RFC 2401, November 1998. | |
6212 | ||
6213 | ||
6214 | ||
6215 | Kaufman, et al. Expires August 27, 2006 [Page 111] | |
6216 | \f | |
6217 | Internet-Draft IKEv2bis February 2006 | |
6218 | ||
6219 | ||
6220 | [IPV6ADDR] | |
6221 | Hinden, R. and S. Deering, "Internet Protocol Version 6 | |
6222 | (IPv6) Addressing Architecture", RFC 3513, April 2003. | |
6223 | ||
6224 | [ISAKMP] Maughan, D., Schneider, M., and M. Schertler, "Internet | |
6225 | Security Association and Key Management Protocol | |
6226 | (ISAKMP)", RFC 2408, November 1998. | |
6227 | ||
6228 | [LDAP] Wahl, M., Howes, T., and S. Kille, "Lightweight Directory | |
6229 | Access Protocol (v3)", RFC 2251, December 1997. | |
6230 | ||
6231 | [MAILFORMAT] | |
6232 | Resnick, P., "Internet Message Format", RFC 2822, | |
6233 | April 2001. | |
6234 | ||
6235 | [MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, | |
6236 | April 1992. | |
6237 | ||
6238 | [MIPV6] Johnson, D., Perkins, C., and J. Arkko, "Mobility Support | |
6239 | in IPv6", RFC 3775, June 2004. | |
6240 | ||
6241 | [MLDV2] Vida, R. and L. Costa, "Multicast Listener Discovery | |
6242 | Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. | |
6243 | ||
6244 | [NAI] Aboba, B. and M. Beadles, "The Network Access Identifier", | |
6245 | RFC 2486, January 1999. | |
6246 | ||
6247 | [NATREQ] Aboba, B. and W. Dixon, "IPsec-Network Address Translation | |
6248 | (NAT) Compatibility Requirements", RFC 3715, March 2004. | |
6249 | ||
6250 | [OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol", | |
6251 | RFC 2412, November 1998. | |
6252 | ||
6253 | [PFKEY] McDonald, D., Metz, C., and B. Phan, "PF_KEY Key | |
6254 | Management API, Version 2", RFC 2367, July 1998. | |
6255 | ||
6256 | [PHOTURIS] | |
6257 | Karn, P. and W. Simpson, "Photuris: Session-Key Management | |
6258 | Protocol", RFC 2522, March 1999. | |
6259 | ||
6260 | [PKCS1] B. Kaliski and J. Staddon, "PKCS #1: RSA Cryptography | |
6261 | Specifications Version 2", September 1998. | |
6262 | ||
6263 | [PRFAES128CBC] | |
6264 | Hoffman, P., "The AES-XCBC-PRF-128 Algorithm for the | |
6265 | Internet Key Exchange Protocol (IKE)", RFC 3664, | |
6266 | January 2004. | |
6267 | ||
6268 | ||
6269 | ||
6270 | ||
6271 | Kaufman, et al. Expires August 27, 2006 [Page 112] | |
6272 | \f | |
6273 | Internet-Draft IKEv2bis February 2006 | |
6274 | ||
6275 | ||
6276 | [PRFAES128CBC-bis] | |
6277 | Hoffman, P., "The AES-XCBC-PRF-128 Algorithm for the | |
6278 | Internet Key Exchange Protocol (IKE)", | |
6279 | draft-hoffman-rfc3664bis (work in progress), October 2005. | |
6280 | ||
6281 | [RADIUS] Rigney, C., Rubens, A., Simpson, W., and S. Willens, | |
6282 | "Remote Authentication Dial In User Service (RADIUS)", | |
6283 | RFC 2138, April 1997. | |
6284 | ||
6285 | [RANDOMNESS] | |
6286 | Eastlake, D., Schiller, J., and S. Crocker, "Randomness | |
6287 | Requirements for Security", BCP 106, RFC 4086, June 2005. | |
6288 | ||
6289 | [REAUTH] Nir, Y., ""Repeated Authentication in IKEv2", | |
6290 | draft-nir-ikev2-auth-lt (work in progress), May 2005. | |
6291 | ||
6292 | [RSA] R. Rivest, A. Shamir, and L. Adleman, "A Method for | |
6293 | Obtaining Digital Signatures and Public-Key | |
6294 | Cryptosystems", February 1978. | |
6295 | ||
6296 | [SHA] National Institute of Standards and Technology, U.S. | |
6297 | Department of Commerce, "Secure Hash Standard", | |
6298 | FIPS 180-1, May 1994. | |
6299 | ||
6300 | [SIGMA] H. Krawczyk, "SIGMA: the `SIGn-and-MAc' Approach to | |
6301 | Authenticated Diffie-Hellman and its Use in the IKE | |
6302 | Protocols", Advances in Cryptography - CRYPTO 2003 | |
6303 | Proceedings LNCS 2729, 2003, <http:// | |
6304 | www.informatik.uni-trier.de/~ley/db/conf/crypto/ | |
6305 | crypto2003.html>. | |
6306 | ||
6307 | [SKEME] H. Krawczyk, "SKEME: A Versatile Secure Key Exchange | |
6308 | Mechanism for Internet", IEEE Proceedings of the 1996 | |
6309 | Symposium on Network and Distributed Systems Security , | |
6310 | 1996. | |
6311 | ||
6312 | [TRANSPARENCY] | |
6313 | Carpenter, B., "Internet Transparency", RFC 2775, | |
6314 | February 2000. | |
6315 | ||
6316 | [X.501] ITU-T, "Recommendation X.501: Information Technology - | |
6317 | Open Systems Interconnection - The Directory: Models", | |
6318 | 1993. | |
6319 | ||
6320 | [X.509] ITU-T, "Recommendation X.509 (1997 E): Information | |
6321 | Technology - Open Systems Interconnection - The Directory: | |
6322 | Authentication Framework", 1997. | |
6323 | ||
6324 | ||
6325 | ||
6326 | ||
6327 | Kaufman, et al. Expires August 27, 2006 [Page 113] | |
6328 | \f | |
6329 | Internet-Draft IKEv2bis February 2006 | |
6330 | ||
6331 | ||
6332 | Appendix A. Summary of changes from IKEv1 | |
6333 | ||
6334 | The goals of this revision to IKE are: | |
6335 | ||
6336 | 1. To define the entire IKE protocol in a single document, | |
6337 | replacing RFCs 2407, 2408, and 2409 and incorporating subsequent | |
6338 | changes to support NAT Traversal, Extensible Authentication, and | |
6339 | Remote Address acquisition; | |
6340 | ||
6341 | 2. To simplify IKE by replacing the eight different initial | |
6342 | exchanges with a single four-message exchange (with changes in | |
6343 | authentication mechanisms affecting only a single AUTH payload | |
6344 | rather than restructuring the entire exchange) see | |
6345 | [EXCHANGEANALYSIS]; | |
6346 | ||
6347 | 3. To remove the Domain of Interpretation (DOI), Situation (SIT), | |
6348 | and Labeled Domain Identifier fields, and the Commit and | |
6349 | Authentication only bits; | |
6350 | ||
6351 | 4. To decrease IKE's latency in the common case by making the | |
6352 | initial exchange be 2 round trips (4 messages), and allowing the | |
6353 | ability to piggyback setup of a CHILD_SA on that exchange; | |
6354 | ||
6355 | 5. To replace the cryptographic syntax for protecting the IKE | |
6356 | messages themselves with one based closely on ESP to simplify | |
6357 | implementation and security analysis; | |
6358 | ||
6359 | 6. To reduce the number of possible error states by making the | |
6360 | protocol reliable (all messages are acknowledged) and sequenced. | |
6361 | This allows shortening CREATE_CHILD_SA exchanges from 3 messages | |
6362 | to 2; | |
6363 | ||
6364 | 7. To increase robustness by allowing the responder to not do | |
6365 | significant processing until it receives a message proving that | |
6366 | the initiator can receive messages at its claimed IP address, | |
6367 | and not commit any state to an exchange until the initiator can | |
6368 | be cryptographically authenticated; | |
6369 | ||
6370 | 8. To fix cryptographic weaknesses such as the problem with | |
6371 | symmetries in hashes used for authentication documented by Tero | |
6372 | Kivinen; | |
6373 | ||
6374 | 9. To specify Traffic Selectors in their own payloads type rather | |
6375 | than overloading ID payloads, and making more flexible the | |
6376 | Traffic Selectors that may be specified; | |
6377 | ||
6378 | 10. To specify required behavior under certain error conditions or | |
6379 | when data that is not understood is received in order to make it | |
6380 | ||
6381 | ||
6382 | ||
6383 | Kaufman, et al. Expires August 27, 2006 [Page 114] | |
6384 | \f | |
6385 | Internet-Draft IKEv2bis February 2006 | |
6386 | ||
6387 | ||
6388 | easier to make future revisions in a way that does not break | |
6389 | backwards compatibility; | |
6390 | ||
6391 | 11. To simplify and clarify how shared state is maintained in the | |
6392 | presence of network failures and Denial of Service attacks; and | |
6393 | ||
6394 | 12. To maintain existing syntax and magic numbers to the extent | |
6395 | possible to make it likely that implementations of IKEv1 can be | |
6396 | enhanced to support IKEv2 with minimum effort. | |
6397 | ||
6398 | ||
6399 | Appendix B. Diffie-Hellman Groups | |
6400 | ||
6401 | There are two Diffie-Hellman groups defined here for use in IKE. | |
6402 | These groups were generated by Richard Schroeppel at the University | |
6403 | of Arizona. Properties of these primes are described in [OAKLEY]. | |
6404 | ||
6405 | The strength supplied by group one may not be sufficient for the | |
6406 | mandatory-to-implement encryption algorithm and is here for historic | |
6407 | reasons. | |
6408 | ||
6409 | Additional Diffie-Hellman groups have been defined in [ADDGROUP]. | |
6410 | ||
6411 | B.1. Group 1 - 768 Bit MODP | |
6412 | ||
6413 | This group is assigned id 1 (one). | |
6414 | ||
6415 | The prime is: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } | |
6416 | Its hexadecimal value is: | |
6417 | ||
6418 | FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 | |
6419 | 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD | |
6420 | EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 | |
6421 | E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF | |
6422 | ||
6423 | The generator is 2. | |
6424 | ||
6425 | B.2. Group 2 - 1024 Bit MODP | |
6426 | ||
6427 | This group is assigned id 2 (two). | |
6428 | ||
6429 | ||
6430 | ||
6431 | ||
6432 | ||
6433 | ||
6434 | ||
6435 | ||
6436 | ||
6437 | ||
6438 | ||
6439 | Kaufman, et al. Expires August 27, 2006 [Page 115] | |
6440 | \f | |
6441 | Internet-Draft IKEv2bis February 2006 | |
6442 | ||
6443 | ||
6444 | The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }. | |
6445 | Its hexadecimal value is: | |
6446 | ||
6447 | FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 | |
6448 | 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD | |
6449 | EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 | |
6450 | E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED | |
6451 | EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 | |
6452 | FFFFFFFF FFFFFFFF | |
6453 | ||
6454 | The generator is 2. | |
6455 | ||
6456 | ||
6457 | Appendix C. Exchanges and Payloads | |
6458 | ||
6459 | {{ Clarif-AppA }} | |
6460 | ||
6461 | This appendix contains a short summary of the IKEv2 exchanges, and | |
6462 | what payloads can appear in which message. This appendix is purely | |
6463 | informative; if it disagrees with the body of this document, the | |
6464 | other text is considered correct. | |
6465 | ||
6466 | Vendor-ID (V) payloads may be included in any place in any message. | |
6467 | This sequence here shows what are the most logical places for them. | |
6468 | ||
6469 | C.1. IKE_SA_INIT Exchange | |
6470 | ||
6471 | request --> [N(COOKIE)], | |
6472 | SA, KE, Ni, | |
6473 | [N(NAT_DETECTION_SOURCE_IP)+, | |
6474 | N(NAT_DETECTION_DESTINATION_IP)], | |
6475 | [V+] | |
6476 | ||
6477 | normal response <-- SA, KE, Nr, | |
6478 | (no cookie) [N(NAT_DETECTION_SOURCE_IP), | |
6479 | N(NAT_DETECTION_DESTINATION_IP)], | |
6480 | [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], | |
6481 | [V+] | |
6482 | ||
6483 | ||
6484 | ||
6485 | ||
6486 | ||
6487 | ||
6488 | ||
6489 | ||
6490 | ||
6491 | ||
6492 | ||
6493 | ||
6494 | ||
6495 | Kaufman, et al. Expires August 27, 2006 [Page 116] | |
6496 | \f | |
6497 | Internet-Draft IKEv2bis February 2006 | |
6498 | ||
6499 | ||
6500 | C.2. IKE_AUTH Exchange without EAP | |
6501 | ||
6502 | request --> IDi, [CERT+], | |
6503 | [N(INITIAL_CONTACT)], | |
6504 | [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], | |
6505 | [IDr], | |
6506 | AUTH, | |
6507 | [CP(CFG_REQUEST)], | |
6508 | [N(IPCOMP_SUPPORTED)+], | |
6509 | [N(USE_TRANSPORT_MODE)], | |
6510 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6511 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6512 | SA, TSi, TSr, | |
6513 | [V+] | |
6514 | ||
6515 | response <-- IDr, [CERT+], | |
6516 | AUTH, | |
6517 | [CP(CFG_REPLY)], | |
6518 | [N(IPCOMP_SUPPORTED)], | |
6519 | [N(USE_TRANSPORT_MODE)], | |
6520 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6521 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6522 | SA, TSi, TSr, | |
6523 | [N(ADDITIONAL_TS_POSSIBLE)], | |
6524 | [V+] | |
6525 | ||
6526 | ||
6527 | ||
6528 | ||
6529 | ||
6530 | ||
6531 | ||
6532 | ||
6533 | ||
6534 | ||
6535 | ||
6536 | ||
6537 | ||
6538 | ||
6539 | ||
6540 | ||
6541 | ||
6542 | ||
6543 | ||
6544 | ||
6545 | ||
6546 | ||
6547 | ||
6548 | ||
6549 | ||
6550 | ||
6551 | Kaufman, et al. Expires August 27, 2006 [Page 117] | |
6552 | \f | |
6553 | Internet-Draft IKEv2bis February 2006 | |
6554 | ||
6555 | ||
6556 | C.3. IKE_AUTH Exchange with EAP | |
6557 | ||
6558 | first request --> IDi, | |
6559 | [N(INITIAL_CONTACT)], | |
6560 | [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], | |
6561 | [IDr], | |
6562 | [CP(CFG_REQUEST)], | |
6563 | [N(IPCOMP_SUPPORTED)+], | |
6564 | [N(USE_TRANSPORT_MODE)], | |
6565 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6566 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6567 | SA, TSi, TSr, | |
6568 | [V+] | |
6569 | ||
6570 | first response <-- IDr, [CERT+], AUTH, | |
6571 | EAP, | |
6572 | [V+] | |
6573 | ||
6574 | / --> EAP | |
6575 | repeat 1..N times | | |
6576 | \ <-- EAP | |
6577 | ||
6578 | last request --> AUTH | |
6579 | ||
6580 | last response <-- AUTH, | |
6581 | [CP(CFG_REPLY)], | |
6582 | [N(IPCOMP_SUPPORTED)], | |
6583 | [N(USE_TRANSPORT_MODE)], | |
6584 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6585 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6586 | SA, TSi, TSr, | |
6587 | [N(ADDITIONAL_TS_POSSIBLE)], | |
6588 | [V+] | |
6589 | ||
6590 | ||
6591 | ||
6592 | ||
6593 | ||
6594 | ||
6595 | ||
6596 | ||
6597 | ||
6598 | ||
6599 | ||
6600 | ||
6601 | ||
6602 | ||
6603 | ||
6604 | ||
6605 | ||
6606 | ||
6607 | Kaufman, et al. Expires August 27, 2006 [Page 118] | |
6608 | \f | |
6609 | Internet-Draft IKEv2bis February 2006 | |
6610 | ||
6611 | ||
6612 | C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying CHILD_SAs | |
6613 | ||
6614 | request --> [N(REKEY_SA)], | |
6615 | [N(IPCOMP_SUPPORTED)+], | |
6616 | [N(USE_TRANSPORT_MODE)], | |
6617 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6618 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6619 | SA, Ni, [KEi], TSi, TSr | |
6620 | ||
6621 | response <-- [N(IPCOMP_SUPPORTED)], | |
6622 | [N(USE_TRANSPORT_MODE)], | |
6623 | [N(ESP_TFC_PADDING_NOT_SUPPORTED)], | |
6624 | [N(NON_FIRST_FRAGMENTS_ALSO)], | |
6625 | SA, Nr, [KEr], TSi, TSr, | |
6626 | [N(ADDITIONAL_TS_POSSIBLE)] | |
6627 | ||
6628 | C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE_SA | |
6629 | ||
6630 | request --> SA, Ni, [KEi] | |
6631 | ||
6632 | response <-- SA, Nr, [KEr] | |
6633 | ||
6634 | C.6. INFORMATIONAL Exchange | |
6635 | ||
6636 | request --> [N+], | |
6637 | [D+], | |
6638 | [CP(CFG_REQUEST)] | |
6639 | ||
6640 | response <-- [N+], | |
6641 | [D+], | |
6642 | [CP(CFG_REPLY)] | |
6643 | ||
6644 | ||
6645 | Appendix D. Changes Between Internet Draft Versions | |
6646 | ||
6647 | This section will be removed before publication as an RFC. | |
6648 | ||
6649 | D.1. Changes from IKEv2 to draft -00 | |
6650 | ||
6651 | There were a zillion additions from the Clarifications document. | |
6652 | These are noted with "{{ Clarif-nn }}". The numbers used in the text | |
6653 | of this version are based on | |
6654 | draft-eronen-ipsec-ikev2-clarifications-08.txt, which has different | |
6655 | numbers than earlier versions of that draft. | |
6656 | ||
6657 | Cleaned up many of the figures. Made the table headings consistent. | |
6658 | Made some tables easier to read by removing blank spaces. Removed | |
6659 | the "reserved to IANA" and "private use" text wording and moved it | |
6660 | ||
6661 | ||
6662 | ||
6663 | Kaufman, et al. Expires August 27, 2006 [Page 119] | |
6664 | \f | |
6665 | Internet-Draft IKEv2bis February 2006 | |
6666 | ||
6667 | ||
6668 | into the tables. | |
6669 | ||
6670 | Changed many SHOULD requirements to better match RFC 2119. These are | |
6671 | also marked with comments such as "{{ Demoted the SHOULD }}". | |
6672 | ||
6673 | In Section 2.16, changed the MUST requirement of authenticating the | |
6674 | responder from "public key signature based" to "strong" because that | |
6675 | is what most current IKEv2 implementations do, and it better matches | |
6676 | the actual security requirement. | |
6677 | ||
6678 | ||
6679 | Authors' Addresses | |
6680 | ||
6681 | Charlie Kaufman | |
6682 | Microsoft | |
6683 | 1 Microsoft Way | |
6684 | Redmond, WA 98052 | |
6685 | US | |
6686 | ||
6687 | Phone: 1-425-707-3335 | |
6688 | Email: charliek@microsoft.com | |
6689 | ||
6690 | ||
6691 | Paul Hoffman | |
6692 | VPN Consortium | |
6693 | 127 Segre Place | |
6694 | Santa Cruz, CA 95060 | |
6695 | US | |
6696 | ||
6697 | Phone: 1-831-426-9827 | |
6698 | Email: paul.hoffman@vpnc.org | |
6699 | ||
6700 | ||
6701 | Pasi Eronen | |
6702 | Nokia Research Center | |
6703 | P.O. Box 407 | |
6704 | FIN-00045 Nokia Group | |
6705 | Finland | |
6706 | ||
6707 | Email: pasi.eronen@nokia.com | |
6708 | ||
6709 | ||
6710 | Full Copyright Statement | |
6711 | ||
6712 | Copyright (C) The Internet Society (2006). | |
6713 | ||
6714 | This document is subject to the rights, licenses and restrictions | |
6715 | contained in BCP 78, and except as set forth therein, the authors | |
6716 | ||
6717 | ||
6718 | ||
6719 | Kaufman, et al. Expires August 27, 2006 [Page 120] | |
6720 | \f | |
6721 | Internet-Draft IKEv2bis February 2006 | |
6722 | ||
6723 | ||
6724 | retain all their rights. | |
6725 | ||
6726 | This document and the information contained herein are provided on an | |
6727 | "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | |
6728 | OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET | |
6729 | ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, | |
6730 | INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE | |
6731 | INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED | |
6732 | WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | |
6733 | ||
6734 | ||
6735 | Intellectual Property | |
6736 | ||
6737 | The IETF takes no position regarding the validity or scope of any | |
6738 | Intellectual Property Rights or other rights that might be claimed to | |
6739 | pertain to the implementation or use of the technology described in | |
6740 | this document or the extent to which any license under such rights | |
6741 | might or might not be available; nor does it represent that it has | |
6742 | made any independent effort to identify any such rights. Information | |
6743 | on the procedures with respect to rights in RFC documents can be | |
6744 | found in BCP 78 and BCP 79. | |
6745 | ||
6746 | Copies of IPR disclosures made to the IETF Secretariat and any | |
6747 | assurances of licenses to be made available, or the result of an | |
6748 | attempt made to obtain a general license or permission for the use of | |
6749 | such proprietary rights by implementers or users of this | |
6750 | specification can be obtained from the IETF on-line IPR repository at | |
6751 | http://www.ietf.org/ipr. | |
6752 | ||
6753 | The IETF invites any interested party to bring to its attention any | |
6754 | copyrights, patents or patent applications, or other proprietary | |
6755 | rights that may cover technology that may be required to implement | |
6756 | this standard. Please address the information to the IETF at | |
6757 | ietf-ipr@ietf.org. | |
6758 | ||
6759 | ||
6760 | Acknowledgment | |
6761 | ||
6762 | Funding for the RFC Editor function is currently provided by the | |
6763 | Internet Society. | |
6764 | ||
6765 | ||
6766 | ||
6767 | ||
6768 | ||
6769 | ||
6770 | ||
6771 | ||
6772 | ||
6773 | ||
6774 | ||
6775 | Kaufman, et al. Expires August 27, 2006 [Page 121] | |
6776 | \f |