view Side-By-Side changes
Network Working Group P. Eronen Internet-Draft Nokia Expires:September 25,December 3, 2005 P. Hoffman VPN ConsortiumMarch 27,June 1, 2005 IKEv2 Clarifications and Implementation Guidelinesdraft-eronen-ipsec-ikev2-clarifications-02.txtdraft-eronen-ipsec-ikev2-clarifications-03.txt Status of this MemoThis document is an Internet-Draft and is subject to all provisions of section 3 of RFC 3667.By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or shebecomebecomes aware will be disclosed, in accordance withRFC 3668.Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents asInternet-Drafts.Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire onSeptember 25,December 3, 2005. Copyright Notice Copyright (C) The Internet Society (2005). Abstract This document clarifies many areas of the IKEv2 specification. It does not to introduce any changes to the protocol, but rather provides descriptions that are less prone to ambiguous interpretations. The purpose of this document is to encourage the development of interoperable implementations. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 1] Internet-Draft IKEv2 ClarificationsMarchJune 2005 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Authentication . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 Data included in AUTH payload calculation . . . . . . . . 4 2.2 Hash function for RSA signatures . . . . . . . . . . . . . 5 2.3 Encoding method for RSA signatures . . . . . . . . . . . . 6 2.4 Identification type for EAP . . . . . . . . . . . . . . . 6 2.5 Identity for policy lookups when using EAP . . . . . . . . 7 2.6 EAP authentication and the AUTH payload . . . . . . . . . 7 2.7 Certificate encoding types . . . . . . . . . . . . . . . . 7 2.8 Shared key authentication and fixed PRF key size . . . . . 8 2.9 EAP authentication and fixed PRF key size . . . . . . . . 9 2.10 Matching ID payloads to certificate contents . . . . . . 9 3. Keying and rekeying . . . . . . . . . . . . . . . . . . . . 9 3.1 Semantics of the CREATE_CHILD_SA exchange . . . . . . . . 9 3.2 Rekeying the IKE_SA vs. reauthentication . . . . . . . . . 13 3.3 SPIs when rekeying the IKE_SA . . . . . . . . . . . . . .1314 3.4 SPI when rekeying a CHILD_SA . . . . . . . . . . . . . . . 14 3.5 Changing PRFs when rekeying the IKE_SA . . . . . . . . . . 14 3.6 Deleting vs. closing SAs . . . . . . . . . . . . . . . . . 14 3.7 Deleting a CHILD_SA pair . . . . . .14. . . . . . . . . . . 15 3.8 Deleting an IKE_SA . . . . . . . . . . . . . . . . . . . . 15 3.9 Who is the original initiator of IKE_SA . . . . . . . . . 15 4. Traffic selectors . . . . . . . . . . . . . . . . . . . . .1416 4.1 Semantics of complex traffic selector payloads . . . . . .1416 4.2 ICMP type/code in traffic selector payloads . . . . . . .1516 4.3 Mobility header in traffic selector payloads . . . . . . .1517 4.4 Narrowing the traffic selectors . . . . . . . . . . . . .1517 4.5 SINGLE_PAIR_REQUIRED . . . . . . . . . . . . . . . . . . .1617 4.6 Traffic selectors violating own policy . . . . . . . . . .1618 5. Configuration payloads . . . . . . . . . . . . . . . . . . .1719 5.1 Length of configuration attribute type field . . . . . . .1719 5.2 Requesting any INTERNAL_IP4/IP6_ADDRESS . . . . . . . . .1719 5.3 INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET . . . . . . . . .1819 5.4 INTERNAL_IP4_NETMASK . . . . . . . . . . . . . . . . . . .2022 5.5 Configuration payloads for IPv6 . . . . . . . . . . . . .2223 5.6 INTERNAL_IP6_ADDRESS prefix length . . . . . . . . . . . .2224 5.7 INTERNAL_IP6_NBNS . . . . . . . . . . . . . . . . . . . .2325 5.8 INTERNAL_ADDRESS_EXPIRY . . . . . . . . . . . . . . . . . 25 6. Miscellaneous issues . . . . . . . . . . . . . . . . . . . .2326 6.1 Diffie-Hellman for first CHILD_SA . . . . . . . . . . . .2426 6.2 Extended Sequence Numbers (ESN) transform . . . . . . . .2426 6.3 Matching ID_IPV4_ADDR and ID_IPV6_ADDR . . . . . . . . . .2427 6.4 Relationship of IKEv2 to RFC2401bis . . . . . . . . . . .2527 6.5 Reducing the window size . . . . . . . . . . . . . . . . .2527 6.6 Minimum size of nonces . . . . . . . . . . . . . . . . . .2528 6.7 Initial zero octets on port 4500 . . . . . . . . . . . . .2528 Eronen & Hoffman Expires December 3, 2005 [Page 2] Internet-Draft IKEv2 Clarifications June 2005 6.8 SPI values in IKE_SA_INIT exchange . . . . . . . . . . . .2629 6.9 SPI values for messages outside of an IKE_SA . . . . . . .2730 6.10 Protocol ID/SPI fields in Notify payloads . . . . . . .2730 6.11 INVALID_IKE_SPI . . . . . . . . . . . . . . . . . . . .2730 6.12 Which message should contain INITIAL_CONTACT . . . . . .28 7. Status of the clarifications .31 6.13 Message IDs for IKE_SA_INIT messages . . . . . . . . . . 31 6.14 Message IDs for IKE_AUTH messages . . . . .28 Eronen & Hoffman Expires September 25, 2005 [Page 2] Internet-Draft IKEv2 Clarifications March 2005 8. Implementation mistakes. . . . . . 32 6.15 Creating an IKE_SA without a CHILD_SA . . . . . . . . . 32 6.16 Alignment of payloads . . .30 9. Open issues. . . . . . . . . . . . . . 32 6.17 Negotiation of ESP_TFC_PADDING_NOT_SUPPORTED . . . . . . 32 6.18 Negotiation of NON_FIRST_FRAGMENTS_ALSO . . . .30. . . . 33 7. Status of the clarifications . . . . . . . . . . . . . . . . 33 8. Implementation mistakes . . . . . . . . . . . . . . . . . . 35 9. Open issues . . . . . . . . . . . . . . . . . . . . . . . . 35 10. Security considerations . . . . . . . . . . . . . . . . . .3136 11. IANA considerations . . . . . . . . . . . . . . . . . . . .3136 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . .3136 13. References . . . . . . . . . . . . . . . . . . . . . . . . .3236 13.1 Normative References . . . . . . . . . . . . . . . . . .. 3236 13.2 Informative References . . . . . . . . . . . . . . . . .. 3237 Authors' Addresses . . . . . . . . . . . . . . . . . . . . .3438 A. Exchanges and payloads . . . . . . . . . . . . . . . . . . . 39 A.1 IKE_SA_INIT exchange . . . . . . . . . . . . . . . . . . . 39 A.2 IKE_AUTH exchange without EAP . . . . . . . . . . . . . . 40 A.3 IKE_AUTH exchange with EAP . . . . . . . . . . . . . . . . 41 A.4 CREATE_CHILD_SA exchange for creating/rekeying CHILD_SAs . 41 A.5 CREATE_CHILD_SA exchange for rekeying the IKE_SA . . . . . 42 A.6 INFORMATIONAL exchange . . . . . . . . . . . . . . . . . . 42 Intellectual Property and Copyright Statements . . . . . . .3543 Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 3] Internet-Draft IKEv2 ClarificationsMarchJune 2005 1. Introduction This document clarifies many areas of the IKEv2 specification that may be difficult to understand to developers not intimately familiar with the specification and its history. The clarifications in this document come from the discussion on the IPsec WG mailing list, from experience in interoperability testing, and from implementation issues that have been brought to the editors' attention. Readers are advised that this document is work-in-progress, and may contain incorrect interpretations. Issues where the clarification is known to be incomplete, or there is no consensus on what the the interpretation should be, are marked as such. IKEv2/IPsec can be used for several different purposes, including IPsec-based remote access (sometimes called the "road warrior" case), site-to-site virtual private networks (VPNs), and host-to-host protection of application traffic. While this document attempts to consider all of these uses, the remote access scenario has perhaps received more attention here than the other uses. This document does not place any requirements on anyone, and does not use [RFC2119] keywords such as "MUST" and "SHOULD", except in quotations from the original IKEv2 documents. The requirements are given in the IKEv2 specification [IKEv2] and IKEv2 cryptographic algorithms document [IKEv2ALG]. In this document, references to a numbered section (such as "Section 2.15") mean that section in [IKEv2]. References to mailing list messages refer to the IPsec WG mailing list at ipsec@ietf.org. Archives of the mailing list can be found at <http://www.ietf.org/mail-archive/web/ipsec/index.html>. 2. Authentication 2.1 Data included in AUTH payload calculation Section 2.15 describes how the AUTH payloads are calculated; this calculation involves values prf(SK_pi,IDi') and prf(SK_pr,IDr'). The text describes the method in words, but does not give clear definitions of what is signed or MACed. The initiator's signed octets can be described as: Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 4] Internet-Draft IKEv2 ClarificationsMarchJune 2005 InitiatorSignedOctets = RealMessage1 | NonceRData | MACedIDForI GenIKEHDR = [ four octets 0 if using port 4500 ] | RealIKEHDR RealIKEHDR = SPIi | SPIr | . . . | Length RealMessage1 = RealIKEHDR | RestOfMessage1 NonceRPayload = PayloadHeader | NonceRData InitiatorIDPayload = PayloadHeader | RestOfIDPayload RestOfInitIDPayload = IDType | RESERVED | InitIDData MACedIDForI = prf(SK_pi, RestOfInitIDPayload) The responder's signed octets can be described as: ResponderSignedOctets = RealMessage2 | NonceIData | MACedIDForR GenIKEHDR = [ four octets 0 if using port 4500 ] | RealIKEHDR RealIKEHDR = SPIi | SPIr | . . . | Length RealMessage2 = RealIKEHDR | RestOfMessage2 NonceIPayload = PayloadHeader | NonceIData ResponderIDPayload = PayloadHeader | RestOfIDPayload RestOfRespIDPayload = IDType | RESERVED | InitIDData MACedIDForR = prf(SK_pr, RestOfRespIDPayload) 2.2 Hash function for RSA signatures Section 3.8 says that RSA digital signature is "Computed as specified in section 2.15 using an RSA private key over a PKCS#1 padded hash." Unlike IKEv1, IKEv2 does not negotiate a hash function for the IKE_SA. The algorithm for signatures is selected by the signing party who, in general, may not know beforehand what algorithms the verifying party supports. Furthermore, [IKEv2ALG] does not say what algorithms implementations are required or recommended to support. This clearly has a potential for causing interoperability problems, since authentication will fail if the signing party selects an algorithm that is not supported by the verifying party, or not acceptable according to the verifying party's policy. This document recommends that all implementations support SHA-1, and use SHA-1 as the default hash function when generating the signatures, unless there are good reasons (such as explicit manual configuration) to believe that the other end supports something else. Note that unlike IKEv1, IKEv2 uses the PKCS#1 v1.5 [PKCS1v20] signature encoding method (see next section for details), which includes the algorithm identifier for the hash algorithm. Thus, when the verifying party receives the AUTH payload it can determine which hash function was used. Other possible choices include, for example, using the hash function Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 5] Internet-Draft IKEv2 ClarificationsMarchJune 2005 that was used to sign the certificate. However, this approach assumes that the recipient's "IKEv2 module" supports the same algorithms as the "certificate validation module" (which may not be true, especially if something like [SCVP] is used). Furthermore, not all CERT payloads types include a signature; and the certificate could be signed with some other algorithm than RSA. (References: Magnus Alstrom's mail "RE:", 2005-01-03. Pasi Eronen's reply, 2005-01-04. Tero Kivinen's reply, 2005-01-04.) 2.3 Encoding method for RSA signatures Section 3.8 says that the RSA digital signature is "Computed as specified in section 2.15 using an RSA private key over a PKCS#1 padded hash." The current version of PKCS#1 (v2.1) [PKCS1v21] defines two different encoding methods (ways of "padding the hash") for signatures. However, IKEv2 points to the older PKCS#1 v2.0 [PKCS1v20]. That version has only one encoding method for signatures(EMSA-PKCS1-v1_5),(EMSA-PKCS1- v1_5), and thus there is no ambiguity. Note that this encoding method is different from the encoding method used in IKEv1. If future revisions of IKEv2 provide support for other encoding methods (such as EMSA-PSS), they will be given new Auth Method numbers. (References: Pasi Eronen's mail "RE:", 2005-01-04.) 2.4 Identification type for EAP Section 3.5 defines several different types for identification payloads, including, e.g., ID_FQDN, ID_RFC822_ADDR, and ID_KEY_ID. EAP [EAP] does not mandate the use of any particular type of identifier, but often EAP is used with Network Access Identifiers (NAIs) defined in [NAI] and [NAIbis]. Although NAIs look a bit like email addresses (e.g., "joe@example.com"), the syntax is not exactly the same as the syntax of email address in [RFC822]. This raises the question of which identification type should be used. This document recommends that ID_RFC822_ADDR identification type is used for those NAIs that include the realm component. Therefore, responder implementations should not attempt to verify that the contents actually conform to the exact syntax given in [RFC822] or [RFC2822], but instead should accept any reasonable looking NAI. For NAIs that do not include the realm component, this document recommends using the ID_KEY_ID identification type. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 6] Internet-Draft IKEv2 ClarificationsMarchJune 2005 (References: "need your help on this IKEv2/i18n/EAP issue" and "IKEv2 identifier issue with EAP" threads, Aug 2004.) 2.5 Identity for policy lookups when using EAP When the initiator authentication uses EAP, it is possible that the contents of the IDi payload is used only for AAA routing purposes and selecting which EAP method to use. This value may be different from the identity authenticated by the EAP method (see [EAP], Sections 5.1 and 7.3). It is important that policy lookups and access control decisions use the actual authenticated identity. Often the EAP server is implemented in a separate AAA server that communicates with the IKEv2 responder using, e.g., RADIUS [RADEAP]. In this case, the authenticated identity has to be sent from the AAA server to the IKEv2 responder. (References: Pasi Eronen's mail "RE: Reauthentication in IKEv2", 2004-10-28. "Policy lookups" thread, Oct/Nov 2004. RFC 3748, Section 7.3.) 2.6 EAP authentication and the AUTH payload Section 2.16 says that "For EAP methods that create a shared key as a side effect of authentication, that shared key MUST be used by both the initiator and responder to generate AUTH payloads in messages 5 and 6 using the syntax for shared secrets specified in section 2.15." This text should say "messages 7 and 8". (References: "How to do authentication with EAP" thread, Feb 2005) 2.7 Certificate encoding types Section 3.6 defines a total of twelve different certificate encoding types, and continues that "Specific syntax is for some of the certificate type codes above is not defined in this document." However, the text does not provide references to other documents that would contain information about the exact contents and use of those values. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 7] Internet-Draft IKEv2 ClarificationsMarchJune 2005 Without this information, it is not possible to develop interoperable implementations. Therefore, this document recommends that the following certificate encoding values should not be used before new specifications that specify their use are available. PKCS #7 wrapped X.509 certificate 1 PGP Certificate 2 DNS Signed Key 3 Kerberos Token 6 SPKI Certificate 9 (Future versions of this document may also contain clarifications about how these values are to be used.) This document recommends that most implementations should use only those values that are "MUST"/"SHOULD" requirements in [IKEv2]; i.e., "X.509 Certificate - Signature" (4), "Raw RSA Key" (11), "Hash and URL of X.509 certificate" (12), and "Hash and URL of X.509 bundle" (13). Furthermore, Section 3.7 says that the "Certificate Encoding" field for the Certificate Request payload uses the same values as for Certificate payload. However, the contents of the "Certification Authority" field are defined only for X.509 certificates (presumably covering at least types 4, 10, 12, and 13). This document recommends that other values should not be used before new specifications that specify their use are available. 2.8 Shared key authentication and fixed PRF key size Section 2.15 says that "If the negotiated prf takes a fixed size key, the shared secret MUST be of that fixed size". This statement is correct: the shared secret must be of the correct size. If it is not, it cannot be used; there is no padding, truncation, or other processing involved to force it to that correct size. This requirement means that it is difficult to use these PRFs with shared key authentication. The authors think this part of the specification was very poorly thought out, and using PRFs with a fixed key size is likely to result in interoperability problems. Thus, we recommend that such PRFs (currently only PRF_AES128_CBC) should not be used with shared key authentication. Note that Section 2.13 also contains text that is related to PRFs with fixed key size: "When the key for the prf function has fixed length, the data provided as a key is truncated or padded with zeros as necessary unless exceptional processing is explained following the formula". However, this text applies only to the prf+ construction, Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 8] Internet-Draft IKEv2 ClarificationsMarchJune 2005 so it does not contradict the text in Section 2.15. (References: Paul Hoffman's mail "Re: ikev2-07: last nits", 2003-05-02. Hugo Krawczyk's reply, 2003-05-12. Thread "Question about PRFs with fixed size key", Jan 2005.) 2.9 EAP authentication and fixed PRF key size As described in the previous section, PRFs with a fixed key size require a shared secret of exactly that size. A strict interpretation of this text also means that such PRFs are unlikely to be useful for EAP authentication, since [EAP] specifies that the MSK is at least 64 octets (512 bits) long, while PRF_AES128_CBC requires a 128-bit key. It is currently under discussion whether truncation or padding should be allowed in the EAP case (where the security implications of truncation are slightly different). (References: Thread "Question about PRFs with fixed size key", Jan 2005.)3. Keying and rekeying 3.1 Semantics of the CREATE_CHILD_SA exchange Section 1.3's organization does not lead2.10 Matching ID payloads toclear understanding of what is needed in which environment.certificate contents In IKEv1, there was some confusion about whether or not the identities in certificates used to authenticate IKE were required to match the contents of the ID payloads. There has been some work done on this in the PKI4IPSEC Working Group, but that work is not finished at this time. However, Section 3.5 explicitly says that the ID payload "does not necessarily have to match anything in the CERT payload". 3. Keying and rekeying 3.1 Semantics of the CREATE_CHILD_SA exchange Section 1.3's organization does not lead to clear understanding of what is needed in which environment. The section can be reorganized with subsections for each use of the CREATE_CHILD_SA exchange (creating child SAs, rekeying IKE SAs, and rekeying child SAs.) Further, specific parts of Section 3.1 can be clarified. These include: o It is not clear which SA to send in a rekeying a child SA. The relevant sentence says "If this CREATE_CHILD_SA exchange is rekeying an existing SA other than the IKE_SA, the leading N payload of type REKEY_SA MUST identify the SA being rekeyed." That can be clarified by adding "sender's inbound" before "SA being rekeyed". Eronen & Hoffman Expires December 3, 2005 [Page 9] Internet-Draft IKEv2 Clarifications June 2005 o The specific method for rekeying an IKE_SA is not described in the section that describes the rekeying. This is described in Section 2.8. Relevant text from Section 2.8 can be moved here. o Section 1.3 never mentions the REKEY_SA Notification, but it does have a mandatory Notification payload when rekeying. The CREATE_CHILD_SA exchange MUST include a REKEY_SA Notification payload with an SPI field identifying the SA being rekeyed.Eronen & Hoffman Expires September 25, 2005 [Page 9] Internet-Draft IKEv2 Clarifications March 2005o The spec is partially wrong about the use of nonces in computing keys for CHILD_SAs. Section 1.3 says "The nonces from the initial exchange are used in computing the keys for the CHILD_SA." However, that is not always true. It is only true for a CHILD_SA created in the IKE_AUTH exchange. Thus, the sentence can be ignored because the use of the nonces for computing the keys is clear in Section 2.17. The new Section 1.3 with subsections and the above changes might look like this. NEW-1.3 The CREATE_CHILD_SA Exchange The CREATE_CHILD_SA Exchange is used to create new CHILD_SAs and to rekey both IKE_SAs and CHILD_SAs. This exchange consists of a single request/response pair, and some of its function was referred to as a phase 2 exchange in IKEv1. It MAY be initiated by either end of the IKE_SA after the initial exchanges are completed. All messages following the initial exchange are cryptographically protected using the cryptographic algorithms and keys negotiated in the first two messages of the IKE exchange. These subsequent messages use the syntax of the Encrypted Payload described in section 3.14. All subsequent messages included an Encrypted Payload, even if they are referred to in the text as "empty". For both messages in the CREATE_CHILD_SA, the message following the header is encrypted and the message including the header is integrity protected using the cryptographic algorithms negotiated for the IKE_SA. The CREATE_CHILD_SA is used for rekeying IKE_SAs and CHILD_SAs. This section describes the first part of rekeying, the creation of new SAs; Section 2.8 covers the mechanics of rekeying, including moving traffic from old to new SAs and the deletion of the old SAs. The two sections must be read together to understand the entire process of rekeying. Either endpoint may initiate a CREATE_CHILD_SA exchange, so in Eronen & Hoffman Expires December 3, 2005 [Page 10] Internet-Draft IKEv2 Clarifications June 2005 this section the term initiator refers to the endpoint initiating this exchange. An implementation MAY refuse all CREATE_CHILD_SA requests within an IKE_SA. The CREATE_CHILD_SA request MAY optionally contain a KE payload for an additional Diffie-Hellman exchange to enable stronger guarantees of forward secrecy for the CHILD_SA. The keying material for the CHILD_SA is a function of SK_d established during the establishment of the IKE_SA, the nonces exchangedEronen & Hoffman Expires September 25, 2005 [Page 10] Internet-Draft IKEv2 Clarifications March 2005during the CREATE_CHILD_SA exchange, and the Diffie-Hellman value (if KE payloads are included in the CREATE_CHILD_SA exchange). If a CREATE_CHILD_SA exchange includes a KEi payload, at least one of the SA offers MUST include the Diffie-Hellman group of the KEi. The Diffie-Hellman group of the KEi MUST be an element of the group the initiator expects the responder to accept (additional Diffie-Hellman groups can be proposed). If the responder rejects the Diffie-Hellman group of the KEi payload, the responder MUST reject the request and indicate its preferred Diffie-Hellman group in the INVALID_KE_PAYLOAD Notification payload. In the case of such a rejection, the CREATE_CHILD_SA exchange fails, and the initiator SHOULD retry the exchange with a Diffie-Hellman proposal and KEi in the group that the responder gave in the INVALID_KE_PAYLOAD. NEW-1.3.1 Creating New CHILD_SAs with the CREATE_CHILD_SA Exchange A CHILD_SA may be created by sending a CREATE_CHILD_SA request. The CREATE_CHILD_SA request for creating a new CHILD_SA is: Initiator Responder ----------- ----------- HDR, SK {SA, Ni, [KEi], TSi, TSr} --> The initiator sends SA offer(s) in the SA payload, a nonce in the Ni payload, optionally a Diffie-Hellman value in the KEi payload, and the proposed traffic selectors for the proposed CHILD_SA in the TSi and TSr payloads. The CREATE_CHILD_SA response for creating a new CHILD_SA is: <-- HDR, SK {SA, Nr, [KEr], TSi, TSr} The responder replies (using the same Message ID to respond) with the accepted offer in an SA payload, and a Diffie-Hellman Eronen & Hoffman Expires December 3, 2005 [Page 11] Internet-Draft IKEv2 Clarifications June 2005 value in the KEr payload if KEi was included in the request and the selected cryptographic suite includes that group. The traffic selectors for traffic to be sent on that SA are specified in the TS payloads in the response, which may be a subset of what the initiator of the CHILD_SA proposed. NEW-1.3.2 Rekeying IKE_SAs with the CREATE_CHILD_SA Exchange The CREATE_CHILD_SA request for rekeying an IKE_SA is:Eronen & Hoffman Expires September 25, 2005 [Page 11] Internet-Draft IKEv2 Clarifications March 2005Initiator Responder ----------- ----------- HDR, SK {SA, Ni,[KEi]}KEi} --> The initiator sends SA offer(s) in the SA payload, a nonce in the Ni payload, andoptionallya Diffie-Hellman value in the KEi payload. New initiator and responder SPIs are supplied in the SPI fields. The CREATE_CHILD_SA response for rekeying an IKE_SA is: <-- HDR, SK {SA, Nr,[KEr]}KEr} The responder replies (using the same Message ID to respond) with the accepted offer in an SA payload, and a Diffie-Hellman value in the KEr payload ifKEi was included in the request andthe selected cryptographic suite includes that group. The new IKE_SA has its message counters set to 0, regardless of what they were in the earlier IKE_SA. The window size starts at 1 for any new IKE_SA. KEi and KEr are required for rekeying an IKE_SA. NEW-1.3.3 Rekeying CHILD_SAs with the CREATE_CHILD_SA Exchange The CREATE_CHILD_SA request for rekeying a CHILD_SA is: Initiator Responder ----------- ----------- HDR, SK {N, SA, Ni, [KEi], TSi, TSr} --> The initiator sends SA offer(s) in the SA payload, a nonce in the Ni payload, optionally a Diffie-Hellman value in the KEi payload, and the proposed traffic selectors for the proposed CHILD_SA in the TSi and TSr payloads. When rekeying an existing CHILD_SA, the leading N payload of type REKEY_SA MUST be Eronen & Hoffman Expires December 3, 2005 [Page 12] Internet-Draft IKEv2 Clarifications June 2005 included and MUSTidentifygive the SPI (as they would be expected in thesender'sheaders of inboundSApackets) of the SAs being rekeyed. The CREATE_CHILD_SA response for rekeying a CHILD_SA is: <-- HDR, SK {SA, Nr, [KEr], TSi, TSr} The responder replies (using the same Message ID to respond) with the accepted offer in an SA payload, and a Diffie-Hellman value in the KEr payload if KEi was included in the request and the selected cryptographic suite includes that group.Eronen & Hoffman Expires September 25, 2005 [Page 12] Internet-Draft IKEv2 Clarifications March 2005The traffic selectors for traffic to be sent on that SA are specified in the TSpayloadsinpayloads in the response, which may be a subset of what the initiator of the CHILD_SA proposed. 3.2 Rekeying the IKE_SA vs. reauthentication Rekeying the IKE_SA and reauthentication are different concepts in IKEv2. Rekeying the IKE_SA establishes new keys for the IKE_SA and resets the Message ID counters, but it does not authenticate the parties again (no AUTH or EAP payloads are involved). While rekeying the IKE_SA may be important in some environments, reauthentication (the verification that the parties still have access to the long-term credentials) is often more important. IKEv2 does not have any special support for reauthentication. Reauthentication is done by creating a new IKE_SA from scratch (using IKE_SA_INIT/IKE_AUTH exchanges, without any REKEY_SA notify payloads), creating new CHILD_SAs within the new IKE_SA (without REKEY_SA notify payloads), and finally deleting the old IKE_SA (which deletes the old CHILD_SAs as well). This means that reauthentication also establishes new keys for the IKE_SA and CHILD_SAs. Therefore, while rekeying can be performed more often than reauthentication, the situation where "authentication lifetime" is shorter than "key lifetime" does not make sense. While creation of a new IKE_SA can be initiated by either party (initiator or responder in the original IKE_SA), the use of EAP authentication and/or configuration payloads means in practice that reauthentication has to be initiated by the same party as the original IKE_SA. IKEv2 does not currently allow the responder to request reauthentication in this case; however, there is ongoing work to add this functionality [ReAuth]. Eronen & Hoffman Expires December 3, 2005 [Page 13] Internet-Draft IKEv2 Clarifications June 2005 (References: "Reauthentication in IKEv2" thread, Oct/Nov 2004.) 3.3 SPIs when rekeying the IKE_SA Section 2.18 says that "New initiator and responder SPIs are supplied in the SPI fields". This refers to the SPI fields in the Proposal structures inside the Security Association (SA) payloads, not the SPI fields in the IKE header. (References: Tom Stiemerling's mail "Rekey IKE SA", 2005-01-24. Geoffrey Huang's reply, 2005-01-24.)Eronen & Hoffman Expires September 25, 2005 [Page 13] Internet-Draft IKEv2 Clarifications March 20053.4 SPI when rekeying a CHILD_SA Section 3.10.1 says that in REKEY_SA notifications, "The SPI field identifies the SA being rekeyed." Since CHILD_SAs always exist in pairs, there are two different SPIs. The SPI placed in the REKEY_SA notification is the SPI the exchange initiator would expect in inbound ESP or AH packets (just as in Delete payloads). 3.5 Changing PRFs when rekeying the IKE_SA When rekeying the IKE_SA, Section 2.18 says that "SKEYSEED for the new IKE_SA is computed using SK_d from the existing IKE_SA as follows: SKEYSEED = prf(SK_d (old), [g^ir (new)] | Ni | Nr)" If the old and new IKE_SA selected a different PRF, it is not clear which PRF should be used. Regardless of which is the correct answer, it works poorly if the new IKE_SA's PRF has a fixed key size. If the new PRF is also used to calculate SKEYSEED, then SK_d may not be of the correct size. And if SKEYSEED is calculated using the old PRF, then it may not be of the correct size for the new PRF. Although it is not yet clear which is the correct answer, this supports our opinion earlier in the document that the use of PRFs with a fixed key size is a bad idea. 3.6 Deleting vs. closing SAs It is not clear that SAs must be actively deleted. The text sometimes says that SAs are "closed" when it means that the SAs are actively deleted. Section 1.4 says "ESP and AH SAs always exist in Eronen & Hoffman Expires December 3, 2005 [Page 14] Internet-Draft IKEv2 Clarifications June 2005 pairs, with one SA in each direction. When an SA is closed, both members of the pair MUST be closed." It is important to note that SAs that are closed need to be actively deleted with DELETE payloads.4. Traffic selectors 4.1 Semantics of complex traffic selector payloads As described in3.7 Deleting a CHILD_SA pair Section3.13,1.4 describes how to delete SA pairs using theTSi/TSr payloads can includeInformational exchange: "To delete an SA, an INFORMATIONAL Exchange with one or moreindividual traffic selectors. Theredelete payloads isno requirement that TSi and TSr containsent listing thesame number of individual traffic selectors. Thus,SPIs (as theyare interpreted as follows: a packet matches a given TSi/TSr if it matches at least one of the individual selectorswould be expected inTSi, and at least onethe headers of inbound packets) of theindividual selectors in TSr. For instance,SAs to be deleted. The recipient MUST close thefollowing traffic selectors: TSi = ((17, 100, 192.0.1.66-192.0.1.66), (17, 200, 192.0.1.66-192.0.1.66)) TSr = ((17, 300, 0.0.0.0-255.255.255.255), (17, 400, 0.0.0.0-255.255.255.255)) would match UDP packets from 192.0.1.66 to anywhere, with any of the four combinations of source/destination ports (100,300), (100,400), (200,300), and (200, 400). This implies thatdesignated SAs." The "one or more delete payloads" phrase has caused sometypes of policies may require several CHILD_SA pairs. For instance, a policy matching only source/destination ports (100,300) and (200,400), but notconfusion. You never send delete payloads for theothertwocombinations, cannot be negotiated assides of an SA in a singleCHILD_SA pair using IKEv2. Eronen & Hoffman Expires September 25, 2005 [Page 14] Internet-Draft IKEv2 Clarifications March 2005 (References: "IKEv2 Traffic Selectors?" thread, Feb 2005.) 4.2 ICMP type/code in traffic selector payloads The traffic selector types 7 and 8 can also refermessage. If you have many SAs toICMP type and code fields. As described in Section 3.13.1, "For the ICMP protocol,delete at thetwo one octet fields Type and Code are treatedsame time (such asa single 16 bit integer (with Type inthemost significant eight bits and Codenested example given inthe least significant eight bits) port numberthat paragraph), you include delete payloads forthe purposes of filtering based on this field." This encoding is quite clear. However, as both TSi and TSr are always present, together they have two "start port" fields (oneinTSi and oneinbound half or each SA inTSr) and two "end port" fields.your Informational exchange. 3.8 Deleting an IKE_SA SinceICMP messages only have a single type/code field (instead of separate source/destination ports, like TCP and UDP), thereIKE_SAs do not exist in pairs, it issome room for confusion. One sensible interpretation would be that in case of ICMP, the "start port" fields in TSi and TSr must always be equal, and likewise for the "end port" fields. 4.3 Mobility header in traffic selector payloads Traffic selectors can use IP Protocol ID 135 to matchnot totally clear what theIPv6 mobility header [MIPv6]. However,response message should contain when theIKEv2 specification does not define how to representrequest deleted the"MH Type" field in traffic selectors. At some point, it was expectedIKE_SA. Since there is no information thatthis willneeds to bedefined in a separate document later. However, [RFC2401bis] sayssent to the other side (except that"For IKE,theIPv6 mobility header message type (MH type) is placed inrequest was received), an empty Informational response seems like the mostsignificant eight bits of the 16 bit local "port" selector."logical choice. (References:Tero Kivinen's mail "Issue #86: Add IPv6 mobility header message type as selector", 2003-10-14.) 4.4 Narrowing"Question about delete IKE SA" thread, May 2005.) 3.9 Who is thetraffic selectors Section 2.9 describes how traffic selectors are negotiated when creating a CHILD_SA. A more concise summaryoriginal initiator of IKE_SA In thenarrowing process is presented below. o IfIKEv2 document, "initiator" refers to theresponder's policy does not allow any part ofparty who initiated thetraffic covered by TSi/TSr, it responds with TS_UNACCEPTABLE. o Ifexchange being described, and "original initiator" refers to theresponder's policy allowsparty who initiated theentire set of traffic covered by TSi/TSr, no narrowingwhole IKE_SA. However, there isnecessary, andsome potential for confusion because theresponderIKE_SA canreturn the same TSi/TSr values. Eronen &be rekeyed by either party. To clear up this confusion, we propose that "original initiator" always refers to the party who initiated the exchange which resulted in the current IKE_SA. In other words, if the the "original responder" starts rekeying the IKE_SA, that party becomes the "original initiator" of the new IKE_SA. (References: Paul Hoffman's mail "Original initiator in IKEv2", 2005- 04-21.) Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 15] Internet-Draft IKEv2 ClarificationsMarchJune 2005o Otherwise, narrowing is needed. If the responder's policy allows all traffic covered by TSi[1]/TSr[1] (the first traffic4. Traffic selectors 4.1 Semantics of complex traffic selector payloads As described inTSi/TSr) but not entire TSi/TSr,Section 3.13, theresponder narrows to an acceptable subset ofTSi/TSr payloads can include one or more individual traffic selectors. There is no requirement thatincludes TSi[1]/TSr[1]. o IfTSi and TSr contain theresponder's policy does not allow all traffic covered by TSi[1]/TSr[1], but does allow some partssame number ofTSi/TSr,individual traffic selectors. Thus, they are interpreted as follows: a packet matches a given TSi/TSr if itnarrows to an acceptable subsetmatches at least one ofTSi/TSr. Inthelast two cases, there may be several subsets that are acceptable (but their union is not);individual selectors inthis case, the responder arbitrarily choosesTSi, and at least one ofthem, and includes ADDITIONAL_TS_POSSIBLE notificationthe individual selectors in TSr. For instance, theresponse. 4.5 SINGLE_PAIR_REQUIRED The descriptionfollowing traffic selectors: TSi = ((17, 100, 192.0.1.66-192.0.1.66), (17, 200, 192.0.1.66-192.0.1.66)) TSr = ((17, 300, 0.0.0.0-255.255.255.255), (17, 400, 0.0.0.0-255.255.255.255)) would match UDP packets from 192.0.1.66 to anywhere, with any of theSINGLE_PAIR_REQUIRED notify payload in Sections 2.9four combinations of source/destination ports (100,300), (100,400), (200,300), and3.10.1 is not fully consistent. We do not attempt to describe this payload in this document either, since it is expected(200, 400). This implies thatmost implementations will not havesome types of policiesthatmay requireseparate SAs for each address pair. Thus, ifseveral CHILD_SA pairs. For instance, a policy matching onlysome part (or parts) of the TSi/TSr proposed by the initiator is (are) acceptable to the responder, most responders should simply narrow TSi/TSr to an acceptable subset (as described insource/destination ports (100,300) and (200,400), but not thelastother twoparagraphs of Section 2.9), rather than use SINGLE_PAIR_REQUIRED. 4.6combinations, cannot be negotiated as a single CHILD_SA pair using IKEv2. (References: "IKEv2 Trafficselectors violating own policy Section 2.9 describesSelectors?" thread, Feb 2005.) 4.2 ICMP type/code in traffic selectornegotiationpayloads The traffic selector types 7 and 8 can also refer to ICMP type and code fields. As described ingreat detail. One aspect of this negotiation that may need some clarification is that when creatingSection 3.13.1, "For the ICMP protocol, the two one octet fields Type and Code are treated as anew SA,single 16 bit integer (with Type in theinitiator should not propose traffic selectors that violate its own policy. Ifmost significant eight bits and Code in the least significant eight bits) port number for the purposes of filtering based on thisrule is not followed, valid traffic may be dropped.field." This encoding isbest illustrated by an example. Suppose that host A has a policy whose effect is that traffic to 192.0.1.66 is sent via host B encrypted using AES,quite clear. However, as both TSi andtraffic to all other hostsTSr are always present, together they have two "start port" fields (one in192.0.1.0/24 is also sent via B, but must use 3DES. Suppose also that host B accepts any combination of AESTSi and3DES. If host A now proposes an SA that uses 3DES,one in TSr) andincludes TSr containing (192.0.1.0-192.0.1.0.255), this will be accepted by host B. Now, host B can also use this SA to send traffic from 192.0.1.66, but those packets will be dropped by A since it requires the use of AES for those traffic. Even if host A creates a new SAtwo "end port" fields. Since ICMP messages only have a single type/code field (instead of separate source/ destination ports, like TCP and UDP), there is some room for confusion. One sensible interpretation would be that in case of ICMP, the "start Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 16] Internet-Draft IKEv2 ClarificationsMarchJune 2005192.0.1.66 that uses AES, host B may freely continue to use the first SA for the traffic. In this situation, when proposing the SA, host A should have followed its own policy,port" fields in TSi andincluded aTSrcontaining ((192.0.1.0-192.0.1.65),(192.0.1.67-192.0.1.255)) instead. In general, if (1) the initiator makes a proposal "for traffic X (TSi/TSr), do SA",must always be equal, and(2)likewise forsome subset X' of X, the initiator does not actually accept traffic X' with SA, and (3)theinitiator would be willing to accept traffic X' with some SA' (!=SAi), valid"end port" fields. 4.3 Mobility header in traffic selector payloads Traffic selectors canbe unnecessarily dropped since the responder can apply either SA or SA'use IP Protocol ID 135 totraffic X'. (References: "Question about "narrowing" ..." thread, Feb 2005. "IKEv2 needs a "policy usage mode"..." thread, Feb 2005. "IKEv2 Traffic Selectors?" thread, Feb 2005. "IKEv2 traffic selector negotiation examples", 2004-08-08.) 5. Configuration payloads 5.1 Length of configuration attribute type field In Section 3.15.1, Figure 23 shows thatmatch thelength ofIPv6 mobility header [MIPv6]. However, the"AttributeIKEv2 specification does not define how to represent the "MH Type" fieldis 15 bits, while the text below the figurein traffic selectors. At some point, it was expected that this will be defined in a separate document later. However, [RFC2401bis] says that "For IKE, thelength is 7 bits. The figureIPv6 mobility header message type (MH type) iscorrect,placed in thefield is 15 bits.most significant eight bits of the 16 bit local "port" selector." (References: Tero Kivinen's mail"Comments to"Issue #86: Add IPv6 mobility header message type as selector", 2003-10-14.) 4.4 Narrowing thedraft-ietf-ipsec-ikev2-11.txt", 2003-11-09. Yoav Nir's mail "Will ikev2-16 betraffic selectors Section 2.9 describes how traffic selectors are negotiated when creating a CHILD_SA. A more concise summary of thecharm?", 2004-09-23. Charlie Kaufman's mail"draft-ietf-ipsec-ikev2-17.txt", 2004-10-04. Itnarrowing process isexpected that this issue will be fixed during the "Authors' 48 hours" beforepresented below. o If theRFC is published.) 5.2 Requestingresponder's policy does not allow anyINTERNAL_IP4/IP6_ADDRESS When describingpart of theINTERNAL_IP4/IP6_ADDRESS attributes, Section 3.15.1 says that "In a request message,traffic covered by TSi/TSr, it responds with TS_UNACCEPTABLE. o If theaddress specified is a requested address (or zero ifresponder's policy allows the entire set of traffic covered by TSi/TSr, nospecific address is requested)". The question herenarrowing isthat does "zero" mean an address "0.0.0.0" or a zero length string? Earlier,necessary, and the responder can return the samesection also says that "If an attributeTSi/TSr values. o Otherwise, narrowing is needed. If the responder's policy allows all traffic covered by TSi[1]/TSr[1] (the first traffic selectors in TSi/TSr) but not entire TSi/TSr, theCFG_REQUEST Configuration Payload isresponder narrows to an acceptable subset of TSi/TSr that includes TSi[1]/TSr[1]. o If the responder's policy does notzero lengthallow all traffic covered by TSi[1]/TSr[1], but does allow some parts of TSi/TSr, itis taken as a suggestion fornarrows to an acceptable subset of TSi/TSr. In the last two cases, there may be several subsets thatattribute". Also,are acceptable (but their union is not); in this case, thetableresponder arbitrarily chooses one ofconfiguration attributes shows thatthem, and includes ADDITIONAL_TS_POSSIBLE notification in thelengthresponse. 4.5 SINGLE_PAIR_REQUIRED The description ofINTERNAL_IP4_ADDRESS is either "0 or 4 octets",the SINGLE_PAIR_REQUIRED notify payload in Sections 2.9 andlikewise, INTERNAL_IP6_ADDRESS3.10.1 iseither "0 or 17 octets".not fully consistent. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page 17] Internet-Draft IKEv2 ClarificationsMarchJune 2005Thus, if the client does not request a specific address, it includes a zero-length INTERNAL_IP4/IP6_ADDRESS attribute,We do notan attribute containing an all-zeroes address. The exampleattempt to describe this payload in2.19 is thus incorrect,this document either, since itshows the attribute as "INTERNAL_ADDRESS(0.0.0.0)". However, since the valueisonly a suggestion,expected that most implementationsare recommended to ignore suggestions they do not accept; or in other words, treat the same way a zero-length INTERNAL_IP4_ADDRESS, "0.0.0.0", and any other addresses the implementation doeswill notrecognize as a reasonable suggestion. 5.3 INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET Section 3.15.1 describes the INTERNAL_IP4_SUBNET as "The protected sub-networkshave policies thatthis edge-device protects. This attribute is made uprequire separate SAs for each address pair. Thus, if only some part (or parts) oftwo fields;thefirst being an IP address andTSi/TSr proposed by thesecond being a netmask. Multiple sub-networks MAY be requested. The responder MAY respond with zero or more sub-network attributes." INTERNAL_IP6_SUBNET is defined in a similar manner. This raises two questions: first, since this informationinitiator isusually included in(are) acceptable to theTSr payload, what functionality does this attribute add? And second, what does this attribute meanresponder, most responders should simply narrow TSi/TSr to an acceptable subset (as described inCFG_REQUESTs? Forthefirst question, there seem to belast twosensible interpretations. Clearly TSr (in IKE_AUTH or CREATE_CHILD_SA response) indicates which subnets are accessible through the SA that was just created. The first interpretationparagraphs of Section 2.9), rather than use SINGLE_PAIR_REQUIRED. 4.6 Traffic selectors violating own policy Section 2.9 describes traffic selector negotiation in great detail. One aspect ofthe INTERNAL_IP4/6_SUBNET attributes is that they indicate additional subnets that can be reached throughthisgateway, butnegotiation that may need some clarification is that when creating aseparate SA. According to this interpretation,new SA, theINTERNAL_IP4/6_SUBNET attributes are useful mainly when they contain addressesinitiator should notincluded in TSr. The second interpretation ispropose traffic selectors thatthe INTERNAL_IP4/6_SUBNET attributes express the gateway's policy about whatviolate its own policy. If this rule is not followed, valid trafficshouldmay besent through the gateway. The client can choose whether other traffic (covereddropped. This is best illustrated byTSr, but not in INTERNAL_IP4/6_SUBNET)an example. Suppose that host A has a policy whose effect issent through the gateway or directly the destination. According to this interpretation, the attributes are useful mainly when TSr contains addresses not included in the INTERNAL_IP4/6_SUBNET attributes. These two interpretations are not totally incompatible: in both cases, they suggestthat traffic tothe addresses listed192.0.1.66 is sent via host B encrypted using AES, and traffic to all other hosts inthe INTERNAL_IP4/6_SUBNET attributes should be192.0.1.0/24 is also sent viathis gateway (and,B, but must use 3DES. Suppose also that host B accepts any combination ofcourse, the packets have toAES and 3DES. If host A now proposes an SA that uses 3DES, and includes TSr containing (192.0.1.0-192.0.1.0.255), this will besent over someaccepted by host B. Now, host B can also use this SAwhose Eronen & Hoffman Expires September 25, 2005 [Page 18] Internet-Draft IKEv2 Clarifications March 2005to send trafficselectors cover the address in question).from 192.0.1.66, but those packets will be dropped by Acouplesince it requires the use ofexamples are given below. For instance,AES for those traffic. Even ifthere are two subnets, 192.0.1.0/26 and 192.0.2.0/24, andhost A creates a new SA only for 192.0.1.66 that uses AES, host B may freely continue to use theclient's request containsfirst SA for thefollowing: CP(CFG_REQUEST) = INTERNAL_IP4_ADDRESS() TSi = (0, 0-65536, 0.0.0.0-255.255.255.255) TSr = (0, 0-65536, 0.0.0.0-255.255.255.255) Then a valid response could be the following (in which TSr and INTERNAL_IP4_SUBNET contain the same information): CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = ((0, 0-65536, 192.0.1.0-192.0.1.63), (0, 0-65536, 192.0.2.0-192.0.2.255))traffic. Inthese cases,this situation, when proposing theINTERNAL_IP4_SUBNET does not really carry any useful information. Another possible reply wouldSA, host A should havebeen this: CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = (0, 0-65536, 0.0.0.0-255.255.255.255) This would mean that the client can send allfollowed itstraffic through the gateway, but the gateway does not mind if the client sends traffic notown policy, and includedby INTERNAL_IP4_SUBNET directly to the destination (without going through the gateway). A different situation arisesa TSr containing ((192.0.1.0-192.0.1.65),(192.0.1.67-192.0.1.255)) instead. In general, if (1) thegateway hasinitiator makes apolicy that requires theproposal "for traffic X (TSi/TSr), do SA", and (2) for some subset X' of X, thetwo subnets to be carried in separate SAs. Then a response like thisinitiator does not actually accept traffic X' with SA, and (3) the initiator wouldindicatebe willing to accept traffic X' with some SA' (!=SAi), valid traffic can be unnecessarily dropped since theclient that if it wants accessresponder can apply either SA or SA' tothe second subnet, ittraffic X'. (References: "Question about "narrowing" ..." thread, Feb 2005. "IKEv2 needsto createaseparate SA: CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234)"policy usage mode"..." thread, Feb 2005. "IKEv2 Traffic Selectors?" thread, Feb 2005. "IKEv2 traffic selector negotiation examples", 2004-08-08.) Eronen & Hoffman Expires December 3, 2005 [Page 18] Internet-Draft IKEv2 Clarifications June 2005 5. Configuration payloads 5.1 Length of configuration attribute type field In Section 3.15.1, Figure 23 shows that the length of the "Attribute Type" field is 15 bits, while the text below the figure says the length is 7 bits. The figure is correct, the field is 15 bits. (References: Tero Kivinen's mail "Comments to the draft-ietf-ipsec-ikev2-11.txt", 2003-11-09. Yoav Nir's mail "Will ikev2-16 be the charm?", 2004-09-23. Charlie Kaufman's mail"draft-ietf-ipsec-ikev2-17.txt", 2004-10-04. It is expected that this issue will be fixed during the "Authors' 48 hours" before the RFC is published.) 5.2 Requesting any INTERNAL_IP4/IP6_ADDRESS When describing the INTERNAL_IP4/IP6_ADDRESS attributes, Section 3.15.1 says that "In a request message, the address specified is a requested address (or zero if no specific address is requested)". The question here is that does "zero" mean an address "0.0.0.0" or a zero length string? Earlier, the same section also says that "If an attribute in the CFG_REQUEST Configuration Payload is not zero length it is taken as a suggestion for that attribute". Also, the table of configuration attributes shows that the length of INTERNAL_IP4_ADDRESS is either "0 or 4 octets", and likewise, INTERNAL_IP6_ADDRESS is either "0 or 17 octets". Thus, if the client does not request a specific address, it includes a zero-length INTERNAL_IP4/IP6_ADDRESS attribute, not an attribute containing an all-zeroes address. The example in 2.19 is thus incorrect, since it shows the attribute as "INTERNAL_ADDRESS(0.0.0.0)". However, since the value is only a suggestion, implementations are recommended to ignore suggestions they do not accept; or in other words, treat the same way a zero-length INTERNAL_IP4_ADDRESS, "0.0.0.0", and any other addresses the implementation does not recognize as a reasonable suggestion. 5.3 INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET Section 3.15.1 describes the INTERNAL_IP4_SUBNET as "The protected sub-networks that this edge-device protects. This attribute is made Eronen & Hoffman Expires December 3, 2005 [Page 19] Internet-Draft IKEv2 Clarifications June 2005 up of two fields; the first being an IP address and the second being a netmask. Multiple sub-networks MAY be requested. The responder MAY respond with zero or more sub-network attributes." INTERNAL_IP6_SUBNET is defined in a similar manner. This raises two questions: first, since this information is usually included in the TSr payload, what functionality does this attribute add? And second, what does this attribute mean in CFG_REQUESTs? For the first question, there seem to be two sensible interpretations. Clearly TSr (in IKE_AUTH or CREATE_CHILD_SA response) indicates which subnets are accessible through the SA that was just created. The first interpretation of the INTERNAL_IP4/6_SUBNET attributes is that they indicate additional subnets that can be reached through this gateway, but need a separate SA. According to this interpretation, the INTERNAL_IP4/6_SUBNET attributes are useful mainly when they contain addresses not included in TSr. The second interpretation is that the INTERNAL_IP4/6_SUBNET attributes express the gateway's policy about what traffic should be sent through the gateway. The client can choose whether other traffic (covered by TSr, but not in INTERNAL_IP4/6_SUBNET) is sent through the gateway or directly the destination. According to this interpretation, the attributes are useful mainly when TSr contains addresses not included in the INTERNAL_IP4/6_SUBNET attributes. These two interpretations are not totally incompatible: in both cases, they suggest that traffic to the addresses listed in the INTERNAL_IP4/6_SUBNET attributes should be sent via this gateway (and, of course, the packets have to be sent over some SA whose traffic selectors cover the address in question). A couple of examples are given below. For instance, if there are two subnets, 192.0.1.0/26 and 192.0.2.0/24, and the client's request contains the following: CP(CFG_REQUEST) = INTERNAL_IP4_ADDRESS() TSi = (0, 0-65536, 0.0.0.0-255.255.255.255) TSr = (0, 0-65536, 0.0.0.0-255.255.255.255) Then a valid response could be the following (in which TSr and INTERNAL_IP4_SUBNET contain the same information): Eronen & Hoffman Expires December 3, 2005 [Page 20] Internet-Draft IKEv2 Clarifications June 2005 CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = ((0, 0-65536, 192.0.1.0-192.0.1.63), (0, 0-65536, 192.0.2.0-192.0.2.255)) In these cases, the INTERNAL_IP4_SUBNET does not really carry any useful information. Another possible reply would have been this: CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = (0, 0-65536, 0.0.0.0-255.255.255.255) This would mean that the client can send all its traffic through the gateway, but the gateway does not mind if the client sends traffic not included by INTERNAL_IP4_SUBNET directly to the destination (without going through the gateway). A different situation arises if the gateway has a policy that requires the traffic for the two subnets to be carried in separate SAs. Then a response like this would indicate to the client that if it wants access to the second subnet, it needs to create a separate SA: CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = (0, 0-65536, 192.0.1.0-192.0.1.63) INTERNAL_IP4_SUBNET can also be useful if the client's TSr included only part of the address space. For instance, if the client requests the following: CP(CFG_REQUEST) = INTERNAL_IP4_ADDRESS() TSi = (0, 0-65536, 0.0.0.0-255.255.255.255) TSr = (0, 0-65536, 192.0.2.155-192.0.2.155) Then the gateway's reply could be this: Eronen & Hoffman Expires December 3, 2005 [Page 21] Internet-Draft IKEv2 Clarifications June 2005 CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = (0, 0-65536, 192.0.2.155-192.0.2.155) It is less clear what the attributes mean in CFG_REQUESTs, and whether other lengths than zero make sense in this situation (but for INTERNAL_IP6_SUBNET, zero length is not allowed at all!). Currently this document recommends that implementations should not include INTERNAL_IP4_SUBNET or INTERNAL_IP6_SUBNET attributes in CFG_REQUESTs. For the IPv4 case, this document recommends using only netmasks consisting of some amount of "1" bits followed by "0" bits; for instance, "255.0.255.0" would not be a valid netmask for INTERNAL_IP4_SUBNET. (References: Tero Kivinen's mail "Intent of couple of attributes in Configuration Payload in IKEv2?", 2004-11-19. Srinivasa Rao Addepalli's mail "INTERNAL_IP4_SUBNET and INTERNAL_IP6_SUBNET in IKEv2", 2004-09-10. Yoav Nir's mail "Re: New I-D: IKEv2 Clarifications and Implementation Guidelines", 2005-02-07.) 5.4 INTERNAL_IP4_NETMASK Section 3.15.1 defines the INTERNAL_IP4_NETMASK attribute, and says that "The internal network's netmask. Only one netmask is allowed in the request and reply messages (e.g., 255.255.255.0) and it MUST be used only with an INTERNAL_IP4_ADDRESS attribute". However, it is not clear what exactly this attribute means, as the concept of "netmask" is not very well defined for point-to-point links (unlike multi-access links, where it means "you can reach hosts inside this netmask directly using layer 2, instead of sending packets via a router"). One possible interpretation would be that the host is given a whole block of IP addresses instead of a single address. This is also what Framed-IP-Netmask does in [RADIUS] and the IPCP "subnet mask" extension does in PPP [IPCPSubnet]. This interpretation would also work nicely with IPv6 (see the following section). However, one IKEv2 guru assured the authors that this interpretation is not correct. Section 3.15.1 also says that multiple addresses are assigned using multiple INTERNAL_IP4_ADDRESS attributes. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page19]22] Internet-Draft IKEv2 ClarificationsMarchJune 2005TSr = (0, 0-65536, 192.0.1.0-192.0.1.63)Currently, this document's interpretation is the following: o INTERNAL_IP4_NETMASK in a CFG_REPLY means exactly the same thing as INTERNAL_IP4_SUBNETcan also be useful ifcontaining theclient's TSr included only partsame information (see the previous section for description of INTERNAL_IP4_SUBNET). o INTERNAL_IP4_NETMASK does not make sense for CFG_REQUESTs, and theaddress space. Forexample in Section 2.19 is incorrect in this sense. (Another interpretation would be that by sending, for instance,ifthe combination of INTERNAL_IP4_ADDRESS(192.0.2.0) and INTERNAL_IP4_NETMASK(255.255.255.0), the clientrequestsis asking to be assigned one IP address from thefollowing: CP(CFG_REQUEST) = INTERNAL_IP4_ADDRESS() TSi = (0, 0-65536, 0.0.0.0-255.255.255.255) TSr = (0, 0-65536, 192.0.2.155-192.0.2.155) Thennetwork 192.0.2.0/24. However, this interpretation is not supported by thegateway's reply could be this: CP(CFG_REPLY) = INTERNAL_IP4_ADDRESS(192.0.1.234) INTERNAL_IP4_SUBNET(192.0.1.0/255.255.255.192) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) TSi = (0, 0-65536, 192.0.1.234-192.0.1.234) TSr = (0, 0-65536, 192.0.2.155-192.0.2.155) ItIKEv2 spec.) This interpretation isless clear whatnot yet settled; and it would imply that theattributes mean in CFG_REQUESTs,whole attribute is totally unnecessary. Yet another possible interpretation would be that INTERNAL_IP4_NETMASK indicates a broadcast address, meaning that if a client sends a packet to this address, the gateway will decrypt it andwhethersend copies to all otherlengths than zero make senseVPN clients inthis situation (but for INTERNAL_IP6_SUBNET, zero lengththat address range. However, no implementation isnot allowed at all!). Currentlyknown to do this, and there is nothing in the IKEv2 spec that would support thisdocument recommendsinterpretation. Fortunately, Section 4 clearly says thatimplementations shoulda minimal implementation does not need to includeINTERNAL_IP4_SUBNETorINTERNAL_IP6_SUBNET attributes in CFG_REQUESTs. Forunderstand theIPv4 case,INTERNAL_IP4_NETMASK attribute, and thus this document recommendsusing only netmasks consisting of some amount of "1" bits followed by "0" bits; for instance, "255.0.255.0" wouldthat implementations should notbe a valid netmask for INTERNAL_IP4_SUBNET.use the INTERNAL_IP4_NETMASK attribute at all. (References:Tero Kivinen's mail "Intent of couple of attributes in Configuration Payload in IKEv2?", 2004-11-19. Srinivasa Rao Addepalli'sCharlie Kaufman's mail"INTERNAL_IP4_SUBNET and INTERNAL_IP6_SUBNET in"RE: Proposed Last Call based revisions to IKEv2",2004-09-10.2004-05-27. Email discussion with Tero Kivinen, Jan 2005. Yoav Nir's mail "Re: New I-D: IKEv2 Clarifications and Implementation Guidelines", 2005-02-07.)5.4 INTERNAL_IP4_NETMASK Section 3.15.1 defines the INTERNAL_IP4_NETMASK attribute, and says that "The internal network's netmask. Only one netmask is allowed in the request and reply messages (e.g., 255.255.255.0) and it MUST be used only with an INTERNAL_IP4_ADDRESS attribute". However, it is not clear what exactly this attribute means, as the concept of "netmask" is not very well defined5.5 Configuration payloads forpoint-to-point links (unlike multi-access links, where it means "you can reach hosts Eronen & Hoffman Expires September 25, 2005 [Page 20] Internet-DraftIPv6 IKEv2Clarifications March 2005 inside this netmask directly using layer 2, instead of sending packets via a router"). One possible interpretation would be that the host is given a whole block of IP addresses instead of a single address. This isalsowhat Framed-IP-Netmask does in [RADIUS]defines configuration payloads for IPv6. However, they are based on the corresponding IPv4 payloads, and do not fully follow theIPCP "subnet mask" extension does in PPP [IPCPSubnet]. This interpretation would also work nicely with"normal IPv6(see the following section). However, oneway of doing things". Eronen & Hoffman Expires December 3, 2005 [Page 23] Internet-Draft IKEv2guru assuredClarifications June 2005 A client can be assigned an IPv6 address using theauthors that this interpretation is not correct. Section 3.15.1 also saysINTERNAL_IP6_ADDRESS configuration payload. Presumably, the idea was thatmultiple addressesa minimal exchange would look something like this: CP(CFG_REQUEST) = INTERNAL_IP6_ADDRESS() INTERNAL_IP6_DNS() TSi = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) TSr = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) CP(CFG_REPLY) = INTERNAL_IP6_ADDRESS(2001:DB8:0:1:2:3:4:5/?) INTERNAL_IP6_DNS(2001:DB8:99:88:77:66:55:44) TSi = (0, 0-65536, 2001:DB8:0:1:2:3:4:5 - 2001:DB8:0:1:2:3:4:5) TSr = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) In particular, IPv6 stateless autoconfiguration or router advertisement messages areassigned using multiple INTERNAL_IP4_ADDRESS attributes. Currently,not used; neither is neighbor discovery. While thisdocument's interpretationapproach isthe following: o INTERNAL_IP4_NETMASKreasonably simple, it has some limitations: IPsec tunnels configured using IKEv2 are not fully-featured "interfaces" ina CFG_REPLY means exactly the same thing as INTERNAL_IP4_SUBNET containing the same information (seetheprevious section for description of INTERNAL_IP4_SUBNET). o INTERNAL_IP4_NETMASK doesIPv6 addressing architecture [IPv6Addr] sense. In particular, they do notmake sense for CFG_REQUESTs,necessarily have link-local addresses, and this may complicate theexampleuse of protocols that assume them, such as [MLDv2]. (Whether they are called "interfaces" inSection 2.19some particular operating system isincorrect ina different issue.) (References: "VPN remote host configuration IPv6 ?" thread, May 2004.) 5.6 INTERNAL_IP6_ADDRESS prefix length Earlier versions of the IKEv2 draft had an INTERNAL_IP6_NETMASK attribute corresponding to INTERNAL_IP4_NETMASK, but thissense. (Another interpretationwas deleted when the prefix length field was added to the INTERNAL_IP6_ADDRESS attribute. Thus, it seems logical to assume that their purpose would be similar; however, this is far from obvious. The draft quite clearly says thatby sending, for instance, the combination of INTERNAL_IP4_ADDRESS(192.0.2.0) and INTERNAL_IP4_NETMASK(255.255.255.0),the client isasking to beassignedone IPan IPv6 addressfromusing thenetwork 192.0.2.0/24.INTERNAL_IP6_ADDRESS attribute. However,this interpretationas with the netmask in IPv4, it is notsupported byclear what theIKEv2 spec.) Thisprefix length here means. Again, one possible interpretation isnot yet settled; and it would implythat a prefix length smaller than 128 in a CFG_REPLY means that the client is assigned a whole block of IPv6 addresses. This would be in line with the IPv6 addressing architecture in general, and with, e.g., the Framed-IPv6- Prefix attributeis totally unnecessary. Yet another possiblein [RADIUS6]. However, the previous section Eronen & Hoffman Expires December 3, 2005 [Page 24] Internet-Draft IKEv2 Clarifications June 2005 rejected this interpretation for IPv4, so it wouldbeseem strange to adopt it only for IPv6. Thus, if we assume that INTERNAL_IP4_NETMASKindicatesand the prefix length in INTERNAL_IP6_ADDRESS have the same meaning, and the reasoning in the previous section is correct, then abroadcast address, meaningCFG_REPLY containing a prefix length smaller than 128 has the same purpose as INTERNAL_IP6_SUBNET. However, CFG_REQUESTs are more complicated. It seems thatifaclient sendsCFG_REQUEST message that requests apacket tospecific IPv6 address (usually an address thisaddress, the gateway will decrypt it and send copies to allclient was using earlier) should have prefix length 128. But what do otherVPN clientsprefix lengths mean in CFG_REQUESTs? Section 3.15.1 says that "With IPv6, a requestor MAY supply the low order addressrange. However, no implementation is knownbytes it wants todo this, anduse": presumably the prefix length tells how many low order bits thereis nothing inare (i.e., if theIKEv2 spec that would supportprefix length is X, there requester supplies 128-X low order address bits). However, thisinterpretation. Fortunately, Section 4 clearly says thatis quite confusing: if, say, aminimal implementationprefix length 126 means that "I want to use these 128-126=2 low order bits", why doesnot needprefix length 128 mean that "I want toinclude or understanduse these 128 low order bits"? Another interpretation is that instead of "low order", theINTERNAL_IP4_NETMASK attribute,draft should have said "high order", and thus a prefix length smaller than 128 means "I'd like to get an address from this subnet". Given this very confusing discussion, this document recommends that implementations should not use other INTERNAL_IP6_ADDRESS prefix lengths than 128. 5.7 INTERNAL_IP6_NBNS Section 3.15.1 defines theINTERNAL_IP4_NETMASKINTERNAL_IP6_NBNS attribute for sending the IPv6 address of NetBIOS name servers. However, NetBIOS is not defined for IPv6, and probably never will be. Thus, this attribute most likely does not make much sense. (Pointed out by Bernard Aboba in the IP Configuration Security (ICOS) BoF atall. (References: Charlie Kaufman's mail "RE: Proposed Last Call based revisions to IKEv2", 2004-05-27. Email discussion with Tero Kivinen, Jan 2005. Yoav Nir's mail "Re: New I-D: IKEv2 ClarificationsIETF62.) 5.8 INTERNAL_ADDRESS_EXPIRY Section 3.15.1 defines the INTERNAL_ADDRESS_EXPIRY attribute as "Specifies the number of seconds that the host can use the internal IP address. The host MUST renew the IP address before this expiry time. Only one of these attributes MAY be present in the reply." Expiry times andImplementation Guidelines", 2005-02-07.)explicit renewals are primarily useful in Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page21]25] Internet-Draft IKEv2 ClarificationsMarchJune 20055.5 Configuration payloads for IPv6 IKEv2 also defines configuration payloads for IPv6. However, they are based onenvironments like DHCP, where thecorresponding IPv4 payloads, and do not fully followserver cannot reliably know when the"normal IPv6 way of doing things". Aclient has gone away. However, in IKEv2 this is known, and the gateway canbe assigned an IPv6 address usingsimply free theINTERNAL_IP6_ADDRESS configuration payload. Presumably,address when theidea wasIKE_SA is deleted. Also, Section 4 says thata minimal exchange would look something like this: CP(CFG_REQUEST) = INTERNAL_IP6_ADDRESS() INTERNAL_IP6_DNS() TSi = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) TSr = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) CP(CFG_REPLY) = INTERNAL_IP6_ADDRESS(2001:DB8:0:1:2:3:4:5/?) INTERNAL_IP6_DNS(2001:DB8:99:88:77:66:55:44) TSi = (0, 0-65536, 2001:DB8:0:1:2:3:4:5 - 2001:DB8:0:1:2:3:4:5) TSr = (0, 0-65536, :: - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF) In particular, IPv6 stateless autoconfiguration or router advertisement messages are not used; neithersupporting renewals isneighbor discovery. Whilenot mandatory. Given that thisapproachfunctionality isreasonably simple, it has some limitations: IPsec tunnels configured using IKEv2 areusually notfully-featured "interfaces" in the IPv6 addressing architecture [IPv6Addr] sense. In particular, they doneeded, we recommend that gateways should notnecessarily have link-local addresses, andsend the INTERNAL_ADDRESS_EXPIRY attribute. (And since thismay complicateattribute does not seem to make much sense for CFG_REQUESTs, clients should not send it either.) Note that according to Section 4, clients are required to understand INTERNAL_ADDRESS_EXPIRY if the receive it. A minimum implementation would use the value to limit the lifetime ofprotocols that assume them, such as [MLDv2]. (Whether they are called "interfaces" in some particular operating system is a different issue.)the IKE_SA. (References:"VPN remote host configuration IPv6 ?" thread, May 2004.) 5.6 INTERNAL_IP6_ADDRESS prefix length Earlier versionsTero Kivinen's mail "Comments of draft-eronen-ipsec-ikev2-clarifications-02.txt", 2005-04-05. "Questions about internal address" thread, April 2005.) 6. Miscellaneous issues 6.1 Diffie-Hellman for first CHILD_SA Section 1.2 shows that IKE_AUTH messages do not contain KEi/KEr or Ni/Nr payloads. This implies that theIKEv2 draft had an INTERNAL_IP6_NETMASK attribute corresponding to INTERNAL_IP4_NETMASK, butSA payload in IKE_AUTH exchange cannot contain Transform Type 4 (Diffie-Hellman Group) with any other value than NONE. Implementations should probably leave the transform out entirely in thiswas deleted whencase. 6.2 Extended Sequence Numbers (ESN) transform The description of theprefix length field was addedESN transform in Section 3.3 has be proved difficult to understand. When theINTERNAL_IP6_ADDRESS attribute. Thus,ESN transform is included, itseems logical to assume that their purpose would be similar; however,has the following meaning: o A proposal containing one ESN transform with value 0 means "do not use extended sequence numbers". o A proposal containing one ESN transform with value 1 means "use extended sequence numbers". o A proposal containing two ESN transforms with values 0 and 1 means "I support both normal and extended sequence numbers, you choose". (Obviously this case isfar from obvious. The draft quite clearly says thatonly allowed in requests; theclient is assigned an IPv6 address usingresponse will contain only one ESN transform.) In most cases, theINTERNAL_IP6_ADDRESS attribute. However, as withexchange initiator will include either thenetmaskfirst or third alternative inIPv4, itits SA payload. The second alternative isnot clear whatrarely useful for theprefix length here means.initiator: it means that using normal sequence Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page22]26] Internet-Draft IKEv2 ClarificationsMarchJune 2005Again, one possible interpretationnumbers is not acceptable (so if the responder does not support ESNs, the exchange will fail with NO_PROPOSAL_CHOSEN). Section 3.3.2 also says thata prefix length smaller than 128"If Transform Type 5 is not included in aCFG_REPLYproposal, use of Extended Sequence Numbers is assumed". Or in other words, omitting the ESN transform meansthattheclientsame thing as including one ESN transform with value 1. This choice of default value isassigned a whole blocksomewhat counterintuitive and as described above, rarely useful. IPsec WG decided recently to change this part ofIPv6 addresses. This would be in line withtheIPv6 addressing architecture in general,specification, andwith, e.g., the Framed-IPv6-Prefix attribute in [RADIUS6]. However, the previous section rejected this interpretation for IPv4, somake itwould seem strangemandatory toadopt it onlyinclude the ESN transform forIPv6. Thus, if we assume that INTERNAL_IP4_NETMASK andESP/AH. (References: "Technical change needed to IKEv2 before publication", "STRAW POLL: Dealing with theprefix lengthESN negotiation interop issue inINTERNAL_IP6_ADDRESS have the same meaning,IKEv2" and "Results of straw poll regarding: IKEv2 interoperability issue" threads, March-April 2005.) 6.3 Matching ID_IPV4_ADDR and ID_IPV6_ADDR When using thereasoning in the previous section is correct, then a CFG_REPLY containing a prefix length smaller than 128 has the same purpose as INTERNAL_IP6_SUBNET. However, CFG_REQUESTs are more complicated. It seems that a CFG_REQUEST message that requests a specific IPv6 address (usually an address this client was using earlier) should have prefix length 128. But what do other prefix lengths mean in CFG_REQUESTs? Section 3.15.1 says that "With IPv6, a requestor MAY supply the low orderID_IPV4_ADDR/ID_IPV6_ADDR identity types in IDi/IDr payloads, IKEv2 does not require this addressbytes it wantstouse": presumably the prefix length tells how many low order bits there are (i.e., ifmatch theprefix length is X, there requester supplies 128-X low orderaddressbits). However, thisin the IP header (of IKEv2 packets), or anything in the TSi/TSr payloads. The contents of IDi/IDr isquite confusing: if, say, a prefix length 126 means that "I wantused purely touse these 128-126=2 low order bits", why does prefix length 128 mean that "I wantfetch the policy and authentication data related touse these 128 low order bits"? Another interpretation is that instead of "low order",thedraft should have said "high order",other party. (References: "Identities types IP address,FQDN/user FQDN andthus a prefix length smaller than 128 means "I'd likeDN and its usage in preshared key authentication" thread, Jan 2005.) 6.4 Relationship of IKEv2 toget an address from this subnet". Given this very confusing discussion, thisRFC2401bis The IKEv2 documentrecommends that implementations should not use other INTERNAL_IP6_ADDRESS prefix lengths than 128. 5.7 INTERNAL_IP6_NBNSrefers to [RFC2401bis], but it never makes clear what the exact relationship is. That is probably because there is no exact relationship. However, the IKEv2 document could state this explicitly. Section3.15.1 defines2.24 of IKEv2 says "Specifically, tunnel encapsulators and decapsulators for all tunnel-mode Security Associations (SAs) created by IKEv2 MUST support theINTERNAL_IP6_NBNS attributeECN full-functionality option forsendingtunnels specified in [RFC3168] and MUST implement theIPv6 addresstunnel encapsulation and decapsulation processing specified in [RFC2401bis] to prevent discarding ofNetBIOS name servers. However, NetBIOS isECN congestion indications." This, in essence, says that IKEv2 must be used with [RFC2401bis] only, notdefinedwith RFC 2401, because RFC 2401 has no requirements forIPv6, and probably never will be. Thus, this attribute most likely does not make much sense. (Pointed out by Bernard Aboba inECN. 6.5 Reducing theIP Configuration Security (ICOS) BoF at IETF62.) 6. Miscellaneous issueswindow size In IKEv2, the window size is assumed to be a (possibly configurable) Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page23]27] Internet-Draft IKEv2 ClarificationsMarchJune 20056.1 Diffie-Hellman for first CHILD_SA Section 1.2 shows that IKE_AUTH messages doproperty of a particular implementation, and is notcontain KEi/KEr or Ni/Nr payloads. This implies thatrelated to congestion control (unlike theSA payloadwindow size inIKE_AUTH exchange cannot contain Transform Type 4 (Diffie-Hellman Group) with any otherTCP, for instance). In particular, it is not defined what the responder should do when it receives a SET_WINDOW_SIZE notification containing a smaller value thanNONE. 6.2 Extended Sequence Numbers (ESN) transform The description of the ESN transformis currently inSection 3.3 has be proved difficulteffect. Thus, there is currently no way tounderstand. Whenreduce theESN transform is included, it haswindow size of an existing IKE_SA. However, when rekeying an IKE_SA, thefollowing meaning: o A proposal containing one ESN transform with value 0 means "do not use extended sequence numbers". o A proposal containing one ESN transform with value 1 means "use extended sequence numbers". o A proposal containing two ESN transformsnew IKE_SA starts withvalues 0 andwindow size 1means "I support both normal and extended sequence numbers, you choose". (Obviously this case is only alloweduntil it is explicitly increased by sending a new SET_WINDOW_SIZE notification. (References: Tero Kivinen's mail "Comments of draft-eronen-ipsec-ikev2-clarifications-02.txt", 2005-04-05.) 6.6 Minimum size of nonces Section 2.10 says that "Nonces used inrequests;IKEv2 MUST be randomly chosen, MUST be at least 128 bits in size, and MUST be at least half theresponse will contain only one ESN transform.) In most cases,key size of the negotiated prf." However, theexchangeinitiatorwill include eitherchooses thefirst or third alternative in its SA payload. The second alternativenonce before the outcome of the negotiation israrely usefulknown. In this case, the nonce has to be long enough for all theinitiator: it means that using normal sequence numbersPRFs being proposed. 6.7 Initial zero octets on port 4500 It is notacceptable (so if the responder does not support ESNs,clear whether a peer sending an IKE_SA_INIT request on port 4500 should include theexchange will fail with NO_PROPOSAL_CHOSEN).initial four zero octets. Section3.3.2 also says that "If Transform Type 5 is2.23 talks about how to upgrade to tunneling over port 4500 after message 2, but it does notincluded in a proposal, use of Extended Sequence Numberssay what to do if message 1 isassumed". Or in other words, omitting the ESN transform means the same thingsent on port 4500. IKE MUST listen on port 4500 asincluding one ESN transform with value 1. This choice of default value is somewhat counterintuitive andwell asdescribed above, rarely useful. There is ongoing discussion about making includingport 500. [...] The IKE initiator MUST check these payloads if present and if they do not match theESN transform mandatory, thus removing this illogical default value. (References: "Technical change needed to IKEv2 before publication"addresses in the outer packet MUST tunnel all future IKE and"STRAW POLL: DealingESP packets associated with this IKE_SA over UDP port 4500. To tunnel IKE packets over UDP port 4500, theESN negotiation interop issuein IKEv2" threads, March 2005.) 6.3 Matching ID_IPV4_ADDRIKE header has four octets of zero prepended andID_IPV6_ADDR When usingtheID_IPV4_ADDR/ID_IPV6_ADDR identity types in IDi/IDr payloads, IKEv2 does not require this address to matchresult immediately follows theaddressUDP header. [...] The very beginning of Section 2 says "... though IKE messages may also be received on UDP port 4500 with a slightly different format (see section 2.23)." That "slightly different format" is only described in discussing what Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page24]28] Internet-Draft IKEv2 ClarificationsMarchJune 2005 to do after changing to port 4500. However, [RFC3948] shows clearly theIP header (of IKEv2 packets), or anything informat has theTSi/TSr payloads. The contents of IDi/IDrinitial zeros even for initiators on port 4500. Furthermore, without the initial zeros, the processing engine cannot determine whether the packet isused purely to fetchan IKE packet or an ESP packet. Thus, all packets sent on port 4500 need thepolicy and authentication data related tofour zero prefix; otherwise, theother party. (References: "Identities types IP address,FQDN/user FQDN and DN and its usage in pershared key authentication" thread, Jan 2005.) 6.4 Relationship of IKEv2 to RFC2401bis The IKEv2 document refersreceiver won't know how to[RFC2401bis], but it never makes clear whathandle them. 6.8 SPI values in IKE_SA_INIT exchange Normal IKE messages include theexact relationship is. That is probably because there is no exact relationship.initiator's and responder's SPIs, both of which are non-zero, in the IKE header. However, there are some corner cases where the IKEv2document could state this explicitly. IKEv2 canspecification is not fully consistent about what values should beused with either [RFC2401] or [RFC2401bis], except in placesused. First, Section 3.1 says thatare only covered by [RFC2401bis]. The areas specific to [RFC2401bis] are ECN (Section 2.24), fragmentation control (Section 3.10), andtheuse of opaque portsResponder's SPI "...MUST NOT be zero intraffic selectors (Section 3.13.1). IKEv2 allowsany other message" (than thecreationfirst message ofa single SA that has multiple protocols when being used with [RFC2401]; this is not allowed in [RFC2401bis]. 6.5 Reducingthewindow size In IKEv2,IKE_SA_INIT exchange). However, thewindow size is assumed to be a (possibly configurable) property of a particular implementation, and is not related to congestion control (unlikefigure in Section 2.6 shows thewindow sizesecond IKE_SA_INIT message as "HDR(A,0), N(COOKIE)", contradicting the text inTCP, for instance). In particular, there is no way to reduce3.1. Since thewindow size of an existing IKE_SA. However, when rekeying an IKE_SA,responder's SPI identifies security-related state held by thenew IKE_SA starts with window size 1 until itresponder, and in this case no state isexplicitly increased bycreated, sending anew SET_WINDOW_SIZE notification. 6.6 Minimum size of nonces Section 2.10 says that "Nonces usedzero value seems reasonable. Second, inIKEv2 MUST be randomly chosen, MUST be at least 128 bitsaddition to cookies, there are several other cases when the IKE_SA_INIT exchange does not result insize, and MUST be at least halfthekey sizecreation of an IKE_SA (for instance, INVALID_KE_PAYLOAD or NO_PROPOSAL_CHOSEN). What responder SPI value should be used in thenegotiated prf." However, the initiator choosesIKE_SA_INIT response in this case? Since thenonce beforeIKE_SA_INIT request always has a zero responder SPI, theoutcome ofvalue will not be actually used by thenegotiationinitiator. Thus, we think sending a zero value isknown. Incorrect also in thiscase,case. There is also an important detail about thenonce has toInitiator SPI that must belong enough for alltaken into account by responders. If a responder receives two IKE_SA_INIT requests with thePRFs being proposed. 6.7 Initial zero octets on port 4500same Initiator SPI, it must not automatically conclude that the latter is a retransmission of the former. It is possible that the packets were sent by two different peers that just happened to choose the same Initiator SPI (IKEv2 does notclear whether a peer sending an IKE_SA_INIT request on port 4500require that SPIs are chosen randomly). Instead, the responder shouldincludecompare theinitial four zero octets. Section 2.23 talks about howwhole packets (or at the minimum, Ni payloads, which are always chosen randomly) toupgradedetermine whether or not this packet creates a new IKE_SA or belongs totunneling over port 4500 after message 2, butan existing IKE_SA. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page25]29] Internet-Draft IKEv2 ClarificationsMarchJune 2005it does not say what to do if message 1 is sent on port 4500. IKE MUST listen on port 4500 as well as port 500. [...]6.9 SPI values for messages outside of an IKE_SA TheIKE initiator MUST check these payloads if present and if they doIKEv2 specification does notmatch the addressessay what SPI values should be used in theouter packet MUST tunnel all future IKE and ESP packets associated with this IKE_SA over UDP port 4500. To tunnel IKE packets over UDP port 4500, theIKE headerhas four octets of zero prepended and the result immediately followsfor theUDP header. [...] The very beginningsmall number of notifications that are allowed to be sent outside of an IKE_SA. Note that such notifications are explicitly *not* Informational exchanges; Section2 says "... though IKE1.5 makes it clear that these are one-way messagesmay alsothat must not bereceived on UDP port 4500 withresponded to. There are two cases when such aslightly different format (see section 2.23)." That "slightly different format" is only described in discussing what to do after changingone-way notification can be sent: INVALID_IKE_SPI and INVALID_SPI. In both cases, there are no IKE SPI values that would be meaningful toport 4500. However, [RFC3948] shows clearlytheformat hasrecipient of such a notification. A strict interpretation of theinitial zeros even for initiators on port 4500. Furthermore, withoutspecification would require theinitial zeros,sender to invent garbage values for theprocessing engine cannot determine whetherSPI fields. However, we think this was not thepacketintention, and using zero values is acceptable. 6.10 Protocol ID/SPI fields in Notify payloads Section 3.10 says that the Protocol ID field in Notify payloads "For notifications which do not relate to anIKE packet or an ESP packet. Thus, all packetsexisting SA, this field MUST be senton port 4500 need the fouras zeroprefix; otherwise,and MUST be ignored on receipt". However, thereceiver won't know howspecification does not clearly say which notifications are related tohandle them. 6.8 SPI values in IKE_SA_INIT exchange Normal IKE messages include the initiator'sexisting SAs andresponder's SPIs, both ofwhich arenon-zero, innot. Since theIKE header. However, there are some corner cases wheremain purpose of theIKEv2 specificationProtocol ID field isnot fully consistent about what valuesto specify the type of the SPI, our interpretation is that the Protocol ID field should beused. First,non-zero only when the SPI field is non-empty. There are currently only two notifications where this is the case: INVALID_SELECTORS and REKEY_SA. 6.11 INVALID_IKE_SPI Section3.13.10.1 says that theResponder'sINVALID_IKE_SPI notification "indicates an IKE message was received with an unrecognized destination SPI. This usually indicates that the recipient has rebooted and forgotten the existence of an IKE_SA." The text does not say whether the SPI"...MUST NOTvalue should bezeroincluded inany other message" (than the first message oftheIKE_SA_INIT exchange).notification. However, it is clear that thefigure in Section 2.6 showsnotification will be useful to thesecond IKE_SA_INIT message as "HDR(A,0), N(COOKIE)", contradictingrecipient only if it can find thetext in 3.1. SinceIKE_SA somehow, so theresponder'sSPIidentifies security-related state held by the responder,should be included. This still leaves two questions open: which SPI(s) should be included, andin this case no state is created, sending a zero value seems reasonable. Second, in addition to cookies, therehow it (or they) should be sent. For the first question, the alternatives areseveral other cases whentheIKE_SA_INIT exchange does not result inunrecognized destination SPI, thecreation of an IKE_SA (for instance, INVALID_KE_PAYLOAD or NO_PROPOSAL_CHOSEN). WhatEronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page26]30] Internet-Draft IKEv2 ClarificationsMarchJune 2005respondersource SPIvalue should(which presumably would beused inmore useful for theIKE_SA_INIT response in this case? Sincerecipient), or both. For theIKE_SA_INIT request always has a zero responder SPI,second question, thevalue will notSPI(s) could beactually used by the initiator. Thus, we think sending a zero value is correct alsoplaced inthis case. 6.9 SPI values for messages outside of an IKE_SA The IKEv2 specification does not say whatthe SPIvalues should be used for Informational requests sent outside of an IKE_SA. There seem to be two cases when such a message can be sent: INVALID_IKE_SPI and INVALID_SPI notifications. Especiallyfield(s) in thelatter case, no meaningfulIKE header, the SPIvalues are available. A strict interpretation offield in thespecification would requireNotify payload, or thesender to invent garbage values forNotification Data field. In theSPI fields. However, we think this was notcase of another related notification, INVALID_SPI, theintention, and using zero valuessituation isacceptable. 6.10 Protocol ID/SPI fields in Notify payloads Section 3.10clearer: there is only a single SPI, and the text explicitly says that theProtocol ID field in Notify payloads "For notifications which doSPI is sent as Notification Data (since the notification is notrelate toabout an existing SA,thisthe SPI fieldMUST be sent as zero and MUST be ignored on receipt". However,in thespecification doesNotify payload is notclearly say which notifications are related to existing SAsused; andwhich are not.obviously the value cannot be placed in the IKE header). Since themain purpose of the Protocol ID fieldINVALID_IKE_SPI notification isto specify the typesent outside ofthe SPI, our interpretationan IKE_SA, and it is not about an existing SA, it seems thatthe Protocol ID field shouldusing Notification Data would benon-zero only whentheSPI field is non-empty. There are currently only two notifications wherelogical choice. However, thisis the case: INVALID_SELECTORSissue needs more discussion andREKEY_SA. 6.11 INVALID_IKE_SPIwe do not yet propose any solution in this document. 6.12 Which message should contain INITIAL_CONTACT The description of the INITIAL_CONTACT notification in Section 3.10.1 says thatthe INVALID_IKE_SPI"This notification"indicates an IKE message was received with an unrecognized destination SPI. This usually indicatesasserts that this IKE_SA is therecipient has rebooted and forgottenonly IKE_SA currently active between theexistence of an IKE_SA."authenticated identities". However, neither Section 2.4 nor 3.10.1 says in which message this payload should be placed. The text doesnot say whethertalk about authenticated identities, so it seems theSPI value shouldnotification cannot beincluded insent before both endpoints have been authenticated. Thus, thenotification. However,possible places are the last IKE_AUTH response message and a separate Informational exchange. Based on how this was implemented in IKEv1, itis clear thatseems thenotification will be usefulintent was to use a separate Informational exchange. (References: "Clarifying therecipient only if it can finduse of INITIAL_CONTACT in IKEv2" thread, April 2005. "Initial Contact messages" thread, December 2004. "IKEv2 and Initial Contact" thread, September 2004.) 6.13 Message IDs for IKE_SA_INIT messages The Message ID for IKE_SA_INIT messages is always zero. This includes retries of the message due to responses such as COOKIE and INVALID_KE_PAYLOAD. This is because Message IDs are part of the IKE_SAsomehow, sostate, and when theSPI should be included. This still leaves two questions open: which SPI(s) should beresponder replies to IKE_SA_INIT request with N(COOKIE) or N(INVALID_KE_PAYLOAD), the responder does not allocate any state. (References: "Question about N(COOKIE) and N(INVALID_KE_PAYLOAD) Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page27]31] Internet-Draft IKEv2 ClarificationsMarchJune 2005included, and how it (or they) shouldcombination" thread, Oct 2004. Tero Kivinen's mail "Comments of draft-eronen-ipsec-ikev2-clarifications-02.txt", 2005-04-05.) 6.14 Message IDs for IKE_AUTH messages According to Section 2.2, "The IKE_SA initial setup messages will always besent. Fornumbered 0 and 1." That is true when the IKE_AUTH exchange does not use EAP. When EAP is used, each pair of messages have their message numbers incremented. The firstquestion,pair of AUTH messages will have an ID of 1, thealternatives aresecond will be 2, and so on. (References: "Question about MsgID in AUTH exchange" thread, April 2005.) 6.15 Creating an IKE_SA without a CHILD_SA It is recommended that theunrecognized destination SPI,responder set up an IKE_SA even if it is not possible to set up a CHILD_SA, as long as there is agreement on thesource SPI (which presumably would be more useful forcryptographic parts of therecipient), or both. ForIKE_SA. This might happen when thesecond question,parties in theSPI(s) could be placedIKE_AUTH exchange agree on cryptographic protocols but fail to agree on IPsec issues. The list of responses in the IKE_AUTH exchange that should not prevent an IKE_SA from being set up include NO_PROPOSAL_CHOSEN, SINGLE_PAIR_REQUIRED, INTERNAL_ADDRESS_FAILURE, FAILED_CP_REQUIRED, and TS_UNACCEPTABLE. (References: "Questions about internal address" thread, April, 2005.) 6.16 Alignment of payloads Many IKEv2 payloads contain fields marked as "RESERVED", mostly because IKEv1 had them, and partly because they make the pictures easier to draw. In particular, payloads in IKEv2 are not, in general, aligned to 4-byte boundaries. (Note that payloads were not aligned to 4-byte boundaries inthe SPI field(s)IKEv1 either.) (References: "IKEv2: potential 4-byte alignment problem" thread, June 2004.) 6.17 Negotiation of ESP_TFC_PADDING_NOT_SUPPORTED The description of ESP_TFC_PADDING_NOT_SUPPORTED notification in Section 3.10.1 says that "This notification asserts that theIKE header,sending endpoint will NOT accept packets that contain Flow Confidentiality (TFC) padding". However, theSPI fieldtext does not say inthe Notify payload,which messages this notification should be included, or whether theNotification Data field. In the casescope ofanother related notification, INVALID_SPI, the situation is clearer: therethis notification isonlya singleSPI, andCHILD_SA or all CHILD_SAs of thetext explicitly sayspeer. Eronen & Hoffman Expires December 3, 2005 [Page 32] Internet-Draft IKEv2 Clarifications June 2005 Our interpretation is that theSPIscope issent as Notification Data (since thea single CHILD_SA, and thus this notification isnot about an existing SA, the SPI fieldincluded inthe Notifymessages containing an SA payloadis not used; and obviously the value cannotnegotiating a CHILD_SA. If neither endpoint accepts TFC padding, this notification will beplacedincluded in both theIKE header). Since the INVALID_IKE_SPI notification is sent outside ofrequest proposing anIKE_SA,SA andit is not about an existing SA, it seems that using Notification Data would bethelogical choice. However,response accepting it. If thisissue needs more discussion and we do not yet propose any solutionnotification is included inthis document. 6.12 Which message should contain INITIAL_CONTACT The descriptiononly one of theINITIAL_CONTACTmessages, TFC padding can still be sent in one direction. 6.18 Negotiation of NON_FIRST_FRAGMENTS_ALSO NON_FIRST_FRAGMENTS_ALSO notification is described in Section 3.10.1 simply as "Used for fragmentation control. See [RFC2401bis] for explanation." [RFC2401bis] says "Implementations that"This notification assertswill transmit non-initial fragments on a tunnel mode SA thatthis IKE_SA is the only IKE_SA currently active betweenmakes use of non-trivial port (or ICMP type/code or MH type) selectors MUST notify a peer via theauthenticated identities". However, neither Section 2.4 nor 3.10.1 saysIKE NOTIFY NON_FIRST_FRAGMENTS_ALSO payload. The peer MUST reject this proposal if it will not accept non-initial fragments inwhich messagethispayload should be placed. The textcontext. If an implementation doestalk about authenticated identities, sonot successfully negotiate transmission of non-initial fragments for such an SA, itseemsMUST NOT send such fragments over the SA." However, it is not clear exactly how the negotiation works. Our interpretation is that the negotiation works the same way as for IPCOMP_SUPPORTED and USE_TRANSPORT_MODE: sending non-first fragments is enabled only if NON_FIRST_FRAGMENTS_ALSO notificationcannot be sent beforeis included in bothendpoints have been authenticated. Thus,thepossible places arerequest proposing an SA and thelast IKE_AUTHresponsemessage and a separate Informational exchange. Based on howaccepting it. In other words, if the peer "rejects thiswas implemented in IKEv1,proposal", itseemsonly omits NON_FIRST_FRAGMENTS_ALSO notification from theintent was to use a separate Informational exchange.response, but does not reject the whole CHILD_SA creation. 7. Status of the clarifications This document is work-in-progress, and it contains both relatively stable and finished parts, and other parts that are incomplete or even incorrect. To help the reader in deciding how much weight should be given to each clarification, this section contains our opinions about which parts we believe to are stable, and which are likely to change in future versions. Those clarifications believed to be correct and without controversy are marked with three asterisks (***); those where the clarification is known to be incomplete and/or there is disagreement about what the correct interpretation is are marked with one asterisk (*). TheEronen & Hoffman Expires September 25, 2005 [Page 28] Internet-Draft IKEv2 Clarifications March 2005clarifications marked with two asterisks (**) are somewhere between the extremes. Eronen & Hoffman Expires December 3, 2005 [Page 33] Internet-Draft IKEv2 Clarifications June 2005 2. Authentication 2.1 Data included in AUTH payload calculation *** 2.2 Hash function for RSA signatures *** 2.3 Encoding method for RSA signatures *** 2.4 Identification type for EAP *** 2.5 Identity for policy lookups when using EAP *** 2.6 EAP authentication and the AUTH payload *** 2.7 Certificate encoding types *** 2.8 Shared key authentication and fixed PRF key size ** 2.9 EAP authentication and fixed PRF key size * 2.10 Matching ID payloads to certificate contents *** 3. Keying and rekeying 3.1 Semantics of the CREATE_CHILD_SA exchange * 3.2 Rekeying the IKE_SA vs. reauthentication ** 3.3 SPIs when rekeying the IKE_SA *** 3.4 Which SPI to use in REKEY_SA *** 3.5 Changing PRFs when rekeying the IKE_SA * 3.6 Deleting vs. closing SAs ** 3.7 Deleting an SA pair ** 3.8 Deleting an IKE_SA ** 3.9 Who is the original initiator of IKE_SA ** 4. Traffic selectors 4.1 Semantics of complex traffic selector payloads *** 4.2 ICMP type/code in traffic selector payloads *** 4.3 Mobility header in traffic selector payloads *** 4.4 Narrowing the traffic selectors *** 4.5 SINGLE_PAIR_REQUIRED ** 4.6 Traffic selectors violating own policy * 5. Configuration payloads 5.1 Length of configuration attribute type field *** 5.2 Requesting any INTERNAL_IP4/IP6_ADDRESS *** 5.3 INTERNAL_IP4_SUBNET/INTERNAL_IP6_SUBNET ** 5.4 INTERNAL_IP4_NETMASK ** 5.5 Configuration payloads for IPv6 * 5.6 INTERNAL_IP6_ADDRESS prefix length * 5.7 INTERNAL_IP6_NBNS *** 5.8 INTERNAL_ADDRESS_EXPIRY ** 6. Miscellaneous issues 6.1 Diffie-Hellman for first CHILD_SA *** 6.2 Extended Sequence Numbers (ESN) transform ** 6.3 Matching ID_IPV4_ADDR and ID_IPV6_ADDR *** 6.4 Relationship of IKEv2 to RFC2401bis ** 6.5 Reducing the window size ** 6.6 Minimum size of nonces *** 6.7 Initial zero octets on port 4500 *** 6.8 SPI values in IKE_SA_INIT exchange ** 6.9 SPI values for messages outside ofan IKE_SA * 6.10 Protocol ID/SPI fields in Notifyan IKE_SA * 6.10 Protocol ID/SPI fields in Notify payloads ** Eronen & Hoffman Expires December 3, 2005 [Page 34] Internet-Draft IKEv2 Clarifications June 2005 6.11 INVALID_IKE_SPI * 6.12 Which message should contain INITIAL_CONTACT ** 6.13 Message IDs for IKE_SA_INIT messages ** 6.14 Message IDs for IKE_AUTH messages *** 6.15 Creating an IKE_SA without a CHILD_SA ** 6.16 Alignment of payloads *** 6.17 Negotiation of ESP_TFC_PADDING_NOT_SUPPORTED **6.11 INVALID_IKE_SPI * 6.12 Which message should contain INITIAL_CONTACT6.18 Negotiation of NON_FIRST_FRAGMENTS_ALSO **Eronen & Hoffman Expires September 25, 2005 [Page 29] Internet-Draft IKEv2 Clarifications March 2005Future versions of this document will, of course, change these estimates (and changes in both directions are possible, though hopefully it's more towards higher confidence). 8. Implementation mistakes Some implementers at the first IKEv2 bakeoff didn't do everything correctly. This may seem like an obvious statement, but it is probably useful to list a few things that were clear in the document and not needing clarification, that some implementors didn't do. All of these things caused interoperability problems. o Some implementations continued to send traffic on a CHILD_SA after it was rekeyed, even after receiving an DELETE payload. o After rekeying an IKE_SA, some implementations did not reset their message counters to zero. One set the counter to 2, another did not reset the counter at all. o Some implementations could only handle a single pair of traffic selectors, or would only process the first pair in the proposal.9. Open issues This section lists issues that this document probably should address, but has not done so yet. o In the traffic selector discussion, we need to come up with better wording for the "sender's inbound" SAs. Is that traffic that is being sent to the sender, or traffic being sent from the sender? o Many of the configuration payload issues in this draft are still far from clear. These need to be resolved before implementers can feel assured of creating interoperable implementations.oThere may needSome implementations responded tobe more text about deleting an old SA after rekeying is finished. o The text about sendingaDELETE for only one direction of an SA (and the responderdelete request by sendingthe DELETE for the other direction of the SA in its response) doesn't explain the logic,an empty INFORMATIONAL response, anddoesn't say why you should not send DELETEs for both directions ofthen initiated their own INFORMATIONAL exchange with theSA. We need to add a descriptionpair ofthe race condition if one side deletes bothSAsat once.to delete. oWhenAlthough this did not happen at thedocument usesbakeoff, from theterm "original initiator" (or similar terms),discussion there, it isnotclearwhether orthat some people had not implemented message window sizes correctly. Some implementations might have sent messages that did not fit into the responder's message windows, and some implementations may not have torn down an SA if they did not ever receive a message that they know they should have. 9. Open issues This section lists issues thatterm also applies tothis document probably should address, but has not done so yet. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page30]35] Internet-Draft IKEv2 ClarificationsMarchJune 2005the side that originates an rekeyingo Many of theIKE_SA. That is, if Alice starts the first IKE_SA, but then Bob rekeys the IKE_SA, is the "original initiator" from that point on now Bob, or is itconfiguration payload issues in this draft are stillAlice? Also, if it is Bob, at what exact point does it become Bob? This needsfar from clear. These need to becleared up on a case-by-case basis throughout the document.resolved before implementers can feel assured of creating interoperable implementations. o It would be very useful to have actual examples of certificate type 12 (hash and URL of X.509 certificates) and type 13 (hash and URL of X.509 bundle). oThe message IDs of IKE_SA_INIT messages is unclear if there are cookies followed by INVALID_KE_PAYLOAD. See "Question about N(COOKIE) and N(INVALID_KE_PAYLOAD) combination" thread, Oct 2004.Thisdefinitely needs to be clarified. o There is some confusion on whendocument might want toemit and process INITIAL_CONTACT payloads. References: Michael Richardson's mail "Initial Contact Messages", 2004-12-05. Paul Hoffman's reply, 2004-12-05. Tero Kivinen's reply, 2004-12-07. "Replicated identities" thread in Jan 2005.) It isexplicitly talk about notclear if theredoing ESP- in-AH even though it isan interoperability issue because reactingpossible. We could say "implementations do not need toINITIAL_CONTACT is optional, but this should be cleared up.support this". 10. Security considerations This document does not introduce any new security considerations to IKEv2. If anything, clarifying complex areas of the specification can reduce the likelihood of implementation problems that may have security implications. 11. IANA considerations This document does not change or create any IANA-registered values. 12. Acknowledgments This document is mainly based on conversations on the IPsec WG mailing list. The authors would especially like to thank Bernard Aboba, Jari Arkko, Vijay Devarapalli, William Dixon, Mika Joutsenvirta, Charlie Kaufman, Tero Kivinen, Yoav Nir, and Michael Richardson for their contributions. In addition, the authors would like to thank all the participants of the first public IKEv2 bakeoff, held in Santa Clara in February 2005, for their questions and proposed clarifications.Eronen & Hoffman Expires September 25, 2005 [Page 31] Internet-Draft IKEv2 Clarifications March 200513. References 13.1 Normative References [IKEv2] Kaufman, C., Ed., "Internet Key Exchange (IKEv2) Protocol", draft-ietf-ipsec-ikev2-17 (work in progress), September 2004. [IKEv2ALG] Schiller, J., "Cryptographic Algorithms for use in the Internet Key Exchange Version 2", draft-ietf-ipsec-ikev2-algorithms-05 (work in progress), Eronen & Hoffman Expires December 3, 2005 [Page 36] Internet-Draft IKEv2 Clarifications June 2005 April 2004. [PKCS1v20] Kaliski, B. and J. Staddon, "PKCS #1: RSA Cryptography Specifications Version 2.0", RFC 2437, October 1998. [PKCS1v21] Jonsson, J. and B. Kaliski, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC 3447, February 2003. [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998. [RFC2401bis] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol",draft-ietf-ipsec-rfc2401bis-05draft-ietf-ipsec-rfc2401bis-06 (work in progress),December 2004.March 2005. 13.2 Informative References [EAP] Aboba, B., Blunk, L., Vollbrecht, J., Carlson,J.J., and H. Levkowetz, "Extensible Authentication Protocol (EAP)", RFC 3748, June 2004. [EAPKey] Aboba, B., Simon, D., Arkko, J., Eronen,P.P., and H. Levkowetz, "Extensible Authentication Protocol (EAP) Key Management Framework",draft-ietf-eap-keying-04draft-ietf-eap-keying-06 (work in progress),November 2004.April 2005. [IPCPSubnet] Cisco Systems, Inc., "IPCP Subnet Mask Support Enhancements",http://www.cisco.com/univercd/cc/td/doc/product/software/i os121/121newft/121limit/121dc/121dc3/ipcp_msk.htm,http://www.cisco.com/univercd/cc/td/doc/ product/software/ios121/121newft/121limit/121dc/121dc3/ ipcp_msk.htm, January 2003.Eronen & Hoffman Expires September 25, 2005 [Page 32] Internet-Draft IKEv2 Clarifications March 2005[IPv6Addr] Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6) Addressing Architecture", RFC 3513, April 2004. [MIPv6] Johnson, D., Perkins,C.C., and J. Arkko, "Mobility Support in IPv6", RFC 3775, June 2004. [MLDv2] Vida, R. and L. Costa, "Multicast Listener Discovery Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. [NAI] Aboba, B. and M. Beadles, "The Network Access Identifier", RFC 2486, January 1999. Eronen & Hoffman Expires December 3, 2005 [Page 37] Internet-Draft IKEv2 Clarifications June 2005 [NAIbis] Aboba, B., Beadles, M., Arkko,J.J., and P. Eronen, "The Network Access Identifier",draft-ietf-radext-rfc2486bis-03draft-ietf-radext-rfc2486bis-05 (work in progress),November 2004.February 2005. [RADEAP] Aboba, B. and P. Calhoun, "RADIUS (Remote Authentication Dial In User Service) Support For Extensible Authentication Protocol (EAP)", RFC 3579, September 2003. [RADIUS] Rigney, C., Willens, S., Rubens,A.A., and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000. [RADIUS6] Aboba, B., Zorn,G.G., and D. Mitton, "RADIUS and IPv6", RFC 3162, August 2001. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, March 1997. [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro,L.L., and M. Stenberg, "UDP Encapsulation of IPsec ESP Packets", RFC 3948, January 2005. [RFC822] Crocker, D., "Standard for the format of ARPA Internet text messages", RFC 822, August 1982. [ReAuth] Nir, Y., "Repeated Authentication in IKEv2",draft-nir-ikev2-auth-lt-01draft-nir-ikev2-auth-lt-02 (work in progress),November 2004.May 2005. [SCVP] Freeman,T., Housley, R. and A.T., Housley, R., Malpani, A., Cooper, D., and T. Polk, "Simple Certificate Validation Protocol (SCVP)",Eronen & Hoffman Expires September 25, 2005 [Page 33] Internet-Draft IKEv2 Clarifications March 2005 draft-ietf-pkix-scvp-16draft-ietf-pkix-scvp-18 (work in progress),October 2004.February 2005. Authors' Addresses Pasi Eronen Nokia Research Center P.O. Box 407 FIN-00045 Nokia Group FinlandEMail:Email: pasi.eronen@nokia.com Eronen & Hoffman Expires December 3, 2005 [Page 38] Internet-Draft IKEv2 Clarifications June 2005 Paul Hoffman VPN Consortium 127 Segre Place Santa Cruz, CA 95060 USAEMail:Email: paul.hoffman@vpnc.org Appendix A. Exchanges and payloads This appendix contains a short summary of the IKEv2 exchanges, and what payloads can appear in which message. This appendix is purely informative; if it disagrees with the body of this document or the IKEv2 specification, the other text is considered correct. Vendor-ID (V) payloads may be included in any place in any message. This sequence shows what are, in our opinion, the most logical places for them. The specification does not say which messages can contain N(SET_WINDOW_SIZE). It can possibly be included in any message, but it is not yet shown below. Note: N(INITIAL_CONTACT) is still under discussion and is not shown below. A.1 IKE_SA_INIT exchange request --> [N(COOKIE)], SA, KE, Ni, [N(NAT_DETECTION_SOURCE_IP)+, N(NAT_DETECTION_DESTINATION_IP)], [V+] normal response <-- SA, KE, Nr, (no cookie) [N(NAT_DETECTION_SOURCE_IP), N(NAT_DETECTION_DESTINATION_IP)], [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [V+] Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page34]39] Internet-Draft IKEv2 ClarificationsMarchJune 2005 A.2 IKE_AUTH exchange without EAP request --> IDi, [CERT+], [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [IDr], AUTH, [CP(CFG_REQUEST)], [N(IPCOMP_SUPPORTED)+], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, TSi, TSr, [V+] response <-- IDr, [CERT+], AUTH, [CP(CFG_REPLY)], [N(IPCOMP_SUPPORTED)], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, TSi, TSr, [N(ADDITIONAL_TS_POSSIBLE)], [V+] Eronen & Hoffman Expires December 3, 2005 [Page 40] Internet-Draft IKEv2 Clarifications June 2005 A.3 IKE_AUTH exchange with EAP first request --> IDi, [[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [IDr], [CP(CFG_REQUEST)], [N(IPCOMP_SUPPORTED)+], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, TSi, TSr, [V+] first response <-- IDr, [CERT+], AUTH, EAP, [V+] / --> EAP repeat 1..N times | \ <-- EAP last request --> AUTH last response <-- AUTH, [CP(CFG_REPLY)], [N(IPCOMP_SUPPORTED)], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, TSi, TSr, [N(ADDITIONAL_TS_POSSIBLE)], [V+] A.4 CREATE_CHILD_SA exchange for creating/rekeying CHILD_SAs request --> [N(REKEY)], [N(IPCOMP_SUPPORTED)+], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, Ni, [KEi], TSi, TSr response <-- [N(IPCOMP_SUPPORTED)], [N(USE_TRANSPORT_MODE)], [N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(NON_FIRST_FRAGMENTS_ALSO)], SA, Nr, [KEr], TSi, TSr, [N(ADDITIONAL_TS_POSSIBLE)] Eronen & Hoffman Expires December 3, 2005 [Page 41] Internet-Draft IKEv2 Clarifications June 2005 A.5 CREATE_CHILD_SA exchange for rekeying the IKE_SA request --> N(REKEY), SA, Ni, [KEi] response <-- SA, Nr, [KEr] A.6 INFORMATIONAL exchange request --> [N+], [D+], [CP(CFG_REQUEST)] response <-- [N+], [D+], [CP(CFG_REPLY)] Eronen & Hoffman Expires December 3, 2005 [Page 42] Internet-Draft IKEv2 Clarifications June 2005 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Eronen & Hoffman ExpiresSeptember 25,December 3, 2005 [Page35]43] ----