view Side-By-Side changes
IPSEC Working Group Charlie Kaufman INTERNET-DRAFT editordraft-ietf-ipsec-ikev2-04.txt Januarydraft-ietf-ipsec-ikev2-05.txt February 2003 Internet Key Exchange (IKEv2) Protocol<draft-ietf-ipsec-ikev2-04.txt><draft-ietf-ipsec-ikev2-05.txt> Status of this Memo This document is a submission by the IPSEC Working Group of the Internet Engineering Task Force (IETF). Comments should be submitted to the ipsec@lists.tislabs.com mailing list. Distribution of this memo is unlimited. This document is an Internet Draft and is in full conformance with all provisions of Section 10 of RFC2026 [Bra96]. Internet Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and working groups. Note that other groups may also distribute working documents as 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." To learn the current status of any Internet Draft, please check the "1id-abstracts.txt" listing contained in the Internet Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Australia), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). Abstract This document describes version 2 of the IKE (Internet Key Exchange) protocol. IKEperformsis a component of IPsec used for performing mutual authentication andestablishes an IKEestablishing and maintaining securityassociation that can be used to efficiently establish SAs for ESP and/or AH.associations. This versiongreatly simplifies IKE by replacing the 8 possible phase 1 exchanges with a single exchange based on either public signature keys or shared secret keys. The single exchange provides identity hiding, yet works in 2 round trips (all the identity hiding exchanges in IKE v1 required 3 round trips). Latency of setup of an IPsec SA is further reduced from IKEv1 by allowing setupofan SA for ESP and/or AH to be piggybacked on the initialIKEexchange. It also improves security by allowingsimplifies theIKEv2 [Page 1] INTERNET DRAFT January 2003 Responder to be stateless until it can be assureddesign by removing options that were rarely used and simplifying theInitiator can receive at the claimed IP source address.encoding. This versionalso presentsof theentire protocol in a single self-contained document, in contrast to IKEv1, in whichIKE specification combines theprotocol was described incontents of what were previously separate documents, including ISAKMP (RFC 2408), IKE (RFC 2409),andthe Internet DOI (RFC2407) documents.2407), NAT Traversal, Legacy authentication, and remote address acquisition. IKEv2 [Page 1] INTERNET DRAFT February 2003 Version 2 of IKE does not interoperate with version 1, but it has enough of the header format in common that both versions can unambiguously run over the same UDP port. Table of Contents Abstract.....................................................11 Summary of Changes from IKEv1..............................3 2RequirementsTerminology...................................4 3Terminology.....................................3 1 IKE ProtocolOverview......................................5 3.1Overview......................................3 1.1 UsageScenarios..........................................6 3.1.1Scenarios..........................................5 1.1.1 Gateway to GatewayTunnel..............................6 3.1.2Tunnel..............................5 1.1.2 Endpoint to EndpointTransport.........................6 3.1.3Transport.........................5 1.1.3 Endpoint to GatewayTransport..........................7 3.1.4Transport..........................6 1.1.4 OtherScenarios........................................8 3.2Scenarios........................................7 1.2 The InitialExchange.....................................8 3.3Exchange.....................................7 1.3 The CREATE_CHILD_SAExchange.............................9 3.4Exchange.............................8 1.4 TheInformational Exchange..............................11 3.5INFORMATIONAL Exchange..............................10 1.5 Informational Messages outside of anIKE-SA.............12 4IKE-SA.............11 2 IKE Protocol Details andVariations.......................13 4.1Variations.......................11 2.1 Use of RetransmissionTimers............................13 4.2Timers............................12 2.2 Use of Sequence Numbers for MessageID..................13 4.3ID..................12 2.3 Window Size for overlappingrequests....................14 4.4requests....................13 2.4 State Synchronization and ConnectionTimeouts...........15 4.5Timeouts...........14 2.5 Version Numbers and ForwardCompatibility...............16 4.6 Cookies.................................................18 4.7Compatibility...............15 2.6 Cookies.................................................17 2.7 Cryptographic AlgorithmNegotiation.....................20 4.8 Rekeying................................................20 4.9Negotiation.....................19 2.8 Rekeying................................................19 2.9 Traffic SelectorNegotiation............................21 4.10 Nonces.................................................23 4.11Negotiation............................20 2.10 Nonces.................................................22 2.11 Address and PortAgility...............................24 4.12Agility...............................22 2.12 Reuse of Diffie-HellmanExponentials...................24 4.13Exponentials...................23 2.13 Generating KeyingMaterial.............................25 4.14Material.............................23 2.14 Generating Keying Material for theIKE-SA..............25 4.15IKE-SA..............24 2.15 Authentication of theIKE-SA...........................26 4.16IKE-SA...........................25 2.16 Extended Authentication Protocol Methods...............26 2.17 Generating Keying Material for CHILD-SAs...............274.172.18 Rekaying IKE-SAs using a CREATE_CHILD_SA exchange......284.182.19 Requesting an internal address on a remotenetwork.....28 4.19network.....29 2.20 Requesting a Peer's Version............................304.202.21 ErrorHandling.........................................30 4.21 IPcomp.................................................31 5Handling.........................................31 2.22 IPcomp.................................................32 2.23 NAT Traversal..........................................32 2.24 ECN Notification.......................................34 3 Header and PayloadFormats................................32 5.1Formats................................35 3.1 The IKEHeader..........................................32 5.2Header..........................................35 3.2 Generic PayloadHeader..................................34 5.3Header..................................38 3.3 Security AssociationPayload............................35Payload............................39 IKEv2 [Page 2] INTERNET DRAFTJanuaryFebruary 20035.3.13.3.1 ProposalSubstructure.................................36 5.4Substructure.................................40 3.4 Key ExchangePayload....................................38 5.5Payload....................................43 3.5 IdentificationPayload..................................38 5.6Payload..................................43 3.6 CertificatePayload.....................................40 5.7Payload.....................................45 3.7 Certificate RequestPayload.............................41 5.8Payload.............................47 3.8 AuthenticationPayload..................................42 5.9Payload..................................48 3.9 NoncePayload...........................................44 5.10Payload...........................................49 3.10 NotifyPayload.........................................44 5.10.1Payload.........................................50 3.10.1 Notify MessageTypes.................................45 5.11Types.................................51 3.11 DeletePayload.........................................50 5.12Payload.........................................56 3.12 Vendor IDPayload......................................51 5.13Payload......................................57 3.13 Traffic SelectorPayload...............................53 5.13.1Payload...............................58 3.13.1 TrafficSelector.....................................53 5.14Selector.....................................59 3.14 EncryptedPayload......................................55 5.15Payload......................................60 3.15 ConfigurationPayload..................................57 5.15.1Payload..................................62 3.15.1 ConfigurationAttributes.............................59 5.16Attributes.............................64 3.16 Extended Authentication Protocol (EAP) Payload.........66 3.17 Other Payloadtypes....................................61 6types....................................68 4 ConformanceRequirements..................................62 7Requirements..................................68 5 SecurityConsiderations...................................62 8Considerations...................................70 6 IANAConsiderations.......................................63Considerations.......................................71 7 Acknowledgements..........................................72 8 References................................................72 8.1Transform Types and Attribute Values....................64Normative References....................................72 8.2Exchange Types..........................................64 8.3 Payload Types...........................................64 9 Acknowledgements..........................................64 10 References...............................................64 10 Normative References.....................................64 10Non-normativeReferences.................................64References................................72 Appendix A:NAT Traversal...................................67Summary of Changes from IKEv1...................75 Appendix B: Diffie-HellmanGroups...........................69Groups...........................77 ChangeHistory..............................................71History..............................................79 Author'sAddress............................................73Address............................................82 Full CopyrightStatement....................................74 1 Summary of changes from IKEv1 The goals ofStatement....................................82 Requirements Terminology Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT" and "MAY" that appear in thisrevisiondocument are toIKE are: 1) To define the entire IKE protocolbe interpreted as described ina single document, rather than three that cross reference one another; 2) To simplify IKE by replacing the eight different initial phase[Bra97]. 1exchanges with a single four message exchange (with changes inIKE Protocol Overview IP Security (IPsec) provides confidentiality, data integrity, access control, and data source authenticationmechanisms affecting only a single AUTH payload rather than restructuringto IP datagrams. These services are provided by maintaining shared state between theentire exchange); 3) To removesource and theDomainsink ofInterpretation (DOI), Situation (SIT), and Labeled Domain Identifier fields, andan IP datagram. This state defines, among other things, theCommitspecific services provided to the datagram, which cryptographic algorithms will be used to provide the services, andAuthenticationthe keys used as input to the cryptographic algorithms. Establishing this shared state in a manual fashion does not scale IKEv2 [Page 3] INTERNET DRAFTJanuaryFebruary 2003only bits; 4) To decrease IKE's latency in the common case by making the initial exchange be 2 round trips (4 messages), and allowing the abilitywell. Therefore a protocol topiggyback setup ofestablish this state dynamically is needed. This memo describes such aCHILD-SA on that exchange; 5) To replace the cryptographic syntax for protectingprotocol-- the Internet Key Exchange (IKE). This is version 2 of IKE. Version 1 of IKEmessages themselves with one based closely on ESPwas defined in RFCs 2407, 2408, and 2409. This single document is intended tosimplify implementationreplace all three of those RFCs. IKE performs mutual authentication between two parties and establishes an IKE securityanalysis; 6) To reduceassociation that includes shared secret information that can be used to efficiently establish SAs for ESP (RFC 2406) and/or AH (RFC 2402). It also negotiates use of IPcomp (RFC 2393) in connection with an ESP and/or AH SA. We call thenumberIKE SA an "IKE-SA". The SAs for ESP and/or AH that get set up through that IKE-SA we call "CHILD-SA"s. All IKE communications consist ofpossible error states by makingpairs of messages: a request and a response. The pair is called an "exchange". We call theprotocol reliable (allfirst messagesare acknowledged)establishing an IKE-SA IKE_SA_INIT andsequenced. This allows shortening Phase 2IKE_AUTH exchangesfrom 3 messages to 2; 7) To increase robustness by allowingand subsequent IKE exchanges CREATE_CHILD_SA or INFORMATIONAL exchanges. In theresponder to not do significant processing until it receivescommon case, there is amessage proving that the initiator can receive messages at its claimed IP address,single IKE_SA_INIT exchange andnot commit any state to ana single IKE_AUTH exchangeuntil the initiator can be cryptographically authenticated; 8) To fix bugs such as(a total of four messages) to establish thehash problem documented in [draft-ietf- ipsec-ike-hash-revised-02.txt]; 9) To specify Traffic Selectors in their own payloads type rather than overloading ID payloads,IKE-SA andmaking more flexibletheTraffic Selectors thatfirst CHILD-SA. In exceptional cases, there may bespecified; 10) To replace the complex mix and match negotiationmore than one ofcryptographic algorithms with proposals based on suiteseach ofalgorithms; 11) To specify required behavior under certain error conditions or when datathese exchanges. In all cases, all IKE_SA_INIT exchanges MUST complete before any other exchange type, then all IKE_AUTH exchanges MUST complete, and following thatis not understood is received in order to make it easier to make future revisionsany number of CREATE_CHILD_SA and INFORMATIONAL exchanges may occur in any order. In some scenarios, only away that does not break backwards compatibility; 12) To incorporate ideas from draft-ietf-ipsec-nat-reqts-02.txt to allow IKE to negotiate through NAT gateways; 12) To simplify and clarify how shared statesingle CHILD-SA ismaintained inneeded between thepresence of network failures and Denial of Service attacks; and 13) To maintain existing syntaxIPsec endpoints andmagic numberstherefore there would be no additional exchanges. Subsequent exchanges MAY be used to establish additional CHILD-SAs between theextent possible to make it likely that implementationssame authenticated pair ofIKEv1 can be enhanced to support IKEv2 with minimum effort. 2 Requirements Terminology Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT"endpoints andIKEv2 [Page 4] INTERNET DRAFT January 2003 "MAY" that appear in this document aretobe interpreted as described in [Bra97]. 3perform housekeeping functions. IKEProtocol Overview IP Security (IPsec) provides confidentiality, data integrity, access control, and data source authentication to IP datagrams. These services are providedmessage flow always consists of a request followed bymaintaining shared state between the source anda response. It is thesinkresponsibility ofan IP datagram. This state defines, among other things, the specific services provided to the datagram, which cryptographic algorithms will be used to provide the services, andthekeys used as inputrequester to ensure reliability. If thecryptographic algorithms. Establishing this shared state in a manual fashion does not scale well. Therefore a protocol to establish this state dynamicallyresponse isneeded. This memo describes suchnot received within aprotocol--timeout interval, theInternet Key Exchange (IKE). This is version 2 of IKE. Version 1 of IKE was defined in RFCs 2407, 2408, and 2409. This single document is intended to replace all threerequester MUST retransmit the request (or abandon the connection). The first request/response ofthose RFCs. IKE performs mutual authentication between two parties and establishesan IKE session negotiates securityassociation that includes shared secret information that can be used to efficiently establish SAsparameters forESP (RFC 2406) and/or AH (RFC 2402). It also negotiates use of IPcomp (RFC 2393) in connection with an ESP and/or AH SA. We calltheIKE SA an "IKE-SA". The SAs for ESP and/or AH that get set up through that IKE-SA we call "CHILD-SA"s.IKE-SA, sends nonces, and sends Diffie-Hellman values. We call thefirst four messages establishing an IKE-SA a "phase 1"initial exchange IKE_SA_INIT (request andsubsequent IKE exchanges "phase 2", inheriting this terminology from IKEv1.response). Thephase 1 exchange establishessecond request/response, which we'll call IKE_AUTH transmits identities, proves knowledge of theIKE-SAsecrets corresponding to the two identities, and sets up an SA for the first (and often only) AH and/or ESP CHILD-SA.In some scenarios, onlyThe types of subsequent exchanges are CREATE_CHILD_SA (which creates asingle CHILD-SA is needed between the IPsec endpoints and therefore there would be no phase 2 exchanges. Phase 2 exchanges MAY be used to establish additional CHILD-SAs between the same authenticated pair of endpoints and to perform housekeeping functions. The phase 1 exchange consists of two request/response pairs. A phase 2 exchange is one request/response pair, and can be used to create or delete a CHILD- SA, rekey or delete the IKE-SA,CHILD-SA), orreport information such as error conditions. IKE message flow always consists of a request followed by a response. It is the responsibility of the requester to ensure reliability. If the response is not received within a timeout interval, the requester MUST retransmit the request (or abandon the connection). The first request/response of a phase 1 exchange negotiates security parameters for the IKE-SA, sends nonces, and sends Diffie-Hellman IKEv2 [Page 5] INTERNET DRAFT January 2003 values. We call the initial exchange IKE_SA_INIT (request and response). The second request/response, which we'll call IKE_AUTH transmits identities, proves knowledge of the secrets corresponding to the two identities,andsets up an SA for the first (and often only) AH and/or ESP CHILD-SA. Phase 2 exchanges each consist of a single request/response pair. The types of exchanges are CREATE_CHILD_SAINFORMATIONAL (whichcreates a CHILD-SA), or an Informational exchange whichdeletes an SA, reports error IKEv2 [Page 4] INTERNET DRAFT February 2003 conditions, or does otherhousekeeping. All these messages requirehousekeeping). Every request requires a response. Aninformational messageINFORMATIONAL request with no payloads is commonly used as a check for liveness. These subsequent exchanges cannot be used until the initial exchanges have completed. In the description that follows, we assume that no errors occur. Modifications to the flow should errors occur are described in section4. 3.12.21. 1.1 Usage Scenarios IKE is expected to be used to negotiate ESP and/or AH SAs in a number of different scenarios, each with their own special requirements.3.1.11.1.1 Gateway to Gateway Tunnel +-+-+-+-+-+ +-+-+-+-+-+ ! ! IPsec ! ! Protected !Tunnel ! Tunnel !Tunnel ! Protected Subnet <-->!Endpoint !<---------->!Endpoint !<--> Subnet ! ! ! ! +-+-+-+-+-+ +-+-+-+-+-+ Figure 1: Firewall to Firewall Tunnel In this scenario, neither endpoint of the IP connection implements IPsec, but network nodes between them protect traffic for part of the way. Protection is transparent to the endpoints, and depends on ordinary routing sending packets through the tunnel endpoints for processing. Each endpoint would announce the set of addresses "behind" it, and packets would be sent in Tunnel Mode where the inner IP header would contain the IP addresses of the actual endpoints.3.1.21.1.2 Endpoint to Endpoint Transport +-+-+-+-+-+ +-+-+-+-+-+ ! ! IPsec ! ! !Protected! Tunnel !Protected!IKEv2 [Page 6] INTERNET DRAFT January 2003!Endpoint !<---------------------------------------->!Endpoint ! ! ! ! ! +-+-+-+-+-+ +-+-+-+-+-+ Figure 2: Endpoint to Endpoint In this scenario, both endpoints of the IP connection implement IPsec. These endpoints may implement application layer access controls based on the authenticated identities of the participants. Transport mode will commonly be used with no inner IP header. If IKEv2 [Page 5] INTERNET DRAFT February 2003 there is an inner IP header, the inner addresses will be the same as theoutherouter addresses. A single pair of addresses will be negotiated for packets to be sent over this SA. It is possible in this scenario that one of the protected endpoints will be behind a network address translation (NAT) node, in which case the tunnelled packets will have to be UDP encapsulated so that port numbers in the UDP headers can be used to identify individual endpoints "behind" the NAT.3.1.31.1.3 Endpoint to Gateway Transport +-+-+-+-+-+ +-+-+-+-+-+ ! ! IPsec ! ! Protected !Protected! Tunnel !Tunnel ! Subnet !Endpoint !<------------------------>!Endpoint !<--- and/or ! ! ! ! Internet +-+-+-+-+-+ +-+-+-+-+-+ Figure 3: Endpoint to Gateway In this scenario, a protected endpoint (typically a portable roaming computer) connects back to its corporate network through an IPsec protected tunnel. It might use this tunnel only to access information on the corporate network or it might tunnel all of its traffic back through the corporate network in order to take advantage of protection provided by a corporate firewall against Internet based attacks. In either case, the protected endpoint will want an IP address associated with the gateway so that packets returned to it will go to the gateway and be tunnelled back. This IP address may be static or may be dynamically allocated by the gateway. In support of the latter case, IKEv2 includes a mechanism for the initiator to request an IP address owned by the gateway for use for the duration of its SA. In this scenario, packets will use tunnel mode. On each packet from the protected endpoint, the outer IP header will contain the source IP address associated with its current location (i.e. the addressIKEv2 [Page 7] INTERNET DRAFT January 2003that will get traffic routed to the endpoint directly) while the inner IP header will contain the source IP address assigned by the gateway (i.e. the address that will get traffic routed to the gateway for forwarding to the endpoint). The outer destination address will always be that of the gateway, while the inner destination address will be the ultimate destination for the packet. In this scenario, it is possible that the protected endpoint will be behind a NAT. In that case, the IP address as seen by the gateway will not be the same as the IP address sent by the protected IKEv2 [Page 6] INTERNET DRAFT February 2003 endpoint, and packets will have to be UDP encapsulated in order to be routed properly.3.1.41.1.4 Other Scenarios Other scenarios are possible, as are nested combinations of the above. One noteable example combines aspects of3.1.11.1.1 and3.1.3.1.1.3. A subnet may make all external accesses through a remote gateway using an IPsec tunnel, where the addresses on the subnet are routed to the gateway by the rest of the Internet. An example would be someones home network being virtually on the Internet with static IP addresses even though connectivity is provided by an ISP that assigns a single dynamically assigned IP address (where the static IP addresses and an IPsec relay is provided by a third party located elsewhere).3.21.2 The Initial Exchange Communication using IKE always begins with an initial exchange (known in IKEv1 as Phase 1). This initial exchange normally consists of four messages, though in some scenarios that number can grow. All communications using IKE consist of request/response pairs. We'll describe the base exchange first, followed by variations. The first pair of messages (IKE_SA_INIT) negotiate cryptographic algorithms, exchange nonces, and do a Diffie-Hellman exchange. The second pair of messages (IKE_AUTH) authenticate the previous messages, exchange identities and certificates, and establish the first CHILD-SA. Parts of these messages are encrypted and integrity protected with keys established through the IKE_SA_INIT exchange, so the identities are hidden from eavesdroppers and all fields in all the messages are authenticated. In the following description, the payloads contained in the message are indicated by names such as SA. The details of the contents of each payload are described later. Payloads which may optionally appear will be shown in brackets, such as [CERTREQ], would indicate that optionally a certificate request payload can be included.IKEv2 [Page 8] INTERNET DRAFT January 2003The initial exchange is as follows: Initiator Responder ----------- ----------- HDR, SAi1, KEi, Ni --> HDR contains the SPIs, version numbers, and flags of various sorts. The SAi1 payload states the cryptographic algorithms the Initiator supports for the IKE-SA. The KE payload sends the Initiator's Diffie-Hellman value. Ni is the Initiator's nonce. IKEv2 [Page 7] INTERNET DRAFT February 2003 <-- HDR, SAr1, KEr, Nr, [CERTREQ] The Responder chooses a cryptographic suite from the Initiator's offered choices and expresses that choice in the SAr1 payload, completes the Diffie-Hellman exchange with the KEr payload, and sends its nonce in the Nr payload. At this point in the negotiation each party can generate SKEYSEED, from which all keys are derived for that IKE-SA. All but the headers of all the messages that follow are encrypted and integrity protected. The keys used for the encryption and integrity protection are derived from SKEYSEED and are known as SK_e (encryption) and SK_a (authentication, a.k.a. integrity protection). A separate SK_e and SK_a is computed for each direction. The notation SK { ... } indicates that these payloads are encrypted and integrity protected using that direction's SK_e and SK_a. HDR, SK {IDi, [CERT,] [CERTREQ,] [IDr,] AUTH, SAi2, TSi, TSr} --> The Initiator asserts her identity with the IDi payload, proves knowledge of the secret corresponding to IDi and integrity protects the contents of the first two messages using the AUTH payload. She might also send her certificate(s) in CERT payload(s) and a list of her trust anchors in CERTREQ payload(s). If any CERT payloads are included, the first certificate provided must contain the public key used to verify the AUTH field. The optional payload IDr enables Alice to specify which of Bob's identities she wants to talk to. This is useful when Bob is hosting multiple identities at the same IP address. She begins negotiation of a CHILD-SA using the SAi2 payload. The final fields (starting with SAi2) are described in the description of the CREATE_CHILD_SA exchange. <-- HDR, SK {IDr, [CERT,] AUTH, SAr2, TSi, TSr} The Responder asserts his identity with the IDr payload, optionallyIKEv2 [Page 9] INTERNET DRAFT January 2003sends one or more certificates (again with the certificate containing the public key used to verify AUTH listed first), authenticates his identity with the AUTH payload, and completes negotiation of aCHILD-SACHILD- SA with the additional fields described below in the CREATE_CHILD_SA exchange. The recipients of messages 3 and 4 MUST verify that all signatures and MACs are computed correctly and that the names in the ID payloads correspond to the keys used to generate the AUTH payload.3.31.3 The CREATE_CHILD_SA Exchange IKEv2 [Page 8] INTERNET DRAFT February 2003 This exchange consists of a single request/response pair, and was referred to as a phase 2 exchange in IKEv1. It MAY be initiated by either end of the IKE-SA after the initial exchange is 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 using a syntax described in section5.14.3.14. Either endpoint may initiate a CREATE_CHILD_SA exchange, so in this section the term Initiator refers to the endpoint initiating this exchange. A CHILD-SA is created by sending a CREATE_CHILD_SA request. 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 exchanged during the CREATE_CHILD_SA exchange, and the Diffie-Hellman value (if KE payloads are included in the CREATE_CHILD_SA exchange). In the CHILD-SA created as part of the initial exchange, a second KE payload and nonce MUST NOT be sent. The nonces from the initial exchange are used in computing the keys for the CHILD-SA. The CREATE_CHILD_SA request contains: 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 in the TSi and TSr payloads. If the SA offers include different Diffie-Hellman groups, KEi must be anIKEv2 [Page 10] INTERNET DRAFT January 2003element of the group the Initiator expects the responder to accept. If she guesses wrong, the CREATE_CHILD_SA exchange will fail and she will have to retry with a different KEi. The message past the header is encrypted and the message including the header is integrity protected using the cryptographic algorithms negotiatedin Phase 1.for the IKE SA. The CREATE_CHILD_SA response contains: <-- HDR, SK {SA, Nr, [KEr], IKEv2 [Page 9] INTERNET DRAFT February 2003 [TSi, TSr]} The Responder replies (using the same Message ID to respond) with the accepted offer in an SA payload, a Diffie-Hellman value in the KEr payload if KEi was included in the request and the selected cryptographic suite includes that group. If the responder chooses a cryptographic suite with a different group, it must reject the request and have the initiator make another one. The traffic selectors for traffic to be sent on that SA are specified in the TS payloads, which may be a subset of what the Initiator of the CHILD-SA proposed. Traffic selectors are omitted if this CREATE_CHILD_SA request is being used to change the key of the IKE- SA.3.41.4 TheInformationalINFORMATIONAL Exchange At various points during the operation of an IKE-SA, peers may desire to convey control messages to each other regarding errors or notifications of certain events. To accomplish this IKE defines anInformationalINFORMATIONAL exchange.InformationalINFORMATIONAL exchangesMUSTMAY ONLY occur after an initial exchange and are cryptographically protected with the negotiated keys. Control messages that pertain to an IKE-SA MUST be sent under that IKE-SA. Control messages that pertain to CHILD-SAs MUST be sent under the protection of the IKE-SA which generated them (or its successor if the IKE-SA was replaced for the purpose of rekeying). Messages in anInformationalINFORMATIONAL Exchange contain zero or moreNotification or DeleteNotification, Delete, and Configuration payloads. The Recipient of anInformationalINFORMATIONAL Exchange request MUST send some response (else the Sender will assume the message was lost in the network and will retransmit it). That response MAY be a message with no payloads. The request message in anInformationalINFORMATIONAL Exchange MAY also contain no payloads. This is the expected way an endpoint can ask the other endpoint to verify that it is alive.IKEv2 [Page 11] INTERNET DRAFT January 2003ESP and AH SAs always exist in pairs, with one SA in each direction. When an SA is closed, both members of the pair MUST be closed. When SAs are nested, as when data (and IP headers if in tunnel mode) are encapsulated first with IPcomp, then with ESP, and finally with AH between the same pair of endpoints, all of the SAs MUST be deleted together. Each endpoint MUST close the SAs it sends on and allow the other endpoint to close the other SA in each pair. To delete an SA, anInformationalINFORMATIONAL Exchange with one or more delete payloads is sent listing the SPIs (as they would be placed in the headers of outbound packets) of the SAs to be deleted. The recipient MUST close the IKEv2 [Page 10] INTERNET DRAFT February 2003 designated SAs. Normally, the reply in theInformationalINFORMATIONAL Exchange will contain delete payloads for the paired SAs going in the other direction. There is one exception. If by chance both ends of a set of SAs independently decide to close them, each may send a delete payload and the two requests may cross in the network. If a node receives a delete request for SAs for which it has already issued a delete request, it MUST delete the incoming SAs while processing the request and the outgoing SAs while processing the response. In that case, the responses MUST NOT include delete payloads for the deleted SAs, since that would result in duplicate deletion and could in theory delete the wrong SA. A node SHOULD regard half open connections as anomalous and audit their existence should they persist. Note that this specification nowhere specifies time periods, so it is up to individual endpoints to decide how long to wait. A node MAY refuse to accept incoming data on half open connections but MUST NOT unilaterally close them and reuse the SPIs. If connection state becomes sufficiently messed up, a node MAY close the IKE-SA which will implicitly close all SAs negotiated under it. It can then rebuild the SAs it needs on a clean base under a new IKE-SA. TheInformationalINFORMATIONAL Exchange is defined as: Initiator Responder ----------- ----------- HDR, SK{N, ..., D,{[N,] [D,] [CP,] ...} --> <-- HDR, SK{N, ..., D,{[N,] [D,] [CP], ...} The processing of anInformationalINFORMATIONAL Exchange is determined by its component payloads.3.51.5 Informational Messages outside of an IKE-SA If a packet arrives with an unrecognised SPI, it could be because the receiving node has recently crashed and lost state or because of some other system malfunction or attack. If the receiving node has an active IKE-SA to the IP address from whence the packet came, it MAYIKEv2 [Page 12] INTERNET DRAFT January 2003send a notification of the wayward packet over that IKE-SA. If it does not, it MAY send an Informational message without cryptographic protection to the source IP address to alert it to a possible problem.42 IKE Protocol Details and Variations IKE normally listens and sends on UDP port 500, though IKE messages may also be received on UDP port 4500 with a slightly differentformat.format (see section 2.23). Since UDP is a datagram (unreliable) IKEv2 [Page 11] INTERNET DRAFT February 2003 protocol, IKE includes in its definition recovery from transmission errors, including packet loss, packet replay, and packet forgery. IKE is designed to function so long as (1) at least one of a series of retransmitted packets reaches its destination before timing out; and (2) the channel is not so full of forged and replayed packets so as to exhaust the network or CPU capacities of either endpoint. Even in the absence of those minimum performance requirements, IKE is designed to fail cleanly (as though the network were broken).4.12.1 Use of Retransmission Timers All messages in IKE exist in pairs: a request and a response. The setup of an IKE-SA normally consists of two request/response pairs. Once the IKE-SA is set up, either end of the security association may initiate requests at any time, and there can be many requests and responses "in flight" at any given moment. But each message is labelled as either a request or a response and for each request/response pair one end of the security association is the Initiator and the other is the Responder. For every pair of messages, the Initiator is responsible for retransmission in the event of a timeout. The Responder MUST never retransmit a response unless it receives a retransmission of the request. In that event, the Responder MUST ignore the retransmitted request except insofar as it triggers a retransmission of the response. The Initiator MUST remember each request until it receives the corresponding response. The Responder MUST remember each response until it receives a request whose sequence number is larger than the sequence number in the response plus his window size (see section4.3).2.3). IKE is a reliable protocol, in the sense that the Initiator MUST retransmit a request until either it receives a corresponding reply OR it deems the IKE security association to have failed and it discards all state associated with the IKE-SA and any CHILD-SAs negotiated using that IKE-SA.4.22.2 Use of Sequence Numbers for Message IDIKEv2 [Page 13] INTERNET DRAFT January 2003Every IKE message contains a Message ID as part of its fixed header. This Message ID is used to match up requests and responses, and to identify retransmissions of messages. The Message ID is a 32 bit quantity, which is zero for the first IKE request in each direction. The IKE-SA initial setup messages will always be numbered 0 and 1. Each endpoint in the IKE Security Association maintains two "current" Message IDs: the next one to be used for a request it initiates and the next one it expects to see in IKEv2 [Page 12] INTERNET DRAFT February 2003 a request from the other end. These counters increment as requests are generated and received. Responses always contain the same message ID as the corresponding request. That means that after the initial exchange, each integer n may appear as the message ID in four distinct messages: The nth request from the original IKE Initiator, the corresponding response, the nth request from the original IKE Responder, and the corresponding response. If the two ends make very different numbers of requests, the Message IDs in the two directions can be very different. There is no ambiguity in the messages, however, because eachpacket contains enough information to determinethe (I)nitiator and (R)eply bits in the message header specify which of the four messages a particular one is. Note that Message IDs are cryptographically protected and provide protection against message replays.4.3In the unlikely event that Message IDs grow too large to fit in 32 bits, the IKE SA MUST be closed. Rekeying and IKE SA resets the sequence numbers. 2.3 Window Size for overlapping requests In order to maximize IKE throughput, an IKE endpoint MAY issue multiple requests before getting a response to any of them. For simplicity, an IKE implementation MAY choose to process requests strictly in order and/or wait for a response to one request before issuing another. Certain rules must be followed to assure interoperability between implementations using different strategies. After an IKE-SA is set up, either end can initiate one or more requests. These requests may pass one another over the network. An IKE endpoint MUST be prepared to accept and process a request while it has a request outstanding in order to avoid a deadlock in this situation. An IKE endpoint SHOULD be prepared to accept and process multiple requests while it has a request outstanding. An IKE endpoint MUST wait for a response to each of its messages before sending a subsequent message unless it has received a Notify message from its peer informing it that the peer is prepared to maintain state for multiple outstanding messages in order to allow greater throughput. An IKE endpoint MUST NOT exceed the peer's stated window size for transmitted IKE requests. In other words, if Bob stated his windowIKEv2 [Page 14] INTERNET DRAFT January 2003size is N, then when Alice needs to make a request X, she MUST wait until she has received responses to all requests up through request X-N. An IKE endpoint MUST keep a copy of (or be able to regenerate exactly) each request it has sent until it receives the corresponding response. An IKE endpoint MUST keep a copy of (or be able to regenerate exactly) the number of previous responses equal to its declared window size in case its response was lost and the Initiator IKEv2 [Page 13] INTERNET DRAFT February 2003 requests its retransmission by retransmitting the request. An IKE endpoint supporting a window size greater than one SHOULD be capable of processing incoming requests out of order to maximize performance in the event of network failures or packet reordering.4.42.4 State Synchronization and Connection Timeouts An IKE endpoint is allowed to forget all of its state associated with an IKE-SA and the collection of corresponding CHILD-SAs at any time. This is the anticipated behavior in the event of an endpoint crash and restart. It is important when an endpoint either fails or reinitializes its state that the other endpoint detect those conditions and not continue to waste network bandwidth by sending packets over those SAs and having them fall into a black hole. Since IKE is designed to operate in spite of Denial of Service (DoS) attacks from the network, an endpoint MUST NOT conclude that the other endpoint has failed based on any routing information (e.g. ICMP messages) or IKE messages that arrive without cryptographic protection (e.g., notify messages complaining about unknown SPIs). An endpoint MUST conclude that the other endpoint has failed only when repeated attempts to contact it have gone unanswered for a timeout period or when a cryptographically protected INITIAL-CONTACT notification is received on a different IKE-SA to the same authenticated identity. An endpoint SHOULD suspect that the other endpoint has failed based on routing information and initiate a request to see whether the other endpoint is alive. To check whether the other side is alive, IKE specifies an emptyInformationalINFORMATIONAL message that (like all IKE requests) requires an acknowledgment. If a cryptographically protected message has been received from the other side recently, unprotected notifications MAY be ignored. Implementations MUST limit the rate at which they take actions based on unprotected messages. Numbers of retries and lengths of timeouts are not covered in this specification because they do not affect interoperability. It is suggested that messages be retransmitted at least a dozen times over a period of at least several minutes before giving up on an SA, but different environments may require different rules. If there has only been outgoing traffic on all of the SAs associated with an IKE-SA, itIKEv2 [Page 15] INTERNET DRAFT January 2003is essential to confirm liveness of the other endpoint to avoid black holes. If no cryptographically protected messages have been received on an IKE-SA or any of its CHILD-SAs recently, a liveness check MUST be performed. Receipt of a fresh cryptographically protected message on an IKE-SA or any of its CHILD-SAs assures liveness of the IKE-SA and all of its CHILD-SAs. Note that this places requirements on the failure modes of an IKE endpoint. An implementation MUST NOT continue IKEv2 [Page 14] INTERNET DRAFT February 2003 sending on any SA if some failure prevents it from receiving on all of the associated SAs. If CHILD-SAs can fail independently from one another without the associated IKE-SA being able to send a delete message, then they MUST be negotiated by separate IKE-SAs. There is a Denial of Service attack on the Initiator of an IKE-SA that can be avoided if the Initiator takes the proper care. Since the first two messages of an SA setup are not cryptographically protected, an attacker could respond to the Initiator's message before the genuine Responder and poison the connection setup attempt. To prevent this, the Initiator MAY be willing to accept multiple responses to its first message, treat each as potentially legitimate, respond to it, and then discard all the invalid half open connections when she receives a valid cryptographically protected response to any one of her requests. Once a cryptographically valid response is received, all subsequent responses should be ignored whether or not they are cryptographically valid. Note that with these rules, there is no reason to negotiate and agree upon an SA lifetime. If IKE presumes the partner is dead, based on repeated lack of acknowledgment to an IKE message, then the IKE SA and all CHILD-SAs set up through that IKE-SA are deleted. An IKE endpoint may at any time delete inactive CHILD-SAs to recover resources used to hold their state. If an IKE endpoint chooses to do so, it MUST send Delete payloads to the other end notifying it of the deletion. It MAY similarly time out the IKE-SA. Closing the IKE-SA implicitly closes all associated CHILD-SAs. In this case, an IKE endpoint SHOULD send a Delete payload indicating that it has closed the IKE-SA.4.52.5 Version Numbers and Forward Compatibility This document describes version 2.0 of IKE, meaning the major version number is 2 and the minor version number is zero. It is likely that some implementations will want to support both version 1.0 and version 2.0, and in the future, other versions. The major version number should only be incremented if the packet formats or required actions have changed so dramatically that an older version node would not be able to interoperate with a newerIKEv2 [Page 16] INTERNET DRAFT January 2003version node if it simply ignored the fields it did not understand and took the actions specified in the older specification. The minor version number indicates new capabilities, and MUST be ignored by a node with a smaller minor version number, but used for informational purposes by the node with the larger minor version number. For example, it might indicate the ability to process a newly defined notification message. The node with the larger minor version number IKEv2 [Page 15] INTERNET DRAFT February 2003 would simply note that its correspondent would not be able to understand that message and therefore would not send it. If an endpoint receives a message with a higher major version number, it MUST drop the message and SHOULD send an unauthenticated notification message containing the highest version number it supports. If an endpoint supports major version n, and major version m, it MUST support all versions between n and m. If it receives a message with a major version that it supports, it MUST respond with that version number. In order to prevent two nodes from being tricked into corresponding with a lower major version number than the maximum that they both support, IKE has a flag that indicates that the node is capable of speaking a higher major version number. Thus the major version number in the IKE header indicates the version number of the message, not the highest version number that the transmitter supports. If A is capable of speaking versions n, n+1, and n+2, and B is capable of speaking versions n and n+1, then they will negotiate speaking n+1, where A will set the flag indicating ability to speak a higher version. If they mistakenly (perhaps through an active attacker sending error messages) negotiate to version n, then both will notice that the other side can support a higher version number, and they MUST break the connection and reconnect using version n+1. Note that IKEv1 does not follow these rules, because there is no way in v1 of noting that you are capable of speaking a higher version number. So an active attacker can trick two v2-capable nodes into speaking v1. When a v2-capable node negotiates down to v1, it SHOULD note that fact in its logs. Also for forward compatibility, all fields marked RESERVED MUST be set to zero by a version 2.0 implementation and their content MUST be ignored by a version 2.0 implementation ("Be conservative in what you send and liberal in what you receive"). In this way, future versions of the protocol can use those fields in a way that is guaranteed to be ignored by implementations that do not understand them. Similarly, payload types that are not defined are reserved for future use and implementations of version 2.0 MUST skip over those payloads and ignore their contents. IKEv2[Page 17] INTERNET DRAFT January 2003 IKEv2adds a "critical" flag to each payload header for further flexibility for forward compatibility. If the critical flag is set and the payload type is unrecognised, the message MUST be rejected and the response to the IKE request containing that payload MUST include a notify payload UNSUPPORTED-CRITICAL-PAYLOAD, indicating an unsupported critical payload was included. If the critical flag is not set and the payload type is unsupported, that payload MUST be IKEv2 [Page 16] INTERNET DRAFT February 2003 ignored. While new payload types may be added in the future and may appear interleaved with the fields defined in this specification, implementations MUST send the payloads defined in this specification in the order shown in section 3 and implementations SHOULD reject as invalid a message with payloads in any other order.4.62.6 Cookies The term "cookies" originates with Karn and Simpson [RFC 2522] in Photuris, an early proposal for key management with IPsec. It has persisted because the IETF has never rejected a proposal involving cookies. The ISAKMP fixed message header includes two eight octet fields titled "cookies", and that syntax is used by both IKEv1 and IKEv2 though in IKEv2 they are referred to as the IKE SPI and there is a new separate field in a NOTIFY payload holding the cookie. The initial two eight octet fields in the header are used as a connection identifier at the beginning of IKE packets. Each endpoint chooses one of the two SPIs and SHOULD choose them so as to be unique identifiers of an IKE-SA. An SPI value of zero is special and indicates that the remote SPI value is not yet known by the sender. Unlike ESP and AH where only the recipient's SPI appears in the header of a message, in IKE the sender's SPI is also sent in every message. Since the SPI chosen by the original initiator of the IKE-SA is always sent first, an endpoint with multiple IKE-SAs open that wants to find the appropriate IKE-SA using the SPI it assigned must look at the I(nitiator) Flag bit in the header to determine whether it assigned the first or the second eight octets. In the first message of an initial IKE exchange, the initiator will not know the responder's SPI value and will therefore set that field to zero. An expected attack against IKE is state and CPU exhaustion, where the target is flooded with session initiation requests from forged IP addresses. This attack can be made less effective if an implementation of a responder uses minimal CPU and commits no state to an SA until it knows the initiator can receive packets at the address from which he claims to be sending them. To accomplish this,IKEv2 [Page 18] INTERNET DRAFT January 2003a responder SHOULD - when it detects a large number of half-openIKE-SAsIKE- SAs - reject initial IKE messages unless they contain a notify payload of type "cookie". It SHOULD instead send an unprotected IKE message as a response and include its cookie in a notify payload. Initiators who receive such responses MUST retry the IKE_SA_INIT with the responder supplied cookie as the first payload. The initial exchange will then be as follows: IKEv2 [Page 17] INTERNET DRAFT February 2003 Initiator Responder ----------- ----------- HDR(A,0), SAi1, KEi, Ni --> <-- HDR(A,0), N(COOKIE-REQUIRED), N(COOKIE) HDR(A,0), N(COOKIE), SAi1, KEi, Ni --> <-- HDR(A,B), SAr1, KEr, Nr, [CERTREQ] HDR(A,B), SK {IDi, [CERT,] [CERTREQ,] [IDr,] AUTH, SAi2, TSi, TSr} --> <-- HDR(A,B), SK {IDr, [CERT,] AUTH, SAr2, TSi, TSr} The first two messages do not affect any initiator or responder state except for communicating the cookie. In particular, the message sequence numbers in the first four messages will all be zero and the message sequence numbers in the last two messages will be one. An IKE implementation SHOULD implement its responder cookie generation is such a way as to not require any saved state to recognise its valid cookie when the second IKE_SA_INIT message arrives. The exact algorithms and syntax they use to generate cookies does not affect interoperability and hence is not specified here. The following is an example of how an endpoint could use cookies to implement limited DOS protection. A good way to do this is to set the responder cookie to be: Cookie = <SecretVersionNumber> | Hash(IPi | SPIi | <secret>) where <secret> is a randomly generated secret known only to the responder and periodically changed. <SecretVersionNumber> should be changed whenever <secret> is regenerated.This valueThe cookie can be recomputed when the IKE_SA_INIT arrives the second time and compared to the cookie in the received message. If it matches, the responderIKEv2 [Page 19] INTERNET DRAFT January 2003knows that SPIr was generated since the last change to <secret> and that IPi must be the same as the source address it saw the first time. Incorporating SPIi into the calculation assures that if multiple IKE-SAs are being set up in parallel they will all get different cookies (assuming the initiator chooses unique SPIi's). If a new value for <secret> is chosen while there are connections in the process of being initialized, an IKE_SA_INIT might be returned IKEv2 [Page 18] INTERNET DRAFT February 2003 with other than the current <SecretVersionNumber>. The responder in that case MAY reject the message by sending another response with a new cookie or it MAY keep the old value of <secret> around for a short time and accept cookies computed from either one. The responder SHOULD NOT accept cookies indefinitely after <secret> is changed, since that would defeat part of the denial of service protection.4.72.7 Cryptographic Algorithm Negotiation The payload type known as "SA" indicates a proposal for a set of choices of protocols (IKE, ESP, and/or AH) for the SA as well as cryptographic algorithms associated with each protocol. An SA consists of one or more proposals. Each proposal includes a Suite-ID, which implies one or more protocols and the associated cryptographic algorithms. Since Alice sends her Diffie-Hellman value in the IKE_SA_INIT, she must guess at the Diffie-Hellman group that Bob will select from her list of supported cryptographic suites. If she guesses wrong, Bob will respond with a NOTIFY payload of type INVALID-KE-PAYLOAD indicating the selected cryptographic suite. In this case, Alice MUST retry the IKE_SA_INIT with the corrected Diffie-Hellman group. Alice MUST again propose her full set of acceptable cryptographic suites because the rejection message was unauthenticated and otherwise an active attacker could trick Alice and Bob into negotiating a weaker suite than a stronger one that they both prefer.4.82.8 Rekeying IKE, ESP, and AH security associations use secret keys which SHOULD only be used for a limited amount of time and to protect a limited amount of data. This limits the lifetime of the entire security association. When the lifetime of a security association expires the security association MUST NOT be used. If there is demand, new security associations MAY be established. Reestablishment of security associations to take the place of ones which expire is referred to as "rekeying".IKEv2 [Page 20] INTERNET DRAFT January 2003To rekey a CHILD-SA, create a new, equivalent SA (see section4.172.17 below), and when the new one is established, delete the old one. To rekey an IKE-SA, establish a new equivalent IKE-SA (see section4.202.18 below) with the peer to whom the old IKE-SA is shared using aPhase 2 negotiationCREATE_CHILD_SA within the existing IKE-SA. An IKE-SA so created inherits all of the original IKE-SA's CHILD-SAs. Use the new IKE-SA for all control messages needed to maintain the CHILD-SAs created by IKEv2 [Page 19] INTERNET DRAFT February 2003 the old IKE-SA, and delete the old IKE-SA. The Delete payload to delete itself MUST be the last request sent over an IKE-SA. SAs SHOULD be rekeyed proactively, i.e., the new SA should be established before the old one expires and becomes unusable. Enough time should elapse between the time the new SA is established and the old one becomes unusable so that traffic can be switched over to the new SA. A difference between IKEv1 and IKEv2 is that in IKEv1 SA lifetimes were negotiated. In IKEv2, each end of the SA is responsible for enforcing its own lifetime policy on the SA and rekeying the SA when necessary. If the two ends have different lifetime policies, the end with the shorter lifetime will end up always being the one to request the rekeying. If an SA bundle has been inactive for a long time and if an endpoint would not initiate the SA in the absense of traffic, the endpoint MAY choose to close the SA instead of rekeying it when its lifetime expires. It SHOULD do so if there has been no traffic since the last time the SA was rekeyed. If the two ends have the same lifetime policies, it is possible that both will initiate a rekeying at the same time (which will result in redundant SAs). To reduce the probability of this happening, the timing of rekeying requests SHOULD be jittered (delayed by a random amount of time after the need for rekeying is noticed). This form of rekeying may temporarily result in multiple similar SAs between the same pairs of nodes. When there are two SAs eligible to receive packets, a node MUST accept incoming packets through either SA. An endpoint SHOULD wait a random amount of time before closing a redundant SA to prevent cycling. The node that initiated the rekeyed SA SHOULD delete the replaced SA after the new one is established.4.92.9 Traffic Selector Negotiation When an IP packet is received by an RFC2401 compliant IPsec subsystem and matches a "protect" selector in its SPD, the subsystem MUST protect that packet with IPsec. When no SA exists yet it is the task of IKE to create it. Maintenance of of a system's SPD is outside theIKEv2 [Page 21] INTERNET DRAFT January 2003scope of IKE (see [PFKEY] for an example protocol), though some implementations might update their SPD in connection with the running of IKE (for an example scenario, see section3.1.3).1.1.3). Traffic Selector (TS) payloads allow endpoints to communicate some of the information from their SPD to their peers. TS payloads specify the selection criteria for packets that will be forwarded over the IKEv2 [Page 20] INTERNET DRAFT February 2003 newly set up SA. This can serve as a consistency check in some scenarios to assure that the SPDs are consistent. In others, it guides the dynamic update of the SPD. Two TS payloads appear in each of the messages in the exchange that creates a CHILD-SA pair. Each TS payload contains one or more Traffic Selectors. Each Traffic Selector consists of an address range (IPv4 or IPv6), a port range, and a protocol ID. In support of the scenario described in section3.1.3,1.1.3, an initiator may request that the responder assign an IP address and tell the initiator what it is. IKEv2 allows the responder to choose a subset of the traffic proposed by the initiator. This could happen when the configuration of the two endpoints are being updated but only one end has received the new information. Since the two endpoints may be configured by different people, the incompatibility may persist for an extended period even in the absense of errors. It also allows for intentionally different configurations, as when one end is configured to tunnel all addresses and depends on the other end to have the up to date list. The first of the two TS payloads is known as TSi (Traffic Selector- initiator). The second is known as TSr (Traffic Selector-responder). TSi specifies the source address of traffic forwarded from (or the destination address of traffic forwarded to) the initiator of the CHILD-SA pair. TSr specifies the destination address of the traffic forwarded from (or the source address of the traffic forwarded to) the responder of the CHILD-SA pair. For example, if Alice initiates the creation of the CHILD-SA pair from Alice to Bob, and wishes to tunnel all traffic from subnet 10.2.16.* on Alice's side to subnet 18.16.*.* on Bob's side, Alice would include a single traffic selector in each TS payload. TSi would specify the address range (10.2.16.0 - 10.2.16.255) and TSr would specify the address range (18.16.0.0 - 18.16.255.255). Assuming that proposal was acceptable to Bob, he would send identical TS payloads back. The Responder is allowed to narrow the choices by selecting a subset of the traffic, for instance by eliminating or narrowing the range of one or more members of the set of traffic selectors, provided the set does not become the NULL set. It is possible for the Responder's policy to contain multiple smallerIKEv2 [Page 22] INTERNET DRAFT January 2003ranges, all encompassed by the Initiator's traffic selector, and with the Responder's policy being that each of those ranges should be sent over a different SA. Continuing the example above, Bob might have a policy of being willing to tunnel those addresses to and from Alice, but might require that each address pair be on a separately negotiated CHILD-SA. If Alice generated her request in response to an incoming packet from 10.2.16.43 to 18.16.2.123, there would be no way IKEv2 [Page 21] INTERNET DRAFT February 2003 for Bob to determine which pair of addresses should be included in this tunnel, and he would have to make his best guess or reject the request with a status of SINGLE-PAIR-REQUIRED. To enable Bob to choose the appropriate range in this case, if Alice has initiated the SA due to a data packet, Alice MAY include as the first traffic selector in each of TSi and TSr a very specific traffic selector including the addresses in the packet triggering the request. In the example, Alice would include in TSi two traffic selectors: the first containing the address range (10.2.16.43 - 10.2.16.43) and the source port and protocol from the packet and the second containing (10.2.16.0 - 10.2.16.255) with all ports and protocols. She would similarly include two traffic selectors in TSr. If Bob's policy does not allow him to accept the entire set of traffic selectors in Alice's request, but does allow him to accept the first selector of TSi and TSr, then Bob MUST narrow the traffic selectors to a subset that includes Alice's first choices. In this example, Bob might respond with TSi being (10.2.16.43 - 10.2.16.43) with all ports and protocols. If Alice creates the CHILD-SA pair not in response to an arriving packet, but rather - say - upon startup, then there may be no specific addresses Alice prefers for the initial tunnel over any other. In that case, the first values in TSi and TSr MAY be ranges rather than specific values, and Bob chooses a subset of Alice's TSi and TSr that are acceptable to him. If more than one subset is acceptable but their union is not, Bob MUST accept some subset and MAY include a NOTIFY payload of type ADDITIONAL-TS-POSSIBLE to indicate that Alice might want to try again. This case will only occur when Alice and Bob are configured differently from one another. If Alice and Bob agree on the granularity of tunnels, she will never request a tunnel wider than Bob will accept.4.102.10 Nonces The IKE_SA_INIT messages each contain a nonce. These nonces are used as inputs to cryptographic functions. The CREATE_CHILD_SA request and the CREATE_CHILD_SA response also contain nonces. These nonces are used to add freshness to the key derivation technique used to obtain keys for CHILD-SAs. Nonces used in IKEv2 MUST therefore beIKEv2 [Page 23] INTERNET DRAFT January 2003randomly chosen and of size at least equal to the key size of the strongest cryptographic algorithm used.4.112.11 Address and Port Agility IKE runs over UDP ports 500 and 4500, and implicitly sets up ESP and AH associations for the same IP addresses it runs over. The IP IKEv2 [Page 22] INTERNET DRAFT February 2003 addresses and ports in the outer header are, however, not themselves cryptographically protected, and IKE is designed to work even through Network Address Translation (NAT) boxes. An implementation MUST accept incoming connection requests even if not received from UDP port 500 or 4500, and MUST respond to the address and port from which the request was received. IKE functions identically over IPv4 or IPv6.4.122.12 Reuse of Diffie-Hellman Exponentials IKE generates keying material using an ephemeral Diffie-Hellman exchange in order to gain the property of "perfect forward secrecy". This means that once a connection is closed and its corresponding keys are forgotten, even someone who has recorded all of the data from the connection and gets access to all of the long term keys of the two endpoints cannot reconstruct the keys used to protect the conversation. Achieving perfect forward secrecy requires that when a connection is closed, each endpoint must forget not only the keys used by the connection but any information that could be used to recompute those keys. In particular, it must forget the secrets used in the Diffie- Hellman calculation and any state that may persist in the state of a pseudo-random number generater that could be used to recompute the Diffie-Hellman secrets. Since the computing of Diffie-Hellman exponentials is computationally expensive, an endpoint may find it advantageous to reuse those exponentials for multiple connection setups. There are several reasonable strategies for doing this. An endpoint could choose a new exponential only periodically though this could result in less-than- perfect forward secrecy if some connection lasts for less than the lifetime of the exponential. Or it could keep track of which exponential was used for each connection and delete the information associated with the exponential only when some corresponding connection was closed. This would allow the exponential to be reused without losing perfect forward secrecy at the cost of maintaining more state. Decisions as to whether and when to reuse Diffie-Hellman exponentials is a private decision in the sense that it will not affectIKEv2 [Page 24] INTERNET DRAFT January 2003interoperability. An implementation that reuses exponentialsmayMAY choose to remember the exponential used by the other endpoint on past exchanges and if one is reused to avoid the second half of the calculation.4.132.13 Generating Keying Material IKEv2 [Page 23] INTERNET DRAFT February 2003 In the context of the IKE-SA, three cryptographic algorithms are negotiated: an encryption algorithm, a Diffie-Hellman group, and a pseudo-random function (prf). The pseudo-random function is used both for integrity protection of the IKE payloads and for the construction of keying material for all of the cryptographic algorithms used in both the IKE-SA and the CHILD-SAs. We assume that each cryptographic algorithm accepts a fixed size key, and that any randomly chosen value of that fixed size can serve as an appropriate key. For functions that accept a variable length key, a fixed key size MUST be specified as part of the cryptographic suite negotiated. For prf functions based on HMAC, the fixed key size is the size of the output of the HMAC. Keying material will always be derived as the output of the negotiated prf algorithm. Since the amount of keying material needed may be greater than the size of the output of the prf algorithm, we will use the prf iteratively. We will use the terminology prf+ to describe the function that outputs a pseudo-random stream based on the inputs to a prf as follows: (where | indicates concatenation) prf+ (K,S) = T1 | T2 | T3 | T4 | ... where: T1 = prf (K, S | 0x01) T2 = prf (K, T1 | S | 0x02) T3 = prf (K, T2 | S | 0x03) T4 = prf (K, T3 | S | 0x04) continuing as needed to compute all required keys. The keys are taken from the output string without regard to boundaries (e.g. if the required keys are a 256 bit AES key and a 160 bit HMAC key, and the prf function generates 160 bits, the AES key will come from T1 and the beginning of T2, while the HMAC key will come from the rest of T2 and the beginning of T3). The constant concatenated to the end of each string feeding the prf is a single octet. prf+ in this document is not defined beyond 255 times the size of the prf output.4.142.14 Generating Keying Material for the IKE-SAIKEv2 [Page 25] INTERNET DRAFT January 2003The shared keys are computed as follows. A quantity called SKEYSEED is calculated from the nonces exchanged during the IKE_SA_INIT exchange and the Diffie-Hellman shared secret established during that exchange. SKEYSEED is used to calculate five other secrets: SK_d used for deriving new keys for the CHILD-SAs established with this IKE-SA; SK_ai and SK_ar used as a key to the prf algorithm for IKEv2 [Page 24] INTERNET DRAFT February 2003 authenticating the component messages of subsequent exchanges; and SK_ei and SK_er used for encrypting (and of course decrypting) all subsequent exchanges. SKEYSEED and its derivatives are computed as follows: SKEYSEED = prf(Ni | Nr, g^ir) {SK_d, SK_ai, SK_ar, SK_ei, SK_er} = prf+ (SKEYSEED, g^ir | Ni | Nr |CKY-ISPIi |CKY-R)SPIr ) (indicating that the quantities SK_d, SK_ai, SK_ar, SK_ei, and SK_er are taken in order from the generated bits of the prf+). g^ir is the shared secret from the ephemeral Diffie-Hellman exchange. g^ir is represented as a string of octets in big endian order padded with zeros if necessary to make it the length of the modulus. Ni and Nr are the nonces, stripped of any headers. The two directions of flow use different keys. The keys used to protect messages from the original initiator are SK_ai and SK_ei. The keys used to protect messages in the other direction are SK_ar and SK_er. Each algorithm takes a fixed number of bits of keying material, which is specified as part of the algorithm. For integrity algorithms based on HMAC, the key size is always equal to the length of the underlying hash function.4.152.15 Authentication of the IKE-SATheWhen not using extended authentication (see section 2.16), the peers are authenticated by having each sign (or MAC using a shared secret as the key) a block of data. For the responder, the octets to be signed start with the first octet of the first SPI in the header of the second message and end with the last octet of the last payload in the second message. Appended to this (for purposes of computing the signature) is the initiator's nonce Ni (just the value, not the payload containingit).it) and the contents of the responder's ID payload (excluding fixed header). Similarly, the initiator signs the first message, starting with the first octet of the first SPI in the header and ending with the last octet of the last payload. Appended to this (for purposes of computing the signature) is the responder's nonceNr.Nr and the initiator's ID payload (excluding fixed header). It is critical to the security of the exchange that each side sign the other side's nonce. Note that all of the payloads are included under the signature, including any payload types not defined in this document. If the first message of the exchange is sent twice (the second time with a responder cookie and/or a different Diffie-Hellman group), it is theIKEv2 [Page 26] INTERNET DRAFT January 2003second version of the message that is signed. IKEv2 [Page 25] INTERNET DRAFT February 2003 Optionally, messages 3 and 4 MAY include a certificate, or certificate chain providing evidence that the key used to compute a digital signature belongs to the name in the ID payload. The signature or MAC will be computed using algorithms dictated by the type of key used by the signer, an RSA-signed PKCS1-padded-hash for an RSA digital signature, a DSS-signed SHA1-hash for a DSA digital signature, or the negotiated PRF function for a pre-shared key. There is no requirement that the Initiator and Responder sign with the same cryptographic algorithms. The choice of cryptographic algorithms depends on the type of key each has. This type is either indicated in the certificate supplied or, if the keys were exchanged out of band, the key types must have been similarly learned. In particular, the initiator may be using a shared key while the responder may have a public signature key and certificate. It will commonly be the case (but it is not required) that if a shared secret is used for authentication that the same key is used in both directions. Note that it is a common but insecure practice to have a shared key derived from a user chosen password. This is insecure because user chosen passwords are unlikely to have sufficient randomness to resist dictionary attacks. The pre-shared key SHOULD contain as much randomness as the strongest key being negotiated. In the case of a pre-shared key, the AUTH value is computed as: AUTH = prf(Shared Secret | "Key Pad for IKEv2", <message bytes>) where the string "Key Pad for IKEv2" is ASCII encoded and not null terminated. The shared secret can be variable length. The pad string is added so that if the shared secret is derived from a password, this exchange will not compromise use of the same password in other protocols. As noted above, deriving the shared secret from a password is not secure. This construction is used because it is anticipated that people will do it anyway.4.16 Generating Keying Material2.16 Extended Authentication Protocol Methods In addition to authentication using public key signatures and shared secrets, IKE supports authentication using methods defined in RFC 2284 [EAP]. Typically, these methods are asymmetric (designed forCHILD-SAs CHILD-SAsa user authenticating to a server), and they may not be mutual. For this reason, these protocols arecreated either by being piggybacked ontypically used to authenticate thephase 1 exchange, orinitiator to the responder and are used in addition to aphase 2 CREATE_CHILD_SA exchange. Keying material for them is generated as follows: KEYMAT = prf+(SK_d, Ni | Nr) Where Ni and Nr arepublic key signature based authentication of theNonces fromresponder to theIKE_SA_INIT exchange ifinitator. These methods are also referred to as "Legacy Authentication" mechanisms. While thisrequest is the first CHILD-SA created ormemo references [EAP] with thefresh Ni and Nr fromintent that new methods can be added in theCREATE_CHILD_SA exchange iffuture without updating thisis a subsequent creation. For phase 2 exchanges with PFSspecification, thekeying material is defined as:protocols expected to be used most commonly are fully documented here IKEv2 [Page27]26] INTERNET DRAFTJanuaryFebruary 2003KEYMAT = prf+(SK_d, g^ir (ph2) | Ni | Nr ) where g^ir (ph2) is the shared secret from the ephemeral Diffie- Hellman exchange of this phase 2 exchange, A single CHILD-SA negotiation may result in multiple security associations. ESPandAH SAs exist in pairs (one in each direction), and four SAs could be createdin section 3.16. [EAP] defines an authentication protocol requiring asingle CHILD-SA negotiation if a combinationvariable number ofESP and AH is being negotiated. KEYMATmessages. Extended Authentication isgeneratedimplemented in IKE asdescribedadditional IKE_AUTH exchanges that MUST be completed insection 4.13. Keying material is taken fromorder to initialize theexpanded KEYMAT inIKE-SA. An initiator indicates a desire to use extended authentication by leaving out thefollowing order: All keys for SAs carrying dataAUTH payload from message 3. By including an IDi payload but not an AUTH payload, the initiatortohas declared an identity but has not proven it. If the responderare taken before SAs going in the reverse direction. If multiple protocols are negotiated, keying materialistaken in the order in which the protocol headers will appearwilling to use an extended authentication method, it will place an EAP payload inthe encapsulated packet. If a single protocol has both encryptionmessage 4 and defer sending SAr2, TSi, and TSr until initiator authenticationkeys, the encryption keyistaken fromcomplete in a subsequent IKE_AUTH exchange. In thefirst octetscase ofKEYMAT and the authentication key is taken froma minimal extended authentication, thenext octets. Each cryptographic algorithm takesinitial SA establishment will appear as follows: Initiator Responder ----------- ----------- HDR, SAi1, KEi, Ni --> <-- HDR, SAr1, KEr, Nr, [CERTREQ] HDR, SK {IDi, [CERTREQ,] [IDr,] SAi2, TSi, TSr} --> <-- HDR, SK {IDr, [CERT,] AUTH, EAP } HDR, SK {EAP, [AUTH] } --> <-- HDR, SK {EAP, [AUTH], SAr2, TSi, TSr } For EAP methods that create afixed number of bits of keying material specifiedshared key aspart of the algorithm. 4.17 Rekeying IKE-SAs usingaCREATE_CHILD_SA exchange The CREATE_CHILD_SA exchange canside effect of authentication, that shared key MUST be usedto re-key an existing IKE-SA (see section 4.8). Newby both the Initiator and ResponderSPIs are supplied into generate an AUTH payload using theSPI fields.syntax for shared secrets specified in section 2.15. This shared key MUST NOT be used for any other purpose. TheTS payloads are omitted when rekeyingInitiator of anIKE-SA. SKEYSEED for the newIKE-SAis computedusingSK_d from the existing IKE-SA as follows: SKEYSEED = prf(SK_d (old), [g^ir (ph2)] | Ni | Nr) where g^ir (ph2) is the shared secret from the ephemeral Diffie- Hellman exchangeEAP SHOULD be capable ofthis phase 2extending the initial protocol exchangeand Ni and Nr areto at least ten IKE_AUTH exchanges in thetwo nonces stripped of any headers.event the Responder sends notification messages and/or retries the authentication prompt. Thenew IKE-SA MUST reset its message counters to 0. SK_d, SK_ai, SK_ar, and SK_ei,protocol terminates when the Responder sends the Initiator andSK_erEAP payload containing either a success or failure type. 2.17 Generating Keying Material for CHILD-SAs CHILD-SAs arecomputed from SKEYSEED as specified in section 4.14. 4.18 Requesting an internal addresscreated either by being piggybacked ona remote networkthe IKE_AUTH IKEv2 [Page28]27] INTERNET DRAFTJanuaryFebruary 2003Most commonlyexchange, or in a CREATE_CHILD_SA exchange. Keying material for them is generated as follows: KEYMAT = prf+(SK_d, Ni | Nr) Where Ni and Nr are theendpoint to gateway scenario, an endpoint may need an IP address onNonces from thegateway's internal network, and may need to have that address dynamically assigned. A request for such a temporary address can be included in anyIKE_SA_INIT exchange if this requestto create ais the first CHILD-SA(includingcreated or theimplicit request in message 3) by including a CP payload. This function provides address allocation to an IRAC trying to tunnel into a network protected by an IRAS. Sincefresh Ni and Nr from theIKE_SA_AUTHCREATE_CHILD_SA exchangecreates an IKE-SA andif this is aCHILD-SAsubsequent creation. For CREATE_CHILD_SA exchanges with PFS theIRAC MUST requestkeying material is defined as: KEYMAT = prf+(SK_d, g^ir (ph2) | Ni | Nr ) where g^ir (ph2) is theinternal address, and optionally other information concerningshared secret from theinternal network,ephemeral Diffie- Hellman exchange of this CREATE_CHILD_SA exchange (represented as an octet string in big endian order padded with zeros if necessary to make it theIKE_SA_AUTH exchange. The may IRAS procure an internal address for the IRAC from any numberlength ofsources such asthe modulus), A single CHILD-SA negotiation may result in multiple security associations. ESP and AH SAs exist in pairs (one in each direction), and four SAs could be created in aDHCP/BOOTP server or its own address pool. Initiator Responder ----------------------------- --------------------------- HDR, SAi1, KEi, Ni, Nr, SK {IDi, [CERT,] [CERTREQ,] [IDr,] AUTH, CP(CFG_REQUEST), SAi2, TSi, TSr} --> <-- HDR, SK {IDr, [CERT,] AUTH, CP(CFG_REPLY), SAr2, TSi, TSr} CP(CFG_REQUEST) MUST contain at least an INTERNAL_ADDRESS attribute (either IPv4 or IPv6) but MAY contain any numbersingle CHILD-SA negotiation if a combination ofadditional attributesESP and AH is being negotiated. KEYMAT is generated as described in section 2.13. Keying material is taken from theinitiator wants returnedexpanded KEYMAT in theresponse. For example, messagefollowing order: All keys for SAs carrying data fromInitiatorthe initiator toResponder: CP(CFG_REQUEST)= INTERNAL_ADDRESS(0.0.0.0) INTERNAL_NETMASK(0.0.0.0) INTERNAL_DNS(0.0.0.0) TSi = (0, 0-65536,0.0.0.0-255.255.255.255) TSr = (0, 0-65536,0.0.0.0-255.255.255.255) NOTE: Traffic Selectorsthe responder area (protocol, port range, address range) Message from Responder to Initiator: CP(CFG_REPLY)= INTERNAL_ADDRESS(192.168.219.202) INTERNAL_NETMASK(255.255.255.0) INTERNAL_SUBNET(192.168.219.0/255.255.255.0) TSi = (0, 0-65536,192.168.219.202-192.168.219.202) TSr = (0, 0-65536,192.168.219.0-192.168.219.255) IKEv2 [Page 29] INTERNET DRAFT January 2003 All returned values will be implementation dependent. As can be seentaken before SAs going in theabove example,reverse direction. If multiple protocols are negotiated, keying material is taken in theIRAS MAY also send other attributes that were not includedorder inCP(CFG_REQUEST) and MAY ignorewhich thenon- mandatory attributes that it does not support. 4.19 Requestingprotocol headers will appear in thePeer's Version An IKE peer wishing to inquire about the other peer's version information MUST useencapsulated packet. If a single protocol has both encryption and authentication keys, themethod below. Thisencryption key isan example of a configuration request within an Informational Exchange, aftertaken from theIKE-SA andfirstCHILD-SA have been created. An IKE implementation MAY decline to give out version information prior to authentication or even afteroctets of KEYMAT and the authenticationto prevent trolling in case some implementationkey isknowntaken from the next octets. Each cryptographic algorithm takes a fixed number of bits of keying material specified as part of the algorithm. 2.18 Rekeying IKE-SAs using a CREATE_CHILD_SA exchange The CREATE_CHILD_SA exchange can be used tohave some security weakness. In that case, it MUST returnre-key anempty string.existing IKE-SA (see section 2.8). New Initiator and Responder----------------------------- -------------------------- HDR, SK{CP(CFG_REQUEST)} --> <-- HDR, SK{CP(CFG_REPLY)} CP(CFG_REQUEST)= APPLICATION_VERSION("") CP(CFG_REPLY) APPLICATION_VERSION("foobar v1.3beta, (c) Foo Bar Inc.") 4.20 Error Handling ThereSPIs aremany kinds of errors that can occur during IKE processing. If a request is received that is badly formatted or unacceptable for reasons of policy (e.g. no matching cryptographic algorithms), the response MUST contain a Notify payload indicatingsupplied in theerror. IfSPI fields. The TS payloads are omitted when rekeying anerror occurs outsideIKE-SA. SKEYSEED for thecontext of an IKE request (e.g.new IKE-SA is computed using SK_d from thenodeexisting IKEv2 [Page 28] INTERNET DRAFT February 2003 IKE-SA as follows: SKEYSEED = prf(SK_d (old), [g^ir (ph2)] | Ni | Nr) where g^ir (ph2) isgetting ESP messages on a non-existent SPI),thenode SHOULD initiateshared secret from the ephemeral Diffie- Hellman exchange of this CREATE_CHILD_SA exchange (represented as anInformational Exchangeoctet string in big endian order padded witha Notify payload describingzeros if necessary to make it theproblem. Errors that occur before a cryptographically protectedlength of the modulus) and Ni and Nr are the two nonces stripped of any headers. The new IKE-SAis established must be handled very carefully. There is a trade-off between wantingMUST reset its message counters tobe helpful0. SK_d, SK_ai, SK_ar, and SK_ei, and SK_er are computed from SKEYSEED as specified indiagnosingsection 2.14. 2.19 Requesting an internal address on aproblem and respondingremote network Most commonly in the endpoint toitgateway scenario, an endpoint may need an IP address on the gateway's internal network, andwantingmay need toavoid beinghave that address dynamically assigned. A request for such adupetemporary address can be included in any request to create adenial of service attack based on forged messages. IfCHILD-SA (including the implicit request in message 3) by including anode receivesCP payload. This function provides address allocation to an IRAC trying to tunnel into amessage on UDP port 500 outsidenetwork protected by an IRAS. Since thecontext ofIKE_AUTH exchange creates an IKE-SAknown to it (and notand a CHILD-SA the IRAC MUST requestto start one), it may betheresult of a recent crash ofinternal address, and optionally other information concerning thenode. Ifinternal network, in themessage is markedIKE_AUTH exchange. The may IRAS procure an internal address for the IRAC from any number of sources such as aIKEv2 [Page 30]DHCP/BOOTP server or its own address pool. Initiator Responder ----------------------------- --------------------------- HDR, SK {IDi, [CERT,] [CERTREQ,] [IDr,] AUTH, CP(CFG_REQUEST), SAi2, TSi, TSr} --> <-- HDR, SK {IDr, [CERT,] AUTH, CP(CFG_REPLY), SAr2, TSi, TSr} In all cases, the CP payload MUST be inserted immediately before the SA payload. In variations of the protocol where there are multiple IKE_AUTH exchanges, the CP payloads MUST be inserted in the messages containing the SA payloads. CP(CFG_REQUEST) MUST contain at least an INTERNAL_ADDRESS attribute IKEv2 [Page 29] INTERNET DRAFTJanuaryFebruary 2003response, the node(either IPv4 or IPv6) but MAYauditcontain any number of additional attributes thesuspicious event but MUST NOT respond. Ifinitiator wants returned in the response. For example, messageis marked asfrom Initiator to Responder: CP(CFG_REQUEST)= INTERNAL_ADDRESS(0.0.0.0) INTERNAL_NETMASK(0.0.0.0) INTERNAL_DNS(0.0.0.0) TSi = (0, 0-65536,0.0.0.0-255.255.255.255) TSr = (0, 0-65536,0.0.0.0-255.255.255.255) NOTE: Traffic Selectors are arequest,(protocol, port range, address range) Message from Responder to Initiator: CP(CFG_REPLY)= INTERNAL_ADDRESS(192.168.219.202) INTERNAL_NETMASK(255.255.255.0) INTERNAL_SUBNET(192.168.219.0/255.255.255.0) TSi = (0, 0-65536,192.168.219.202-192.168.219.202) TSr = (0, 0-65536,192.168.219.0-192.168.219.255) All returned values will be implementation dependent. As can be seen in thenode MAY auditabove example, thesuspicious event andIRAS MAY also senda response. If a response is sent, the response MUST be sent to the IP addressother attributes that were not included in CP(CFG_REQUEST) andport from whenceMAY ignore the non- mandatory attributes that itcame withdoes not support. 2.20 Requesting thesamePeer's Version An IKESPIs andpeer wishing to inquire about theMessage ID copied. The response MUST NOT be cryptographically protected andother peer's version information MUSTcontainuse the method below. This is an example of anotify payload indicating INVALID-SPI. A node receiving suchconfiguration request within anunprotected NOTIFY payload MUST NOT respondINFORMATIONAL Exchange, after the IKE-SA and first CHILD-SA have been created. An IKE implementation MAY decline to give out version information prior to authentication or even after authentication to prevent trolling in case some implementation is known to have some security weakness. In that case, it MUSTNOT change the stateeither return an empty string or no CP payload if CP is not supported. Initiator Responder ----------------------------- -------------------------- HDR, SK{CP(CFG_REQUEST)} --> <-- HDR, SK{CP(CFG_REPLY)} CP(CFG_REQUEST)= APPLICATION_VERSION("") IKEv2 [Page 30] INTERNET DRAFT February 2003 CP(CFG_REPLY) APPLICATION_VERSION("foobar v1.3beta, (c) Foo Bar Inc.") 2.21 Error Handling There are many kinds ofany existing SAs. The message might beerrors that can occur during IKE processing. If aforgeryrequest is received that is badly formatted ormight be aunacceptable for reasons of policy (e.g. no matching cryptographic algorithms), the response MUST contain a Notify payload indicating the error. If an error occurs outside the context of an IKE request (e.g. the node is getting ESP messages on a non-existent SPI), thegenuine correspondent was tricked into sending. Anode SHOULDtreat suchinitiate an INFORMATIONAL Exchange with amessage (and alsoNotify payload describing the problem. Errors that occur before anetwork message like ICMP destination unreachable) ascryptographically protected IKE-SA is established must be handled very carefully. There is ahint that there mighttrade-off between wanting to beproblems with SAshelpful in diagnosing a problem and responding tothat IP addressit andSHOULD initiatewanting to avoid being aliveness test for any such IKE-SA. An implementation SHOULD limitdupe in a denial of service attack based on forged messages. If a node receives a message on UDP port 500 outside the context of an IKE-SA known to it (and not a request to start one), it may be the result of a recent crash of the node. If the message is marked as a response, the node MAY audit the suspicious event but MUST NOT respond. If the message is marked as a request, the node MAY audit the suspicious event and MAY send a response. If a response is sent, the response MUST be sent to the IP address and port from whence it came with the same IKE SPIs and the Message ID copied. The response MUST NOT be cryptographically protected and MUST contain a notify payload indicating INVALID-SPI. A node receiving such an unprotected NOTIFY payload MUST NOT respond and MUST NOT change the state of any existing SAs. The message might be a forgery or might be a response the genuine correspondent was tricked into sending. A node SHOULD treat such a message (and also a network message like ICMP destination unreachable) as a hint that there might be problems with SAs to that IP address and SHOULD initiate a liveness test for any such IKE-SA. An implementation SHOULD limit the frequency of such tests to avoid being tricked into participating in a denial of service attack. A node receiving a suspicious message from an IP address with which it has an IKE-SA MAY send an IKE notify payload in an IKEInformationalINFORMATIONAL exchange over that SA. The recipient MUST NOT change the state of any SA's as a result but SHOULD audit the event to aid in diagnosing malfunctions. A node MUST limit the rate at which it will send messages in response to unprotected messages.4.21IKEv2 [Page 31] INTERNET DRAFT February 2003 2.22 IPcomp Use of IP compression [IPCOMP] can be negotiated as part of the setup of a CHILD-SA. While IP compression involves an extra header in each packet and a CPI (compression parameter index), the virtual "compression association" has no life outside the ESP or AH SA that contains it. Compression associations disappear when the corresponding ESP or AH SA goes away, and is not explicitly mentioned in any DELETE payload. Negotiation of IP compression is separate from the negotiation of cryptographic parameters associated with a CHILD-SA. A node requesting a CHILD-SA MAY advertise its support for one or more compression algorithms though one or more NOTIFY payloads of type IPCOMP_SUPPORTED. The response MAY indicate acceptance of a single compression algorithm with a NOTIFY payload of type IPCOMP_SUPPORTED. These payloads MAY ONLY occur in the same messages that contain SA payloads. While there has been discussion of allowing multiple compression algorithms to be accepted and to have different compression algorithms available for the two directions of a CHILD-SA, implementations of this specification MUST NOT accept an IPcompIKEv2 [Page 31] INTERNET DRAFT January 2003algorithm that was not proposed, MUST NOT accept more than one, and MUST NOT compress using an algorithm other than one proposed and accepted in the setup of the CHILD-SA. A side effect of separating the negotiation of IPcomp from cryptographic parameters is that it is not possible to propose multiple cryptographic suites and propose IP compression with some of them but not others.5 Header2.23 NAT Traversal NAT (Network Address Translation) gateways are a controversial subject. This appendix briefly describes what they are andPayload Formats 5.1 The IKE Header IKE messages use UDP ports 500 and/or 4500, with one IKE message per UDP datagram. Information from the UDP header is largely ignored except that the IP addresses and UDP ports from the headershow they arereversed and used for return packets. When sent of UDP port 500, IKE messages begin immediately following the UDP header. When sentlikely to act onUDP port 4500,IKEmessages have prepended for octets of zero. These four octets of zerotraffic. Many people believe that NATs arenot part of the IKE messageevil andarethat we should notincludeddesign our protocols so as to make them work better. IKEv2 does specify some unintuitive processing rules inanyorder that NATs are more likely to work. NATs exist primarily because of thelength fields or checksums defined by IKE. Each IKE message begins with the IKE header, denoted HDR in this memo. Following the headershortage of IPv4 addresses, though there areone or more IKE payloads each identified byother rationales. IP nodes that are "behind" a"Next Payload" field in the preceding payload. PayloadsNAT have IP addresses that areprocessed innot globally unique, but rather are assigned from some space that is unique within theorder in which they appear in an IKE message by invokingnetwork behind theappropriate processing routine accordingNAT but which are likely to be reused by nodes behind other NATs. Generally, nodes behind NATs can communicate with other nodes behind the"Next Payload" field in the IKE headersame NAT andsubsequently according to the "Next Payload" field in the IKE payload itself until a "Next Payload" field of zero indicateswith nodes with globally unique addresses, but not IKEv2 [Page 32] INTERNET DRAFT February 2003 with nodes behind other NATs. There are exceptions to thatno payloads follow. If a payload of type "Encrypted" is found,rule. When those nodes make connections to nodes on the real Internet, the NAT gateway "translates" the IP source address to an address thatpayloadwill be routed back to the gateway. Messages to the gateway from the Internet have their destination addresses "translated" to the internal address that will route the packet to the correct endnode. NATs are designed to be "transparent" to endnodes. Neither software on the node behind the NAT nor the node on the Internet require modification to communicate through the NAT. Achieving this transparency isdecryptedmore difficult with some protocols than with others. Protocols that include IP addresses of the endpoints within the payloads of the packet will fail unless the NAT gateway understands the protocol andits contents parsed as additional payloads. An Encrypted payload MUST bemodifies thelast payloadinternal references as well as those in the headers. Such knowledge is inherently unreliable, is apacketnetwork layer violation, andan encrypted payload MUST NOT contain another encrypted payload. The Recipient SPIoften results inthe header identifies an instance ofsubtle problems. Opening anIKE security association. It is therefore possible forIPsec connection through asingle instance of IKE to multiplex distinct sessions with multiple peers. The format ofNAT introduces special problems. If theIKE header is shownconnection runs inFigure 1. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE-SA Initiator's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE-SA Responder's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IKEv2 [Page 32] INTERNET DRAFT January 2003 ! Next Payload ! MjVer ! MnVer ! Exchange Type ! Flags ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Message ID ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1: IKE Header Format o Initiator's SPI (8 octets) - A value chosen bytransport mode, changing theinitiator to identify a unique IKE security association. This value MUST NOT be zero. o Responder's SPI (8 octets) - A value chosen byIP addresses on packets will cause theresponderchecksums toidentify a unique IKE security association. This value MUST be zerofail and the NAT cannot correct the checksums because they are cryptographically protected. Even in tunnel mode, there are routing problems because transparently translating thefirst messageaddresses ofan IKE Initial ExchangeAH andMUST NOT be zeroESP packets requires special logic inany other message. o Next Payload (1 octet) - Indicates the type of payload that immediately followstheheader. The formatNAT andvalue of each payloadthat logic isdefined below. o Major Version (4 bits) - indicates the major version of the IKE protocolheuristic and unreliable inuse. Implementations based on this versionnature. For that reason, IKEv2 can negotiate UDP encapsulation ofIKE MUST set the Major Version to 2. Implementations based on previous versionsIKE, ESP, and AH packets. This encoding is slightly less efficient but is easier for NATs to process. In addition, firewalls may be configured to pass IPsec traffic over UDP but not ESP/AH or vice versa. It is a common practice ofIKENATs to translate TCP andISAKMP MUST setUDP port numbers as well as addresses and use theMajor Versionport numbers of inbound packets to1. Implementations based ondecide which internal node should get a given packet. For thisversion ofreason, even though IKE packets MUSTreject (or ignore) messages containing a version number greater than 2. o Minor Version (4 bits) - indicatesbe sent from and to UDP port 500, they SHOULD be accepted coming from any port and responses SHOULD be sent to theminor versionport from whence they came. This is because the ports may be modified as the packets pass through NATs. Similarly, IP addresses of the IKEprotocolendpoints are generally not included inuse. Implementations based on this version of IKE MUST set the Minor Version to 0. They MUST ignore the minor version number of received messages. o Exchange Type (1 octet) - indicatesthetype of exchange being used. This dictatesIKE payloads because the payloadssent in each messageare cryptographically protected andmessage orderings in the exchanges. Exchange Type Value RESERVED 0 Reserved for ISAKMP 1-31 Reserved for IKEv1 32-33 IKE_SA_INIT 34 IKE_SA_AUTH 35 CREATE_CHILD_SA 36 Informational 37 IKEv2 [Page 33] INTERNET DRAFT January 2003 Reserved for IKEv2+ 38-239 Reservedcould not be transparently modified by NATs. Port 4500 is reserved forprivate use 240-255 o Flags (1 octet) - indicates specific options that are set for the message. Presence of options are indicated by the appropriate bitUDP encapsulated ESP, AH, and IKE. When working through a NAT, it is generally better to pass IKE packets over port 4500 because some older NATs modify IKE traffic on port 500 in an attempt to transparently establish IPsec connections. Such NATs may interfere with theflags field being set. The bits are defined LSB first,straightforward NAT traversal envisioned by this document, sobit 0 would be the least significant bit of the Flags octet. In the description below,an IPsec endpoint that discovers abit being 'set' means its value is '1', while 'cleared' meansNAT between it and itsvaluecorrespondent SHOULD send all subsequent traffic to and from IKEv2 [Page 33] INTERNET DRAFT February 2003 port 4500, which all NATs should know run the NAT-friendly protocol. The specific requirements for supporting NAT traversal are listed below. Support for NAT traversal is'0'. -- R(eserved) (bits 0-2) - These bitsoptional. In this section only, requirements listed as MUSTbe cleared when sending andonly apply to implementations supporting NAT. IKE MUSTbe ignoredlisten onreceipt. -- I(nitiator) (bit 3 of Flags) - This bitport 4500 as well as port 500. IKE MUSTbe set in messages sent by the original Initiator ofrespond to theIKE-SAIP address and port from which packets arrived. The IKE responder MUSTbe clearedinclude inmessages sent by the original Responder. It is used by the recipient to determine whether the message is a request or a response. -- V(ersion) (bit 4 of Flags) - This bit indicates that the transmitter is capable of speaking a higher major version numberits IKE_SA_INIT response Notify payloads of type NAT-DETECTION-SOURCE-IP and NAT-DETECTION- DESTINATION-IP. The IKE initiator MUST check these payloads if present and if they do not match theprotocol than the one indicatedaddresses in themajor version number field. Implementations of IKEv2 must clearouter packet MUST tunnel all future IKE, ESP, and AH packets associated with thisbit when sendingIKE-SA over UDP port 4500. 2.24 ECN Notification Sections 5.1.2.1 andMUST ignore it in incoming messages. -- R(eserved) (bits 5-75.1.2.2 ofFlags) - These bits MUST be cleared when sending[RFC 2401] specify that the IPv4 TOS byte andMUSTIPv6 traffic class octet are to beignored on receipt. o Message ID (4 octets) - Message identifier usedcopied from the inner header tocontrol retransmission of lost packets and matching of requeststhe outer header by the encapsulator andresponses. See section 4.2. Inthat thefirst message of a Phase 1 negotiation,outer header is to be discarded (no change to inner header) by thevalue MUSTdecapsulator. If ECN is in use, ECT codepoints will besetcopied to0. The responsethe outer header, but if a router within the tunnel changes an ECT codepoint tothat message MUST also haveaMessage ID of 0. o Length (4 octets) - Length of total message (header + payloads) in octets. Session encryption can expandCE codepoint to indicate congestion, that indication will be discarded by thesizedecapsulator. This behavior is highly undesirable, and Section 9.2 ofan IKE message[RFC 3168] specifies changes to IPsec to avoid it. These changes include two ECN operating modes and negotiation support to detect and cope with IPsec decapsulators thatis reflecteddiscard ECN congestion indications; use of ECN in thetotal lengthouter IP header ofthe message. 5.2 Generic Payload Header Each IKE payload defined in sections 5.3 through 5.14 begins withIPsec tunnels is not permitted when such discarding is ageneric header, shown in Figure 2. Figurespossibility. In order to avoid multiple ECN operating modes and negotiation, tunnel decapsulators foreach payload below will includetunnel-mode Security Associations (SAs) created by IKEv2 MUST implement thegeneric payload header but for brevityfollowing modifications to prevent discarding of ECN congestion indications. IKEv2 tunnel- mode SA negotiation is handled by thedescriptionUSE-TRANSPORT-MODE notify message type (see Section 5.10.1 ofeach field will be omitted.[IKEv2]). Theconstructionfollowing modifications *replace* Section 9.2 of RFC 3168 andprocessing*update* Sections 5.1.2.1 and 5.1.2.2 ofthe generic payload header is identicalRFC 2401. Encapsulation and Decapsulation of packets foreacha tunnel-mode SA created by IKEv2 MUST NOT follow the modifications specified by Section 9.2 of RFC 3168 and its subsections. Instead, the following modifications to encapsulation and decapsulation in Sections 5.1.2.1 and 5.1.2.2 of RFC 2401 MUST be performed: IKEv2 [Page 34] INTERNET DRAFTJanuaryFebruary 2003payload and will similarly be omitted. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2: Generic PayloadOuter Hdr at Inner Hdr at IPv4 Encapsulator Decapsulator HeaderThe Generic Payloadfields: -------------------- ------------ DS Field copied from inner hdr (5) no change ECN Field copied from inner hdr constructed (7) IPv6 Headerfields are defined as follows: o Next Payload (1 octet) - Identifier for the payload type of the next payload in the message.fields: DS Field copied from inner hdr (6) no change ECN Field copied from inner hdr constructed (7) (5)(6) If thecurrent payload ispacket will immediately enter a domain for which thelastDSCP value in themessage, then this field willouter header is not appropriate, that value MUST be0. This field provides a "chaining" capability whereby additional payloads can be added to a message by appending it to the end of the message and setting the "Next Payload" field of the preceding payloadmapped toindicate the new payload's type. ForanEncrypted payload, which must always beappropriate value for thelast payload of a message,domain [RFC 2474]. Also see [RFC 2475] for further information. (7) If theNext PayloadECN field in the inner header is set to ECT(0) or ECT(1) and thepayload type ofECN field in thefirst contained payload. o Critical (1 bit) - MUST beouter header is set tozero if the sender wants the recipient to skip this payload if he does not understand the payload type code inCE, then set theNext PayloadECN fieldofin theprevious payload. MUST be setinner header toone if the sender wants the recipientCE, otherwise make no change toreject this entire message if he does not understandthepayload type. MUST be ignored by the recipient if the recipient understands the payload type code. SHOULD be set to zero for payload types definedECN field inthis document. Note thatthecritical bit appliesinner header. (5) and (6) are identical tothe current payload rather than the "next" payload whose type code appearsmatch usage inthe first octet. The reasoning behind[RFC2401], although they are different in [RFC2401]. These actions are notsetting the critical bitrelated to ECN, but are required forpayloads defined inDifferentiated Services support. They are carried over to this documentisfrom RFC 3168 so that allimplementations MUST understand all payload types defined in this document and therefore must ignore the Critical bit's value. Skipped payloads are expectedof RFC 3168's changes tohave valid Next PayloadIPsec can be made non-applicable to SAs created by IKEv2. 3 Header and PayloadLength fields. o RESERVED (7 bits) - MUST beFormats 3.1 The IKE Header IKE messages use UDP ports 500 and/or 4500, with one IKE message per UDP datagram. Information from the UDP header is largely ignored except that the IP addresses and UDP ports from the headers are reversed and used for return packets. When sentas zero; MUST be ignored. o Payload Length (2 octets) - Length inon UDP port 500, IKE messages begin immediately following the UDP header. When sent on UDP port 4500, IKE messages have prepended four octets of zero. These four octets of zero are not part of thecurrent payload, includingIKE message and are not included in any of thegeneric payload header. 5.3 Security Association Payload The Security Association Payload,length fields or checksums defined by IKE. Each IKE message begins with the IKE header, denotedSAHDR in thismemo, is usedmemo. Following the header are one or more IKE payloads each identified by a "Next Payload" field in the preceding payload. Payloads are processed in the order in which they appear in an IKE message by invoking the appropriate processing routine according to the "Next Payload" field in the IKE header and subsequently according to the "Next Payload" field in the IKE payload itself until a "Next Payload" field of zero indicates that no payloads follow. If a IKEv2 [Page 35] INTERNET DRAFTJanuaryFebruary 2003negotiate attributespayload ofa security association. An SA may contain multiple proposals. Each proposal may propose multiple protocols (where a protocoltype "Encrypted" isIKE, ESP, or AH), along with a suite of cryptographic algorithms tofound, that payload is decrypted and its contents parsed as additional payloads. An Encrypted payload MUST beused bytheprotocols. The protocol(s), cryptographic algorithms,last payload in a packet andany associated parameters are determined by the suite number. An SAan encrypted payloadMAY contain proposals for different protocols. For example, one suite mightMUST NOT containAH and ESP, whileanothermight contain only ESP and a third only AH. The Proposal structure contains within it a Proposal # and a Suite- ID.encrypted payload. Thefirst proposal MUST have Proposal # = 1, the second MUST have Proposal # = 2, etc. IfRecipient SPI in theproposalsheader identifies an instance of an IKE security association. It is therefore possible for a single instance of IKE to multiplex distinct sessions with multiple peers. All multi-octet fields representing integers aremisnumbered, the responder MUST reject alllaid out in big endian order (aka most significant byte first, or network byte order). The format ofthem. Unrecognised Suite-IDs MUST be ignored.the IKE header is shown in Figure 4. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE-SA Initiator's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE-SA Responder's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload!C! RESERVED!Payload LengthMjVer ! MnVer ! Exchange Type ! Flags ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Message ID !~ <Proposals> ~+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure3: Security Association Payload4: IKE Header Format oProposals (variable)Initiator's SPI (8 octets) -one or more proposal substructures. The payload type forA value chosen by theSecurity Association Payload is one (1). 5.3.1 Proposal Substructure 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! 0 (last) or 2 ! RESERVED ! Proposal Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Proposal # ! RESERVED-MBZ ! Suite-ID ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ SPI(S) (variable) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 4: Proposal Substructureinitiator to identify a unique IKE security association. This value MUST NOT be zero. o0 (last) or 2 (more)Responder's SPI (8 octets) - A value chosen by the responder to identify a unique IKE security association. This value MUST be zero in the first message of an IKE Initial Exchange and MUST NOT be zero in any other message other than a cookie request (see section 2.6). o Next Payload (1 octet) -Specifies whether this isIndicates thelast Proposal Substructure intype of payload that immediately follows theSA. This syntaxheader. The format and value of each payload isinheriteddefined below. o Major Version (4 bits) - indicates the major version of the IKE protocol in use. Implementations based on this version of IKE IKEv2 [Page 36] INTERNET DRAFTJanuaryFebruary 2003from ISAKMP, but is unnecessary because the last Proposal could be identified from the length ofMUST set theSA. The value (2) correspondsMajor Version toa Payload Type2. Implementations based on previous versions ofProposal,IKE and ISAKMP MUST set thefirst four octets of the Proposal structure are designedMajor Version tolook somewhat like the header1. Implementations based on this version ofa Payload. o RESERVED (1 octet) -IKE MUSTbe sent as zero; MUST be ignored.reject (or ignore) messages containing a version number greater than 2. oProposal Length (2 octets)Minor Version (4 bits) -Lengthindicates the minor version of the IKE protocol in use. Implementations based on thisproposal, includingversion of IKE MUST set theSPIMinor Version to 0. They MUST ignore the minor version number of received messages. oProposal #Exchange Type (1 octet) -In an SA payload requesting a new SA is sent, it may contain multiple proposals. The first proposal in an SA MUST be #1, and subsequent proposals MUST be one greater thanindicates theprevious proposal. When an SA is accepted,type of exchange being used. This dictates theSA payloadpayloads sentback MUST contain a single proposalin each message andthe proposal number MUST match the numbermessage orderings in theaccepted proposal.exchanges. Exchange Type Value RESERVED 0 Reserved for ISAKMP 1-31 Reserved for IKEv1 32-33 IKE_SA_INIT 34 IKE_AUTH 35 CREATE_CHILD_SA 36 INFORMATIONAL 37 Reserved for IKEv2+ 38-239 Reserved for private use 240-255 oRESERVED-MBZFlags (1 octet) -This field is reservedindicates specific options that are set forpossible use in specifying different kindsthe message. Presence ofproposals. Thisoptions are indicated by the appropriate bit in the flags fieldMUSTbeing set. The bits are defined LSB first, so bit 0 would besent as zero and a proposal containingthe least significant bit of the Flags octet. In the description below, anon-zerobit being 'set' means its value is '1', while 'cleared' means its value is '0'. -- X(reserved) (bits 0-2) - These bits MUSTNOTbeaccepted. The negotiation MAY still succeed if there is another acceptable proposal in the SA payload. o Suite-ID (2 octets) - This field specifies a suite of protocolscleared when sending andcryptographic algorithms. See table below. o SPI(S) (variable)MUST be ignored on receipt. -- I(nitiator) (bit 3 of Flags) -The sending entity's SPI(s). IfThis bit MUST be set in messages sent by thesuite proposed includes more than one protocol,original Initiator of theSPIs are concatenated togetherIKE-SA and MUST be cleared in messages sent by theorder inoriginal Responder. It is used by the recipient to determine whichthey would appear in a packet sent usingeight bytes of thesuite (i.e. AH followedSPI was generated byESP). When an initial IKE-SA is being proposed, SPIs are implicit fromtheIKE header and are not repeated here. Noterecipient. -- V(ersion) (bit 4 of Flags) - This bit indicates thatno paddingthe transmitter isapplied. For Suite-ID,capable of speaking a higher major version number of thefollowing values are defined: Name Number Algorithms IKE_CLASSIC 0 DH-Group #5 (1536 bits) 3DES encryption HMAC-SHA1 integrity and prf ESP_CLASSIC 1 3DES encryption HMAC-SHA1 integrityprotocol than the one indicated IKEv2 [Page 37] INTERNET DRAFTJanuaryFebruary 2003<some AES variants, AH (?)) values 2-65000 are reserved to IANA. Values 65001-65533 are for private use among mutually consenting parties. 5.4 Key Exchange Payload The Key Exchange Payload, denoted KEin the major version number field. Implementations of IKEv2 must clear thismemo,bit when sending and MUST ignore it in incoming messages. -- R(esponse) (bit 5 of Flags) - This bit indicates that this message isuseda response toexchange Diffie-Hellman public numbers as part ofaDiffie-Hellman key exchange. The Key Exchange Payload consists ofmessage containing the same message ID. This bit MUST be cleared in all request messages and MUST be set in all responses. An IKE endpoint MUST NOT generate a response to a message that is marked as being a response. -- X(reserved) (bits 6-7 of Flags) - These bits MUST be cleared when sending and MUST be ignored on receipt. o Message ID (4 octets) - Message identifier used to control retransmission of lost packets and matching of requests and responses. See section 2.2. o Length (4 octets) - Length of total message (header + payloads) in octets. 3.2 Generic Payload Header Each IKE payload defined in sections 3.3 through 3.16 begins with a generic header, shown in Figure 5. Figures for each payload below will include the generic payload headerfollowed bybut for brevity theDiffie-Hellman public value itself.description of each field will be omitted. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! Suite-ID ! RESERVED (MBZ) ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Key Exchange Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Figure7: Key Exchange5: Generic PayloadFormat A key exchange payload is constructed by copying ones Diffie-Hellman public value into the "Key Exchange Data" portion of the payload.Header Thelength of the Diffie-Hellman public value MUST be equal toGeneric Payload Header fields are defined as follows: o Next Payload (1 octet) - Identifier for thelengthpayload type of theprime modulus over whichnext payload in theexponentiation was performed, prepending zero bits tomessage. If thevalue if necessary. A key exchangecurrent payload isprocessed by first checking whether the length of the key exchange data (the "Payload Length" fromthegeneric header minus the size oflast in thegeneric header) is equalmessage, then this field will be 0. This field provides a "chaining" capability whereby additional payloads can be added to a message by appending it to thelengthend of theprime modulus over which the exponentiation was performed. Themessageshould be treated as invalid if the payload is not the expected size. The Suite-ID isand setting theidentifier"Next Payload" field of thecryptographic suite from which the Diffie-Hellman group was taken. If the selected proposal uses a different Diffie-Hellman group,preceding payload to indicate themessage MUSTnew payload's type. For an Encrypted payload, which must always berejected with a Notifythe last payload oftype INVALID-KE-PAYLOAD. Thea message, the Next Payload field is set to the payload typeforof theKey Exchange payload is four (4). 5.5 Identification Payloadfirst contained payload. IKEv2 [Page 38] INTERNET DRAFTJanuaryFebruary 2003The Identification Payload, denoted ID in this memo, allows peers to assert an identifyo Critical (1 bit) - MUST be set toone another. The ID Payload nameszero if theidentity to be authenticated withsender wants theAUTH payload. NOTE: In IKEv1, two ID payloads were used in each direction in Phase 2recipient tohold Traffic Selector information for data passing over the SA. In IKEv2,skip thisinformation is carriedpayload if he does not understand the payload type code inTraffic Selector (TS) payloads (see section 5.13). The Identificationthe Next Payloadconsistsfield of theIKE generic header followedprevious payload. MUST be set to one if the sender wants the recipient to reject this entire message if he does not understand the payload type. MUST be ignored byidentification fields as follows:the recipient if the recipient understands the payload type code. MUST be set to zero for payload types defined in this document. Note that the critical bit applies to the current payload rather than the "next" payload whose type code appears in the first octet. The reasoning behind not setting the critical bit for payloads defined in this document is that all implementations MUST understand all payload types defined in this document and therefore must ignore the Critical bit's value. Skipped payloads are expected to have valid Next Payload and Payload Length fields. o RESERVED (7 bits) - MUST be sent as zero; MUST be ignored. o Payload Length (2 octets) - Length in octets of the current payload, including the generic payload header. 3.3 Security Association Payload The Security Association Payload, denoted SA in this memo, is used to negotiate attributes of a security association. An SA may contain multiple proposals. Each proposal may propose multiple protocols (where a protocol is IKE, ESP, or AH), along with a suite of cryptographic algorithms to be used by the protocols. The protocol(s), cryptographic algorithms, and any associated parameters are determined by the suite number. An SA payload MAY contain proposals for different protocols. For example, one suite might contain AH and ESP, while another might contain only ESP and a third only AH. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !ID Type ! RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !! ~Identification Data<Proposals> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure8: Identification6: Security Association PayloadFormat o ID Type (1 octet) - Specifies the type of Identification being used.oRESERVEDProposals (variable) -MUST be sent as zero; MUST be ignored. o Identification Data (variable length) - Value, as indicated by the Identification Type. The length of the Identification Data is computed from the size in the ID payload header. The payload type for the Identification Payload is five (5). The following table lists the assigned values for the Identification Type field, followed by a description of the Identification Data which follows: ID Type Value ------- ----- RESERVED 0 ID_IPV4_ADDR 1 A single four (4) octet IPv4 address.one or more proposal substructures. IKEv2 [Page 39] INTERNET DRAFTJanuaryFebruary 2003ID_FQDN 2 A fully-qualified domain name string. An example of a ID_FQDN is, "lounge.org". The string MUST not contain any terminators (e.g. NULL, CR, etc.). ID_RFC822_ADDR 3 A fully-qualified RFC822 email address string, An example of a ID_RFC822_ADDR is, "lizard@lounge.org". The string MUST not contain any terminators. ID_IPV6_ADDR 5 A single sixteen (16) octet IPv6 address. ID_DER_ASN1_DN 9 The binary DER encoding of an ASN.1 X.500 Distinguished Name [X.501]. ID_DER_ASN1_GN 10 The binary DER encoding of an ASN.1 X.500 GeneralName [X.509]. ID_KEY_ID 11 An opaque octet stream which may be used to pass vendor- specific information necessary to do certain proprietary forms of identification. 5.6 Certificate PayloadTheCertificate Payload, denoted CERT in this memo, provides a means to transport certificates or other certificate-related information via IKE. Certificate payloads SHOULD be included in an exchange if certificates are available topayload type for thesender. The CertificateSecurity Association Payload isdefined as follows:one (1). 3.3.1 Proposal Substructure 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !Next Payload !C!0 (last) or 2 ! RESERVED !PayloadProposal Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+IKEv2 [Page 40] INTERNET DRAFT January 2003!Cert EncodingProposal # ! RESERVED-MBZ !+-+-+-+-+-+-+-+-+Suite-ID ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~Certificate DataSPI(S) (variable) ~! !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure9: Certificate Payload Format7: Proposal Substructure oCertificate Encoding0 (last) or 2 (more) (1 octet) -This field indicatesSpecifies whether this is thetype of certificate or certificate-related information containedlast Proposal Substructure in theCertificate Data field. Certificate Encoding Value -------------------- ----- NONE 0 PKCS #7 wrapped X.509 certificate 1 PGP Certificate 2 DNS Signed Key 3 X.509 Certificate - Signature 4 Kerberos Token 6 Certificate Revocation List (CRL) 7 Authority Revocation List (ARL) 8 SPKI Certificate 9 X.509 Certificate - Attribute 10 RESERVED 11 - 255 o Certificate Data (variable length) - Actual encoding of certificate data. The type of certificateSA. This syntax isindicated byinherited from ISAKMP, but is unnecessary because theCertificate Encoding field. The payload type forlast Proposal could be identified from theCertificate Payload is six (6). 5.7 Certificate Request Payloadlength of the SA payload. TheCertificate Request Payload, denoted CERTREQ in this memo, provides a meansvalue (2) corresponds torequest preferred certificates via IKEa Payload Type of Proposal, andcan appear inthefirst, second, or third messagefirst four octets ofPhase 1. Certificate Request payloads SHOULD be included in an exchange wheneverthepeer may have multiple certificates, some of which might be trusted while others are not. If multiple root CA'sProposal structure aretrusted, then multiple Certificate Request payloads SHOULD be transmitted. Empty (zero length) CA namesdesigned to look somewhat like the header of a Payload. o RESERVED (1 octet) - MUSTNOTbegenerated and SHOULDsent as zero; MUST be ignored.The Certificate Request Payload is defined as follows: 1 2 3 IKEv2 [Page 41] INTERNET DRAFT January 2003 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Cert Encoding ! ! +-+-+-+-+-+-+-+-+ ! ~ Certification Authority ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 10: Certificate Request Payload FormatoCertificate Encoding (1 octet)Proposal Length (2 octets) -Contains an encodingLength of this proposal, including thetype of certificate requested. Acceptable values are listed in section 5.6.SPI oCertification Authority (variable length)Proposal # (1 octet) -Contains an encoding ofIn anacceptable certification authority for the type of certificate requested. TheSA payloadtype for the Certificate Request Payloadrequesting a new SA isseven (7).sent, it may contain multiple proposals. TheCertificate Request Payload is constructed by setting the "Cert Encoding" field tofirst proposal in an SA MUST bethe type of certificate being desired#1, and subsequent proposals MUST be one greater than the"Certification Authority" field to a proper encoding of a certification authority for the specified certificate. For example, forprevious proposal. When anX.509 certificate this field wouldSA is accepted, the SA payload sent back MUST contain a single proposal and theDistinguished Name encoding ofproposal number MUST match theIssuer Name of an X.509 certification authority acceptable tonumber in thesender of this payload. The Certificate Request Payloadaccepted proposal. o RESERVED-MBZ (1 octet) - This field isprocessed by inspecting the "Cert Encoding" field to determine whether the processor has any certificatesreserved for possible use in specifying different kinds ofthis type. If so the "Certification Authority" field is inspected to determine if the processor has any certificates which can be validated up to the specified certification authority.proposals. Thiscanfield MUST be sent as zero and achain of certificates. Ifproposal containing acertificate exists which satisfies the criteria specified in the Certificate Request Payload itnon-zero value MUST NOT besent back to the certificate requestor;accepted. The negotiation MAY still succeed ifa certificate chain exists which goes back to the certification authority specified in the request the entire chain SHOULD be sent back to the certificate requestor. If no certificates exist then no further processing is performed-- this is not an error condition of the protocol. There may be cases wherethere isa preferred CA, but an alternate might beanother acceptable(perhaps after promptingproposal in the SA payload. o Suite-ID (2 octets) - This field specifies ahuman operator). 5.8 Authentication Payloadsuite of protocols and cryptographic algorithms. See table below. o SPI(S) (variable) - The sending entity's SPI(s). If the IKEv2 [Page42]40] INTERNET DRAFTJanuaryFebruary 2003The Authentication Payload, denoted AUTHsuite proposed includes more than one protocol, the SPIs are concatenated together inthis memo, contains data used for authentication purposes. The only authentication method definedthe order inthis memowhich they would appear in a packet sent using the suite (e.g. AH followed by ESP). When an initial IKE-SA isdigital signatures and thereforebeing proposed, SPIs are implicit from thecontentsIKE header and are not repeated here. Note that no padding is applied. For Suite-ID, the following values are defined: Suite-ID Meaning -------- ------- 1 Protocol: IKE 168-bit 3DES CBC encryption Diffie-Hellman group 2 (1024-bit), see Appendix B.2 HMAC-SHA1-96 integrity HMAC-SHA1 prf 2 Protocol: IKE 168-bit 3DES CBC encryption Diffie-Hellman group 5 (1536-bit), see Appendix B.5 HMAC-SHA1-96 integrity HMAC-SHA1 prf 3 Protocol: IKE AES encryption in CBC mode with 128-bit keys Diffie-Hellman group 5 (1536-bit), see Appendix B.5 HMAC-SHA1-96 integrity HMAC-SHA1 prf 4 Protocol: IKE AES encryption in CBC mode with 128-bit keys Diffie-Hellman group 14 (2048-bit), see [ADDGROUP] HMAC-SHA1-96 integrity HMAC-SHA1 prf 5 Protocol: IKE AES encryption in CTR mode with 128-bit keys Diffie-Hellman group 14 (2048-bit), see [ADDGROUP] AES-CBC MAC + XCBC integrity and prf 1001 Protocol: ESP without extended sequence numbers 3DES encryption with three keys HMAC-SHA1-96 integrity 1002 Protocol: ESP with extended sequence numbers AES encryption in CBC mode with 128-bit keys HMAC-SHA1-96 integrity IKEv2 [Page 41] INTERNET DRAFT February 2003 1003 Protocol: ESP with extended sequence numbers AES encryption in CTR mode with 128-bit keys AES-CBC MAC + XCBC integrity 2001 Protocol: AH HMAC-SHA1-96 integrity Other values in the range 0-32000 are reserved to IANA. Values 32001-65533 are for private use among mutually consenting parties. Additional Suite-ID values will be assigned by IANA based on consultation with the IESG. The specification suites that MUST and SHOULD be supported for interoperability has been removed from this document because they are likely to change more rapidly than this document evolves. The previously-MUST ciphersuites (1 and 1001) are based on currently-deployed hardware that meets the security requirements of the vast majority of current IPsec users, and should be useful for at least a decade according to cryptographic estimates from NIST for business user scenarios. The previously-SHOULD ciphersuites (2, 3, 4, and 1002) are based on expectations of where the security industry is moving (namely, to the AES encryption suite) and where more security-conscious users are moving as current key lengths become more attackable due to the steady lowering of cost to mount brute-force attacks. An important lesson learned from IKEv1 is that no system should only implement the mandatory algorithms and expect them to be the best choice for all customers. For example, at the time that this document was being written, many IKEv1 implementers are starting to migrate to AES in CBC mode for VPN applications. Many IPsec systems based on IKEv2 will implement AES, longer Diffie-Hellman keys, and additional hash algorithms, and some IPsec customers already require these algorithms in addition to the ones listed above. It is likely that IANA will add additional Suite-IDs in the future, and some users may want to use private suites, especially for IKE where implementations should be capable of supporting different parameters, up to certain size limits. In support of this goal, all implementations of IKEv2 SHOULD include a management facility that allows specification (by a user or system administrator) of Diffie-Hellman parameters (the generator, modulus, and exponent lengths and values) for new IKE Suites. Implementations SHOULD provide a management interface via which these parameters and the associated Suite-IDs may be entered (by a user or system administrator), to enable negotiating such Suites. IKEv2 [Page 42] INTERNET DRAFT February 2003 All implementations of IKEv2 MUST include a management facility that enables a user or system administratror to specify the Suite IDs that are acceptable for use with IKE. Upon receipt of a payload with a suite ID, the implementation must compare the transmitted suite ID against those locally configured via the management controls, to verify that the proposed suite is acceptable based on local policy. The implementation MUST reject key exchange payloads that are not authorized by these IKE suite controls. 3.4 Key Exchange Payload The Key Exchange Payload, denoted KE in this memo, is used to exchange Diffie-Hellman public numbers as part of a Diffie-Hellman key exchange. The Key Exchange Payload consists of the IKE generic header followed by the Diffie-Hellman public value itself. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Suite-ID ! RESERVED (MBZ) ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Key Exchange Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 8: Key Exchange Payload Format A key exchange payload is constructed by copying ones Diffie-Hellman public value into the "Key Exchange Data" portion of the payload. The length of the Diffie-Hellman public value MUST be equal to the length of the prime modulus over which the exponentiation was performed, prepending zero bits to the value if necessary. The Suite-ID is the identifier of the cryptographic suite from which the Diffie-Hellman group was taken. If the selected proposal uses a different Diffie-Hellman group, the message MUST be rejected with a Notify payload of type INVALID-KE-PAYLOAD. The payload type for the Key Exchange payload is four (4). 3.5 Identification Payload The Identification Payload, denoted ID in this memo, allows peers to assert an identify to one another. The ID Payload names the identity IKEv2 [Page 43] INTERNET DRAFT February 2003 to be authenticated with the AUTH payload. NOTE: In IKEv1, two ID payloads were used in each direction to hold Traffic Selector information for data passing over the SA. In IKEv2, this information is carried in Traffic Selector (TS) payloads (see section 3.13). The Identification Payload consists of the IKE generic header followed by identification fields as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ID Type ! RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Identification Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 9: Identification Payload Format o ID Type (1 octet) - Specifies the type of Identification being used. o RESERVED - MUST be sent as zero; MUST be ignored. o Identification Data (variable length) - Value, as indicated by the Identification Type. The length of the Identification Data is computed from the size in the ID payload header. The payload type for the Identification Payload is five (5). The following table lists the assigned values for the Identification Type field, followed by a description of the Identification Data which follows: ID Type Value ------- ----- RESERVED 0 ID_IPV4_ADDR 1 A single four (4) octet IPv4 address. ID_FQDN 2 IKEv2 [Page 44] INTERNET DRAFT February 2003 A fully-qualified domain name string. An example of a ID_FQDN is, "lounge.org". The string MUST not contain any terminators (e.g. NULL, CR, etc.). ID_RFC822_ADDR 3 A fully-qualified RFC822 email address string, An example of a ID_RFC822_ADDR is, "lizard@lounge.org". The string MUST not contain any terminators. ID_IPV6_ADDR 5 A single sixteen (16) octet IPv6 address. ID_DER_ASN1_DN 9 The binary DER encoding of an ASN.1 X.500 Distinguished Name [X.501]. ID_DER_ASN1_GN 10 The binary DER encoding of an ASN.1 X.500 GeneralName [X.509]. ID_KEY_ID 11 An opaque octet stream which may be used to pass an account name or to pass vendor-specific information necessary to do certain proprietary forms of identification. Two implementations will interoperate only if each can generate a form of ID acceptable to the other. To assure maximum interoperability, implementations MUST be configurable to send at least one of ID_IPV4_ADDR, ID_FQDN, ID_RFC822_ADDR, or ID_KEY_ID, and MUST be configurable to accept all of these forms. Implementations SHOULD be capable of generating and accepting all of these forms. 3.6 Certificate Payload The Certificate Payload, denoted CERT in this memo, provides a means to transport certificates or other authentication related information via IKE. Certificate payloads SHOULD be included in an exchange if certificates are available to the sender unless the peer has indicated an ability to retrieve this information from elsewhere. The Certificate Payload is defined as follows: IKEv2 [Page 45] INTERNET DRAFT February 2003 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Cert Encoding ! ! +-+-+-+-+-+-+-+-+ ! ~ Certificate Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 10: Certificate Payload Format o Certificate Encoding (1 octet) - This field indicates the type of certificate or certificate-related information contained in the Certificate Data field. Certificate Encoding Value -------------------- ----- RESERVED 0 PKCS #7 wrapped X.509 certificate 1 PGP Certificate 2 DNS Signed Key 3 X.509 Certificate - Signature 4 Kerberos Token 6 Certificate Revocation List (CRL) 7 Authority Revocation List (ARL) 8 SPKI Certificate 9 X.509 Certificate - Attribute 10 Raw RSA Key 11 Hash and URL of PKIX certificate 12 Hash and URL of PKIX bundle 13 RESERVED 14 - 200 PRIVATE USE 201 - 255 o Certificate Data (variable length) - Actual encoding of certificate data. The type of certificate is indicated by the Certificate Encoding field. The payload type for the Certificate Payload is six (6). While the certificate type codes above are defined for backwards compatibility and possible future use, the types whose syntax is defined in this document are: X.509 Certificate - Signature (4) contains a BER encoded X.509 certificate. IKEv2 [Page 46] INTERNET DRAFT February 2003 Certificate Revocation List (7) contains a BER encoded X.509 certificate revocation list. Raw RSA Key (11) contains a PKCS #1 encoded RSA key. Hash and URL of PKIX certificate (12) contains a 20 byte SHA-1 hash of a PKIX certificate followed by a variable length URL that resolves to the BER encoded certificate itself. Hash and URL of PKIX bundle (13) contains a 20 byte SHA-1 hash of a PKIX certificate bundle followed by a variable length URL the resolves to the BER encoded certificate bundle itself. The bundle is a BER encoded SEQUENCE of certificates and CRLs. Implementations MUST be capable of being configured to send and accept up to four X.509 certificates in support of authentication. Implementations SHOULD be capable of being configured to send and accept Raw RSA keys and the two Hash and URL formats. If multiple certificates are sent, the first certificate MUST contain the public key used to sign the AUTH payload. 3.7 Certificate Request Payload The Certificate Request Payload, denoted CERTREQ in this memo, provides a means to request preferred certificates via IKE and can appear in the second and/or third message of the initial exchanges. Certificate Request payloads SHOULD be included in an exchange whenever the peer may have multiple certificates, some of which might be trusted while others are not or when multiple formats might be acceptable. If multiple root CAs are trusted, then multiple Certificate Request payloads SHOULD be transmitted. Empty (zero length) CA names MUST NOT be generated and SHOULD be ignored. The Certificate Request Payload is defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Cert Encoding ! ! +-+-+-+-+-+-+-+-+ ! ~ Certification Authority ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IKEv2 [Page 47] INTERNET DRAFT February 2003 Figure 11: Certificate Request Payload Format o Certificate Encoding (1 octet) - Contains an encoding of the type or format of certificate requested. Values are listed in section 3.6. o Certification Authority (variable length) - Contains an encoding of an acceptable certification authority for the type of certificate requested. The payload type for the Certificate Request Payload is seven (7). While intended to allow for future expansion, the only form of certificate request currently defined is X.509 signing certificate (4). For that type, the CA value is a concatenated list of SHA-1 hashes of the public keys of trusted root CAs. The Certificate Request Payload is processed by inspecting the "Cert Encoding" field to determine whether the processor has any certificates of thispayload when used with this memo willtype. If so the "Certification Authority" field is inspected to determine if the processor has any certificates which can be validated up to theoutput generated byspecified certification authority. This can be adigital signature function.chain of certificates. If a certificate exists which satisfies the criteria specified in the Certificate Request Payload it MUST be sent back to the certificate requestor; if a certificate chain exists which goes back to the certification authority specified in the request the entire chain SHOULD be sent back to the certificate requestor. If no certificates exist then no further processing is performed-- this is not an error condition of the protocol. There may be cases where there is a preferred CA, but an alternate might be acceptable (perhaps after prompting a human operator). 3.8 Authentication Payload The Authentication Payload, denoted AUTH in this memo, contains data used for authentication purposes. The syntax of the Authentication data varies according the the Auth Method as specified below. The Authentication Payload is defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Auth Method ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IKEv2 [Page 48] INTERNET DRAFT February 2003 ! ! ~ Authentication Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure11:12: Authentication Payload Format o Auth Method (1 octet) - Specifies the method of authentication used. Values defined are: Digital Signature (1) - Computed as specified in section4.152.15 usingthea publickey in the first CERT payload or known the the recipient by some out of band means.key. Shared Key Message Integrity Code (2) - Computed as specified in section4.152.15 using the shared key associated with the identity in the ID payload. The values 0 and 3-200 are reserved to IANA. The values 201-255 are available for private use. o Authentication Data (variable length) -Data that results from applying the digital signature function to the IKE state (seesee section3).2.15. The payload type for the Authentication Payload is nine (9).The Authentication Payload is constructed by computing a digital signature (or secret key MAC) over part of one of the sender's messages (see section 4.15). The result is placed in the "Authentication Data" portion of the payload. The encoding depends on the type of key being used to authenticate (see section 4.15). The payload length is the size of the generic header plus the size of the "Authentication Data" portion of the payload which depends on the specific authentication method being used. IKEv2 [Page 43] INTERNET DRAFT January 2003 The Authentication Payload is processed by extracting the "Authentication Data" from the payload and verifying it according to the specific authentication method being used. If the specified authentication method is not supported or validation fails a NOTIFY Error message of AUTHENTICATION-FAILED MUST be sent back to the peer and the connection closed. (An exception to this case is that a peer MAY treat unsupported, invalid, or missing authentication data as a request to open an unauthenticated SA. 5.93.9 Nonce Payload The Nonce Payload, denoted Ni and Nr in this memo for the Initiator's and Responder's nonce respectively, contains random data used to guarantee liveness during an exchange and protect against replay attacks. The Nonce Payload is defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Nonce Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure12:13: Nonce Payload Format o Nonce Data (variable length) - Contains the random data generated by the transmitting entity. IKEv2 [Page 49] INTERNET DRAFT February 2003 The payload type for the Nonce Payload is ten (10). TheNonce Payload is constructed by computing a pseudo-random value and copying it into the "Nonce Data" field. Thesize of a Nonce MUST be between 8 and 256 octets inclusive. Nonce values MUST NOT be reused.5.103.10 Notify Payload The Notify Payload, denoted N in this document, is used to transmit informational data, such as error conditions and statetransitionstransitions, to an IKE peer. A Notify Payload may appear in a response message (usually specifying why a request was rejected),orin anInformationalINFORMATIONAL Exchange (to report an error not in an IKErequest). IKEv2 [Page 44] INTERNET DRAFT January 2003request), or in any other message to indicate sender capabilities or to modify the meaning of the request. The Notify Payload is defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Protocol-ID ! SPI Size ! Notify Message Type ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Security Parameter Index (SPI) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Notification Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure13:14: Notification Payload Format o Protocol-Id (1 octet) - Specifies the protocol about which this notification is being sent. Forphase 1IKE-SA notifications, this field MUST be zero (0). Forphase 2notifications concerning IPsec SAs this field will containan IPsec protocol (either ESP,either (1) to indicate ESP orAH).(2) to indicate AH. For notifications for which no protocol ID is relevant, this field MUST be sent as zero and MUST be ignored. o SPI Size (1 octet) - Length in octets of the SPI as defined by the Protocol-Id or zero if no SPI is applicable.For phase 1For a notification concerning the IKE-SA, the SPI Size MUST be zero. o Notify Message Type (2 octets) - Specifies the type of IKEv2 [Page 50] INTERNET DRAFT February 2003 notification message. o SPI (variable length) - Security Parameter Index. o Notification Data (variable length) - Informational or error data transmitted in addition to the Notify Message Type. Values for this field are message specific, see below. The payload type for the Notification Payload is eleven (11).5.10.13.10.1 Notify Message Types Notification information can be error messages specifying why an SA could not be established. It can also be status data that a process managing an SA database wishes to communicate with a peer process.IKEv2 [Page 45] INTERNET DRAFT January 2003 For example, a secure front end or security gateway may use the Notify message to synchronize SA communication.The table below lists the Notification messages and their corresponding values. The number of different error statuses was greatly reduced from IKE V1 both for simplication and to avoid giving configuration information to probers. Types in the range 0 - 16383 are intended for reporting errors. An implementation receiving a Notify payload with one of these types that it does not recognise in aresponseresponse MUST assume that the corresponding request has failed entirely. Unrecognised error types in a request and status types in a request or response MUST be ignored except that they SHOULD be logged. Notify payloads with status types MAY be added to any message and MUST be ignored if not recognised. They are intended to indicate capabilities, and as part of SA negotiation are used to negotiate non-cryptographic parameters. NOTIFY MESSAGES - ERROR TYPES Value ----------------------------- ----- UNSUPPORTED-CRITICAL-PAYLOAD 1 Sent if the payload has the "critical" bit set and the payload type is not recognised. Notification Data contains the one octet payload type. INVALID-SPI 4 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. INVALID-MAJOR-VERSION 5 IKEv2 [Page 51] INTERNET DRAFT February 2003 Indicates the recipient cannot handle the version of IKE specified in the header. The closest version number that the recipient can support will be in the reply header. INVALID-SYNTAX 7 Indicates the IKE message was received was invalid because some type, length, or value was out of range or because the request was rejected for policy reasons. To avoid a denial of service attack using forged messages, this status may only be returned for and in an encrypted packet if the MESSAGE-ID and cryptographic checksum were valid. To avoid leaking information to someone probing a node, this status MUSTassume thatbe sent in response to any error not covered by one of thecorresponding request has failed entirely. Unrecognisedother status codes. To aid debugging, more detailed errortypes ininformation SHOULD be written to arequest and status typesconsole or log. INVALID-MESSAGE-ID 9 Sent when an IKE MESSAGE-ID outside the supported window is received. This Notify MUST NOT be sent in a response; the invalid requestor responseMUST NOT beignored except that they SHOULD be logged. Notify payloadsacknowledged. Instead, inform the other side by initiating an INFORMATIONAL exchange withstatus types MAYNotification data containing the four octet invalid MESSAGE- ID. Sending this notification is optional, MUST beadded to any messagerate limited, and MUST NOT beignored if not recognised. They are intendedsent unless an IKE-SA exists toindicate capabilities,the sending address andas partport. INVALID-SPI 11 MAY be sent in an IKE INFORMATIONAL Exchange when a node receives an ESP or AH packet with an invalid SPI. The Notification Data contains the SPI ofSA negotiation are used to negotiate non-cryptographic parameters. NOTIFY MESSAGES - ERROR TYPES Value ----------------------------- ----- UNSUPPORTED-CRITICAL-PAYLOAD 1 Sent ifthepayloadinvalid packet. This usually indicates a node hasthe "critical" bit setrebooted andthe payload typeforgotten an SA. If this Informational Message isnot recognised. Notification Data containssent outside the context of an IKE-SA, it should only be used by the recipient as a "hint" that something might be wrong (because it could easily be forged). NO-PROPOSAL-CHOSEN 14 None of the proposed crypto suites was acceptable. AUTHENTICATION-FAILED 24 Sent in theone octet payload type. INVALID-SPI 4 Indicatesresponse to anIKEIKE_AUTH messagewas received with an unrecognized destination SPI.when for some reason the authentication failed. There is no associated data. IKEv2 [Page 52] INTERNET DRAFT February 2003 SINGLE-PAIR-REQUIRED 34 Thisusuallyerror indicates that a CREATE_CHILD_SA request is unacceptable because therecipient has rebooted and forgotten the existenceResponder is willing to accept traffic selectors specifying a single pair of addresses. The Initiator is expected to respond by requesting anIKE-SA. INVALID-MAJOR-VERSION 5 Indicates the recipient cannot handle the version of IKE specified inSA for only theheader. The closest version numberspecific traffic he is trying to forward. NO-ADDITIONAL-SAS 35 This error indicates that a CREATE_CHILD_SA request is unacceptable because therecipient can support will beResponder is unwilling to accept any more CHILD-SAs on this IKE-SA. Some minimal implementations may only accept a single CHILD-SA setup in thereply header. INVALID-SYNTAX 7 Indicates the IKE message was received was invalid because some type, length, or value was outcontext ofrangean initial IKE exchange and reject any subsequent attempts to add more. INTERNAL-ADDRESS-FAILURE 36 Indicates an error assigning an internal address (i.e., INTERNAL_IP4_ADDRESS orbecauseINTERNAL_IP6_ADDRESS) during therequest was rejected for policy reasons. To avoid a denialprocessing ofservice attack using forged messages,a Configuration Payload by a Responder. If this error is generated within an IKE_AUTH exchange no CHILD-SA will be created. RESERVED TO IANA - Errors 37 - 8191 Private Use - Errors 8192 - 16383 NOTIFY MESSAGES - STATUS TYPES Value ------------------------------ ----- RESERVED TO IANA - STATUS 16384 - 24577 INITIAL-CONTACT 24578 This notification asserts that thisstatus mayIKE-SA is the only IKE- SA currently active between the authenticated identities. It MAY bereturned for and insent when anencrypted packet if the MESSAGE-ID and cryptographic checksum were valid. To avoid leaking information to someone probingIKE-SA is established after anode,crash, and the recipient MAY use thisstatus IKEv2 [Page 46] INTERNET DRAFT January 2003 MUST be sent in responseinformation to delete anyerror not covered by one of theotherstatus codes. To aid debugging, more detailed error information SHOULD be writtenIKE-SAs it has toa console or log. INVALID-MESSAGE-ID 9 Sent when an IKE MESSAGE-ID outsidethesupported window is received. This Notify MUST NOT be sent insame authenticated identity without waiting for aresponse; the invalid request MUST NOT be acknowledged. Instead, inform the other side by initiating an Informational exchange with Notification data containingtimeout if those IKE-SAs reside at thefour octet invalid MESSAGE-ID. SendingIP address from which this notificationis optional, MUST be rate limited, andarrived. This notification MUST NOT be sentunlessby anIKE-SA exists to the sending address and port. INVALID-SPI 11 MAYentity that may besent in an IKE Informational Exchange whenreplicated (e.g. anode receives an ESP or AH packet with an invalid SPI. The Notification Data contains the SPI ofroaming user's credentials where theinvalid packet. This usually indicates a node has rebooted and forgotten an SA. If this Informational Messageuser issent outsideallowed to connect to the corporate firewall from two remote systems at the same time). IKEv2 [Page 53] INTERNET DRAFT February 2003 SET-WINDOW-SIZE 24579 This notification asserts that thecontextsending endpoint is capable ofan IKE-SA, it should only be used bykeeping state for multiple outstanding exchanges, permitting the recipientasto send multiple requests before getting a"hint" that something might be wrong (because it could easilyresponse to the first. The data associated with a SET-WINDOW-SIZE notification MUST beforged). NO-PROPOSAL-CHOSEN 14 None4 octets long and contain the big endian represention of theproposed crypto suites was acceptable. AUTHENTICATION-FAILED 24 Sent innumber of messages theresponsesender promises toan IKE_AUTH message when for some reasonkeep. Window size is always one until theauthentication failed.initial exchanges complete. ADDITIONAL-TS-POSSIBLE 24580 This notification asserts that the sending endpoint narrowed the proposed traffic selectors but that other traffic selectors would also have been acceptable, though only in a separate SA. There is no data associateddata. SINGLE-PAIR-REQUIRED 34with this notify type. It may only be sent as an additional payload in a message including accepted TSs. IPCOMP-SUPPORTED 24581 Thiserror indicates thatnotification may only be included in aPhase 2message containing an SArequest is unacceptable because the Responder is willing to accept traffic selectors specifyingpayload negotiating asingle pair of addresses.CHILD-SA and indicates a willingness by its sender to use IPcomp on this SA. TheInitiatordata associated with this notification includes a two byte IPcomp CPI followed by a one octet transform ID optionally followed by attributes whose length and format isexpected to responddefined byrequestingthat transform ID. A message proposing an SA may contain multiple IPCOMP-SUPPORTED notifications to indicate multiple supported algorithms. A message accepting an SAfor only the specific traffic he is tryingmay contain at most one. The transform IDs currently defined are: NAME NUMBER DEFINED IN ----------- ------ ----------- RESERVED 0 IPCOMP_OUI 1 IPCOMP_DEFLATE 2 RFC 2394 IPCOMP_LZS 3 RFC 2395 values 4-240 are reserved toforward. NO-ADDITIONAL-SAS 35IANA. Values 241-255 are for private use among mutually consenting parties. NAT-DETECTION-SOURCE-IP 24582 Thiserror indicates that a Phase 2 SA request is unacceptable because the Respondernotification isunwillingused toacceptby its recipient to determine IKEv2 [Page47]54] INTERNET DRAFTJanuaryFebruary 2003any more CHILD-SAs onwhether the source is behind a NAT box. The data associated with thisIKE-SA. Some minimal implementations may only acceptnotification is asingle CHILD-SA setupSHA-1 digest of the SPIs, IP address and port on which this packet was sent. There MAY be multiple notify payloads of this type in a message if thecontextsender does not know which ofan initial IKE exchange and reject any subsequent attemptsseveral network attachments will be used toadd more. INTERNAL-ADDRESS-FAILURE 36 Indicates an error assigning an internal address (i.e., INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS) duringsend theprocessingpacket. The recipient ofa Configuration Payload by a Responder. Ifthiserror is generated within an IKE_AUTH exchange no CHILD-SA will be created. RESERVED TO IANA - Errors 37 - 8191 Private Use - Errors 8192 - 16383 NOTIFY MESSAGES - STATUS TYPES Value ------------------------------ ----- RESERVED TO IANA - STATUS 16384 - 24577 INITIAL-CONTACT 24578 Thisnotificationasserts that this IKE-SA isMAY compare theonly IKE- SA currently active betweensupplied value to a hash of theauthenticated identities. Itsource IP address and port and if they don't match it MAYbe sent when an IKE-SA is established after a crash,invoke NAT specific handling (like using UDP encapsulation of ESP packets and subsequent IKE packets). Alternately, it MAY reject the connection attempt if NAT traversal is not supported. NAT-DETECTION-DESTINATION-IP 24583 This notification is used to by its recipientMAY use this informationtodelete any other IKE-SAsdetermine whether ithas to the same authenticated identity without waiting foris behind atimeout if those IKE-SAs reside atNAT box. The data associated with this notification is a SHA-1 digest of the SPIs, IP addressfromand port to which this packet was sent. The recipient of this notificationarrived.MAY compare the supplied value to a hash of the destination IP address and port and if they don't match it MAY invoke NAT specific handling (like using UDP encapsulation of ESP packets and subsequent IKE packets). Alternately, it MAY reject the connection attempt if NAT traversal is not supported. COOKIE 24584 This notificationMUST NOTMAY besent byincluded in anentityIKE_SA_INIT request or response. In the response, it indicates thatmay be replicated (e.g. a roaming user's credentials wheretheuser is allowed to connect torequest should be retried with thecorporate firewall from two remote systems atCOOKIE included in thesame time). SET-WINDOW-SIZE 24579request. That data associated with this notification MUST be between 1 and 64 octets in length (inclusive). USE-TRANSPORT-MODE 24585 This notificationassertsMAY be included in a request message that also includes an SA requesting a CHILD-SA. It requests that the CHILD-SA use transport mode rather than tunnel mode for thesending endpointSA created. If the request iscapable of keeping state for multiple outstanding Phase 2 exchanges, permittingaccepted, therecipient to send multiple Phase 2 requests before getting aresponseto the first. The data associated withMUST also include aSET-WINDOW-SIZEnotificationMUSTof type USE-TRANSPORT-MODE. If the responder declines the request, the CHILD-SA can still be4 octets long an containestablished, but will use tunnel mode. If this is unacceptable to thebig endian represention ofinitiator, thenumber of messagesinitiator MUST delete thesender promisesSA. Note: except when using this option tokeep. ADDITIONAL-TS-POSSIBLE 24580negotiate transport mode, all CHILD-SAs will use tunnel mode. HTTP-CERT-LOOKUP-SUPPORTED 24586 IKEv2 [Page48]55] INTERNET DRAFTJanuaryFebruary 2003 This notificationassertsMAY be included any message thatthe sending endpoint narrowed the proposed traffic selectors butcan include a CERTREQ payload and indicates thatother traffic selectorsthe sender is capable of looking up certificates based on an HTTP-based URL (and hence presumeably wouldalso have been acceptable, though onlyprefer to receive certificate specifications in that format). RESERVED TO IANA - STATUS 24587 - 40959 Private Use - STATUS 40960 - 65535 3.11 Delete Payload The Delete Payload, denoted D in this memo, contains aseparate SA. There isprotocol specific security association identifier that the sender has removed from its security association database and is, therefore, nodata associated with this notify type.longer valid. Figure 15 shows the format of the Delete Payload. Itmay only be sent as an additional payloadis possible to send multiple SPIs in amessage including accepted TSs. IPCOMP-SUPPORTED 24581 This notification may onlyDelete payload, however, each SPI MUST be for the same protocol. Mixing of Protocol Identifiers MUST NOT beincludedperformed in amessage containing an SA payload negotiatingthe Delete payload. It is permitted, however, to include multiple Delete payloads in aCHILD-SA and indicatessingle INFORMATIONAL Exchange where each Delete payload lists SPIs for awillingnessdifferent protocol. Deletion of the IKE-SA is indicated byits sender to use IPcomp on this SA. The data associated with this notification includesatwo byte IPcomp CPI followed byProtocol-Id of 0 (IKE) but no SPIs. Deletion of aone octet transform ID optionally followed by attributes whose lengthCHILD-SA, such as ESP or AH, will contain the Protocol-Id of that protocol (1 for ESP, 2 for AH) andformatthe SPI isdefined by that transform ID. A message proposing an SA may contain multiple IPCOMP-SUPPORTED notifications to indicate multiple supported algorithms. A message accepting an SA may contain at most one.the SPI the sending endpoint would place in outbound ESP or AH packets. Thetransform IDs currentlyDelete Payload is definedare: NAME NUMBER DEFINED IN ----------- ------ ----------- RESERVEDas follows: 1 2 3 0IPCOMP_OUI1IPCOMP_DEFLATE2RFC 2394 IPCOMP_LZS 3 RFC 2395 values 4-240 are reserved to IANA. Values 241-255 are3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Protocol-Id ! SPI Size ! # of SPIs ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Security Parameter Index(es) (SPI) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 15: Delete Payload Format o Protocol-Id (1 octet) - Must be zero for an IKE-SA, 1 for ESP, or 2 forprivate use among mutually consenting parties. NAT-DETECTION-SOURCE-IP 24582 This notification is used toAH. IKEv2 [Page 56] INTERNET DRAFT February 2003 o SPI Size (1 octet) - Length in octets of the SPI as defined byits recipient to determine whetherthesource is behind a NAT box. The data associated with this notificationProtocol-Id. Zero for IKE (SPI isa digest of the SPIs, IP address and port on which this packet was sent. There MAY be multiple notify payloads of this typeinamessageif the sender does not know whichheader) or four for AH and ESP. o # ofseveral network attachments will be used to sendSPIs (2 octets) - The number of SPIs contained in thepacket.Delete payload. Therecipientsize ofthis notification MAY compareeach SPI is defined by thesupplied valueSPI Size field. o Security Parameter Index(es) (variable length) - Identifies the specific security association(s) toa hashdelete. The length of this field is determined by thesource IP address and portSPI Size andif they don't match it MAY invoke NAT specific handling (like using UDP encapsulation# ofESP packets and subsequent IKE packets).SPIs fields. Thedigest is computed using the negotiated digest algorithmpayload type for theIKE- SA. IKEv2 [Page 49] INTERNET DRAFT January 2003 NAT-DETECTION-DESTINATION-IP 24583 This notification is used to by its recipient to determine whether the itDelete Payload isbehindtwelve (12). 3.12 Vendor ID Payload The Vendor ID Payload contains aNAT box.vendor defined constant. Thedata associated with this notificationconstant isa digest of the SPIs, IP address and portused by vendors towhich this packet was sent. The recipientidentify and recognize remote instances ofthis notificationtheir implementations. This mechanism allows a vendor to experiment with new features while maintaining backwards compatibility. A Vendor ID payload MAYcompareannounce that thesupplied valuesender is capable to accepting certain extensions toa hash ofthedestination IP address and port and if they don't matchprotocol, or it MAYinvoke NAT specific handling (like using UDP encapsulation of ESP packets and subsequent IKE packets). The digest is computed usingsimply identify thenegotiated digest algorithmimplementation as an aid in debugging. If parameter values "reserved forthe IKE-SA. COOKIE 24584 This notification MAYuse by consenting parties" are used, they must beincluded in an IKE_SA_INIT request or response. In the response, it indicatespreceded by a Vendor ID payload that disambiguates them. A Vendor ID payload MUST NOT change therequest should be retried with the COOKIE includedinterpretation of any information defined inthe request. That data associated withthisnotificationspecification (i.e. it MUST bebetween 1 and 64 octets in length (inclusive). USE-TRANSPORT-MODE 24585 This notificationnon-critical). Multiple Vendor ID payloads MAY beincluded in a request message that also includes an SA requesting a CHILD-SA. It requests that the CHILD-SA use transport mode rather than tunnel mode for the SA created. If the requestsent. An implementation isaccepted, the response MUST also includeNOT REQUIRED to send any Vendor ID payload at all. A Vendor ID payload may be sent as part of any message. Reception of anotificationfamiliar Vendor ID payload allows an implementation to make use oftype USE-TRANSPORT-MODE. If the responder declines the request, the CHILD-SA can stillPrivate USE numbers described throughout this memo-- private payloads, private exchanges, private notifications, etc. Unfamiliar Vendor IDs MUST beestablished, but will use tunnel mode. Ifignored. Writers of Internet-Drafts who wish to extend thisis unacceptableprotocol MUST define a Vendor ID payload to announce theinitiator, the initiator MUST deleteability to implement theSA. RESERVED TO IANA - STATUS 24586 - 40959 Private Use - STATUS 40960 - 65535 5.11 Delete Payload The Delete Payload, denoted Dextension inthis memo, contains a protocol- specific security association identifierthe Internet-Draft. It is expected that Internet-Drafts which gain acceptance and are standardized will be given "magic numbers" out of thesender has removed from its security association databaseFuture Use range by IANA andis, therefore, no longer valid.the requirement to use a Vendor ID will go away. The Vendor ID Payload fields are defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 IKEv2 [Page 57] INTERNET DRAFT February 2003 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Vendor ID (VID) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure14 shows16: Vendor ID Payload Format o Vendor ID (variable length) - It is theformatresponsibility of theDelete Payload. It is possibleperson choosing the Vendor ID tosend multiple SPIsassure its uniqueness ina Delete payload, however, each SPI MUST be for the same protocol. Mixingspite ofProtocol Identifiers MUST NOT be performed withtheDelete payload. Itabsence of any central registry for IDs. Good practice ispermitted, however,to includemultiple Delete payloads inasingle Informational IKEv2 [Page 50] INTERNET DRAFT January 2003 Exchangecompany name, a person name or some such. If you want to show off, you might include the latitude and longitude and time whereeach Deleteyou were when you chose the ID and some random input. A message digest of a long unique string is preferable to the long unique string itself. The payloadlists SPIstype fora different protocol. Deletion oftheIKE-SAVendor ID Payload isindicatedthirteen (13). 3.13 Traffic Selector Payload The Traffic Selector Payload, denoted TS in this memo, allows peers to identify packet flows for processing bya Protocol-IdIPsec security services. The Traffic Selector Payload consists of the IKE generic header followed by individual traffic selectors as follows: 1 2 3 0(IKE) but no SPIs. Deletion1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Number ofa CHILD-SA, suchTSs ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ <Traffic Selectors> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 17: Traffic Selectors Payload Format o Number of TSs (1 octet) - Number of traffic selectors being provided. o RESERVED - This field MUST be sent asESPzero and MUST be ignored. IKEv2 [Page 58] INTERNET DRAFT February 2003 o Traffic Selectors (variable length) - one orAH, will contain the Protocol-Idmore individual traffic selectors. The length ofthat protocol (e.g. ESP, AH) andtheSPI isTraffic Selector payload includes thereceiving entity's SPI(s).TS header and all the traffic selectors. TheDelete Payloadpayload type for the Traffic Selector payload isdefined as follows:fourteen (14). 3.13.1 Traffic Selector 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !Next Payload !C! RESERVEDTS Type !PayloadProtocol ID | Selector Length!| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start-Port | End-Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !Protocol-Id!SPI Size~ Starting Address ~ !# of SPIs! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~Security Parameter Index(es) (SPI)Ending Address ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure14: Delete Payload Format o Protocol-Id (1 octet) - Must be zero for an IKE-SA, 50 for ESP, or 51 for AH.18: Traffic Selector oSPI Size (1TS Type (one octet)- Length in octets of the SPI as defined by the Protocol-Id. Zero for IKE (SPI is in message header) or four for AH and ESP. o # of SPIs (2 octets) - The number of SPIs contained in the Delete payload. The size of each SPI is defined by the SPI Size field. o Security Parameter Index(es) (variable length) - Identifies the specific security association(s) to delete. The length of this field is determined by the SPI Size and # of SPIs fields. The payload type for the Delete Payload is twelve (12). 5.12 Vendor ID Payload The Vendor ID Payload contains a vendor defined constant. The constant is used by vendors to identify and recognize remote instances- Specifies the type oftheir implementations. This mechanism allows a vendor to experiment with new features while maintaining backwards compatibility. IKEv2 [Page 51] INTERNET DRAFT January 2003 A Vendortraffic selector. o Protocol IDpayload MAY announce(1 octet) - Value specifying an associated IP protocol ID (e.g. UDP/TCP). A value of zero means that thesenderProtocol ID iscapable to accepting certain extensionsnot relevant to this traffic selector-- theprotocol, or it MAY simply identifySA can carry all protocols. o Selector Length - Specifies theimplementation as an aid in debugging. If parameter values "reserved for uselength of this Traffic Selector Substructure including the header. o Start-Port (2 octets) - Value specifying the smallest port number allowed byconsenting parties"this Traffic Selector. For protocols for which port is undefined, or if all ports areused, they must be precededallowed bya Vendor ID payload that disambiguates them. A Vendor ID payload MUST NOT change the interpretation of any information defined inthisspecification (i.e. itTraffic Selector, this field MUST benon-critical). Multiple Vendor ID payloads MAY be sent. An implementation is NOT REQUIRED to send any Vendor ID payload at all. A Vendor ID payload may be sent as part of any message. Reception of a familiar Vendor ID payload allows an implementation to make use of Private USE numbers described throughoutzero. o End-Port (2 octets) - Value specifying the largest port number allowed by thismemo-- private payloads, private exchanges, private notifications, etc. Unfamiliar Vendor IDsTraffic Selector. For protocols for which port is undefined, or it all ports are allowed by this Traffic Selector, this field MUST beignored. Writers of Internet-Drafts who wish to extend65535. IKEv2 [Page 59] INTERNET DRAFT February 2003 o Starting Address - The smallest address included in thisprotocol MUST define a Vendor ID payload to announceTraffic Selector (length determined by TS type). o Ending Address - The largest address included in this Traffic Selector (length determined by TS type). The following table lists theability to implementassigned values for theextension inTraffic Selector Type field and theInternet-Draft. Itcorresponding Address Selector Data. TS Type Value ------- ----- RESERVED 0 TS_IPV4_ADDR_RANGE 7 A range of IPv4 addresses, represented by two four (4) octet values. The first value isexpected that Internet-Drafts which gain acceptancethe beginning IPv4 address (inclusive) and the second value is the ending IPv4 address (inclusive). All addresses falling between the two specified addresses arestandardized willconsidered to begiven "magic numbers" out ofwithin theFuture Uselist. TS_IPV6_ADDR_RANGE 8 A range of IPv6 addresses, represented byIANA and the requirement to use a Vendor ID will go away.two sixteen (16) octet values. TheVendor ID Payload fields are defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Vendor ID (VID) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 15: Vendor ID Payload Format o Vendor ID (variable length) - Itfirst value is theresponsibility ofbeginning IPv6 address (inclusive) and theperson choosingsecond value is theVendor IDending IPv6 address (inclusive). All addresses falling between the two specified addresses are considered toassure its uniquenessbe within the list. 3.14 Encrypted Payload The Encrypted Payload, denoted SK{...} inspite ofthis memo, contains other payloads in encrypted form. The Encrpted Payload, if present in a message, must be theabsence of any central registry for IDs. Good practicelast payload in the message. Often, it isto include a company name, a person name or some such. If you want to show off, you might includethelatitudeonly payload in the message. The algorithms for encryption andlongitudeintegrity protection are negotiated during IKE-SA setup, andtime where you were when you chosetheIDkeys are computed as specified in sections 2.14 andsome random input. A message digest2.18. The encryption and integrity protection algorithms are modelled after the ESP algorithms described in RFCs 2104, 2406, 2451. This document completely specifies the cryptographic processing of IKE data, but those documents should be consulted for design rationale. We assume along unique string is preferable to the long unique string itself.block cipher with a fixed block size and an integrity check algorithm that computes a fixed length checksum over a variable size message. Thepayload type for the Vendor IDPayload Type for an Encrypted payload isthirteen (13).fifteen (15). The IKEv2 [Page52]60] INTERNET DRAFTJanuaryFebruary 20035.13 Traffic Selector Payload The Traffic Selector Payload, denoted TS in this memo, allows peers to identify packet flows for processing by IPsec security services. The Traffic SelectorEncrypted Payload consists of the IKE generic header followed by individualtraffic selectorsfields as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !Number of TSsInitialization Vector !RESERVED! (length is block size for encryption algorithm) ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Encrypted IKE Payloads !~ <Traffic Selectors> ~+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! Padding (0-255 octets) ! +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ ! ! Pad Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Integrity Checksum Data ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure16: Traffic Selectors19: Encrypted Payload Format oNumberNext Payload - The payload type ofTSs (1 octet)the first embedded payload. Since the Encrypted payload must be last in a message, there is no need to specify a payload type for a payload beyond it. o Payload Length -NumberIncludes the lengths oftraffic selectors being provided.the IV, Padding, and Authentication data. oRESERVEDInitialization Vector -This fieldA randomly chosen value whose length is equal to the block length of the underlying encryption algorithm. Recipients MUSTbe sent as zeroaccept any value. Senders SHOULD either pick this value pseudo-randomly and independently for each message or use the final ciphertext block of the previous message sent. Senders MUSTbe ignored. o Traffic Selectors (variable length) - oneNOT use the same value for each message, use a sequence of values with low hamming distance (e.g. a sequence number), ormore individual traffic selectors. Theuse ciphertext from a received message. o IKE Payloads are as specified earlier in this section. This field is encrypted with the negotiated cipher. o Padding may contain any value chosen by the sender, and must have a length that makes the combination of theTraffic Selector payload includesPayloads, theTS headerPadding, andallthetraffic selectors. The payload type forPad Length to be a multiple of theTraffic Selector payloadencryption block size. This field isfourteen (14). 5.13.1 Traffic Selector 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! TS Type ! Protocol ID | Selector Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start-Port | End-Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Starting Address ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! !encrypted with the negotiated cipher. IKEv2 [Page53]61] INTERNET DRAFTJanuaryFebruary 2003~ Ending Address ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 17: Traffic SelectoroTS Type (one octet) - SpecifiesPad Length is thetypelength oftraffic selector. o Protocol ID (1 octet) - Value specifying an associated IP protocol ID (e.g. UDP/TCP). Athe Padding field. The sender SHOULD set the Pad Length to the minimum valueof zero meansthat makes theProtocol ID is not relevant to this traffic selector--combination of theSA can carry all protocols. o SelectorPayloads, the Padding, and the Pad Length- Specifiesa multiple of the block size, but the recipient MUST accept any lengthof this Traffic Selector Substructure includingthat results in proper alignment. This field is encrypted with theheader.negotiated cipher. oStart-Port (2 octets) - Value specifyingIntegrity Checksum Data is thesmallest port number allowed bycryptographic checksum of the entire message starting with the Fixed IKE Header through the Pad Length. The checksum MUST be computed over the encrypted message. 3.15 Configuration Payload The Configuration payload, denoted CP in thisTraffic Selector. For protocolsdocument, is used to exchange configuration information between IKE peers. Currently, the only defined uses forwhich portthis exchange isundefined,for an IRAC to request an internal IP address from an IRAS orif all ports are allowed by this Traffic Selector, this field MUST be zero. o End-Port (2 octets) - Value specifyingfor either party to request version information from thelargest port number allowed byother, but thisTraffic Selector. For protocols for which portpayload isundefined,intended as a likely place for future extensions. Configuration payloads are of type CFG_REQUEST/CFG_REPLY oritCFG_SET/CFG_ACK (see CFG Type in the payload description below). CFG_REQUEST and CFG_SET payloads may optionally be added to any IKE request. The IKE response MUST include either a corresponding CFG_REPLY or CFG_ACK or a Notify payload with an error code indicating why the request could not be honored. An exception is that a minimal implementation MAY ignore allports are allowed by this Traffic Selector, this fieldCFG_REQUEST and CFG_SET payloads, so a response message without a corresponding CFG_REPLY or CFG_ACK MUST be65535. o Starting Address - The smallest address includedaccepted as an indication that the request was not supported. "CFG_REQUEST/CFG_REPLY" allows an IKE endpoint to request information from its peer. If an attribute inthis Traffic Selector (length determined by TS type). o Ending Address -the CFG_REQUEST Configuration Payload is not zero length it is taken as a suggestion for that attribute. Thelargest address includedCFG_REPLY Configuration Payload MAY return that value, or a new one. It MAY also add new attributes and not include some requested ones. Requestors MUST ignore returned attributes that they do not recognise. Some attributes MAY be multi-valued, inthis Traffic Selector (length determined by TS type). The following table lists the assignedwhich case multiple attribute valuesfor the Traffic Selector Type field and the corresponding Address Selector Data. TS Type Value ------- ----- RESERVED 0 TS_IPV4_ADDR_RANGE 7 A rangeofIPv4 addresses, represented by two four (4) octet values. The first value isthebeginning IPv4 address (inclusive) andsame type are sent and/or returned. Generally, all values of an attribute are returned when thesecond valueattribute is requested. For some attributes (in this version of theending IPv4 address (inclusive). All addresses falling between the two specified addresses are considered tospecification only internal addresses), multiple requests indicates a request that multiple values bewithinassigned. For these attributes, thelist. TS_IPV6_ADDR_RANGE 8number of values returned SHOULD NOT exceed the number requested. IKEv2 [Page54]62] INTERNET DRAFTJanuaryFebruary 2003A range of IPv6 addresses, represented by two sixteen (16) octet values. The first valueIf the data type requested in a CFG_REQUEST is not recognised or not supported, thebeginning IPv6 address (inclusive) andresponder MUST NOT return an error code but rather MUST either send a CFG_REPLY which MAY be empty or a reply not containing a CFG_REPLY payload at all. Error returns are reserved for cases where thesecond valuerequest is recognised but cannot be performed as requested or the request is badly formatted. "CFG_SET/CFG_ACK" allows an IKE endpoint to push configuration data to its peer. In this case theending IPv6 address (inclusive). All addresses falling betweenCFG_SET Configuration Payload contains attributes thetwo specified addresses are consideredinitiator wants its peer tobe withinalter. The responder MUST return a Configuration Payload if it accepted any of thelist. TS_IPV4_ADDR_REQUEST 9 This TS type requestsconfiguration data and it MUST contain the attributes that the responderassign an IPv4 address for useaccepted withthis SA. Thezero lengthof the addresses field is zero. TS_IPV6_ADDR_REQUEST 10 This TS type requestsdata. Those attributes that it did not accept MUST NOT be in the CFG_ACK Configuration Payload. If no attributes were accepted, the responderassignMUST return either anIPv6 addressempty CFG_ACK payload or a response message without a CFG_ACK payload. There are currently no defined uses forusethe CFG_SET/CFG_ACK exchange, though they may be used in connection withthis SA. The lengthextensions based on Vendor IDs. An minimal implementation of this specification MAY ignore CFG_SET payloads. Extensions via theaddresses fieldCP payload SHOULD NOT be used for general purpose management. Its main intent iszero. 5.14 Encryptedto provide a bootstrap mechanism to exchange information within IPSec from IRAS to IRAC. While it MAY be useful to use such a method to exchange information between some Security Gateways (SGW) or small networks, existing management protocols such as DHCP [DHCP], RADIUS [RADIUS], SNMP or LDAP [LDAP] should be preferred for enterprise management as well as subsequent information exchanges. The Configuration Payload is defined as follows: 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! CFG Type ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Configuration Attributes ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 20: Configuration Payload Format TheEncrypted Payload, denoted SK{...} in this memo, contains other payloads in encrypted form. The Encrpted Payload, if present in a message, must be the lastpayloadintype for themessage. Often, itConfiguration Payload isthe only payload in the message.16. IKEv2 [Page 63] INTERNET DRAFT February 2003 o CFG Type (1 octet) - Thealgorithms for encryption and integrity protection are negotiated during IKE-SA setup, andtype of exchange represented by thekeysConfiguration Attributes. CFG Type Value =========== ===== RESERVED 0 CFG_REQUEST 1 CFG_REPLY 2 CFG_SET 3 CFG_ACK 4 values 5-127 arecomputed as specified in sections 4.14 and 4.17. The encryption and integrity protection algorithmsreserved to IANA. Values 128-255 aremodelled after the ESP algorithms described in RFCs 2104, 2406, 2451. This document completely specifies the cryptographic processing of IKE data, but those documents should be consultedfordesign rationale. We assume a block cipher with a fixed block size and an integrity check algorithm that computes a fixedprivate use among mutually consenting parties. o RESERVED (3 octets) - MUST be sent as zero; MUST be ignored. o Configuration Attribute (variable length) - These are type lengthchecksum over a variable size message. The mandatoryvalues specific toimplement algorithms are AES-128-CBC and HMAC-SHA1. The Payload Type for an Encrypted payload is fifteen (15). The Encrypted Payload consists oftheIKE generic header followed by individual fields as follows:Configuration Payload and are defined below. There may be zero or more Configuration Attributes in this payload. 3.15.1 Configuration Attributes 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !R| Attribute Type !Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Initialization Vector ! IKEv2 [Page 55] INTERNET DRAFT January 2003 ! (length is block size for encryption algorithm) ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Encrypted IKE Payloads ! + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! Padding (0-255 octets) ! +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ ! ! PadLength!| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~Integrity Checksum DataValue ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure18: Encrypted Payload21: Configuration Attribute Format oNext PayloadReserved (1 bit) - This bit MUST be set to zero and MUST be ignored. o Attribute Type (7 bits) - A unique identifier for each of the Configuration Attribute Types. o Length (2 octets) - Length in octets of Value. o Value (0 or more octets) - Thepayload typevariable length value of this Configuration Attribute. The following attribute types have been defined: IKEv2 [Page 64] INTERNET DRAFT February 2003 Multi- Attribute Type Value Valued Length ======================= ===== ====== ================== RESERVED 0 INTERNAL_IP4_ADDRESS 1 YES* 0 or 4 octets INTERNAL_IP4_NETMASK 2 NO 0 or 4 octets INTERNAL_IP4_DNS 3 YES 0 or 4 octets INTERNAL_IP4_NBNS 4 YES 0 or 4 octets INTERNAL_ADDRESS_EXPIRY 5 NO 0 or 4 octets INTERNAL_IP4_DHCP 6 YES 0 or 4 octets APPLICATION_VERSION 7 NO 0 or more INTERNAL_IP6_ADDRESS 8 YES* 0 or 16 octets INTERNAL_IP6_NETMASK 9 NO 0 or 16 octets INTERNAL_IP6_DNS 10 YES 0 or 16 octets INTERNAL_IP6_NBNS 11 YES 0 or 16 octets INTERNAL_IP6_DHCP 12 YES 0 or 16 octets INTERNAL_IP4_SUBNET 13 NO 0 or 8 octets SUPPORTED_ATTRIBUTES 14 NO Multiple ofthe first embedded payload. Since the Encrypted payload must2 INTERNAL_IP6_SUBNET 15 NO 17 octets * These attributes may belast in a message, there is no needmulti-valued on return only if multiple values were requested. Types 16-16383 are reserved tospecify a payload typeIANA. Values 16384-32767 are fora payload beyond it. o Payload Length - Includes the lengths of the IV, Padding, and Authentication data.private use among mutually consenting parties. oInitialization VectorINTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS -A randomly chosen value whose length is equal to the block length of the underlying encryption algorithm. Recipients MUST accept any value. Senders SHOULD either pick this value pseudo-randomly and independently for each message or use the final ciphertext block of the previous message sent. Senders MUST NOT useAn address on thesame value for each message, use a sequence of values with low hamming distance (e.g.internal network, sometimes called asequence number),red node address oruse ciphertext from a received message. o IKE Payloads are as specified earlier in this section. This field is encrypted with the negotiated cipher. o Padding may contain any value chosen by the sender,private address andmust haveMAY be alength that makes the combination of the Payloads, the Padding, andprivate address on thePad Length toInternet. Multiple internal addresses MAY bearequested by requesting multipleof the encryption block size. This field is encrypted with the negotiated cipher. o Pad Length is the length of the Padding field.internal address attributes. Thesender SHOULD set the Pad Lengthresponder MAY only send up to theminimum value that makes the combinationnumber of addresses requested. The requested address is valid until thePayloads, the Padding, andexpiry time defined with thePad Length a multiple ofINTERNAL_ADDRESS EXPIRY attribute or there are no IKE-SAs between theblock size, butpeers. o INTERNAL_IP4_NETMASK, INTERNAL_IP6_NETMASK - The internal network's netmask. Only one netmask is allowed in therecipientrequest and reply messages (e.g. 255.255.255.0) and it MUSTaccept any length that results in proper alignment. This field is encryptedbe used only withthe negotiated cipher.an INTERNAL_ADDRESS attribute. oIntegrity Checksum Data is the cryptographic checksumINTERNAL_IP4_DNS, INTERNAL_IP6_DNS - Specifies an address of a DNS server within theentire message startingnetwork. Multiple DNS servers MAY be requested. The responder MAY respond withthe Fixed IKE Headerzero or more DNS server attributes. o INTERNAL_IP4_NBNS, INTERNAL_IP6_NBNS - Specifies an address of IKEv2 [Page56]65] INTERNET DRAFTJanuaryFebruary 2003througha NetBios Name Server (WINS) within thePad Length. The checksum MUSTnetwork. Multiple NBNS servers MAY becomputed over the encrypted message. 5.15 Configuration Payloadrequested. TheConfiguration payload, denoted CP in this document, is used to exchange configuration information between IKE peers. Currently,responder MAY respond with zero or more NBNS server attributes. o INTERNAL_ADDRESS_EXPIRY - Specifies the number of seconds that the host can use theonly defined uses for this exchange is for an IRAC to request aninternal IPaddress from an IRAS or for either party to request version information fromaddress. The host MUST renew theother, butIP address before thispayload is intended as a likely place for future extensions. Configuration payloads areexpiry time. Only one oftype CFG_REQUEST/CFG_REPLY or CFG_SET/CFG_ACK (see CFG Typethese attributes MAY be present in thepayload description below). CFG_REQUEST and CFG_SET payloads may optionally be addedreply. o INTERNAL_IP4_DHCP, INTERNAL_IP6_DHCP - Instructs the host to send anyIKE request.internal DHCP requests to the address contained within the attribute. Multiple DHCP servers MAY be requested. TheIKE response MUST include either a corresponding CFG_REPLYresponder MAY respond with zero orCFG_ACKmore DHCP server attributes. o APPLICATION_VERSION - The version ora Notify payload with an error code indicating why the request could not be honored. "CFG_REQUEST/CFG_REPLY" allows an IKE endpoint to requestapplication informationfrom its peer. If an attribute inof theCFG_REQUEST Configuration Payload is not zero length itIPSec host. This istaken asasuggestion forstring of printable ASCII characters thatattribute.is NOT null terminated. o INTERNAL_IP4_SUBNET - TheCFG_REPLY Configuration Payload MAY returnprotected sub-networks thatvalue, orthis edge-device protects. This attribute is made up of two fields; the first being an IP address and the second being anew one. Itnetmask. Multiple sub-networks MAYalso add new attributesbe requested. The responder MAY respond with zero or more sub-network attributes. o SUPPORTED_ATTRIBUTES - When used within a Request, this attribute must be zero length andnot include some requested ones. Requestors MUST ignore returnedspecifies a query to the responder to reply back with all of the attributes thatthey do not recognise. Some attributes MAY be multi-valued, in which case multipleit supports. The response contains an attributevaluesthat contains a set of attribute identifiers each in 2 octets. The length divided by 2 (bytes) would state thesame type are sent and/or returned. Generally, all valuesnumber ofan attribute are returned whensupported attributes contained in the response. o INTERNAL_IP6_SUBNET - The protected sub-networks that this edge-device protects. This attribute isrequested. For some attributes (in this versionmade up of two fields; thespecification only internal addresses), multiple requests indicatesfirst being arequest that multiple values be assigned. For these attributes, the number of values returned SHOULD NOT exceed the number requested. If16 octet IPv6 address thedata type requested insecond being aCFG_REQUEST is not recognised or not supported, theone octet prefix-mask as defined in [ADDRIPV6]. Multiple sub-networks MAY be requested. The responderMUST NOT returnMAY respond with zero or more sub-network attributes. Note that no recommendations are made in this document how anerror code but rather MUSTimplementation actually figures out what information to send in aCFG_REPLYreply. i.e. we do not recommend any specific method of an IRAS determining whichMAY be empty. Error returns are reserved for cases where the request is recognised but cannotDNS server should beperformed as requested or the request is badly formatted. "CFG_SET/CFG_ACK" allows an IKE endpoint to push configuration data to its peer. In this case the CFG_SET Configuration Payload contains attributes the initiator wants its peerreturned toalter. The responder MUST returnaConfigurationrequesting IRAC. 3.16 Extended Authentication Protocol (EAP) Payloadand it MUST contain the zero length attributes that the responder accepted. Those attributes that it did not accept MUST NOT be in the CFG_ACK Configuration Payload. There are currently no defined uses for the CFG_SET/CFG_ACK exchange,The Extended Authentication Protocol Payload, denoted EAP in this IKEv2 [Page57]66] INTERNET DRAFTJanuaryFebruary 2003though they maymemo, allows IKE SAs to beusedauthenticated using the protocol defined inconnection withRFC 2284 [EAP] and subsequent extensionsbased on Vendor IDs. An implementationto that protocol. The full set ofthis specification without extensions MUST recogniseacceptable values for theCFG_SETpayload are defined elsewhere, butMUST always respond with an empty CFG_ACK. Extensions via the CP payload SHOULD NOT be used for general purpose management. Its main intent is to provide a bootstrap mechanism to exchange information within IPSec from IRAS to IRAC. While it MAY be useful to use suchamethod to exchange information between some Security Gateways (SGW) or small networks, existing management protocols such as DHCP [DHCP], RADIUS [RADIUS], SNMP or LDAP [LDAP] should be preferred for enterprise management as well as subsequent information exchanges. The Configuration Payloadshort summary of RFC 2284 isdefined as follows:included here to make this document stand alone in the common cases. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !CFG Type ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !! ~Configuration AttributesEAP Message ~ ! !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 19: Configuration Payload Format The payload type for the Configuration Payload is 16. o CFG Type (1 octet) - The type of exchange represented by the Configuration Attributes. CFG Type Value =========== ===== RESERVED 0 CFG_REQUEST 1 CFG_REPLY 2 CFG_SET 3 CFG_ACK 4 values 5-127 are reserved to IANA. Values 128-255 are for private use among mutually consenting parties. o RESERVED (3 octets) - MUST be sent as zero; MUST be ignored. IKEv2 [Page 58] INTERNET DRAFT January 2003 o Configuration Attribute (variable length) - These are type length values specific to the Configuration+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 22: EAP Payloadand are defined below. There may be zero or more Configuration Attributes in this payload. 5.15.1 Configuration AttributesFormat 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+!R| Attribute Type! Code ! Identifier ! Length| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Value ~ | |! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Type ! Type-Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Figure20: Configuration Attribute23: EAP Message Format oReserved (1 bit) - This bitCode (one octet) indicates whether this message is a Request (1), Response (2), Success (3), or Failure (4). o Identifier (one octet) is used in PPP to distinguish replayed messages from repeated ones. Since in IKE, EAP runs over a reliable protocol, it serves no function here. In a response message this octet MUST be set tozero and MUST be ignored. o Attribute Type (7 bits) - A uniquematch the identifierfor each ofin theConfiguration Attribute Types.corresponding request. In other messages, this field MAY be set to any value. o Length(2 octets) - Length in octets of Value. o Value (0 or more(two octets)- The variableis the lengthvalue of this Configuration Attribute. The following attribute types have been defined: MUST Multi- Attribute Type Value Support Valued Length ======================= ===== ======= ====== ================== RESERVED 0 INTERNAL_IP4_ADDRESS 1 YES YES* 0 or 4 octets INTERNAL_IP4_NETMASK 2 NO NO 0 or 4 octets INTERNAL_IP4_DNS 3 NO YES 0 or 4 octets INTERNAL_IP4_NBNS 4 NO YES 0 or 4 octets INTERNAL_ADDRESS_EXPIRY 5 YES NO 0 or 4 octets INTERNAL_IP4_DHCP 6 NO YES 0 or 4 octets APPLICATION_VERSION 7 YES NO 0 or more INTERNAL_IP6_ADDRESS 8 YES YES* 0 or 16 octets INTERNAL_IP6_NETMASK 9 NO NO 0 or 16 octets INTERNAL_IP6_DNS 10 NO YES 0 or 16 octets INTERNAL_IP6_NBNS 11 NO YES 0of the EAP message and MUST be four less than the Payload Length of the encapsulating payload. o Type (one octet) is present only if the Code field is Request (1) or16Response (2). For other types, the EAP message length MUST be four octetsINTERNAL_IP6_DHCP 12 NO YES 0and the Type and Type-Data fields MUST NOT be present. In a Request (1) message, Type indicates the data being requested. In a Response (2) message, Type must either be NAC or16 octetsmatch the type of the data requested. The IKEv2 [Page59]67] INTERNET DRAFTJanuaryFebruary 2003INTERNAL_IP4_SUBNET 13 YES NO 0 or 8 octets SUPPORTED_ATTRIBUTES 14 YES NO Multiple of 2 INTERNAL_IP6_SUBNET 15 YES NO 17 octets * These attributes may be multi-valued on return only if multiple values were requested. Types 16-16383 are reserved to IANA. Values 16384-32767following types arefor private use among mutually consenting parties.defined in RFC 2284: 1 Identity 2 Notification 3 NAK (Response Only) 4 MD5-Challenge 5 One-Time Password (OTP) 6 Generic Token Card oINTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS - An addressType-Data (Variable Length) contains data depending on theinternal network, sometimes called a red node address or private addressCode andMAYType. In Requests other than MD5-Challenge, this field contains a prompt to be displayed to aprivate address onhuman user. For NAK, it contains one octet suggesting theInternet. Multiple internal addresses MAY be requestedform of authentication the Initiator would prefer to use. For most other responses, it contains the authentication code typed byrequesting multiple internal address attributes. The responder MAY only send upthe human user. Note that since IKE passes an indication of initiator identity in message 3 of the protocol, EAP based prompts for Identity SHOULD NOT be used. 3.17 Other Payload Types Payload type values 17-127 are reserved to IANA for future assignment in IKEv2 (see section 10). Payload type values 128-255 are for private use among mutually consenting parties. 4 Conformance Requirements In order tothe numberassure that all implementations ofaddresses requested. The requested address is valid until the expiry time defined with the INTERNAL_ADDRESS EXPIRY attribute orIKEv2 can interoperate, there areno IKE-SAs between the peers. o INTERNAL_IP4_NETMASK, INTERNAL_IP6_NETMASK - The internal network's netmask. OnlyMUST support requirements in addition to those listed elsewhere. Of course, IKEv2 is a security protocol, and onenetmaskof its major functions isallowed inpreventing therequest and reply messages (e.g. 255.255.255.0) and it MUST be used onlybad guys from interoperating withan INTERNAL_ADDRESS attribute. o INTERNAL_IP4_DNS, INTERNAL_IP6_DNS - Specifies an address ofone's systems. So aDNS server within the network. Multiple DNS servers MAYparticular implementation may berequested. The responder MAY respondconfigured withzero or more DNS server attributes. o INTERNAL_IP4_NBNS, INTERNAL_IP6_NBNS - Specifies an addressany of aNetBios Name Server (WINS) within the network. Multiple NBNS servers MAY be requested. The responder MAY respond with zero or more NBNS server attributes. o INTERNAL_ADDRESS_EXPIRY - Specifies thenumber ofsecondsrestrictions concerning algorithms and trusted authorities that will prevent universal interoperability. IKEv2 is designed to permit minimal implementations thatthe hostcanuse the internal IP address. The host MUST renewinteroperate with all compliant implementations. There are a series of optional features that can easily be ignored by a particular implementation if it does not support that feature. Those features include: Ability to negotiate SAs through a NAT and tunnel the resulting ESP SA over UDP. Ability to request (and respond to a request for) a temporary IP addressbefore this expiry time. Only oneon the remote end ofthese attributesa tunnel. IKEv2 [Page60]68] INTERNET DRAFTJanuaryFebruary 2003MAYAbility to support various forms of legacy authentication. Ability to support window sizes greater than one. Ability to establish multiple ESP and/or AH SAs within a single IKE SA. Ability to rekey SAs. To assure interoperability, all implementations MUST bepresent in the reply. o INTERNAL_IP4_DHCP, INTERNAL_IP6_DHCP - Instructs the hostcapable of parsing all payload types (if only tosend any internal DHCP requestsskip over them) and to ignore payload types that it does not support unless theaddress contained withincritical bit is set in theattribute. Multiple DHCP serverspayload header. If the critical bit is set in an unsupported payload header, all implementations MUST reject the messages containing those payloads. Every implementation MUST be capable of doing four message IKE_SA_INIT and IKE_AUTH exchanges establishing two SAs (one for IKE, one for ESP and/or AH). Implementations MAY berequested. The responderinitiate-only or respond-only if appropriate for their platform. Every implementation MUST be capable of responding to an INFORMATIONAL exchange, but a minimal implementation MAY respond to any INFORMATIONAL message withzero or more DHCP server attributes. o APPLICATION_VERSION - The version or application information ofan empty INFORMATIONAL reply. A minimal implementation MAY support theIPSec host. This isCREATE_CHILD_SA exchange only in so far as to recognise requests and reject them with astring of printable ASCII characters that is NOT null terminated. o INTERNAL_IP4_SUBNET - The protected sub-networks that this edge- device protects. This attribute is made upNotify payload oftwo fields; the first beingtype NO-ADDITIONAL-SAS. A minimal implementation need not be able to initiate CREATE_CHILD_SA or INFORMATIONAL exchanges. When anIP addressSA expires (based on either lifetime or bytes passed), andthe second being a netmask. Multiple sub-networks MAY be requested. The responderimplementation MAYrespondeither try to renew it withzero or more sub-network attributes. o SUPPORTED_ATTRIBUTES - When used withinaRequest, this attribute must be zero lengthCREATE_CHILD_SA exchange or it MAY delete (close) the old SA andspecifiescreate aquery tonew one. If the responderto reply back with all ofrejects theattributes that it supports. The response contains an attribute that containsCREATE_CHILD_SA request with aset of attribute identifiers each in 2 octets. The length divided by 2 (bytes) would state the number of supported attributes contained inNO-ADDITIONAL-SAS notification, theresponse. o INTERNAL_IP6_SUBNET - The protected sub-networks that this edge- device protects. This attribute is made upimplementation MUST be capable oftwo fields;instead closing thefirst beingold SA and creating a16 octet IPv6 address the second beingnew one. Implementations are not required to support requesting temporary IP addresses or responding to such requests. If an implementation does support issuing such requests, it MUST include aone octet prefix-mask as definedCP payload in[ADDRIPV6]. Multiple sub-networks MAY be requested. The responder MAY respond with zeromessage 3 containing at least a field of type INTERNAL_IP4_ADDRESS ormore sub- network attributes. Note that no recommendationsINTERNAL_IP6_ADDRESS. All other fields aremade in this document howoptional. If an implementationactually figures out what informationsupports responding tosendsuch requests, it MUST parse the CP payload of type CFG_REQUEST in message 3 and recognise a field of type INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS. If it supports leasing an address of the appropriate type, it MUST return areply. i.e. we do not recommend any specific methodCP payload of type CFG_REPLY containing anIRAS determining which DNS server should be returnedaddress of the requested type. The responder SHOULD include all of the other related attributes if it has them. A minimal responder implementation will ignore the contents of the CP payload except toa requesting IRAC. 5.16 Other Payload Typesdetermine that it includes an INTERNAL_IP4_ADDRESS IKEv2 [Page61]69] INTERNET DRAFTJanuaryFebruary 2003Payload type values 17-127 are reserved to IANA for future assignment in IKEv2 (see section 10). Payload type values 128-255 are for private use among mutually consenting parties. 6 Conformance Requirements In order to assure that all implementationsattribute and will respond with the address and other related attributes regardless ofIKEv2 can interoperate, there arewhether the initiator requested them. A minimal initiator will generate a CP payload containing only an INTERNAL_IP4_ADDRESS attribute and will parse the response ignoring attributes it does not know how to use. The only attribute it MUSTsupport requirements in additionbe able tothose listed elsewhere. Of course, IKEv2process isa security protocol, and oneINTERNAL_ADDRESS_EXPIRY, which it must use to bound the lifetime ofits major functions is preventingthebad guys from interoperating with one's systems. So a particular implementation maySA unless it successfully renews the lease before it expires. Minimal initiators need not beconfigured with any of a number of restrictions concerning algorithmsable to request lease renewals andtrusted authorities that will prevent universal interoperability.minimal responders need not respond to them. For an implementation to be called conforming to this specification, it MUST be possible to configure it to accept thefollowing: RSA keys: 1024following: PKIX Certificates containing and signed by RSA keys of size 1024 or 2048 bits, where the ID passed is any of ID_KEY_ID, ID_FQDN, ID_RFC822_ADDR, or ID_DER_ASN1_DN. Shared key authentication where the ID passes is any of ID_KEY_ID, ID_FQDN, or ID_RFC822_ADDR. Authentication where the responder authenticates using PKIX Certificates and2048 bits Cert types/lengths/algs Symmetricthe initiator authenticates using shared key(pwd authentication) setup 1 CHILD-SA in first 4 messages; may reject subsequent. Must respond to "pings". Must accept "deletes". Must respond to all messages; may ignore all but delete (what if ignores delete?). .... 7authentication. 5 Security Considerations Repeated re-keying usingPhase 2CREATE_CHILD_SA without PFScan consume the entropyleave all SAs vulnerable to cryptanalysis ofthe Diffie-Hellman shared secret.a single key or overrun of either endpoint. Implementers should take note of this fact and set a limit onPhase 2 ExchangesCREATE_CHILD_SA exchanges between exponentiations. This memo does not prescribe such a limit. The strength of a key derived from a Diffie-Hellman exchange using any of the groups defined here depends on the inherent strength of the group, the size of the exponent used, and the entropy provided by the random number generator used. Due to these inputs it is difficult to determine the strength of a key for any of the defined groups. Diffie-Hellman group number two when used with a strong random number generator and an exponent no less than 160 bits is sufficient to use for 3DES. Groups three through five provide greater security. Group one is for historic purposes only and does not provide sufficient strength to the required cipher (although it is sufficient for use with DES, which is also for historic use only). Implementations should make note of these conservative estimates when establishingIKEv2 [Page 62] INTERNET DRAFT January 2003policy and negotiating security parameters. Note that these limitations are on the Diffie-Hellman groups IKEv2 [Page 70] INTERNET DRAFT February 2003 themselves. There is nothing in IKE which prohibits using stronger groups nor is there anything which will dilute the strength obtained from stronger groups. In fact, the extensible framework of IKE encourages the definition of more groups; use of elliptical curve groups may greatly increase strength using much smaller numbers. It is assumed that the Diffie-Hellman exponents in this exchange are erased from memory after use. In particular, these exponents MUST NOT be derived from long-lived secrets like the seed to a pseudo-random generator that is not erased after use. The security of this protocol is critically dependent on the randomness of the Diffie-Hellman exponents, which should be generated by a strong random or properly seeded pseudo-random source (see RFC1715). While the protocol was designed to be secure even if the Nonces and other values specified as random are not strongly random, they should similarly be generated from a strong random source as part of a conservative design.86 IANA Considerations This document contains many "magic numbers" to be maintained by the IANA. This section explains the criteria to be used by the IANA to assign additional numbers in each of these lists. Cryptographic Suite-IDs Error Codes Status Codes IPcomp Transform IDs Configuration request types Configuration attribute types Payload Types IKE Exchange Types Values of the Cryptographic Suite-ID define a set of cryptographic algorithms to be used in an IKE, ESP, or AH SA. Requests for assignment of new values must be accompanied by a reference to an RFC that describes how to use these algorithms. This memo definesthreefour exchange types for use with IKEv2. Requests for assignment of new exchange types MUST be accompanied by an RFC which defines the following: - the purpose of and need for the new exchange. - the payloads (mandatory and optional) that accompanyIKEv2 [Page 63] INTERNET DRAFT January 2003messages in the exchange. - when thephase of the exchange.exchange may take place. - requirements the new exchange has on existing IKEv2 [Page 71] INTERNET DRAFT February 2003 exchanges which have assigned numbers. Payloads are defined in this memo to convey information between peers. New payloads may be required when defining a new authentication method or exchange. Requests for new payload types MUST be accompanied by an RFC which defines the physical layout of the payload and the fields it contains. All payloads MUST use the same generic header defined in Figure2. 95. 7 Acknowledgements This document is a collaborative effort of the entire IPsec WG. If there were no limit to the number of authors that could appear on an RFC, the following, in alphabetical order, would have been listed: Bill Aiello, Stephane Beaulieu, Steve Bellovin, Sara Bitan, Matt Blaze, Ran Canetti, Darren Dukes, Dan Harkins, Paul Hoffman, J. Ioannidis, Steve Kent, Angelos Keromytis, Tero Kivinen, Hugo Krawczyk, Andrew Krywaniuk, Radia Perlman, O. Reingold. Many other people contributed to the design. It is an evolution of IKEv1, ISAKMP, and the IPSec DOI, each of which has its own list of authors. Hugh Daniel suggested the feature of having the initiator, in message 3, specify a name for the responder, and gave the feature the cute name "You Tarzan, Me Jane". David Faucher and Valery Smyzlov helped refine the design of the traffic selector negotiation.108 References10.18.1 Normative References [Bra96] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996. [Bra97] Bradner, S., "Key Words for use in RFCs to indicate Requirement Levels", BCP 14, RFC 2119, March 1997.10.2[EAP] Blunk, L. and Volibrecht, J., "PPP Extensible Authentication Protocol (EAP), RFC 2284, March 1998. 8.2 Non-normative References [Ble98] Bleichenbacher, D., "Chosen Ciphertext Attacks against Protocols Based on RSA Encryption Standard PKCS#1", Advances in Cryptology Eurocrypt '98, Springer-Verlag, 1998. [BR94] Bellare, M., and Rogaway P., "Optimal Asymmetric Encryption", Advances in Cryptology Eurocrypt '94, Springer-Verlag, 1994. IKEv2 [Page64]72] INTERNET DRAFTJanuaryFebruary 2003 [DES] ANSI X3.106, "American National Standard for Information Systems-Data Link Encryption", American National Standards Institute, 1983. [DH] Diffie, W., and Hellman M., "New Directions in Cryptography", IEEE Transactions on Information Theory, V. IT-22, n. 6, June 1977. [DHCP] R. Droms, "Dynamic Host Configuration Protocol", RFC2131 [DSS] NIST, "Digital Signature Standard", FIPS 186, National Institute of Standards and Technology, U.S. Department of Commerce, May, 1994. [HC98] Harkins, D., Carrel, D., "The Internet Key Exchange (IKE)", RFC 2409, November 1998. [IDEA] Lai, X., "On the Design and Security of Block Ciphers," ETH Series in Information Processing, v. 1, Konstanz: Hartung- Gorre Verlag, 1992 [Ker01] Keronytis, A., Sommerfeld, B., "The 'Suggested ID' Extension for IKE", draft-keronytis-ike-id-00.txt, 2001 [KBC96] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, February 1997. [LDAP] M. Wahl, T. Howes, S. Kille., "Lightweight Directory Access Protocol (v3)", RFC2251 [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321, April 1992. [MSST98] Maughhan, D., Schertler, M., Schneider, M., and Turner, J. "Internet Security Association and Key Management Protocol (ISAKMP)", RFC 2408, November 1998. [Orm96] Orman, H., "The Oakley Key Determination Protocol", RFC 2412, November 1998. [PFKEY] McDonald, D., Metz, C., and Phan, B., "PFKEY Key Management API, Version 2", RFC2367, July 1998. [PKCS1] Kaliski, B., and J. Staddon, "PKCS #1: RSA Cryptography Specifications Version 2", September 1998. IKEv2 [Page65]73] INTERNET DRAFTJanuaryFebruary 2003 [PK01] Perlman, R., and Kaufman, C., "Analysis of the IPsec key exchange Standard", WET-ICE Security Conference, MIT, 2001, http://sec.femto.org/wetice-2001/papers/radia-paper.pdf. [Pip98] Piper, D., "The Internet IP Security Domain Of Interpretation for ISAKMP", RFC 2407, November 1998. [RADIUS] C. Rigney, A. Rubens, W. Simpson, S. Willens, "Remote Authentication Dial In User Service (RADIUS)", RFC2138 [RSA] Rivest, R., Shamir, A., and Adleman, L., "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems", Communications of the ACM, v. 21, n. 2, February 1978. [SHA] NIST, "Secure Hash Standard", FIPS 180-1, National Institute of Standards and Technology, U.S. Department of Commerce, May 1994. [SKEME] Krawczyk, H., "SKEME: A Versatile Secure Key Exchange Mechanism forInternet", from IEEE Proceedings of the 1996 Symposium on Network and Distributed Systems Security. IKEv2 [Page 66] INTERNET DRAFT January 2003 Appendix A: NAT Traversal NAT (Network Address Translation) gateways are a controversial subject. This appendix briefly describes what they are and how they are likely to act on IKE traffic. Many people believe that NATs are evil and that we should not design our protocols so as to make them work better. IKEv2 does specify some unintuitive processing rules in order that NATs are more likely to work. NATs exist primarily because of the shortage of IPv4 addresses, though there are other rationales. IP nodes that are "behind" a NAT have IP addresses that are not globally unique, but rather are assignedInternet", fromsome space that is unique within the network behind the NAT but which are likely to be reused by nodes behind other NATs. Generally, nodes behind NATs can communicate with other nodes behindIEEE Proceedings of thesame NAT and with nodes with globally unique addresses, but not with nodes behind other NATs. There are exceptions to that rule. When those nodes make connections to nodes1996 Symposium onthe real Internet, the NAT gateway "translates" the IP source address to an address that will be routed back to the gateway. Messages to the gatewayNetwork and Distributed Systems Security. IKEv2 [Page 74] INTERNET DRAFT February 2003 Appendix A: Summary of changes fromthe Internet have their destination addresses "translated" to the internal address that will route the packetIKEv1 The goals of this revision to IKE are: 1) To define thecorrect endnode. NATs are designed to be "transparent"entire IKE protocol in a single document, replacing RFCs 2407, 2408, and 2409 and incorporating subsequent changes toendnodes. Neither software on the node behind thesupport NATnor the node on the Internet require modification to communicate throughTraversal, Extended Authentication, and Remote Address acquisition. 2) To simplify IKE by replacing theNAT. Achieving this transparency is more difficulteight different initial exchanges withsome protocolsa single four message exchange (with changes in authentication mechanisms affecting only a single AUTH payload rather thanwith others. Protocols that include IP addresses ofrestructuring theendpoints withinentire exchange); 3) To remove thepayloadsDomain ofthe packet will fail unless the NAT gateway understands the protocolInterpretation (DOI), Situation (SIT), and Labeled Domain Identifier fields, andmodifiestheinternal references as well as thoseCommit and Authentication only bits; 4) To decrease IKE's latency in theheaders. Such knowledge is inherently unreliable, is a network layer violation,common case by making the initial exchange be 2 round trips (4 messages), andoften results in subtle problems. Opening an IPsec connection throughallowing the ability to piggyback setup of aNAT introduces special problems. IfCHILD-SA on that exchange; 5) To replace theconnection runs in transport mode, changingcryptographic syntax for protecting theIP addressesIKE messages themselves with one based closely onpackets will cause the checksumsESP tofailsimplify implementation and security analysis; 6) To reduce theNAT cannot correct the checksums because they are cryptographically protected. Even in tunnel mode, there are routing problems because transparently translating the addressesnumber ofAH and ESP packets requires special logic inpossible error states by making theNAT and that logic is heuristic and unreliable in nature. For that reason, IKEv2 can negotiate UDP encapsulation of ESPprotocol reliable (all messages are acknowledged) andAH packets.sequenced. Thisencoding is slightly less efficient but is easier for NATs to process. In addition, firewalls may be configured to pass IPsec traffic over UDP but not ESP/AH or vice versa. It is a common practice of NATsallows shortening CREATE_CHILD_SA exchanges from 3 messages totranslate TCP and UDP port numbers as well as addresses and use2; 7) To increase robustness by allowing theport numbers of inbound packetsresponder toIKEv2 [Page 67] INTERNET DRAFT January 2003 decide which internal node should getnot do significant processing until it receives agiven packet. For this reason, even though IKE packets MUST be sent frommessage proving that the initiator can receive messages at its claimed IP address, andto UDP port 500, they SHOULD be accepted coming fromnot commit anyport and responses SHOULD be sentstate to an exchange until theport from whence they came. This is because the ports mayinitiator can bemodifiedcryptographically authenticated; 8) To fix bugs such as thepackets pass through NATs. Similarly, IP addresses of the IKE endpoints are generally not includedhash problem documented inthe IKE[draft-ietf- ipsec-ike-hash-revised-02.txt]; 9) To specify Traffic Selectors in their own payloadsbecausetype rather than overloading ID payloads, and making more flexible thepayloads are cryptographically protectedTraffic Selectors that may be specified; 10) To replace the complex mix andcouldmatch negotiation of cryptographic algorithms with proposals based on suites of algorithms; 11) To specify required behavior under certain error conditions or IKEv2 [Page 75] INTERNET DRAFT February 2003 when data that is notbe transparently modified by NATs. Port 4500understood isreserved for UDP encapsulated ESP, AH, and IKE. When working through a NAT,received in order to make itis generally bettereasier topass IKE packets over port 4500 because some older NATs modify IKE traffic on port 500make future revisions inan attempt to transparently establish IPsec connections. Such NATs may interfere with the straightforward NAT traversal envisioned by this document, so an IPsec endpoint that discoversa way that does not break backwards compatibility; 12) To incorporate ideas from draft-ietf-ipsec-nat-reqts-02.txt to allow IKE to negotiate through NATbetween itgateways; 12) To simplify andits correspondent SHOULD send all subsequent traffic toclarify how shared state is maintained in the presence of network failures andfrom port 4500, which all NATs should know runDenial of Service attacks; and 13) To maintain existing syntax and magic numbers to theNAT-friendly protocol.extent possible to make it likely that implementations of IKEv1 can be enhanced to support IKEv2 with minimum effort. IKEv2 [Page68]76] INTERNET DRAFTJanuaryFebruary 2003 Appendix B: Diffie-Hellman Groups There are 5 groups different Diffie-Hellman groups defined for use in IKE. These groups were generated by Richard Schroeppel at the University of Arizona. Properties of these primes are described in [Orm96]. The strength supplied by group one may not be sufficient for the mandatory-to-implement encryption algorithm and is here for historic reasons. Additional Diffie-Hellman groups have been defined in [ADDGROUP]. Future IANA-registered and private use Suite-IDs MAY use Diffie- Hellman groups that have modulus values and generators that are different than those in this document or in [ADDGROUP]. B.1 Group 1 - 768 Bit MODP IKE implementations MAY support a MODP group with the following prime and generator. This group is assigned id 1 (one). The prime is: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } Its hexadecimal value is: FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF The generator is 2. B.2 Group 2 - 1024 Bit MODP IKE implementations SHOULD support a MODP group with the following prime and generator. This group is assigned id 2 (two). IKEv2 [Page69]77] INTERNET DRAFTJanuaryFebruary 2003 The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }. Its hexadecimal value is: FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 FFFFFFFF FFFFFFFF The generator is 2. B.3 Group 3 - 155 Bit EC2N IKE implementations MAY support a EC2N group with the following characteristics. This group is assigned id 3 (three). The curve is based on the Galois Field GF[2^155]. The field size is 155. The irreducible polynomial for the field is: u^155 + u^62 + 1. The equation for the elliptic curve is: y^2 + xy = x^3 + ax^2 + b. Field Size: 155 Group Prime/Irreducible Polynomial: 0x0800000000000000000000004000000000000001 Group Generator One: 0x7b Group Curve A: 0x0 Group Curve B: 0x07338f Group Order: 0x0800000000000000000057db5698537193aef944 The data in the KE payload when using this group is the value x from the solution (x,y), the point on the curve chosen by taking the randomly chosen secret Ka and computing Ka*P, where * is the repetition of the group addition and double operations, P is the curve point with x coordinate equal to generator 1 and the y coordinate determined from the defining equation. The equation of curve is implicitly known by the Group Type and the A and B coefficients. There are two possible values for the y coordinate; either one can be used successfully (the two parties need not agree on the selection). IKEv2 [Page70]78] INTERNET DRAFTJanuaryFebruary 2003 B.4 Group 4 - 185 Bit EC2N IKE implementations MAY support a EC2N group with the following characteristics. This group is assigned id 4 (four). The curve is based on the Galois Field GF[2^185]. The field size is 185. The irreducible polynomial for the field is: u^185 + u^69 + 1. The equation for the elliptic curve is: y^2 + xy = x^3 + ax^2 + b. Field Size: 185 Group Prime/Irreducible Polynomial: 0x020000000000000000000000000000200000000000000001 Group Generator One: 0x18 Group Curve A: 0x0 Group Curve B: 0x1ee9 Group Order: 0x01ffffffffffffffffffffffdbf2f889b73e484175f94ebc The data in the KE payload when using this group will be identical to that as when using Oakley Group 3 (three). B.5 Group 5 - 1536 Bit MODP IKE implementations MUST support a MODP group with the following prime and generator. This group is assigned id 5 (five). The prime is 2^1536 - 2^1472 - 1 + 2^64 * {[2^1406 pi] + 741804}. Its hexadecimal value is FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F 83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D 670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF The generator is 2. Change History H.1 Changes from IKEv2-00 to IKEv2-01 February 2002 1) Changed Appendix B to specify the encryption and authentication processing for IKE rather than referencing ESP. Simplified the format IKEv2 [Page71]79] INTERNET DRAFTJanuaryFebruary 2003 by removing idiosyncracies not needed for IKE. 2) Added option for authentication via a shared secret key. 3) Specified different keys in the two directions of IKE messages. Removed requirement of different cookies in the two directions since now no longer required. 4) Change the quantities signed by the two ends in AUTH fields to assure the two parties sign different quantities. 5) Changed reference to AES to AES_128. 6) Removed requirement that Diffie-Hellman be repeated when rekeying IKE-SA. 7) Fixed typos. 8) Clarified requirements around use of port 500 at the remote end in support of NAT. 9) Clarified required ordering for payloads. 10) Suggested mechanisms for avoiding DoS attacks. 11) Removed claims in some places that the first phase 2 piggybacked on phase 1 was optional. H.2 Changes from IKEv2-01 to IKEv2-02 April 2002 1) Moved the Initiator CERTREQ payload from message 1 to message 3. 2) Added a second optional ID payload in message 3 for the Initiator to name a desired Responder to support the case where multiple named identities are served by a single IP address. 3) Deleted the optimization whereby the Diffie-Hellman group did not need to be specified in phase 2 if it was the same as in phase 1 (it complicated the design with no meaningful benefit). 4) Added a section on the implications of reusing Diffie-Hellman expontentials 5) Changed the specification of sequence numbers to being at 0 in both directions. 6) Many editorial changes and corrections, the most significant being a global replace of "byte" with "octet". IKEv2 [Page72]80] INTERNET DRAFTJanuaryFebruary 2003 H.3 Changes from IKEv2-02 to IKEv2-03 October 2002 1) Reorganized the document moving introductory material to the front. 2) Simplified the specification of Traffic Selectors to allow only IPv4 and IPv6 address ranges, as was done in the JFK spec. 3) Fixed the problem brought up by David Faucher with the fix suggested by Valery Smyslov. If Bob needs to narrow the selector range, but has more than one matching narrower range, then if Alice's first selector is a single address pair, Bob chooses the range that encompasses that. 4) To harmonize with the JFK spec, changed the exchange so that the initial exchange can be completed in four messages even if the responder must invoke an anti-clogging defense and the initiator incorrectly anticipates the responder's choice of Diffie-Hellman group. 5) Replaced the hierarchical SA payload with a simplified version that only negotiates suites of cryptographic algorithms. H.4 Changes from IKEv2-03 to IKEv2-04 January 2003 1) Integrated NAT traversal changes (including Appendix A). 2) Moved the anti-clogging token (cookie) from the SPI to a NOTIFY payload; changed negotation back to 6 messages when a cookie is needed. 3) Made capitalization of IKE-SA and CHILD-SA consistent. 4) Changed how IPcomp was negotiated. 5) Added usage scenarios. 6) Added configuration payload for acquiring internal addresses on remote networks. 7) Added negotiation of tunnel vs transport mode. H.4 Changes from IKEv2-05 to IKEv2-05 February 2003 1) Shortened Abstract 2) Moved NAT Traversal from Appendix to section 2. Moved changes from IKEv2 to Appendix A. Renumbered sections. IKEv2 [Page 81] INTERNET DRAFT February 2003 3) Made language more consistent. Removed most references to Phase 1 and Phase 2. 4) Made explicit the requirements for support of NAT Traversal. 5) Added support for Extended Authentication Protocol methods. 6) Added Response bit to message header. 7) Made more explicit the encoding of Diffie-Hellman numbers in key expansion algorithms. 8) Added ID payloads to AUTH payload computation. 9) Expanded set of defined cryptographic suites. 10) Added text for MUST/SHOULD support for ID payloads. 11) Added new certificate formats and added MUST/SHOULD text. 12) Clarified use of CERTREQ. 13) Deleted "MUST SUPPORT" column in CP payload specification (it was inconsistent with surrounding text). 14) Extended and clarified Conformance Requirements section, including specification of a minimal implementation. 15) Added text to specify ECN handling. Author's Address Charlie Kaufman charlie_kaufman@notesdev.ibm.com IBMIKEv2 [Page 73] INTERNET DRAFT January 2003Full Copyright Statement "Copyright (C) The Internet Society (2003). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for IKEv2 [Page 82] INTERNET DRAFT February 2003 copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS 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." IKEv2 [Page74]83] ----