| 1 |
<pre>Network Working Group D. Harkins |
| 2 |
Request for Comments: 2409 D. Carrel |
| 3 |
Category: Standards Track cisco Systems |
| 4 |
November 1998 |
| 5 |
|
| 6 |
|
| 7 |
<span class="h1">The Internet Key Exchange (IKE)</span> |
| 8 |
|
| 9 |
Status of this Memo |
| 10 |
|
| 11 |
This document specifies an Internet standards track protocol for the |
| 12 |
Internet community, and requests discussion and suggestions for |
| 13 |
improvements. Please refer to the current edition of the "Internet |
| 14 |
Official Protocol Standards" (STD 1) for the standardization state |
| 15 |
and status of this protocol. Distribution of this memo is unlimited. |
| 16 |
|
| 17 |
Copyright Notice |
| 18 |
|
| 19 |
Copyright (C) The Internet Society (1998). All Rights Reserved. |
| 20 |
|
| 21 |
Table Of Contents |
| 22 |
|
| 23 |
<a href="#section-1">1</a> Abstract........................................................ <a href="#page-2">2</a> |
| 24 |
<a href="#section-2">2</a> Discussion...................................................... <a href="#page-2">2</a> |
| 25 |
<a href="#section-3">3</a> Terms and Definitions........................................... <a href="#page-3">3</a> |
| 26 |
<a href="#section-3.1">3.1</a> Requirements Terminology...................................... <a href="#page-3">3</a> |
| 27 |
<a href="#section-3.2">3.2</a> Notation...................................................... <a href="#page-3">3</a> |
| 28 |
<a href="#section-3.3">3.3</a> Perfect Forward Secrecty...................................... <a href="#page-5">5</a> |
| 29 |
<a href="#section-3.4">3.4</a> Security Association.......................................... <a href="#page-5">5</a> |
| 30 |
<a href="#section-4">4</a> Introduction.................................................... <a href="#page-5">5</a> |
| 31 |
<a href="#section-5">5</a> Exchanges....................................................... <a href="#page-8">8</a> |
| 32 |
<a href="#section-5.1">5.1</a> Authentication with Digital Signatures........................ <a href="#page-10">10</a> |
| 33 |
<a href="#section-5.2">5.2</a> Authentication with Public Key Encryption..................... <a href="#page-12">12</a> |
| 34 |
5.3 A Revised method of Authentication with Public Key Encryption. 13 |
| 35 |
<a href="#section-5.4">5.4</a> Authentication with a Pre-Shared Key.......................... <a href="#page-16">16</a> |
| 36 |
<a href="#section-5.5">5.5</a> Quick Mode.................................................... <a href="#page-16">16</a> |
| 37 |
<a href="#section-5.6">5.6</a> New Group Mode................................................ <a href="#page-20">20</a> |
| 38 |
<a href="#section-5.7">5.7</a> ISAKMP Informational Exchanges................................ <a href="#page-20">20</a> |
| 39 |
<a href="#section-6">6</a> Oakley Groups................................................... <a href="#page-21">21</a> |
| 40 |
<a href="#section-6.1">6.1</a> First Oakley Group............................................ <a href="#page-21">21</a> |
| 41 |
<a href="#section-6.2">6.2</a> Second Oakley Group........................................... <a href="#page-22">22</a> |
| 42 |
<a href="#section-6.3">6.3</a> Third Oakley Group............................................ <a href="#page-22">22</a> |
| 43 |
<a href="#section-6.4">6.4</a> Fourth Oakley Group........................................... <a href="#page-23">23</a> |
| 44 |
<a href="#section-7">7</a> Payload Explosion of Complete Exchange.......................... <a href="#page-23">23</a> |
| 45 |
<a href="#section-7.1">7.1</a> Phase 1 with Main Mode........................................ <a href="#page-23">23</a> |
| 46 |
<a href="#section-7.2">7.2</a> Phase 2 with Quick Mode....................................... <a href="#page-25">25</a> |
| 47 |
<a href="#section-8">8</a> Perfect Forward Secrecy Example................................. <a href="#page-27">27</a> |
| 48 |
<a href="#section-9">9</a> Implementation Hints............................................ <a href="#page-27">27</a> |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
<span class="grey">Harkins & Carrel Standards Track [Page 1]</span></pre> |
| 53 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span> |
| 54 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 55 |
|
| 56 |
|
| 57 |
<a href="#section-10">10</a> Security Considerations........................................ <a href="#page-28">28</a> |
| 58 |
<a href="#section-11">11</a> IANA Considerations............................................ <a href="#page-30">30</a> |
| 59 |
<a href="#section-12">12</a> Acknowledgments................................................ <a href="#page-31">31</a> |
| 60 |
<a href="#section-13">13</a> References..................................................... <a href="#page-31">31</a> |
| 61 |
<a href="#appendix-A">Appendix A</a>........................................................ <a href="#page-33">33</a> |
| 62 |
<a href="#appendix-B">Appendix B</a>........................................................ <a href="#page-37">37</a> |
| 63 |
Authors' Addresses................................................ <a href="#page-40">40</a> |
| 64 |
Authors' Note..................................................... <a href="#page-40">40</a> |
| 65 |
Full Copyright Statement.......................................... <a href="#page-41">41</a> |
| 66 |
|
| 67 |
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Abstract</span> |
| 68 |
|
| 69 |
ISAKMP ([<a href="#ref-MSST98" title=""Internet Security Association and Key Management Protocol (ISAKMP)"">MSST98</a>]) provides a framework for authentication and key |
| 70 |
exchange but does not define them. ISAKMP is designed to be key |
| 71 |
exchange independant; that is, it is designed to support many |
| 72 |
different key exchanges. |
| 73 |
|
| 74 |
Oakley ([<a href="#ref-Orm96" title=""The Oakley Key Determination Protocol"">Orm96</a>]) describes a series of key exchanges-- called |
| 75 |
"modes"-- and details the services provided by each (e.g. perfect |
| 76 |
forward secrecy for keys, identity protection, and authentication). |
| 77 |
|
| 78 |
SKEME ([<a href="#ref-SKEME" title=""SKEME: A Versatile Secure Key Exchange Mechanism for Internet"">SKEME</a>]) describes a versatile key exchange technique which |
| 79 |
provides anonymity, repudiability, and quick key refreshment. |
| 80 |
|
| 81 |
This document describes a protocol using part of Oakley and part of |
| 82 |
SKEME in conjunction with ISAKMP to obtain authenticated keying |
| 83 |
material for use with ISAKMP, and for other security associations |
| 84 |
such as AH and ESP for the IETF IPsec DOI. |
| 85 |
|
| 86 |
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Discussion</span> |
| 87 |
|
| 88 |
This memo describes a hybrid protocol. The purpose is to negotiate, |
| 89 |
and provide authenticated keying material for, security associations |
| 90 |
in a protected manner. |
| 91 |
|
| 92 |
Processes which implement this memo can be used for negotiating |
| 93 |
virtual private networks (VPNs) and also for providing a remote user |
| 94 |
from a remote site (whose IP address need not be known beforehand) |
| 95 |
access to a secure host or network. |
| 96 |
|
| 97 |
Client negotiation is supported. Client mode is where the |
| 98 |
negotiating parties are not the endpoints for which security |
| 99 |
association negotiation is taking place. When used in client mode, |
| 100 |
the identities of the end parties remain hidden. |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
<span class="grey">Harkins & Carrel Standards Track [Page 2]</span></pre> |
| 109 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span> |
| 110 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 111 |
|
| 112 |
|
| 113 |
This does not implement the entire Oakley protocol, but only a subset |
| 114 |
necessary to satisfy its goals. It does not claim conformance or |
| 115 |
compliance with the entire Oakley protocol nor is it dependant in any |
| 116 |
way on the Oakley protocol. |
| 117 |
|
| 118 |
Likewise, this does not implement the entire SKEME protocol, but only |
| 119 |
the method of public key encryption for authentication and its |
| 120 |
concept of fast re-keying using an exchange of nonces. This protocol |
| 121 |
is not dependant in any way on the SKEME protocol. |
| 122 |
|
| 123 |
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Terms and Definitions</span> |
| 124 |
|
| 125 |
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> Requirements Terminology</span> |
| 126 |
|
| 127 |
Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT" and |
| 128 |
"MAY" that appear in this document are to be interpreted as described |
| 129 |
in [<a href="#ref-Bra97" title=""Key Words for use in RFCs to indicate Requirement Levels"">Bra97</a>]. |
| 130 |
|
| 131 |
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> Notation</span> |
| 132 |
|
| 133 |
The following notation is used throughout this memo. |
| 134 |
|
| 135 |
HDR is an ISAKMP header whose exchange type is the mode. When |
| 136 |
writen as HDR* it indicates payload encryption. |
| 137 |
|
| 138 |
SA is an SA negotiation payload with one or more proposals. An |
| 139 |
initiator MAY provide multiple proposals for negotiation; a |
| 140 |
responder MUST reply with only one. |
| 141 |
|
| 142 |
<P>_b indicates the body of payload <P>-- the ISAKMP generic |
| 143 |
vpayload is not included. |
| 144 |
|
| 145 |
SAi_b is the entire body of the SA payload (minus the ISAKMP |
| 146 |
generic header)-- i.e. the DOI, situation, all proposals and all |
| 147 |
transforms offered by the Initiator. |
| 148 |
|
| 149 |
CKY-I and CKY-R are the Initiator's cookie and the Responder's |
| 150 |
cookie, respectively, from the ISAKMP header. |
| 151 |
|
| 152 |
g^xi and g^xr are the Diffie-Hellman ([<a href="#ref-DH" title=""New Directions in Cryptography"">DH</a>]) public values of the |
| 153 |
initiator and responder respectively. |
| 154 |
|
| 155 |
g^xy is the Diffie-Hellman shared secret. |
| 156 |
|
| 157 |
KE is the key exchange payload which contains the public |
| 158 |
information exchanged in a Diffie-Hellman exchange. There is no |
| 159 |
particular encoding (e.g. a TLV) used for the data of a KE payload. |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
<span class="grey">Harkins & Carrel Standards Track [Page 3]</span></pre> |
| 165 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span> |
| 166 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 167 |
|
| 168 |
|
| 169 |
Nx is the nonce payload; x can be: i or r for the ISAKMP initiator |
| 170 |
and responder respectively. |
| 171 |
|
| 172 |
IDx is the identification payload for "x". x can be: "ii" or "ir" |
| 173 |
for the ISAKMP initiator and responder respectively during phase |
| 174 |
one negotiation; or "ui" or "ur" for the user initiator and |
| 175 |
responder respectively during phase two. The ID payload format for |
| 176 |
the Internet DOI is defined in [Pip97]. |
| 177 |
|
| 178 |
SIG is the signature payload. The data to sign is exchange- |
| 179 |
specific. |
| 180 |
|
| 181 |
CERT is the certificate payload. |
| 182 |
|
| 183 |
HASH (and any derivitive such as HASH(2) or HASH_I) is the hash |
| 184 |
payload. The contents of the hash are specific to the |
| 185 |
authentication method. |
| 186 |
|
| 187 |
prf(key, msg) is the keyed pseudo-random function-- often a keyed |
| 188 |
hash function-- used to generate a deterministic output that |
| 189 |
appears pseudo-random. prf's are used both for key derivations and |
| 190 |
for authentication (i.e. as a keyed MAC). (See [<a href="#ref-KBC96" title=""HMAC: Keyed- Hashing for Message Authentication"">KBC96</a>]). |
| 191 |
|
| 192 |
SKEYID is a string derived from secret material known only to the |
| 193 |
active players in the exchange. |
| 194 |
|
| 195 |
SKEYID_e is the keying material used by the ISAKMP SA to protect |
| 196 |
the confidentiality of its messages. |
| 197 |
|
| 198 |
SKEYID_a is the keying material used by the ISAKMP SA to |
| 199 |
authenticate its messages. |
| 200 |
|
| 201 |
SKEYID_d is the keying material used to derive keys for non-ISAKMP |
| 202 |
security associations. |
| 203 |
|
| 204 |
<x>y indicates that "x" is encrypted with the key "y". |
| 205 |
|
| 206 |
--> signifies "initiator to responder" communication (requests). |
| 207 |
|
| 208 |
<-- signifies "responder to initiator" communication (replies). |
| 209 |
|
| 210 |
| signifies concatenation of information-- e.g. X | Y is the |
| 211 |
concatentation of X with Y. |
| 212 |
|
| 213 |
[<a id="ref-x">x</a>] indicates that x is optional. |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
<span class="grey">Harkins & Carrel Standards Track [Page 4]</span></pre> |
| 221 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span> |
| 222 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 223 |
|
| 224 |
|
| 225 |
Message encryption (when noted by a '*' after the ISAKMP header) MUST |
| 226 |
begin immediately after the ISAKMP header. When communication is |
| 227 |
protected, all payloads following the ISAKMP header MUST be |
| 228 |
encrypted. Encryption keys are generated from SKEYID_e in a manner |
| 229 |
that is defined for each algorithm. |
| 230 |
|
| 231 |
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a> Perfect Forward Secrecy</span> |
| 232 |
|
| 233 |
When used in the memo Perfect Forward Secrecy (PFS) refers to the |
| 234 |
notion that compromise of a single key will permit access to only |
| 235 |
data protected by a single key. For PFS to exist the key used to |
| 236 |
protect transmission of data MUST NOT be used to derive any |
| 237 |
additional keys, and if the key used to protect transmission of data |
| 238 |
was derived from some other keying material, that material MUST NOT |
| 239 |
be used to derive any more keys. |
| 240 |
|
| 241 |
Perfect Forward Secrecy for both keys and identities is provided in |
| 242 |
this protocol. (Sections <a href="#section-5.5">5.5</a> and <a href="#section-8">8</a>). |
| 243 |
|
| 244 |
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a> Security Association</span> |
| 245 |
|
| 246 |
A security association (SA) is a set of policy and key(s) used to |
| 247 |
protect information. The ISAKMP SA is the shared policy and key(s) |
| 248 |
used by the negotiating peers in this protocol to protect their |
| 249 |
communication. |
| 250 |
|
| 251 |
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Introduction</span> |
| 252 |
|
| 253 |
Oakley and SKEME each define a method to establish an authenticated |
| 254 |
key exchange. This includes payloads construction, the information |
| 255 |
payloads carry, the order in which they are processed and how they |
| 256 |
are used. |
| 257 |
|
| 258 |
While Oakley defines "modes", ISAKMP defines "phases". The |
| 259 |
relationship between the two is very straightforward and IKE presents |
| 260 |
different exchanges as modes which operate in one of two phases. |
| 261 |
|
| 262 |
Phase 1 is where the two ISAKMP peers establish a secure, |
| 263 |
authenticated channel with which to communicate. This is called the |
| 264 |
ISAKMP Security Association (SA). "Main Mode" and "Aggressive Mode" |
| 265 |
each accomplish a phase 1 exchange. "Main Mode" and "Aggressive Mode" |
| 266 |
MUST ONLY be used in phase 1. |
| 267 |
|
| 268 |
Phase 2 is where Security Associations are negotiated on behalf of |
| 269 |
services such as IPsec or any other service which needs key material |
| 270 |
and/or parameter negotiation. "Quick Mode" accomplishes a phase 2 |
| 271 |
exchange. "Quick Mode" MUST ONLY be used in phase 2. |
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
<span class="grey">Harkins & Carrel Standards Track [Page 5]</span></pre> |
| 277 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span> |
| 278 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 279 |
|
| 280 |
|
| 281 |
"New Group Mode" is not really a phase 1 or phase 2. It follows |
| 282 |
phase 1, but serves to establish a new group which can be used in |
| 283 |
future negotiations. "New Group Mode" MUST ONLY be used after phase |
| 284 |
1. |
| 285 |
|
| 286 |
The ISAKMP SA is bi-directional. That is, once established, either |
| 287 |
party may initiate Quick Mode, Informational, and New Group Mode |
| 288 |
Exchanges. Per the base ISAKMP document, the ISAKMP SA is identified |
| 289 |
by the Initiator's cookie followed by the Responder's cookie-- the |
| 290 |
role of each party in the phase 1 exchange dictates which cookie is |
| 291 |
the Initiator's. The cookie order established by the phase 1 exchange |
| 292 |
continues to identify the ISAKMP SA regardless of the direction the |
| 293 |
Quick Mode, Informational, or New Group exchange. In other words, the |
| 294 |
cookies MUST NOT swap places when the direction of the ISAKMP SA |
| 295 |
changes. |
| 296 |
|
| 297 |
With the use of ISAKMP phases, an implementation can accomplish very |
| 298 |
fast keying when necessary. A single phase 1 negotiation may be used |
| 299 |
for more than one phase 2 negotiation. Additionally a single phase 2 |
| 300 |
negotiation can request multiple Security Associations. With these |
| 301 |
optimizations, an implementation can see less than one round trip per |
| 302 |
SA as well as less than one DH exponentiation per SA. "Main Mode" |
| 303 |
for phase 1 provides identity protection. When identity protection |
| 304 |
is not needed, "Aggressive Mode" can be used to reduce round trips |
| 305 |
even further. Developer hints for doing these optimizations are |
| 306 |
included below. It should also be noted that using public key |
| 307 |
encryption to authenticate an Aggressive Mode exchange will still |
| 308 |
provide identity protection. |
| 309 |
|
| 310 |
This protocol does not define its own DOI per se. The ISAKMP SA, |
| 311 |
established in phase 1, MAY use the DOI and situation from a non- |
| 312 |
ISAKMP service (such as the IETF IPSec DOI [Pip97]). In this case an |
| 313 |
implementation MAY choose to restrict use of the ISAKMP SA for |
| 314 |
establishment of SAs for services of the same DOI. Alternately, an |
| 315 |
ISAKMP SA MAY be established with the value zero in both the DOI and |
| 316 |
situation (see [<a href="#ref-MSST98" title=""Internet Security Association and Key Management Protocol (ISAKMP)"">MSST98</a>] for a description of these fields) and in |
| 317 |
this case implementations will be free to establish security services |
| 318 |
for any defined DOI using this ISAKMP SA. If a DOI of zero is used |
| 319 |
for establishment of a phase 1 SA, the syntax of the identity |
| 320 |
payloads used in phase 1 is that defined in [<a href="#ref-MSST98" title=""Internet Security Association and Key Management Protocol (ISAKMP)"">MSST98</a>] and not from any |
| 321 |
DOI-- e.g. [Pip97]-- which may further expand the syntax and |
| 322 |
semantics of identities. |
| 323 |
|
| 324 |
The following attributes are used by IKE and are negotiated as part |
| 325 |
of the ISAKMP Security Association. (These attributes pertain only |
| 326 |
to the ISAKMP Security Association and not to any Security |
| 327 |
Associations that ISAKMP may be negotiating on behalf of other |
| 328 |
services.) |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
<span class="grey">Harkins & Carrel Standards Track [Page 6]</span></pre> |
| 333 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span> |
| 334 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 335 |
|
| 336 |
|
| 337 |
- encryption algorithm |
| 338 |
|
| 339 |
- hash algorithm |
| 340 |
|
| 341 |
- authentication method |
| 342 |
|
| 343 |
- information about a group over which to do Diffie-Hellman. |
| 344 |
|
| 345 |
All of these attributes are mandatory and MUST be negotiated. In |
| 346 |
addition, it is possible to optionally negotiate a psuedo-random |
| 347 |
function ("prf"). (There are currently no negotiable pseudo-random |
| 348 |
functions defined in this document. Private use attribute values can |
| 349 |
be used for prf negotiation between consenting parties). If a "prf" |
| 350 |
is not negotiation, the HMAC (see [<a href="#ref-KBC96" title=""HMAC: Keyed- Hashing for Message Authentication"">KBC96</a>]) version of the negotiated |
| 351 |
hash algorithm is used as a pseudo-random function. Other non- |
| 352 |
mandatory attributes are described in <a href="#appendix-A">Appendix A</a>. The selected hash |
| 353 |
algorithm MUST support both native and HMAC modes. |
| 354 |
|
| 355 |
The Diffie-Hellman group MUST be either specified using a defined |
| 356 |
group description (<a href="#section-6">section 6</a>) or by defining all attributes of a |
| 357 |
group (<a href="#section-5.6">section 5.6</a>). Group attributes (such as group type or prime-- |
| 358 |
see <a href="#appendix-A">Appendix A</a>) MUST NOT be offered in conjunction with a previously |
| 359 |
defined group (either a reserved group description or a private use |
| 360 |
description that is established after conclusion of a New Group Mode |
| 361 |
exchange). |
| 362 |
|
| 363 |
IKE implementations MUST support the following attribute values: |
| 364 |
|
| 365 |
- DES [<a href="#ref-DES" title=""American National Standard for Information Systems-Data Link Encryption"">DES</a>] in CBC mode with a weak, and semi-weak, key check |
| 366 |
(weak and semi-weak keys are referenced in [<a href="#ref-Sch96" title=""Applied Cryptography, Protocols, Algorithms, and Source Code in C"">Sch96</a>] and listed in |
| 367 |
<a href="#appendix-A">Appendix A</a>). The key is derived according to <a href="#appendix-B">Appendix B</a>. |
| 368 |
|
| 369 |
- MD5 [<a href="#ref-MD5" title=""The MD5 Message Digest Algorithm"">MD5</a>] and SHA [SHA}. |
| 370 |
|
| 371 |
- Authentication via pre-shared keys. |
| 372 |
|
| 373 |
- MODP over default group number one (see below). |
| 374 |
|
| 375 |
In addition, IKE implementations SHOULD support: 3DES for encryption; |
| 376 |
Tiger ([<a href="#ref-TIGER" title=""Fast Software Encryption"">TIGER</a>]) for hash; the Digital Signature Standard, RSA [<a href="#ref-RSA" title=""A Method for Obtaining Digital Signatures and Public-Key Cryptosystems"">RSA</a>] |
| 377 |
signatures and authentication with RSA public key encryption; and |
| 378 |
MODP group number 2. IKE implementations MAY support any additional |
| 379 |
encryption algorithms defined in <a href="#appendix-A">Appendix A</a> and MAY support ECP and |
| 380 |
EC2N groups. |
| 381 |
|
| 382 |
The IKE modes described here MUST be implemented whenever the IETF |
| 383 |
IPsec DOI [Pip97] is implemented. Other DOIs MAY use the modes |
| 384 |
described here. |
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
<span class="grey">Harkins & Carrel Standards Track [Page 7]</span></pre> |
| 389 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span> |
| 390 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 391 |
|
| 392 |
|
| 393 |
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Exchanges</span> |
| 394 |
|
| 395 |
There are two basic methods used to establish an authenticated key |
| 396 |
exchange: Main Mode and Aggressive Mode. Each generates authenticated |
| 397 |
keying material from an ephemeral Diffie-Hellman exchange. Main Mode |
| 398 |
MUST be implemented; Aggressive Mode SHOULD be implemented. In |
| 399 |
addition, Quick Mode MUST be implemented as a mechanism to generate |
| 400 |
fresh keying material and negotiate non-ISAKMP security services. In |
| 401 |
addition, New Group Mode SHOULD be implemented as a mechanism to |
| 402 |
define private groups for Diffie-Hellman exchanges. Implementations |
| 403 |
MUST NOT switch exchange types in the middle of an exchange. |
| 404 |
|
| 405 |
Exchanges conform to standard ISAKMP payload syntax, attribute |
| 406 |
encoding, timeouts and retransmits of messages, and informational |
| 407 |
messages-- e.g a notify response is sent when, for example, a |
| 408 |
proposal is unacceptable, or a signature verification or decryption |
| 409 |
was unsuccessful, etc. |
| 410 |
|
| 411 |
The SA payload MUST precede all other payloads in a phase 1 exchange. |
| 412 |
Except where otherwise noted, there are no requirements for ISAKMP |
| 413 |
payloads in any message to be in any particular order. |
| 414 |
|
| 415 |
The Diffie-Hellman public value passed in a KE payload, in either a |
| 416 |
phase 1 or phase 2 exchange, MUST be the length of the negotiated |
| 417 |
Diffie-Hellman group enforced, if necessary, by pre-pending the value |
| 418 |
with zeros. |
| 419 |
|
| 420 |
The length of nonce payload MUST be between 8 and 256 bytes |
| 421 |
inclusive. |
| 422 |
|
| 423 |
Main Mode is an instantiation of the ISAKMP Identity Protect |
| 424 |
Exchange: The first two messages negotiate policy; the next two |
| 425 |
exchange Diffie-Hellman public values and ancillary data (e.g. |
| 426 |
nonces) necessary for the exchange; and the last two messages |
| 427 |
authenticate the Diffie-Hellman Exchange. The authentication method |
| 428 |
negotiated as part of the initial ISAKMP exchange influences the |
| 429 |
composition of the payloads but not their purpose. The XCHG for Main |
| 430 |
Mode is ISAKMP Identity Protect. |
| 431 |
|
| 432 |
Similarly, Aggressive Mode is an instantiation of the ISAKMP |
| 433 |
Aggressive Exchange. The first two messages negotiate policy, |
| 434 |
exchange Diffie-Hellman public values and ancillary data necessary |
| 435 |
for the exchange, and identities. In addition the second message |
| 436 |
authenticates the responder. The third message authenticates the |
| 437 |
initiator and provides a proof of participation in the exchange. The |
| 438 |
XCHG for Aggressive Mode is ISAKMP Aggressive. The final message MAY |
| 439 |
NOT be sent under protection of the ISAKMP SA allowing each party to |
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
<span class="grey">Harkins & Carrel Standards Track [Page 8]</span></pre> |
| 445 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span> |
| 446 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 447 |
|
| 448 |
|
| 449 |
postpone exponentiation, if desired, until negotiation of this |
| 450 |
exchange is complete. The graphic depictions of Aggressive Mode show |
| 451 |
the final payload in the clear; it need not be. |
| 452 |
|
| 453 |
Exchanges in IKE are not open ended and have a fixed number of |
| 454 |
messages. Receipt of a Certificate Request payload MUST NOT extend |
| 455 |
the number of messages transmitted or expected. |
| 456 |
|
| 457 |
Security Association negotiation is limited with Aggressive Mode. Due |
| 458 |
to message construction requirements the group in which the Diffie- |
| 459 |
Hellman exchange is performed cannot be negotiated. In addition, |
| 460 |
different authentication methods may further constrain attribute |
| 461 |
negotiation. For example, authentication with public key encryption |
| 462 |
cannot be negotiated and when using the revised method of public key |
| 463 |
encryption for authentication the cipher and hash cannot be |
| 464 |
negotiated. For situations where the rich attribute negotiation |
| 465 |
capabilities of IKE are required Main Mode may be required. |
| 466 |
|
| 467 |
Quick Mode and New Group Mode have no analog in ISAKMP. The XCHG |
| 468 |
values for Quick Mode and New Group Mode are defined in <a href="#appendix-A">Appendix A</a>. |
| 469 |
|
| 470 |
Main Mode, Aggressive Mode, and Quick Mode do security association |
| 471 |
negotiation. Security Association offers take the form of Tranform |
| 472 |
Payload(s) encapsulated in Proposal Payload(s) encapsulated in |
| 473 |
Security Association (SA) payload(s). If multiple offers are being |
| 474 |
made for phase 1 exchanges (Main Mode and Aggressive Mode) they MUST |
| 475 |
take the form of multiple Transform Payloads for a single Proposal |
| 476 |
Payload in a single SA payload. To put it another way, for phase 1 |
| 477 |
exchanges there MUST NOT be multiple Proposal Payloads for a single |
| 478 |
SA payload and there MUST NOT be multiple SA payloads. This document |
| 479 |
does not proscribe such behavior on offers in phase 2 exchanges. |
| 480 |
|
| 481 |
There is no limit on the number of offers the initiator may send to |
| 482 |
the responder but conformant implementations MAY choose to limit the |
| 483 |
number of offers it will inspect for performance reasons. |
| 484 |
|
| 485 |
During security association negotiation, initiators present offers |
| 486 |
for potential security associations to responders. Responders MUST |
| 487 |
NOT modify attributes of any offer, attribute encoding excepted (see |
| 488 |
<a href="#appendix-A">Appendix A</a>). If the initiator of an exchange notices that attribute |
| 489 |
values have changed or attributes have been added or deleted from an |
| 490 |
offer made, that response MUST be rejected. |
| 491 |
|
| 492 |
Four different authentication methods are allowed with either Main |
| 493 |
Mode or Aggressive Mode-- digital signature, two forms of |
| 494 |
authentication with public key encryption, or pre-shared key. The |
| 495 |
value SKEYID is computed seperately for each authentication method. |
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
<span class="grey">Harkins & Carrel Standards Track [Page 9]</span></pre> |
| 501 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span> |
| 502 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 503 |
|
| 504 |
|
| 505 |
For signatures: SKEYID = prf(Ni_b | Nr_b, g^xy) |
| 506 |
For public key encryption: SKEYID = prf(hash(Ni_b | Nr_b), CKY-I | |
| 507 |
CKY-R) |
| 508 |
For pre-shared keys: SKEYID = prf(pre-shared-key, Ni_b | |
| 509 |
Nr_b) |
| 510 |
|
| 511 |
The result of either Main Mode or Aggressive Mode is three groups of |
| 512 |
authenticated keying material: |
| 513 |
|
| 514 |
SKEYID_d = prf(SKEYID, g^xy | CKY-I | CKY-R | 0) |
| 515 |
SKEYID_a = prf(SKEYID, SKEYID_d | g^xy | CKY-I | CKY-R | 1) |
| 516 |
SKEYID_e = prf(SKEYID, SKEYID_a | g^xy | CKY-I | CKY-R | 2) |
| 517 |
|
| 518 |
and agreed upon policy to protect further communications. The values |
| 519 |
of 0, 1, and 2 above are represented by a single octet. The key used |
| 520 |
for encryption is derived from SKEYID_e in an algorithm-specific |
| 521 |
manner (see <a href="#appendix-B">appendix B</a>). |
| 522 |
|
| 523 |
To authenticate either exchange the initiator of the protocol |
| 524 |
generates HASH_I and the responder generates HASH_R where: |
| 525 |
|
| 526 |
HASH_I = prf(SKEYID, g^xi | g^xr | CKY-I | CKY-R | SAi_b | IDii_b ) |
| 527 |
HASH_R = prf(SKEYID, g^xr | g^xi | CKY-R | CKY-I | SAi_b | IDir_b ) |
| 528 |
|
| 529 |
For authentication with digital signatures, HASH_I and HASH_R are |
| 530 |
signed and verified; for authentication with either public key |
| 531 |
encryption or pre-shared keys, HASH_I and HASH_R directly |
| 532 |
authenticate the exchange. The entire ID payload (including ID type, |
| 533 |
port, and protocol but excluding the generic header) is hashed into |
| 534 |
both HASH_I and HASH_R. |
| 535 |
|
| 536 |
As mentioned above, the negotiated authentication method influences |
| 537 |
the content and use of messages for Phase 1 Modes, but not their |
| 538 |
intent. When using public keys for authentication, the Phase 1 |
| 539 |
exchange can be accomplished either by using signatures or by using |
| 540 |
public key encryption (if the algorithm supports it). Following are |
| 541 |
Phase 1 exchanges with different authentication options. |
| 542 |
|
| 543 |
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a> IKE Phase 1 Authenticated With Signatures</span> |
| 544 |
|
| 545 |
Using signatures, the ancillary information exchanged during the |
| 546 |
second roundtrip are nonces; the exchange is authenticated by signing |
| 547 |
a mutually obtainable hash. Main Mode with signature authentication |
| 548 |
is described as follows: |
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
<span class="grey">Harkins & Carrel Standards Track [Page 10]</span></pre> |
| 557 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span> |
| 558 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 559 |
|
| 560 |
|
| 561 |
Initiator Responder |
| 562 |
----------- ----------- |
| 563 |
HDR, SA --> |
| 564 |
<-- HDR, SA |
| 565 |
HDR, KE, Ni --> |
| 566 |
<-- HDR, KE, Nr |
| 567 |
HDR*, IDii, [ CERT, ] SIG_I --> |
| 568 |
<-- HDR*, IDir, [ CERT, ] SIG_R |
| 569 |
|
| 570 |
Aggressive mode with signatures in conjunction with ISAKMP is |
| 571 |
described as follows: |
| 572 |
|
| 573 |
Initiator Responder |
| 574 |
----------- ----------- |
| 575 |
HDR, SA, KE, Ni, IDii --> |
| 576 |
<-- HDR, SA, KE, Nr, IDir, |
| 577 |
[ CERT, ] SIG_R |
| 578 |
HDR, [ CERT, ] SIG_I --> |
| 579 |
|
| 580 |
In both modes, the signed data, SIG_I or SIG_R, is the result of the |
| 581 |
negotiated digital signature algorithm applied to HASH_I or HASH_R |
| 582 |
respectively. |
| 583 |
|
| 584 |
In general the signature will be over HASH_I and HASH_R as above |
| 585 |
using the negotiated prf, or the HMAC version of the negotiated hash |
| 586 |
function (if no prf is negotiated). However, this can be overridden |
| 587 |
for construction of the signature if the signature algorithm is tied |
| 588 |
to a particular hash algorithm (e.g. DSS is only defined with SHA's |
| 589 |
160 bit output). In this case, the signature will be over HASH_I and |
| 590 |
HASH_R as above, except using the HMAC version of the hash algorithm |
| 591 |
associated with the signature method. The negotiated prf and hash |
| 592 |
function would continue to be used for all other prescribed pseudo- |
| 593 |
random functions. |
| 594 |
|
| 595 |
Since the hash algorithm used is already known there is no need to |
| 596 |
encode its OID into the signature. In addition, there is no binding |
| 597 |
between the OIDs used for RSA signatures in PKCS #1 and those used in |
| 598 |
this document. Therefore, RSA signatures MUST be encoded as a private |
| 599 |
key encryption in PKCS #1 format and not as a signature in PKCS #1 |
| 600 |
format (which includes the OID of the hash algorithm). DSS signatures |
| 601 |
MUST be encoded as r followed by s. |
| 602 |
|
| 603 |
One or more certificate payloads MAY be optionally passed. |
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
<span class="grey">Harkins & Carrel Standards Track [Page 11]</span></pre> |
| 613 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span> |
| 614 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 615 |
|
| 616 |
|
| 617 |
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a> Phase 1 Authenticated With Public Key Encryption</span> |
| 618 |
|
| 619 |
Using public key encryption to authenticate the exchange, the |
| 620 |
ancillary information exchanged is encrypted nonces. Each party's |
| 621 |
ability to reconstruct a hash (proving that the other party decrypted |
| 622 |
the nonce) authenticates the exchange. |
| 623 |
|
| 624 |
In order to perform the public key encryption, the initiator must |
| 625 |
already have the responder's public key. In the case where the |
| 626 |
responder has multiple public keys, a hash of the certificate the |
| 627 |
initiator is using to encrypt the ancillary information is passed as |
| 628 |
part of the third message. In this way the responder can determine |
| 629 |
which corresponding private key to use to decrypt the encrypted |
| 630 |
payloads and identity protection is retained. |
| 631 |
|
| 632 |
In addition to the nonce, the identities of the parties (IDii and |
| 633 |
IDir) are also encrypted with the other party's public key. If the |
| 634 |
authentication method is public key encryption, the nonce and |
| 635 |
identity payloads MUST be encrypted with the public key of the other |
| 636 |
party. Only the body of the payloads are encrypted, the payload |
| 637 |
headers are left in the clear. |
| 638 |
|
| 639 |
When using encryption for authentication, Main Mode is defined as |
| 640 |
follows. |
| 641 |
|
| 642 |
Initiator Responder |
| 643 |
----------- ----------- |
| 644 |
HDR, SA --> |
| 645 |
<-- HDR, SA |
| 646 |
HDR, KE, [ HASH(1), ] |
| 647 |
<IDii_b>PubKey_r, |
| 648 |
<Ni_b>PubKey_r --> |
| 649 |
HDR, KE, <IDir_b>PubKey_i, |
| 650 |
<-- <Nr_b>PubKey_i |
| 651 |
HDR*, HASH_I --> |
| 652 |
<-- HDR*, HASH_R |
| 653 |
|
| 654 |
Aggressive Mode authenticated with encryption is described as |
| 655 |
follows: |
| 656 |
|
| 657 |
Initiator Responder |
| 658 |
----------- ----------- |
| 659 |
HDR, SA, [ HASH(1),] KE, |
| 660 |
<IDii_b>Pubkey_r, |
| 661 |
<Ni_b>Pubkey_r --> |
| 662 |
HDR, SA, KE, <IDir_b>PubKey_i, |
| 663 |
<-- <Nr_b>PubKey_i, HASH_R |
| 664 |
HDR, HASH_I --> |
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
<span class="grey">Harkins & Carrel Standards Track [Page 12]</span></pre> |
| 669 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span> |
| 670 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 671 |
|
| 672 |
|
| 673 |
Where HASH(1) is a hash (using the negotiated hash function) of the |
| 674 |
certificate which the initiator is using to encrypt the nonce and |
| 675 |
identity. |
| 676 |
|
| 677 |
RSA encryption MUST be encoded in PKCS #1 format. While only the body |
| 678 |
of the ID and nonce payloads is encrypted, the encrypted data must be |
| 679 |
preceded by a valid ISAKMP generic header. The payload length is the |
| 680 |
length of the entire encrypted payload plus header. The PKCS #1 |
| 681 |
encoding allows for determination of the actual length of the |
| 682 |
cleartext payload upon decryption. |
| 683 |
|
| 684 |
Using encryption for authentication provides for a plausably deniable |
| 685 |
exchange. There is no proof (as with a digital signature) that the |
| 686 |
conversation ever took place since each party can completely |
| 687 |
reconstruct both sides of the exchange. In addition, security is |
| 688 |
added to secret generation since an attacker would have to |
| 689 |
successfully break not only the Diffie-Hellman exchange but also both |
| 690 |
RSA encryptions. This exchange was motivated by [<a href="#ref-SKEME" title=""SKEME: A Versatile Secure Key Exchange Mechanism for Internet"">SKEME</a>]. |
| 691 |
|
| 692 |
Note that, unlike other authentication methods, authentication with |
| 693 |
public key encryption allows for identity protection with Aggressive |
| 694 |
Mode. |
| 695 |
|
| 696 |
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a> Phase 1 Authenticated With a Revised Mode of Public Key Encryption</span> |
| 697 |
|
| 698 |
Authentication with Public Key Encryption has significant advantages |
| 699 |
over authentication with signatures (see <a href="#section-5.2">section 5.2</a> above). |
| 700 |
Unfortunately, this is at the cost of 4 public key operations-- two |
| 701 |
public key encryptions and two private key decryptions. This |
| 702 |
authentication mode retains the advantages of authentication using |
| 703 |
public key encryption but does so with half the public key |
| 704 |
operations. |
| 705 |
|
| 706 |
In this mode, the nonce is still encrypted using the public key of |
| 707 |
the peer, however the peer's identity (and the certificate if it is |
| 708 |
sent) is encrypted using the negotiated symmetric encryption |
| 709 |
algorithm (from the SA payload) with a key derived from the nonce. |
| 710 |
This solution adds minimal complexity and state yet saves two costly |
| 711 |
public key operations on each side. In addition, the Key Exchange |
| 712 |
payload is also encrypted using the same derived key. This provides |
| 713 |
additional protection against cryptanalysis of the Diffie-Hellman |
| 714 |
exchange. |
| 715 |
|
| 716 |
As with the public key encryption method of authentication (<a href="#section-5.2">section</a> |
| 717 |
<a href="#section-5.2">5.2</a>), a HASH payload may be sent to identify a certificate if the |
| 718 |
responder has multiple certificates which contain useable public keys |
| 719 |
(e.g. if the certificate is not for signatures only, either due to |
| 720 |
certificate restrictions or algorithmic restrictions). If the HASH |
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
<span class="grey">Harkins & Carrel Standards Track [Page 13]</span></pre> |
| 725 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span> |
| 726 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 727 |
|
| 728 |
|
| 729 |
payload is sent it MUST be the first payload of the second message |
| 730 |
exchange and MUST be followed by the encrypted nonce. If the HASH |
| 731 |
payload is not sent, the first payload of the second message exchange |
| 732 |
MUST be the encrypted nonce. In addition, the initiator my optionally |
| 733 |
send a certificate payload to provide the responder with a public key |
| 734 |
with which to respond. |
| 735 |
|
| 736 |
When using the revised encryption mode for authentication, Main Mode |
| 737 |
is defined as follows. |
| 738 |
|
| 739 |
Initiator Responder |
| 740 |
----------- ----------- |
| 741 |
HDR, SA --> |
| 742 |
<-- HDR, SA |
| 743 |
HDR, [ HASH(1), ] |
| 744 |
<Ni_b>Pubkey_r, |
| 745 |
<KE_b>Ke_i, |
| 746 |
<IDii_b>Ke_i, |
| 747 |
[<<Cert-I_b>Ke_i] --> |
| 748 |
HDR, <Nr_b>PubKey_i, |
| 749 |
<KE_b>Ke_r, |
| 750 |
<-- <IDir_b>Ke_r, |
| 751 |
HDR*, HASH_I --> |
| 752 |
<-- HDR*, HASH_R |
| 753 |
|
| 754 |
Aggressive Mode authenticated with the revised encryption method is |
| 755 |
described as follows: |
| 756 |
|
| 757 |
Initiator Responder |
| 758 |
----------- ----------- |
| 759 |
HDR, SA, [ HASH(1),] |
| 760 |
<Ni_b>Pubkey_r, |
| 761 |
<KE_b>Ke_i, <IDii_b>Ke_i |
| 762 |
[, <Cert-I_b>Ke_i ] --> |
| 763 |
HDR, SA, <Nr_b>PubKey_i, |
| 764 |
<KE_b>Ke_r, <IDir_b>Ke_r, |
| 765 |
<-- HASH_R |
| 766 |
HDR, HASH_I --> |
| 767 |
|
| 768 |
where HASH(1) is identical to <a href="#section-5.2">section 5.2</a>. Ke_i and Ke_r are keys to |
| 769 |
the symmetric encryption algorithm negotiated in the SA payload |
| 770 |
exchange. Only the body of the payloads are encrypted (in both public |
| 771 |
key and symmetric operations), the generic payload headers are left |
| 772 |
in the clear. The payload length includes that added to perform |
| 773 |
encryption. |
| 774 |
|
| 775 |
The symmetric cipher keys are derived from the decrypted nonces as |
| 776 |
follows. First the values Ne_i and Ne_r are computed: |
| 777 |
|
| 778 |
|
| 779 |
|
| 780 |
<span class="grey">Harkins & Carrel Standards Track [Page 14]</span></pre> |
| 781 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span> |
| 782 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 783 |
|
| 784 |
|
| 785 |
Ne_i = prf(Ni_b, CKY-I) |
| 786 |
Ne_r = prf(Nr_b, CKY-R) |
| 787 |
|
| 788 |
The keys Ke_i and Ke_r are then taken from Ne_i and Ne_r respectively |
| 789 |
in the manner described in <a href="#appendix-B">Appendix B</a> used to derive symmetric keys |
| 790 |
for use with the negotiated encryption algorithm. If the length of |
| 791 |
the output of the negotiated prf is greater than or equal to the key |
| 792 |
length requirements of the cipher, Ke_i and Ke_r are derived from the |
| 793 |
most significant bits of Ne_i and Ne_r respectively. If the desired |
| 794 |
length of Ke_i and Ke_r exceed the length of the output of the prf |
| 795 |
the necessary number of bits is obtained by repeatedly feeding the |
| 796 |
results of the prf back into itself and concatenating the result |
| 797 |
until the necessary number has been achieved. For example, if the |
| 798 |
negotiated encryption algorithm requires 320 bits of key and the |
| 799 |
output of the prf is only 128 bits, Ke_i is the most significant 320 |
| 800 |
bits of K, where |
| 801 |
|
| 802 |
K = K1 | K2 | K3 and |
| 803 |
K1 = prf(Ne_i, 0) |
| 804 |
K2 = prf(Ne_i, K1) |
| 805 |
K3 = prf(Ne_i, K2) |
| 806 |
|
| 807 |
For brevity, only derivation of Ke_i is shown; Ke_r is identical. The |
| 808 |
length of the value 0 in the computation of K1 is a single octet. |
| 809 |
Note that Ne_i, Ne_r, Ke_i, and Ke_r are all ephemeral and MUST be |
| 810 |
discarded after use. |
| 811 |
|
| 812 |
Save the requirements on the location of the optional HASH payload |
| 813 |
and the mandatory nonce payload there are no further payload |
| 814 |
requirements. All payloads-- in whatever order-- following the |
| 815 |
encrypted nonce MUST be encrypted with Ke_i or Ke_r depending on the |
| 816 |
direction. |
| 817 |
|
| 818 |
If CBC mode is used for the symmetric encryption then the |
| 819 |
initialization vectors (IVs) are set as follows. The IV for |
| 820 |
encrypting the first payload following the nonce is set to 0 (zero). |
| 821 |
The IV for subsequent payloads encrypted with the ephemeral symmetric |
| 822 |
cipher key, Ke_i, is the last ciphertext block of the previous |
| 823 |
payload. Encrypted payloads are padded up to the nearest block size. |
| 824 |
All padding bytes, except for the last one, contain 0x00. The last |
| 825 |
byte of the padding contains the number of the padding bytes used, |
| 826 |
excluding the last one. Note that this means there will always be |
| 827 |
padding. |
| 828 |
|
| 829 |
|
| 830 |
|
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
<span class="grey">Harkins & Carrel Standards Track [Page 15]</span></pre> |
| 837 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span> |
| 838 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 839 |
|
| 840 |
|
| 841 |
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a> Phase 1 Authenticated With a Pre-Shared Key</span> |
| 842 |
|
| 843 |
A key derived by some out-of-band mechanism may also be used to |
| 844 |
authenticate the exchange. The actual establishment of this key is |
| 845 |
out of the scope of this document. |
| 846 |
|
| 847 |
When doing a pre-shared key authentication, Main Mode is defined as |
| 848 |
follows: |
| 849 |
|
| 850 |
Initiator Responder |
| 851 |
---------- ----------- |
| 852 |
HDR, SA --> |
| 853 |
<-- HDR, SA |
| 854 |
HDR, KE, Ni --> |
| 855 |
<-- HDR, KE, Nr |
| 856 |
HDR*, IDii, HASH_I --> |
| 857 |
<-- HDR*, IDir, HASH_R |
| 858 |
|
| 859 |
Aggressive mode with a pre-shared key is described as follows: |
| 860 |
|
| 861 |
Initiator Responder |
| 862 |
----------- ----------- |
| 863 |
HDR, SA, KE, Ni, IDii --> |
| 864 |
<-- HDR, SA, KE, Nr, IDir, HASH_R |
| 865 |
HDR, HASH_I --> |
| 866 |
|
| 867 |
When using pre-shared key authentication with Main Mode the key can |
| 868 |
only be identified by the IP address of the peers since HASH_I must |
| 869 |
be computed before the initiator has processed IDir. Aggressive Mode |
| 870 |
allows for a wider range of identifiers of the pre-shared secret to |
| 871 |
be used. In addition, Aggressive Mode allows two parties to maintain |
| 872 |
multiple, different pre-shared keys and identify the correct one for |
| 873 |
a particular exchange. |
| 874 |
|
| 875 |
<span class="h3"><a class="selflink" id="section-5.5" href="#section-5.5">5.5</a> Phase 2 - Quick Mode</span> |
| 876 |
|
| 877 |
Quick Mode is not a complete exchange itself (in that it is bound to |
| 878 |
a phase 1 exchange), but is used as part of the SA negotiation |
| 879 |
process (phase 2) to derive keying material and negotiate shared |
| 880 |
policy for non-ISAKMP SAs. The information exchanged along with Quick |
| 881 |
Mode MUST be protected by the ISAKMP SA-- i.e. all payloads except |
| 882 |
the ISAKMP header are encrypted. In Quick Mode, a HASH payload MUST |
| 883 |
immediately follow the ISAKMP header and a SA payload MUST |
| 884 |
immediately follow the HASH. This HASH authenticates the message and |
| 885 |
also provides liveliness proofs. |
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
<span class="grey">Harkins & Carrel Standards Track [Page 16]</span></pre> |
| 893 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span> |
| 894 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 895 |
|
| 896 |
|
| 897 |
The message ID in the ISAKMP header identifies a Quick Mode in |
| 898 |
progress for a particular ISAKMP SA which itself is identified by the |
| 899 |
cookies in the ISAKMP header. Since each instance of a Quick Mode |
| 900 |
uses a unique initialization vector (see <a href="#appendix-B">Appendix B</a>) it is possible |
| 901 |
to have multiple simultaneous Quick Modes, based off a single ISAKMP |
| 902 |
SA, in progress at any one time. |
| 903 |
|
| 904 |
Quick Mode is essentially a SA negotiation and an exchange of nonces |
| 905 |
that provides replay protection. The nonces are used to generate |
| 906 |
fresh key material and prevent replay attacks from generating bogus |
| 907 |
security associations. An optional Key Exchange payload can be |
| 908 |
exchanged to allow for an additional Diffie-Hellman exchange and |
| 909 |
exponentiation per Quick Mode. While use of the key exchange payload |
| 910 |
with Quick Mode is optional it MUST be supported. |
| 911 |
|
| 912 |
Base Quick Mode (without the KE payload) refreshes the keying |
| 913 |
material derived from the exponentiation in phase 1. This does not |
| 914 |
provide PFS. Using the optional KE payload, an additional |
| 915 |
exponentiation is performed and PFS is provided for the keying |
| 916 |
material. |
| 917 |
|
| 918 |
The identities of the SAs negotiated in Quick Mode are implicitly |
| 919 |
assumed to be the IP addresses of the ISAKMP peers, without any |
| 920 |
implied constraints on the protocol or port numbers allowed, unless |
| 921 |
client identifiers are specified in Quick Mode. If ISAKMP is acting |
| 922 |
as a client negotiator on behalf of another party, the identities of |
| 923 |
the parties MUST be passed as IDci and then IDcr. Local policy will |
| 924 |
dictate whether the proposals are acceptable for the identities |
| 925 |
specified. If the client identities are not acceptable to the Quick |
| 926 |
Mode responder (due to policy or other reasons), a Notify payload |
| 927 |
with Notify Message Type INVALID-ID-INFORMATION (18) SHOULD be sent. |
| 928 |
|
| 929 |
The client identities are used to identify and direct traffic to the |
| 930 |
appropriate tunnel in cases where multiple tunnels exist between two |
| 931 |
peers and also to allow for unique and shared SAs with different |
| 932 |
granularities. |
| 933 |
|
| 934 |
All offers made during a Quick Mode are logically related and must be |
| 935 |
consistant. For example, if a KE payload is sent, the attribute |
| 936 |
describing the Diffie-Hellman group (see <a href="#section-6.1">section 6.1</a> and [Pip97]) |
| 937 |
MUST be included in every transform of every proposal of every SA |
| 938 |
being negotiated. Similarly, if client identities are used, they MUST |
| 939 |
apply to every SA in the negotiation. |
| 940 |
|
| 941 |
Quick Mode is defined as follows: |
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
|
| 947 |
|
| 948 |
<span class="grey">Harkins & Carrel Standards Track [Page 17]</span></pre> |
| 949 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span> |
| 950 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 951 |
|
| 952 |
|
| 953 |
Initiator Responder |
| 954 |
----------- ----------- |
| 955 |
HDR*, HASH(1), SA, Ni |
| 956 |
[, KE ] [, IDci, IDcr ] --> |
| 957 |
<-- HDR*, HASH(2), SA, Nr |
| 958 |
[, KE ] [, IDci, IDcr ] |
| 959 |
HDR*, HASH(3) --> |
| 960 |
|
| 961 |
Where: |
| 962 |
HASH(1) is the prf over the message id (M-ID) from the ISAKMP header |
| 963 |
concatenated with the entire message that follows the hash including |
| 964 |
all payload headers, but excluding any padding added for encryption. |
| 965 |
HASH(2) is identical to HASH(1) except the initiator's nonce-- Ni, |
| 966 |
minus the payload header-- is added after M-ID but before the |
| 967 |
complete message. The addition of the nonce to HASH(2) is for a |
| 968 |
liveliness proof. HASH(3)-- for liveliness-- is the prf over the |
| 969 |
value zero represented as a single octet, followed by a concatenation |
| 970 |
of the message id and the two nonces-- the initiator's followed by |
| 971 |
the responder's-- minus the payload header. In other words, the |
| 972 |
hashes for the above exchange are: |
| 973 |
|
| 974 |
HASH(1) = prf(SKEYID_a, M-ID | SA | Ni [ | KE ] [ | IDci | IDcr ) |
| 975 |
HASH(2) = prf(SKEYID_a, M-ID | Ni_b | SA | Nr [ | KE ] [ | IDci | |
| 976 |
IDcr ) |
| 977 |
HASH(3) = prf(SKEYID_a, 0 | M-ID | Ni_b | Nr_b) |
| 978 |
|
| 979 |
With the exception of the HASH, SA, and the optional ID payloads, |
| 980 |
there are no payload ordering restrictions on Quick Mode. HASH(1) and |
| 981 |
HASH(2) may differ from the illustration above if the order of |
| 982 |
payloads in the message differs from the illustrative example or if |
| 983 |
any optional payloads, for example a notify payload, have been |
| 984 |
chained to the message. |
| 985 |
|
| 986 |
If PFS is not needed, and KE payloads are not exchanged, the new |
| 987 |
keying material is defined as |
| 988 |
|
| 989 |
KEYMAT = prf(SKEYID_d, protocol | SPI | Ni_b | Nr_b). |
| 990 |
|
| 991 |
If PFS is desired and KE payloads were exchanged, the new keying |
| 992 |
material is defined as |
| 993 |
|
| 994 |
KEYMAT = prf(SKEYID_d, g(qm)^xy | protocol | SPI | Ni_b | Nr_b) |
| 995 |
|
| 996 |
where g(qm)^xy is the shared secret from the ephemeral Diffie-Hellman |
| 997 |
exchange of this Quick Mode. |
| 998 |
|
| 999 |
In either case, "protocol" and "SPI" are from the ISAKMP Proposal |
| 1000 |
Payload that contained the negotiated Transform. |
| 1001 |
|
| 1002 |
|
| 1003 |
|
| 1004 |
<span class="grey">Harkins & Carrel Standards Track [Page 18]</span></pre> |
| 1005 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span> |
| 1006 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1007 |
|
| 1008 |
|
| 1009 |
A single SA negotiation results in two security assocations-- one |
| 1010 |
inbound and one outbound. Different SPIs for each SA (one chosen by |
| 1011 |
the initiator, the other by the responder) guarantee a different key |
| 1012 |
for each direction. The SPI chosen by the destination of the SA is |
| 1013 |
used to derive KEYMAT for that SA. |
| 1014 |
|
| 1015 |
For situations where the amount of keying material desired is greater |
| 1016 |
than that supplied by the prf, KEYMAT is expanded by feeding the |
| 1017 |
results of the prf back into itself and concatenating results until |
| 1018 |
the required keying material has been reached. In other words, |
| 1019 |
|
| 1020 |
KEYMAT = K1 | K2 | K3 | ... |
| 1021 |
where |
| 1022 |
K1 = prf(SKEYID_d, [ g(qm)^xy | ] protocol | SPI | Ni_b | Nr_b) |
| 1023 |
K2 = prf(SKEYID_d, K1 | [ g(qm)^xy | ] protocol | SPI | Ni_b | |
| 1024 |
Nr_b) |
| 1025 |
K3 = prf(SKEYID_d, K2 | [ g(qm)^xy | ] protocol | SPI | Ni_b | |
| 1026 |
Nr_b) |
| 1027 |
etc. |
| 1028 |
|
| 1029 |
This keying material (whether with PFS or without, and whether |
| 1030 |
derived directly or through concatenation) MUST be used with the |
| 1031 |
negotiated SA. It is up to the service to define how keys are derived |
| 1032 |
from the keying material. |
| 1033 |
|
| 1034 |
In the case of an ephemeral Diffie-Hellman exchange in Quick Mode, |
| 1035 |
the exponential (g(qm)^xy) is irretreivably removed from the current |
| 1036 |
state and SKEYID_e and SKEYID_a (derived from phase 1 negotiation) |
| 1037 |
continue to protect and authenticate the ISAKMP SA and SKEYID_d |
| 1038 |
continues to be used to derive keys. |
| 1039 |
|
| 1040 |
Using Quick Mode, multiple SA's and keys can be negotiated with one |
| 1041 |
exchange as follows: |
| 1042 |
|
| 1043 |
Initiator Responder |
| 1044 |
----------- ----------- |
| 1045 |
HDR*, HASH(1), SA0, SA1, Ni, |
| 1046 |
[, KE ] [, IDci, IDcr ] --> |
| 1047 |
<-- HDR*, HASH(2), SA0, SA1, Nr, |
| 1048 |
[, KE ] [, IDci, IDcr ] |
| 1049 |
HDR*, HASH(3) --> |
| 1050 |
|
| 1051 |
The keying material is derived identically as in the case of a single |
| 1052 |
SA. In this case (negotiation of two SA payloads) the result would be |
| 1053 |
four security associations-- two each way for both SAs. |
| 1054 |
|
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
|
| 1059 |
|
| 1060 |
<span class="grey">Harkins & Carrel Standards Track [Page 19]</span></pre> |
| 1061 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span> |
| 1062 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1063 |
|
| 1064 |
|
| 1065 |
<span class="h3"><a class="selflink" id="section-5.6" href="#section-5.6">5.6</a> New Group Mode</span> |
| 1066 |
|
| 1067 |
New Group Mode MUST NOT be used prior to establishment of an ISAKMP |
| 1068 |
SA. The description of a new group MUST only follow phase 1 |
| 1069 |
negotiation. (It is not a phase 2 exchange, though). |
| 1070 |
|
| 1071 |
Initiator Responder |
| 1072 |
----------- ----------- |
| 1073 |
HDR*, HASH(1), SA --> |
| 1074 |
<-- HDR*, HASH(2), SA |
| 1075 |
|
| 1076 |
where HASH(1) is the prf output, using SKEYID_a as the key, and the |
| 1077 |
message-ID from the ISAKMP header concatenated with the entire SA |
| 1078 |
proposal, body and header, as the data; HASH(2) is the prf output, |
| 1079 |
using SKEYID_a as the key, and the message-ID from the ISAKMP header |
| 1080 |
concatenated with the reply as the data. In other words the hashes |
| 1081 |
for the above exchange are: |
| 1082 |
|
| 1083 |
HASH(1) = prf(SKEYID_a, M-ID | SA) |
| 1084 |
HASH(2) = prf(SKEYID_a, M-ID | SA) |
| 1085 |
|
| 1086 |
The proposal will specify the characteristics of the group (see |
| 1087 |
<a href="#appendix-A">appendix A</a>, "Attribute Assigned Numbers"). Group descriptions for |
| 1088 |
private Groups MUST be greater than or equal to 2^15. If the group |
| 1089 |
is not acceptable, the responder MUST reply with a Notify payload |
| 1090 |
with the message type set to ATTRIBUTES-NOT-SUPPORTED (13). |
| 1091 |
|
| 1092 |
ISAKMP implementations MAY require private groups to expire with the |
| 1093 |
SA under which they were established. |
| 1094 |
|
| 1095 |
Groups may be directly negotiated in the SA proposal with Main Mode. |
| 1096 |
To do this the component parts-- for a MODP group, the type, prime |
| 1097 |
and generator; for a EC2N group the type, the Irreducible Polynomial, |
| 1098 |
Group Generator One, Group Generator Two, Group Curve A, Group Curve |
| 1099 |
B and Group Order-- are passed as SA attributes (see <a href="#appendix-A">Appendix A</a>). |
| 1100 |
Alternately, the nature of the group can be hidden using New Group |
| 1101 |
Mode and only the group identifier is passed in the clear during |
| 1102 |
phase 1 negotiation. |
| 1103 |
|
| 1104 |
<span class="h3"><a class="selflink" id="section-5.7" href="#section-5.7">5.7</a> ISAKMP Informational Exchanges</span> |
| 1105 |
|
| 1106 |
This protocol protects ISAKMP Informational Exchanges when possible. |
| 1107 |
Once the ISAKMP security association has been established (and |
| 1108 |
SKEYID_e and SKEYID_a have been generated) ISAKMP Information |
| 1109 |
Exchanges, when used with this protocol, are as follows: |
| 1110 |
|
| 1111 |
|
| 1112 |
|
| 1113 |
|
| 1114 |
|
| 1115 |
|
| 1116 |
<span class="grey">Harkins & Carrel Standards Track [Page 20]</span></pre> |
| 1117 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span> |
| 1118 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1119 |
|
| 1120 |
|
| 1121 |
Initiator Responder |
| 1122 |
----------- ----------- |
| 1123 |
HDR*, HASH(1), N/D --> |
| 1124 |
|
| 1125 |
where N/D is either an ISAKMP Notify Payload or an ISAKMP Delete |
| 1126 |
Payload and HASH(1) is the prf output, using SKEYID_a as the key, and |
| 1127 |
a M-ID unique to this exchange concatenated with the entire |
| 1128 |
informational payload (either a Notify or Delete) as the data. In |
| 1129 |
other words, the hash for the above exchange is: |
| 1130 |
|
| 1131 |
HASH(1) = prf(SKEYID_a, M-ID | N/D) |
| 1132 |
|
| 1133 |
As noted the message ID in the ISAKMP header-- and used in the prf |
| 1134 |
computation-- is unique to this exchange and MUST NOT be the same as |
| 1135 |
the message ID of another phase 2 exchange which generated this |
| 1136 |
informational exchange. The derivation of the initialization vector, |
| 1137 |
used with SKEYID_e to encrypt this message, is described in <a href="#appendix-B">Appendix</a> |
| 1138 |
<a href="#appendix-B">B</a>. |
| 1139 |
|
| 1140 |
If the ISAKMP security association has not yet been established at |
| 1141 |
the time of the Informational Exchange, the exchange is done in the |
| 1142 |
clear without an accompanying HASH payload. |
| 1143 |
|
| 1144 |
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a> Oakley Groups</span> |
| 1145 |
|
| 1146 |
With IKE, the group in which to do the Diffie-Hellman exchange is |
| 1147 |
negotiated. Four groups-- values 1 through 4-- are defined below. |
| 1148 |
These groups originated with the Oakley protocol and are therefore |
| 1149 |
called "Oakley Groups". The attribute class for "Group" is defined in |
| 1150 |
<a href="#appendix-A">Appendix A</a>. All values 2^15 and higher are used for private group |
| 1151 |
identifiers. For a discussion on the strength of the default Oakley |
| 1152 |
groups please see the Security Considerations section below. |
| 1153 |
|
| 1154 |
These groups were all generated by Richard Schroeppel at the |
| 1155 |
University of Arizona. Properties of these groups are described in |
| 1156 |
[<a href="#ref-Orm96" title=""The Oakley Key Determination Protocol"">Orm96</a>]. |
| 1157 |
|
| 1158 |
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a> First Oakley Default Group</span> |
| 1159 |
|
| 1160 |
Oakley implementations MUST support a MODP group with the following |
| 1161 |
prime and generator. This group is assigned id 1 (one). |
| 1162 |
|
| 1163 |
The prime is: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } |
| 1164 |
Its hexadecimal value is |
| 1165 |
|
| 1166 |
|
| 1167 |
|
| 1168 |
|
| 1169 |
|
| 1170 |
|
| 1171 |
|
| 1172 |
<span class="grey">Harkins & Carrel Standards Track [Page 21]</span></pre> |
| 1173 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span> |
| 1174 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1175 |
|
| 1176 |
|
| 1177 |
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 |
| 1178 |
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD |
| 1179 |
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 |
| 1180 |
E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF |
| 1181 |
|
| 1182 |
The generator is: 2. |
| 1183 |
|
| 1184 |
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a> Second Oakley Group</span> |
| 1185 |
|
| 1186 |
IKE implementations SHOULD support a MODP group with the following |
| 1187 |
prime and generator. This group is assigned id 2 (two). |
| 1188 |
|
| 1189 |
The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }. |
| 1190 |
Its hexadecimal value is |
| 1191 |
|
| 1192 |
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 |
| 1193 |
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD |
| 1194 |
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 |
| 1195 |
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED |
| 1196 |
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 |
| 1197 |
FFFFFFFF FFFFFFFF |
| 1198 |
|
| 1199 |
The generator is 2 (decimal) |
| 1200 |
|
| 1201 |
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a> Third Oakley Group</span> |
| 1202 |
|
| 1203 |
IKE implementations SHOULD support a EC2N group with the following |
| 1204 |
characteristics. This group is assigned id 3 (three). The curve is |
| 1205 |
based on the Galois Field GF[2^155]. The field size is 155. The |
| 1206 |
irreducible polynomial for the field is: |
| 1207 |
u^155 + u^62 + 1. |
| 1208 |
The equation for the elliptic curve is: |
| 1209 |
y^2 + xy = x^3 + ax^2 + b. |
| 1210 |
|
| 1211 |
Field Size: 155 |
| 1212 |
Group Prime/Irreducible Polynomial: |
| 1213 |
0x0800000000000000000000004000000000000001 |
| 1214 |
Group Generator One: 0x7b |
| 1215 |
Group Curve A: 0x0 |
| 1216 |
Group Curve B: 0x07338f |
| 1217 |
|
| 1218 |
Group Order: 0X0800000000000000000057db5698537193aef944 |
| 1219 |
|
| 1220 |
The data in the KE payload when using this group is the value x from |
| 1221 |
the solution (x,y), the point on the curve chosen by taking the |
| 1222 |
randomly chosen secret Ka and computing Ka*P, where * is the |
| 1223 |
repetition of the group addition and double operations, P is the |
| 1224 |
curve point with x coordinate equal to generator 1 and the y |
| 1225 |
|
| 1226 |
|
| 1227 |
|
| 1228 |
<span class="grey">Harkins & Carrel Standards Track [Page 22]</span></pre> |
| 1229 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span> |
| 1230 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1231 |
|
| 1232 |
|
| 1233 |
coordinate determined from the defining equation. The equation of |
| 1234 |
curve is implicitly known by the Group Type and the A and B |
| 1235 |
coefficients. There are two possible values for the y coordinate; |
| 1236 |
either one can be used successfully (the two parties need not agree |
| 1237 |
on the selection). |
| 1238 |
|
| 1239 |
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a> Fourth Oakley Group</span> |
| 1240 |
|
| 1241 |
IKE implementations SHOULD support a EC2N group with the following |
| 1242 |
characteristics. This group is assigned id 4 (four). The curve is |
| 1243 |
based on the Galois Field GF[2^185]. The field size is 185. The |
| 1244 |
irreducible polynomial for the field is: |
| 1245 |
u^185 + u^69 + 1. The |
| 1246 |
equation for the elliptic curve is: |
| 1247 |
y^2 + xy = x^3 + ax^2 + b. |
| 1248 |
|
| 1249 |
Field Size: 185 |
| 1250 |
Group Prime/Irreducible Polynomial: |
| 1251 |
0x020000000000000000000000000000200000000000000001 |
| 1252 |
Group Generator One: 0x18 |
| 1253 |
Group Curve A: 0x0 |
| 1254 |
Group Curve B: 0x1ee9 |
| 1255 |
|
| 1256 |
Group Order: 0X01ffffffffffffffffffffffdbf2f889b73e484175f94ebc |
| 1257 |
|
| 1258 |
The data in the KE payload when using this group will be identical to |
| 1259 |
that as when using Oakley Group 3 (three). |
| 1260 |
|
| 1261 |
Other groups can be defined using New Group Mode. These default |
| 1262 |
groups were generated by Richard Schroeppel at the University of |
| 1263 |
Arizona. Properties of these primes are described in [<a href="#ref-Orm96" title=""The Oakley Key Determination Protocol"">Orm96</a>]. |
| 1264 |
|
| 1265 |
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Payload Explosion for a Complete IKE Exchange</span> |
| 1266 |
|
| 1267 |
This section illustrates how the IKE protocol is used to: |
| 1268 |
|
| 1269 |
- establish a secure and authenticated channel between ISAKMP |
| 1270 |
processes (phase 1); and |
| 1271 |
|
| 1272 |
- generate key material for, and negotiate, an IPsec SA (phase 2). |
| 1273 |
|
| 1274 |
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a> Phase 1 using Main Mode</span> |
| 1275 |
|
| 1276 |
The following diagram illustrates the payloads exchanged between the |
| 1277 |
two parties in the first round trip exchange. The initiator MAY |
| 1278 |
propose several proposals; the responder MUST reply with one. |
| 1279 |
|
| 1280 |
|
| 1281 |
|
| 1282 |
|
| 1283 |
|
| 1284 |
<span class="grey">Harkins & Carrel Standards Track [Page 23]</span></pre> |
| 1285 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span> |
| 1286 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1287 |
|
| 1288 |
|
| 1289 |
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 |
| 1290 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1291 |
~ ISAKMP Header with XCHG of Main Mode, ~ |
| 1292 |
~ and Next Payload of ISA_SA ~ |
| 1293 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1294 |
! 0 ! RESERVED ! Payload Length ! |
| 1295 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1296 |
! Domain of Interpretation ! |
| 1297 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1298 |
! Situation ! |
| 1299 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1300 |
! 0 ! RESERVED ! Payload Length ! |
| 1301 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1302 |
! Proposal #1 ! PROTO_ISAKMP ! SPI size = 0 | # Transforms ! |
| 1303 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1304 |
! ISA_TRANS ! RESERVED ! Payload Length ! |
| 1305 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1306 |
! Transform #1 ! KEY_OAKLEY | RESERVED2 ! |
| 1307 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1308 |
~ prefered SA attributes ~ |
| 1309 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1310 |
! 0 ! RESERVED ! Payload Length ! |
| 1311 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1312 |
! Transform #2 ! KEY_OAKLEY | RESERVED2 ! |
| 1313 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1314 |
~ alternate SA attributes ~ |
| 1315 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1316 |
|
| 1317 |
The responder replies in kind but selects, and returns, one transform |
| 1318 |
proposal (the ISAKMP SA attributes). |
| 1319 |
|
| 1320 |
The second exchange consists of the following payloads: |
| 1321 |
|
| 1322 |
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 |
| 1323 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1324 |
~ ISAKMP Header with XCHG of Main Mode, ~ |
| 1325 |
~ and Next Payload of ISA_KE ~ |
| 1326 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1327 |
! ISA_NONCE ! RESERVED ! Payload Length ! |
| 1328 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1329 |
~ D-H Public Value (g^xi from initiator g^xr from responder) ~ |
| 1330 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1331 |
! 0 ! RESERVED ! Payload Length ! |
| 1332 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1333 |
~ Ni (from initiator) or Nr (from responder) ~ |
| 1334 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1335 |
|
| 1336 |
|
| 1337 |
|
| 1338 |
|
| 1339 |
|
| 1340 |
<span class="grey">Harkins & Carrel Standards Track [Page 24]</span></pre> |
| 1341 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span> |
| 1342 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1343 |
|
| 1344 |
|
| 1345 |
The shared keys, SKEYID_e and SKEYID_a, are now used to protect and |
| 1346 |
authenticate all further communication. Note that both SKEYID_e and |
| 1347 |
SKEYID_a are unauthenticated. |
| 1348 |
|
| 1349 |
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 |
| 1350 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1351 |
~ ISAKMP Header with XCHG of Main Mode, ~ |
| 1352 |
~ and Next Payload of ISA_ID and the encryption bit set ~ |
| 1353 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1354 |
! ISA_SIG ! RESERVED ! Payload Length ! |
| 1355 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1356 |
~ Identification Data of the ISAKMP negotiator ~ |
| 1357 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1358 |
! 0 ! RESERVED ! Payload Length ! |
| 1359 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1360 |
~ signature verified by the public key of the ID above ~ |
| 1361 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1362 |
|
| 1363 |
The key exchange is authenticated over a signed hash as described in |
| 1364 |
<a href="#section-5.1">section 5.1</a>. Once the signature has been verified using the |
| 1365 |
authentication algorithm negotiated as part of the ISAKMP SA, the |
| 1366 |
shared keys, SKEYID_e and SKEYID_a can be marked as authenticated. |
| 1367 |
(For brevity, certificate payloads were not exchanged). |
| 1368 |
|
| 1369 |
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a> Phase 2 using Quick Mode</span> |
| 1370 |
|
| 1371 |
The following payloads are exchanged in the first round of Quick Mode |
| 1372 |
with ISAKMP SA negotiation. In this hypothetical exchange, the ISAKMP |
| 1373 |
negotiators are proxies for other parties which have requested |
| 1374 |
authentication. |
| 1375 |
|
| 1376 |
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 |
| 1377 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1378 |
~ ISAKMP Header with XCHG of Quick Mode, ~ |
| 1379 |
~ Next Payload of ISA_HASH and the encryption bit set ~ |
| 1380 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1381 |
! ISA_SA ! RESERVED ! Payload Length ! |
| 1382 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1383 |
~ keyed hash of message ~ |
| 1384 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1385 |
! ISA_NONCE ! RESERVED ! Payload Length ! |
| 1386 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1387 |
! Domain Of Interpretation ! |
| 1388 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1389 |
! Situation ! |
| 1390 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1391 |
! 0 ! RESERVED ! Payload Length ! |
| 1392 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1393 |
|
| 1394 |
|
| 1395 |
|
| 1396 |
<span class="grey">Harkins & Carrel Standards Track [Page 25]</span></pre> |
| 1397 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span> |
| 1398 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1399 |
|
| 1400 |
|
| 1401 |
! Proposal #1 ! PROTO_IPSEC_AH! SPI size = 4 | # Transforms ! |
| 1402 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1403 |
~ SPI (4 octets) ~ |
| 1404 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1405 |
! ISA_TRANS ! RESERVED ! Payload Length ! |
| 1406 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1407 |
! Transform #1 ! AH_SHA | RESERVED2 ! |
| 1408 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1409 |
! other SA attributes ! |
| 1410 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1411 |
! 0 ! RESERVED ! Payload Length ! |
| 1412 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1413 |
! Transform #2 ! AH_MD5 | RESERVED2 ! |
| 1414 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1415 |
! other SA attributes ! |
| 1416 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1417 |
! ISA_ID ! RESERVED ! Payload Length ! |
| 1418 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1419 |
~ nonce ~ |
| 1420 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1421 |
! ISA_ID ! RESERVED ! Payload Length ! |
| 1422 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1423 |
~ ID of source for which ISAKMP is a client ~ |
| 1424 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1425 |
! 0 ! RESERVED ! Payload Length ! |
| 1426 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1427 |
~ ID of destination for which ISAKMP is a client ~ |
| 1428 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1429 |
|
| 1430 |
where the contents of the hash are described in 5.5 above. The |
| 1431 |
responder replies with a similar message which only contains one |
| 1432 |
transform-- the selected AH transform. Upon receipt, the initiator |
| 1433 |
can provide the key engine with the negotiated security association |
| 1434 |
and the keying material. As a check against replay attacks, the |
| 1435 |
responder waits until receipt of the next message. |
| 1436 |
|
| 1437 |
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 |
| 1438 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1439 |
~ ISAKMP Header with XCHG of Quick Mode, ~ |
| 1440 |
~ Next Payload of ISA_HASH and the encryption bit set ~ |
| 1441 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1442 |
! 0 ! RESERVED ! Payload Length ! |
| 1443 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1444 |
~ hash data ~ |
| 1445 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 1446 |
|
| 1447 |
where the contents of the hash are described in 5.5 above. |
| 1448 |
|
| 1449 |
|
| 1450 |
|
| 1451 |
|
| 1452 |
<span class="grey">Harkins & Carrel Standards Track [Page 26]</span></pre> |
| 1453 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span> |
| 1454 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1455 |
|
| 1456 |
|
| 1457 |
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Perfect Forward Secrecy Example</span> |
| 1458 |
|
| 1459 |
This protocol can provide PFS of both keys and identities. The |
| 1460 |
identies of both the ISAKMP negotiating peer and, if applicable, the |
| 1461 |
identities for whom the peers are negotiating can be protected with |
| 1462 |
PFS. |
| 1463 |
|
| 1464 |
To provide Perfect Forward Secrecy of both keys and all identities, |
| 1465 |
two parties would perform the following: |
| 1466 |
|
| 1467 |
o A Main Mode Exchange to protect the identities of the ISAKMP |
| 1468 |
peers. |
| 1469 |
This establishes an ISAKMP SA. |
| 1470 |
o A Quick Mode Exchange to negotiate other security protocol |
| 1471 |
protection. |
| 1472 |
This establishes a SA on each end for this protocol. |
| 1473 |
o Delete the ISAKMP SA and its associated state. |
| 1474 |
|
| 1475 |
Since the key for use in the non-ISAKMP SA was derived from the |
| 1476 |
single ephemeral Diffie-Hellman exchange PFS is preserved. |
| 1477 |
|
| 1478 |
To provide Perfect Forward Secrecy of merely the keys of a non-ISAKMP |
| 1479 |
security association, it in not necessary to do a phase 1 exchange if |
| 1480 |
an ISAKMP SA exists between the two peers. A single Quick Mode in |
| 1481 |
which the optional KE payload is passed, and an additional Diffie- |
| 1482 |
Hellman exchange is performed, is all that is required. At this point |
| 1483 |
the state derived from this Quick Mode must be deleted from the |
| 1484 |
ISAKMP SA as described in <a href="#section-5.5">section 5.5</a>. |
| 1485 |
|
| 1486 |
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Implementation Hints</span> |
| 1487 |
|
| 1488 |
Using a single ISAKMP Phase 1 negotiation makes subsequent Phase 2 |
| 1489 |
negotiations extremely quick. As long as the Phase 1 state remains |
| 1490 |
cached, and PFS is not needed, Phase 2 can proceed without any |
| 1491 |
exponentiation. How many Phase 2 negotiations can be performed for a |
| 1492 |
single Phase 1 is a local policy issue. The decision will depend on |
| 1493 |
the strength of the algorithms being used and level of trust in the |
| 1494 |
peer system. |
| 1495 |
|
| 1496 |
An implementation may wish to negotiate a range of SAs when |
| 1497 |
performing Quick Mode. By doing this they can speed up the "re- |
| 1498 |
keying". Quick Mode defines how KEYMAT is defined for a range of SAs. |
| 1499 |
When one peer feels it is time to change SAs they simply use the next |
| 1500 |
one within the stated range. A range of SAs can be established by |
| 1501 |
negotiating multiple SAs (identical attributes, different SPIs) with |
| 1502 |
one Quick Mode. |
| 1503 |
|
| 1504 |
|
| 1505 |
|
| 1506 |
|
| 1507 |
|
| 1508 |
<span class="grey">Harkins & Carrel Standards Track [Page 27]</span></pre> |
| 1509 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span> |
| 1510 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1511 |
|
| 1512 |
|
| 1513 |
An optimization that is often useful is to establish Security |
| 1514 |
Associations with peers before they are needed so that when they |
| 1515 |
become needed they are already in place. This ensures there would be |
| 1516 |
no delays due to key management before initial data transmission. |
| 1517 |
This optimization is easily implemented by setting up more than one |
| 1518 |
Security Association with a peer for each requested Security |
| 1519 |
Association and caching those not immediately used. |
| 1520 |
|
| 1521 |
Also, if an ISAKMP implementation is alerted that a SA will soon be |
| 1522 |
needed (e.g. to replace an existing SA that will expire in the near |
| 1523 |
future), then it can establish the new SA before that new SA is |
| 1524 |
needed. |
| 1525 |
|
| 1526 |
The base ISAKMP specification describes conditions in which one party |
| 1527 |
of the protocol may inform the other party of some activity-- either |
| 1528 |
deletion of a security association or in response to some error in |
| 1529 |
the protocol such as a signature verification failed or a payload |
| 1530 |
failed to decrypt. It is strongly suggested that these Informational |
| 1531 |
exchanges not be responded to under any circumstances. Such a |
| 1532 |
condition may result in a "notify war" in which failure to understand |
| 1533 |
a message results in a notify to the peer who cannot understand it |
| 1534 |
and sends his own notify back which is also not understood. |
| 1535 |
|
| 1536 |
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Security Considerations</span> |
| 1537 |
|
| 1538 |
This entire memo discusses a hybrid protocol, combining parts of |
| 1539 |
Oakley and parts of SKEME with ISAKMP, to negotiate, and derive |
| 1540 |
keying material for, security associations in a secure and |
| 1541 |
authenticated manner. |
| 1542 |
|
| 1543 |
Confidentiality is assured by the use of a negotiated encryption |
| 1544 |
algorithm. Authentication is assured by the use of a negotiated |
| 1545 |
method: a digital signature algorithm; a public key algorithm which |
| 1546 |
supports encryption; or, a pre-shared key. The confidentiality and |
| 1547 |
authentication of this exchange is only as good as the attributes |
| 1548 |
negotiated as part of the ISAKMP security association. |
| 1549 |
|
| 1550 |
Repeated re-keying using Quick Mode can consume the entropy of the |
| 1551 |
Diffie-Hellman shared secret. Implementors should take note of this |
| 1552 |
fact and set a limit on Quick Mode Exchanges between exponentiations. |
| 1553 |
This memo does not prescribe such a limit. |
| 1554 |
|
| 1555 |
Perfect Forward Secrecy (PFS) of both keying material and identities |
| 1556 |
is possible with this protocol. By specifying a Diffie-Hellman group, |
| 1557 |
and passing public values in KE payloads, ISAKMP peers can establish |
| 1558 |
PFS of keys-- the identities would be protected by SKEYID_e from the |
| 1559 |
ISAKMP SA and would therefore not be protected by PFS. If PFS of both |
| 1560 |
keying material and identities is desired, an ISAKMP peer MUST |
| 1561 |
|
| 1562 |
|
| 1563 |
|
| 1564 |
<span class="grey">Harkins & Carrel Standards Track [Page 28]</span></pre> |
| 1565 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span> |
| 1566 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1567 |
|
| 1568 |
|
| 1569 |
establish only one non-ISAKMP security association (e.g. IPsec |
| 1570 |
Security Association) per ISAKMP SA. PFS for keys and identities is |
| 1571 |
accomplished by deleting the ISAKMP SA (and optionally issuing a |
| 1572 |
DELETE message) upon establishment of the single non-ISAKMP SA. In |
| 1573 |
this way a phase one negotiation is uniquely tied to a single phase |
| 1574 |
two negotiation, and the ISAKMP SA established during phase one |
| 1575 |
negotiation is never used again. |
| 1576 |
|
| 1577 |
The strength of a key derived from a Diffie-Hellman exchange using |
| 1578 |
any of the groups defined here depends on the inherent strength of |
| 1579 |
the group, the size of the exponent used, and the entropy provided by |
| 1580 |
the random number generator used. Due to these inputs it is difficult |
| 1581 |
to determine the strength of a key for any of the defined groups. The |
| 1582 |
default Diffie-Hellman group (number one) when used with a strong |
| 1583 |
random number generator and an exponent no less than 160 bits is |
| 1584 |
sufficient to use for DES. Groups two through four provide greater |
| 1585 |
security. Implementations should make note of these conservative |
| 1586 |
estimates when establishing policy and negotiating security |
| 1587 |
parameters. |
| 1588 |
|
| 1589 |
Note that these limitations are on the Diffie-Hellman groups |
| 1590 |
themselves. There is nothing in IKE which prohibits using stronger |
| 1591 |
groups nor is there anything which will dilute the strength obtained |
| 1592 |
from stronger groups. In fact, the extensible framework of IKE |
| 1593 |
encourages the definition of more groups; use of elliptical curve |
| 1594 |
groups will greatly increase strength using much smaller numbers. |
| 1595 |
|
| 1596 |
For situations where defined groups provide insufficient strength New |
| 1597 |
Group Mode can be used to exchange a Diffie-Hellman group which |
| 1598 |
provides the necessary strength. In is incumbent upon implementations |
| 1599 |
to check the primality in groups being offered and independently |
| 1600 |
arrive at strength estimates. |
| 1601 |
|
| 1602 |
It is assumed that the Diffie-Hellman exponents in this exchange are |
| 1603 |
erased from memory after use. In particular, these exponents must not |
| 1604 |
be derived from long-lived secrets like the seed to a pseudo-random |
| 1605 |
generator. |
| 1606 |
|
| 1607 |
IKE exchanges maintain running initialization vectors (IV) where the |
| 1608 |
last ciphertext block of the last message is the IV for the next |
| 1609 |
message. To prevent retransmissions (or forged messages with valid |
| 1610 |
cookies) from causing exchanges to get out of sync IKE |
| 1611 |
implementations SHOULD NOT update their running IV until the |
| 1612 |
decrypted message has passed a basic sanity check and has been |
| 1613 |
determined to actually advance the IKE state machine-- i.e. it is not |
| 1614 |
a retransmission. |
| 1615 |
|
| 1616 |
|
| 1617 |
|
| 1618 |
|
| 1619 |
|
| 1620 |
<span class="grey">Harkins & Carrel Standards Track [Page 29]</span></pre> |
| 1621 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span> |
| 1622 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1623 |
|
| 1624 |
|
| 1625 |
While the last roundtrip of Main Mode (and optionally the last |
| 1626 |
message of Aggressive Mode) is encrypted it is not, strictly |
| 1627 |
speaking, authenticated. An active substitution attack on the |
| 1628 |
ciphertext could result in payload corruption. If such an attack |
| 1629 |
corrupts mandatory payloads it would be detected by an authentication |
| 1630 |
failure, but if it corrupts any optional payloads (e.g. notify |
| 1631 |
payloads chained onto the last message of a Main Mode exchange) it |
| 1632 |
might not be detectable. |
| 1633 |
|
| 1634 |
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. IANA Considerations</span> |
| 1635 |
|
| 1636 |
This document contains many "magic numbers" to be maintained by the |
| 1637 |
IANA. This section explains the criteria to be used by the IANA to |
| 1638 |
assign additional numbers in each of these lists. |
| 1639 |
|
| 1640 |
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a> Attribute Classes</span> |
| 1641 |
|
| 1642 |
Attributes negotiated in this protocol are identified by their class. |
| 1643 |
Requests for assignment of new classes must be accompanied by a |
| 1644 |
standards-track RFC which describes the use of this attribute. |
| 1645 |
|
| 1646 |
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a> Encryption Algorithm Class</span> |
| 1647 |
|
| 1648 |
Values of the Encryption Algorithm Class define an encryption |
| 1649 |
algorithm to use when called for in this document. Requests for |
| 1650 |
assignment of new encryption algorithm values must be accompanied by |
| 1651 |
a reference to a standards-track or Informational RFC or a reference |
| 1652 |
to published cryptographic literature which describes this algorithm. |
| 1653 |
|
| 1654 |
<span class="h3"><a class="selflink" id="section-11.3" href="#section-11.3">11.3</a> Hash Algorithm</span> |
| 1655 |
|
| 1656 |
Values of the Hash Algorithm Class define a hash algorithm to use |
| 1657 |
when called for in this document. Requests for assignment of new hash |
| 1658 |
algorithm values must be accompanied by a reference to a standards- |
| 1659 |
track or Informational RFC or a reference to published cryptographic |
| 1660 |
literature which describes this algorithm. Due to the key derivation |
| 1661 |
and key expansion uses of HMAC forms of hash algorithms in IKE, |
| 1662 |
requests for assignment of new hash algorithm values must take into |
| 1663 |
account the cryptographic properties-- e.g it's resistance to |
| 1664 |
collision-- of the hash algorithm itself. |
| 1665 |
|
| 1666 |
<span class="h3"><a class="selflink" id="section-11.4" href="#section-11.4">11.4</a> Group Description and Group Type</span> |
| 1667 |
|
| 1668 |
Values of the Group Description Class identify a group to use in a |
| 1669 |
Diffie-Hellman exchange. Values of the Group Type Class define the |
| 1670 |
type of group. Requests for assignment of new groups must be |
| 1671 |
accompanied by a reference to a standards-track or Informational RFC |
| 1672 |
which describes this group. Requests for assignment of new group |
| 1673 |
|
| 1674 |
|
| 1675 |
|
| 1676 |
<span class="grey">Harkins & Carrel Standards Track [Page 30]</span></pre> |
| 1677 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span> |
| 1678 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1679 |
|
| 1680 |
|
| 1681 |
types must be accompanied by a reference to a standards-track or |
| 1682 |
Informational RFC or by a reference to published cryptographic or |
| 1683 |
mathmatical literature which describes the new type. |
| 1684 |
|
| 1685 |
<span class="h3"><a class="selflink" id="section-11.5" href="#section-11.5">11.5</a> Life Type</span> |
| 1686 |
|
| 1687 |
Values of the Life Type Class define a type of lifetime to which the |
| 1688 |
ISAKMP Security Association applies. Requests for assignment of new |
| 1689 |
life types must be accompanied by a detailed description of the units |
| 1690 |
of this type and its expiry. |
| 1691 |
|
| 1692 |
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Acknowledgements</span> |
| 1693 |
|
| 1694 |
This document is the result of close consultation with Hugo Krawczyk, |
| 1695 |
Douglas Maughan, Hilarie Orman, Mark Schertler, Mark Schneider, and |
| 1696 |
Jeff Turner. It relies on protocols which were written by them. |
| 1697 |
Without their interest and dedication, this would not have been |
| 1698 |
written. |
| 1699 |
|
| 1700 |
Special thanks Rob Adams, Cheryl Madson, Derrell Piper, Harry Varnis, |
| 1701 |
and Elfed Weaver for technical input, encouragement, and various |
| 1702 |
sanity checks along the way. |
| 1703 |
|
| 1704 |
We would also like to thank the many members of the IPSec working |
| 1705 |
group that contributed to the development of this protocol over the |
| 1706 |
past year. |
| 1707 |
|
| 1708 |
<span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. References</span> |
| 1709 |
|
| 1710 |
[<a id="ref-CAST">CAST</a>] Adams, C., "The CAST-128 Encryption Algorithm", <a href="./rfc2144">RFC 2144</a>, |
| 1711 |
May 1997. |
| 1712 |
|
| 1713 |
[<a id="ref-BLOW">BLOW</a>] Schneier, B., "The Blowfish Encryption Algorithm", Dr. |
| 1714 |
Dobb's Journal, v. 19, n. 4, April 1994. |
| 1715 |
|
| 1716 |
[<a id="ref-Bra97">Bra97</a>] Bradner, S., "Key Words for use in RFCs to indicate |
| 1717 |
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997. |
| 1718 |
|
| 1719 |
[<a id="ref-DES">DES</a>] ANSI X3.106, "American National Standard for Information |
| 1720 |
Systems-Data Link Encryption", American National Standards |
| 1721 |
Institute, 1983. |
| 1722 |
|
| 1723 |
[<a id="ref-DH">DH</a>] Diffie, W., and Hellman M., "New Directions in |
| 1724 |
Cryptography", IEEE Transactions on Information Theory, V. |
| 1725 |
IT-22, n. 6, June 1977. |
| 1726 |
|
| 1727 |
|
| 1728 |
|
| 1729 |
|
| 1730 |
|
| 1731 |
|
| 1732 |
<span class="grey">Harkins & Carrel Standards Track [Page 31]</span></pre> |
| 1733 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span> |
| 1734 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1735 |
|
| 1736 |
|
| 1737 |
[<a id="ref-DSS">DSS</a>] NIST, "Digital Signature Standard", FIPS 186, National |
| 1738 |
Institute of Standards and Technology, U.S. Department of |
| 1739 |
Commerce, May, 1994. |
| 1740 |
|
| 1741 |
[<a id="ref-IDEA">IDEA</a>] Lai, X., "On the Design and Security of Block Ciphers," ETH |
| 1742 |
Series in Information Processing, v. 1, Konstanz: Hartung- |
| 1743 |
Gorre Verlag, 1992 |
| 1744 |
|
| 1745 |
[<a id="ref-KBC96">KBC96</a>] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- |
| 1746 |
Hashing for Message Authentication", <a href="./rfc2104">RFC 2104</a>, February |
| 1747 |
1997. |
| 1748 |
|
| 1749 |
[<a id="ref-SKEME">SKEME</a>] Krawczyk, H., "SKEME: A Versatile Secure Key Exchange |
| 1750 |
Mechanism for Internet", from IEEE Proceedings of the 1996 |
| 1751 |
Symposium on Network and Distributed Systems Security. |
| 1752 |
|
| 1753 |
[<a id="ref-MD5">MD5</a>] Rivest, R., "The MD5 Message Digest Algorithm", <a href="./rfc1321">RFC 1321</a>, |
| 1754 |
April 1992. |
| 1755 |
|
| 1756 |
[<a id="ref-MSST98">MSST98</a>] Maughhan, D., Schertler, M., Schneider, M., and J. Turner, |
| 1757 |
"Internet Security Association and Key Management Protocol |
| 1758 |
(ISAKMP)", <a href="./rfc2408">RFC 2408</a>, November 1998. |
| 1759 |
|
| 1760 |
[<a id="ref-Orm96">Orm96</a>] Orman, H., "The Oakley Key Determination Protocol", <a href="./rfc2412">RFC</a> |
| 1761 |
<a href="./rfc2412">2412</a>, November 1998. |
| 1762 |
|
| 1763 |
[<a id="ref-PKCS1">PKCS1</a>] RSA Laboratories, "PKCS #1: RSA Encryption Standard", |
| 1764 |
November 1993. |
| 1765 |
|
| 1766 |
[<a id="ref-Pip98">Pip98</a>] Piper, D., "The Internet IP Security Domain Of |
| 1767 |
Interpretation for ISAKMP", <a href="./rfc2407">RFC 2407</a>, November 1998. |
| 1768 |
|
| 1769 |
[<a id="ref-RC5">RC5</a>] Rivest, R., "The RC5 Encryption Algorithm", Dr. Dobb's |
| 1770 |
Journal, v. 20, n. 1, January 1995. |
| 1771 |
|
| 1772 |
[<a id="ref-RSA">RSA</a>] Rivest, R., Shamir, A., and Adleman, L., "A Method for |
| 1773 |
Obtaining Digital Signatures and Public-Key Cryptosystems", |
| 1774 |
Communications of the ACM, v. 21, n. 2, February 1978. |
| 1775 |
|
| 1776 |
[<a id="ref-Sch96">Sch96</a>] Schneier, B., "Applied Cryptography, Protocols, Algorithms, |
| 1777 |
and Source Code in C", 2nd edition. |
| 1778 |
|
| 1779 |
[<a id="ref-SHA">SHA</a>] NIST, "Secure Hash Standard", FIPS 180-1, National Institue |
| 1780 |
of Standards and Technology, U.S. Department of Commerce, |
| 1781 |
May 1994. |
| 1782 |
|
| 1783 |
[<a id="ref-TIGER">TIGER</a>] Anderson, R., and Biham, E., "Fast Software Encryption", |
| 1784 |
Springer LNCS v. 1039, 1996. |
| 1785 |
|
| 1786 |
|
| 1787 |
|
| 1788 |
<span class="grey">Harkins & Carrel Standards Track [Page 32]</span></pre> |
| 1789 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span> |
| 1790 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1791 |
|
| 1792 |
|
| 1793 |
Appendix A |
| 1794 |
|
| 1795 |
This is a list of DES Weak and Semi-Weak keys. The keys come from |
| 1796 |
[<a href="#ref-Sch96" title=""Applied Cryptography, Protocols, Algorithms, and Source Code in C"">Sch96</a>]. All keys are listed in hexidecimal. |
| 1797 |
|
| 1798 |
DES Weak Keys |
| 1799 |
0101 0101 0101 0101 |
| 1800 |
1F1F 1F1F E0E0 E0E0 |
| 1801 |
E0E0 E0E0 1F1F 1F1F |
| 1802 |
FEFE FEFE FEFE FEFE |
| 1803 |
|
| 1804 |
DES Semi-Weak Keys |
| 1805 |
01FE 01FE 01FE 01FE |
| 1806 |
1FE0 1FE0 0EF1 0EF1 |
| 1807 |
01E0 01E0 01F1 01F1 |
| 1808 |
1FFE 1FFE 0EFE 0EFE |
| 1809 |
011F 011F 010E 010E |
| 1810 |
E0FE E0FE F1FE F1FE |
| 1811 |
|
| 1812 |
FE01 FE01 FE01 FE01 |
| 1813 |
E01F E01F F10E F10E |
| 1814 |
E001 E001 F101 F101 |
| 1815 |
FE1F FE1F FE0E FE0E |
| 1816 |
1F01 1F01 0E01 0E01 |
| 1817 |
FEE0 FEE0 FEF1 FEF1 |
| 1818 |
|
| 1819 |
Attribute Assigned Numbers |
| 1820 |
|
| 1821 |
Attributes negotiated during phase one use the following definitions. |
| 1822 |
Phase two attributes are defined in the applicable DOI specification |
| 1823 |
(for example, IPsec attributes are defined in the IPsec DOI), with |
| 1824 |
the exception of a group description when Quick Mode includes an |
| 1825 |
ephemeral Diffie-Hellman exchange. Attribute types can be either |
| 1826 |
Basic (B) or Variable-length (V). Encoding of these attributes is |
| 1827 |
defined in the base ISAKMP specification as Type/Value (Basic) and |
| 1828 |
Type/Length/Value (Variable). |
| 1829 |
|
| 1830 |
Attributes described as basic MUST NOT be encoded as variable. |
| 1831 |
Variable length attributes MAY be encoded as basic attributes if |
| 1832 |
their value can fit into two octets. If this is the case, an |
| 1833 |
attribute offered as variable (or basic) by the initiator of this |
| 1834 |
protocol MAY be returned to the initiator as a basic (or variable). |
| 1835 |
|
| 1836 |
|
| 1837 |
|
| 1838 |
|
| 1839 |
|
| 1840 |
|
| 1841 |
|
| 1842 |
|
| 1843 |
|
| 1844 |
<span class="grey">Harkins & Carrel Standards Track [Page 33]</span></pre> |
| 1845 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span> |
| 1846 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1847 |
|
| 1848 |
|
| 1849 |
Attribute Classes |
| 1850 |
|
| 1851 |
class value type |
| 1852 |
------------------------------------------------------------------- |
| 1853 |
Encryption Algorithm 1 B |
| 1854 |
Hash Algorithm 2 B |
| 1855 |
Authentication Method 3 B |
| 1856 |
Group Description 4 B |
| 1857 |
Group Type 5 B |
| 1858 |
Group Prime/Irreducible Polynomial 6 V |
| 1859 |
Group Generator One 7 V |
| 1860 |
Group Generator Two 8 V |
| 1861 |
Group Curve A 9 V |
| 1862 |
Group Curve B 10 V |
| 1863 |
Life Type 11 B |
| 1864 |
Life Duration 12 V |
| 1865 |
PRF 13 B |
| 1866 |
Key Length 14 B |
| 1867 |
Field Size 15 B |
| 1868 |
Group Order 16 V |
| 1869 |
|
| 1870 |
values 17-16383 are reserved to IANA. Values 16384-32767 are for |
| 1871 |
private use among mutually consenting parties. |
| 1872 |
|
| 1873 |
Class Values |
| 1874 |
|
| 1875 |
- Encryption Algorithm Defined In |
| 1876 |
DES-CBC 1 <a href="./rfc2405">RFC 2405</a> |
| 1877 |
IDEA-CBC 2 |
| 1878 |
Blowfish-CBC 3 |
| 1879 |
RC5-R16-B64-CBC 4 |
| 1880 |
3DES-CBC 5 |
| 1881 |
CAST-CBC 6 |
| 1882 |
|
| 1883 |
values 7-65000 are reserved to IANA. Values 65001-65535 are for |
| 1884 |
private use among mutually consenting parties. |
| 1885 |
|
| 1886 |
- Hash Algorithm Defined In |
| 1887 |
MD5 1 <a href="./rfc1321">RFC 1321</a> |
| 1888 |
SHA 2 FIPS 180-1 |
| 1889 |
Tiger 3 See Reference [<a href="#ref-TIGER" title=""Fast Software Encryption"">TIGER</a>] |
| 1890 |
|
| 1891 |
values 4-65000 are reserved to IANA. Values 65001-65535 are for |
| 1892 |
private use among mutually consenting parties. |
| 1893 |
|
| 1894 |
|
| 1895 |
|
| 1896 |
|
| 1897 |
|
| 1898 |
|
| 1899 |
|
| 1900 |
<span class="grey">Harkins & Carrel Standards Track [Page 34]</span></pre> |
| 1901 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span> |
| 1902 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1903 |
|
| 1904 |
|
| 1905 |
- Authentication Method |
| 1906 |
pre-shared key 1 |
| 1907 |
DSS signatures 2 |
| 1908 |
RSA signatures 3 |
| 1909 |
Encryption with RSA 4 |
| 1910 |
Revised encryption with RSA 5 |
| 1911 |
|
| 1912 |
values 6-65000 are reserved to IANA. Values 65001-65535 are for |
| 1913 |
private use among mutually consenting parties. |
| 1914 |
|
| 1915 |
- Group Description |
| 1916 |
default 768-bit MODP group (<a href="#section-6.1">section 6.1</a>) 1 |
| 1917 |
|
| 1918 |
alternate 1024-bit MODP group (<a href="#section-6.2">section 6.2</a>) 2 |
| 1919 |
|
| 1920 |
EC2N group on GP[2^155] (<a href="#section-6.3">section 6.3</a>) 3 |
| 1921 |
|
| 1922 |
EC2N group on GP[2^185] (<a href="#section-6.4">section 6.4</a>) 4 |
| 1923 |
|
| 1924 |
values 5-32767 are reserved to IANA. Values 32768-65535 are for |
| 1925 |
private use among mutually consenting parties. |
| 1926 |
|
| 1927 |
- Group Type |
| 1928 |
MODP (modular exponentiation group) 1 |
| 1929 |
ECP (elliptic curve group over GF[P]) 2 |
| 1930 |
EC2N (elliptic curve group over GF[2^N]) 3 |
| 1931 |
|
| 1932 |
values 4-65000 are reserved to IANA. Values 65001-65535 are for |
| 1933 |
private use among mutually consenting parties. |
| 1934 |
|
| 1935 |
- Life Type |
| 1936 |
seconds 1 |
| 1937 |
kilobytes 2 |
| 1938 |
|
| 1939 |
values 3-65000 are reserved to IANA. Values 65001-65535 are for |
| 1940 |
private use among mutually consenting parties. For a given "Life |
| 1941 |
Type" the value of the "Life Duration" attribute defines the actual |
| 1942 |
length of the SA life-- either a number of seconds, or a number of |
| 1943 |
kbytes protected. |
| 1944 |
|
| 1945 |
- PRF |
| 1946 |
There are currently no pseudo-random functions defined. |
| 1947 |
|
| 1948 |
values 1-65000 are reserved to IANA. Values 65001-65535 are for |
| 1949 |
private use among mutually consenting parties. |
| 1950 |
|
| 1951 |
|
| 1952 |
|
| 1953 |
|
| 1954 |
|
| 1955 |
|
| 1956 |
<span class="grey">Harkins & Carrel Standards Track [Page 35]</span></pre> |
| 1957 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span> |
| 1958 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 1959 |
|
| 1960 |
|
| 1961 |
- Key Length |
| 1962 |
|
| 1963 |
When using an Encryption Algorithm that has a variable length key, |
| 1964 |
this attribute specifies the key length in bits. (MUST use network |
| 1965 |
byte order). This attribute MUST NOT be used when the specified |
| 1966 |
Encryption Algorithm uses a fixed length key. |
| 1967 |
|
| 1968 |
- Field Size |
| 1969 |
|
| 1970 |
The field size, in bits, of a Diffie-Hellman group. |
| 1971 |
|
| 1972 |
- Group Order |
| 1973 |
|
| 1974 |
The group order of an elliptical curve group. Note the length of |
| 1975 |
this attribute depends on the field size. |
| 1976 |
|
| 1977 |
Additional Exchanges Defined-- XCHG values |
| 1978 |
Quick Mode 32 |
| 1979 |
New Group Mode 33 |
| 1980 |
|
| 1981 |
|
| 1982 |
|
| 1983 |
|
| 1984 |
|
| 1985 |
|
| 1986 |
|
| 1987 |
|
| 1988 |
|
| 1989 |
|
| 1990 |
|
| 1991 |
|
| 1992 |
|
| 1993 |
|
| 1994 |
|
| 1995 |
|
| 1996 |
|
| 1997 |
|
| 1998 |
|
| 1999 |
|
| 2000 |
|
| 2001 |
|
| 2002 |
|
| 2003 |
|
| 2004 |
|
| 2005 |
|
| 2006 |
|
| 2007 |
|
| 2008 |
|
| 2009 |
|
| 2010 |
|
| 2011 |
|
| 2012 |
<span class="grey">Harkins & Carrel Standards Track [Page 36]</span></pre> |
| 2013 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span> |
| 2014 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 2015 |
|
| 2016 |
|
| 2017 |
Appendix B |
| 2018 |
|
| 2019 |
This appendix describes encryption details to be used ONLY when |
| 2020 |
encrypting ISAKMP messages. When a service (such as an IPSEC |
| 2021 |
transform) utilizes ISAKMP to generate keying material, all |
| 2022 |
encryption algorithm specific details (such as key and IV generation, |
| 2023 |
padding, etc...) MUST be defined by that service. ISAKMP does not |
| 2024 |
purport to ever produce keys that are suitable for any encryption |
| 2025 |
algorithm. ISAKMP produces the requested amount of keying material |
| 2026 |
from which the service MUST generate a suitable key. Details, such |
| 2027 |
as weak key checks, are the responsibility of the service. |
| 2028 |
|
| 2029 |
Use of negotiated PRFs may require the PRF output to be expanded due |
| 2030 |
to the PRF feedback mechanism employed by this document. For example, |
| 2031 |
if the (ficticious) DOORAK-MAC requires 24 bytes of key but produces |
| 2032 |
only 8 bytes of output, the output must be expanded three times |
| 2033 |
before being used as the key for another instance of itself. The |
| 2034 |
output of a PRF is expanded by feeding back the results of the PRF |
| 2035 |
into itself to generate successive blocks. These blocks are |
| 2036 |
concatenated until the requisite number of bytes has been acheived. |
| 2037 |
For example, for pre-shared key authentication with DOORAK-MAC as the |
| 2038 |
negotiated PRF: |
| 2039 |
|
| 2040 |
BLOCK1-8 = prf(pre-shared-key, Ni_b | Nr_b) |
| 2041 |
BLOCK9-16 = prf(pre-shared-key, BLOCK1-8 | Ni_b | Nr_b) |
| 2042 |
BLOCK17-24 = prf(pre-shared-key, BLOCK9-16 | Ni_b | Nr_b) |
| 2043 |
and |
| 2044 |
SKEYID = BLOCK1-8 | BLOCK9-16 | BLOCK17-24 |
| 2045 |
|
| 2046 |
so therefore to derive SKEYID_d: |
| 2047 |
|
| 2048 |
BLOCK1-8 = prf(SKEYID, g^xy | CKY-I | CKY-R | 0) |
| 2049 |
BLOCK9-16 = prf(SKEYID, BLOCK1-8 | g^xy | CKY-I | CKY-R | 0) |
| 2050 |
BLOCK17-24 = prf(SKEYID, BLOCK9-16 | g^xy | CKY-I | CKY-R | 0) |
| 2051 |
and |
| 2052 |
SKEYID_d = BLOCK1-8 | BLOCK9-16 | BLOCK17-24 |
| 2053 |
|
| 2054 |
Subsequent PRF derivations are done similarly. |
| 2055 |
|
| 2056 |
Encryption keys used to protect the ISAKMP SA are derived from |
| 2057 |
SKEYID_e in an algorithm-specific manner. When SKEYID_e is not long |
| 2058 |
enough to supply all the necessary keying material an algorithm |
| 2059 |
requires, the key is derived from feeding the results of a pseudo- |
| 2060 |
random function into itself, concatenating the results, and taking |
| 2061 |
the highest necessary bits. |
| 2062 |
|
| 2063 |
|
| 2064 |
|
| 2065 |
|
| 2066 |
|
| 2067 |
|
| 2068 |
<span class="grey">Harkins & Carrel Standards Track [Page 37]</span></pre> |
| 2069 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span> |
| 2070 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 2071 |
|
| 2072 |
|
| 2073 |
For example, if (ficticious) algorithm AKULA requires 320-bits of key |
| 2074 |
(and has no weak key check) and the prf used to generate SKEYID_e |
| 2075 |
only generates 120 bits of material, the key for AKULA, would be the |
| 2076 |
first 320-bits of Ka, where: |
| 2077 |
|
| 2078 |
Ka = K1 | K2 | K3 |
| 2079 |
and |
| 2080 |
K1 = prf(SKEYID_e, 0) |
| 2081 |
K2 = prf(SKEYID_e, K1) |
| 2082 |
K3 = prf(SKEYID_e, K2) |
| 2083 |
|
| 2084 |
where prf is the negotiated prf or the HMAC version of the negotiated |
| 2085 |
hash function (if no prf was negotiated) and 0 is represented by a |
| 2086 |
single octet. Each result of the prf provides 120 bits of material |
| 2087 |
for a total of 360 bits. AKULA would use the first 320 bits of that |
| 2088 |
360 bit string. |
| 2089 |
|
| 2090 |
In phase 1, material for the initialization vector (IV material) for |
| 2091 |
CBC mode encryption algorithms is derived from a hash of a |
| 2092 |
concatenation of the initiator's public Diffie-Hellman value and the |
| 2093 |
responder's public Diffie-Hellman value using the negotiated hash |
| 2094 |
algorithm. This is used for the first message only. Each message |
| 2095 |
should be padded up to the nearest block size using bytes containing |
| 2096 |
0x00. The message length in the header MUST include the length of the |
| 2097 |
pad since this reflects the size of the ciphertext. Subsequent |
| 2098 |
messages MUST use the last CBC encryption block from the previous |
| 2099 |
message as their initialization vector. |
| 2100 |
|
| 2101 |
In phase 2, material for the initialization vector for CBC mode |
| 2102 |
encryption of the first message of a Quick Mode exchange is derived |
| 2103 |
from a hash of a concatenation of the last phase 1 CBC output block |
| 2104 |
and the phase 2 message id using the negotiated hash algorithm. The |
| 2105 |
IV for subsequent messages within a Quick Mode exchange is the CBC |
| 2106 |
output block from the previous message. Padding and IVs for |
| 2107 |
subsequent messages are done as in phase 1. |
| 2108 |
|
| 2109 |
After the ISAKMP SA has been authenticated all Informational |
| 2110 |
Exchanges are encrypted using SKEYID_e. The initiaization vector for |
| 2111 |
these exchanges is derived in exactly the same fashion as that for a |
| 2112 |
Quick Mode-- i.e. it is derived from a hash of a concatenation of the |
| 2113 |
last phase 1 CBC output block and the message id from the ISAKMP |
| 2114 |
header of the Informational Exchange (not the message id from the |
| 2115 |
message that may have prompted the Informational Exchange). |
| 2116 |
|
| 2117 |
Note that the final phase 1 CBC output block, the result of |
| 2118 |
encryption/decryption of the last phase 1 message, must be retained |
| 2119 |
in the ISAKMP SA state to allow for generation of unique IVs for each |
| 2120 |
Quick Mode. Each post- phase 1 exchange (Quick Modes and |
| 2121 |
|
| 2122 |
|
| 2123 |
|
| 2124 |
<span class="grey">Harkins & Carrel Standards Track [Page 38]</span></pre> |
| 2125 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span> |
| 2126 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 2127 |
|
| 2128 |
|
| 2129 |
Informational Exchanges) generates IVs independantly to prevent IVs |
| 2130 |
from getting out of sync when two different exchanges are started |
| 2131 |
simultaneously. |
| 2132 |
|
| 2133 |
In all cases, there is a single bidirectional cipher/IV context. |
| 2134 |
Having each Quick Mode and Informational Exchange maintain a unique |
| 2135 |
context prevents IVs from getting out of sync. |
| 2136 |
|
| 2137 |
The key for DES-CBC is derived from the first eight (8) non-weak and |
| 2138 |
non-semi-weak (see <a href="#appendix-A">Appendix A</a>) bytes of SKEYID_e. The IV is the first |
| 2139 |
8 bytes of the IV material derived above. |
| 2140 |
|
| 2141 |
The key for IDEA-CBC is derived from the first sixteen (16) bytes of |
| 2142 |
SKEYID_e. The IV is the first eight (8) bytes of the IV material |
| 2143 |
derived above. |
| 2144 |
|
| 2145 |
The key for Blowfish-CBC is either the negotiated key size, or the |
| 2146 |
first fifty-six (56) bytes of a key (if no key size is negotiated) |
| 2147 |
derived in the aforementioned pseudo-random function feedback method. |
| 2148 |
The IV is the first eight (8) bytes of the IV material derived above. |
| 2149 |
|
| 2150 |
The key for RC5-R16-B64-CBC is the negotiated key size, or the first |
| 2151 |
sixteen (16) bytes of a key (if no key size is negotiated) derived |
| 2152 |
from the aforementioned pseudo-random function feedback method if |
| 2153 |
necessary. The IV is the first eight (8) bytes of the IV material |
| 2154 |
derived above. The number of rounds MUST be 16 and the block size |
| 2155 |
MUST be 64. |
| 2156 |
|
| 2157 |
The key for 3DES-CBC is the first twenty-four (24) bytes of a key |
| 2158 |
derived in the aforementioned pseudo-random function feedback method. |
| 2159 |
3DES-CBC is an encrypt-decrypt-encrypt operation using the first, |
| 2160 |
middle, and last eight (8) bytes of the entire 3DES-CBC key. The IV |
| 2161 |
is the first eight (8) bytes of the IV material derived above. |
| 2162 |
|
| 2163 |
The key for CAST-CBC is either the negotiated key size, or the first |
| 2164 |
sixteen (16) bytes of a key derived in the aforementioned pseudo- |
| 2165 |
random function feedback method. The IV is the first eight (8) bytes |
| 2166 |
of the IV material derived above. |
| 2167 |
|
| 2168 |
Support for algorithms other than DES-CBC is purely optional. Some |
| 2169 |
optional algorithms may be subject to intellectual property claims. |
| 2170 |
|
| 2171 |
|
| 2172 |
|
| 2173 |
|
| 2174 |
|
| 2175 |
|
| 2176 |
|
| 2177 |
|
| 2178 |
|
| 2179 |
|
| 2180 |
<span class="grey">Harkins & Carrel Standards Track [Page 39]</span></pre> |
| 2181 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span> |
| 2182 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 2183 |
|
| 2184 |
|
| 2185 |
Authors' Addresses |
| 2186 |
|
| 2187 |
Dan Harkins |
| 2188 |
cisco Systems |
| 2189 |
170 W. Tasman Dr. |
| 2190 |
San Jose, California, 95134-1706 |
| 2191 |
United States of America |
| 2192 |
|
| 2193 |
Phone: +1 408 526 4000 |
| 2194 |
EMail: [email protected] |
| 2195 |
|
| 2196 |
|
| 2197 |
Dave Carrel |
| 2198 |
76 Lippard Ave. |
| 2199 |
San Francisco, CA 94131-2947 |
| 2200 |
United States of America |
| 2201 |
|
| 2202 |
Phone: +1 415 337 8469 |
| 2203 |
EMail: [email protected] |
| 2204 |
|
| 2205 |
Authors' Note |
| 2206 |
|
| 2207 |
The authors encourage independent implementation, and |
| 2208 |
interoperability testing, of this hybrid protocol. |
| 2209 |
|
| 2210 |
|
| 2211 |
|
| 2212 |
|
| 2213 |
|
| 2214 |
|
| 2215 |
|
| 2216 |
|
| 2217 |
|
| 2218 |
|
| 2219 |
|
| 2220 |
|
| 2221 |
|
| 2222 |
|
| 2223 |
|
| 2224 |
|
| 2225 |
|
| 2226 |
|
| 2227 |
|
| 2228 |
|
| 2229 |
|
| 2230 |
|
| 2231 |
|
| 2232 |
|
| 2233 |
|
| 2234 |
|
| 2235 |
|
| 2236 |
<span class="grey">Harkins & Carrel Standards Track [Page 40]</span></pre> |
| 2237 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span> |
| 2238 |
<span class="grey"><a href="./rfc2409">RFC 2409</a> IKE November 1998</span> |
| 2239 |
|
| 2240 |
|
| 2241 |
Full Copyright Statement |
| 2242 |
|
| 2243 |
Copyright (C) The Internet Society (1998). All Rights Reserved. |
| 2244 |
|
| 2245 |
This document and translations of it may be copied and furnished to |
| 2246 |
others, and derivative works that comment on or otherwise explain it |
| 2247 |
or assist in its implementation may be prepared, copied, published |
| 2248 |
and distributed, in whole or in part, without restriction of any |
| 2249 |
kind, provided that the above copyright notice and this paragraph are |
| 2250 |
included on all such copies and derivative works. However, this |
| 2251 |
document itself may not be modified in any way, such as by removing |
| 2252 |
the copyright notice or references to the Internet Society or other |
| 2253 |
Internet organizations, except as needed for the purpose of |
| 2254 |
developing Internet standards in which case the procedures for |
| 2255 |
copyrights defined in the Internet Standards process must be |
| 2256 |
followed, or as required to translate it into languages other than |
| 2257 |
English. |
| 2258 |
|
| 2259 |
The limited permissions granted above are perpetual and will not be |
| 2260 |
revoked by the Internet Society or its successors or assigns. |
| 2261 |
|
| 2262 |
This document and the information contained herein is provided on an |
| 2263 |
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING |
| 2264 |
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING |
| 2265 |
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION |
| 2266 |
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF |
| 2267 |
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. |
| 2268 |
|
| 2269 |
|
| 2270 |
|
| 2271 |
|
| 2272 |
|
| 2273 |
|
| 2274 |
|
| 2275 |
|
| 2276 |
|
| 2277 |
|
| 2278 |
|
| 2279 |
|
| 2280 |
|
| 2281 |
|
| 2282 |
|
| 2283 |
|
| 2284 |
|
| 2285 |
|
| 2286 |
|
| 2287 |
|
| 2288 |
|
| 2289 |
|
| 2290 |
|
| 2291 |
|
| 2292 |
Harkins & Carrel Standards Track [Page 41] |
| 2293 |
</pre> |