draft-kivinen-ipsecme-ikev2-rfc5996bis-04.txt   rfc7296.txt 
Network Working Group C. Kaufman Internet Engineering Task Force (IETF) C. Kaufman
Internet-Draft Microsoft Request for Comments: 7296 Microsoft
Obsoletes: 5996 (if approved) P. Hoffman STD: 79 P. Hoffman
Intended status: Standards Track VPN Consortium Obsoletes: 5996 VPN Consortium
Expires: December 8, 2014 Y. Nir Category: Standards Track Y. Nir
Check Point ISSN: 2070-1721 Check Point
P. Eronen P. Eronen
Independent Independent
T. Kivinen T. Kivinen
INSIDE Secure INSIDE Secure
June 6, 2014 October 2014
Internet Key Exchange Protocol Version 2 (IKEv2) Internet Key Exchange Protocol Version 2 (IKEv2)
draft-kivinen-ipsecme-ikev2-rfc5996bis-04.txt
Abstract Abstract
This document describes version 2 of the Internet Key Exchange (IKE) This document describes version 2 of the Internet Key Exchange (IKE)
protocol. IKE is a component of IPsec used for performing mutual protocol. IKE is a component of IPsec used for performing mutual
authentication and establishing and maintaining Security Associations authentication and establishing and maintaining Security Associations
(SAs). This document obsoletes RFC 5996, and includes all of the (SAs). This document obsoletes RFC 5996, and includes all of the
errata for it. It advances IKEv2 to be an Internet Standard. errata for it. It advances IKEv2 to be an Internet Standard.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on December 8, 2014. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7296.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 26 skipping to change at page 3, line 7
modifications of such material outside the IETF Standards Process. modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction ....................................................5
1.1. Usage Scenarios . . . . . . . . . . . . . . . . . . . . . 6 1.1. Usage Scenarios ............................................7
1.1.1. Security Gateway to Security Gateway in Tunnel Mode . 7 1.1.1. Security Gateway to Security Gateway in
1.1.2. Endpoint-to-Endpoint Transport Mode . . . . . . . . . 7 Tunnel Mode .........................................7
1.1.3. Endpoint to Security Gateway in Tunnel Mode . . . . . 8 1.1.2. Endpoint-to-Endpoint Transport Mode .................8
1.1.4. Other Scenarios . . . . . . . . . . . . . . . . . . . 9 1.1.3. Endpoint to Security Gateway in Tunnel Mode .........8
1.2. The Initial Exchanges . . . . . . . . . . . . . . . . . . 9 1.1.4. Other Scenarios .....................................9
1.3. The CREATE_CHILD_SA Exchange . . . . . . . . . . . . . . 13 1.2. The Initial Exchanges ......................................9
1.3.1. Creating New Child SAs with the CREATE_CHILD_SA 1.3. The CREATE_CHILD_SA Exchange ..............................13
Exchange . . . . . . . . . . . . . . . . . . . . . . 14 1.3.1. Creating New Child SAs with the
1.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA Exchange . 15 CREATE_CHILD_SA Exchange ...........................14
1.3.3. Rekeying Child SAs with the CREATE_CHILD_SA 1.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA
Exchange . . . . . . . . . . . . . . . . . . . . . . 16 Exchange ...........................................16
1.4. The INFORMATIONAL Exchange . . . . . . . . . . . . . . . 17 1.3.3. Rekeying Child SAs with the CREATE_CHILD_SA
1.4.1. Deleting an SA with INFORMATIONAL Exchanges . . . . . 17 Exchange ...........................................16
1.5. Informational Messages outside of an IKE SA . . . . . . . 18 1.4. The INFORMATIONAL Exchange ................................17
1.6. Requirements Terminology . . . . . . . . . . . . . . . . 19 1.4.1. Deleting an SA with INFORMATIONAL Exchanges ........18
1.7. Significant Differences between RFC 4306 and RFC5996 . . 19 1.5. Informational Messages outside of an IKE SA ...............19
1.8. Differences between RFC 5996 and This Document . . . . . 22 1.6. Requirements Terminology ..................................20
2. IKE Protocol Details and Variations . . . . . . . . . . . . . 23 1.7. Significant Differences between RFC 4306 and RFC 5996 .....20
2.1. Use of Retransmission Timers . . . . . . . . . . . . . . 23 1.8. Differences between RFC 5996 and This Document ............23
2.2. Use of Sequence Numbers for Message ID . . . . . . . . . 25 2. IKE Protocol Details and Variations ............................23
2.3. Window Size for Overlapping Requests . . . . . . . . . . 26 2.1. Use of Retransmission Timers ..............................24
2.4. State Synchronization and Connection Timeouts . . . . . . 27 2.2. Use of Sequence Numbers for Message ID ....................25
2.5. Version Numbers and Forward Compatibility . . . . . . . . 29 2.3. Window Size for Overlapping Requests ......................26
2.6. IKE SA SPIs and Cookies . . . . . . . . . . . . . . . . . 30 2.4. State Synchronization and Connection Timeouts .............28
2.6.1. Interaction of COOKIE and INVALID_KE_PAYLOAD . . . . 33 2.5. Version Numbers and Forward Compatibility .................30
2.7. Cryptographic Algorithm Negotiation . . . . . . . . . . . 34 2.6. IKE SA SPIs and Cookies ...................................32
2.8. Rekeying . . . . . . . . . . . . . . . . . . . . . . . . 35 2.6.1. Interaction of COOKIE and INVALID_KE_PAYLOAD .......35
2.8.1. Simultaneous Child SA Rekeying . . . . . . . . . . . 37 2.7. Cryptographic Algorithm Negotiation .......................35
2.8.2. Simultaneous IKE SA Rekeying . . . . . . . . . . . . 39 2.8. Rekeying ..................................................36
2.8.3. Rekeying the IKE SA versus Reauthentication . . . . . 40 2.8.1. Simultaneous Child SA Rekeying .....................38
2.9. Traffic Selector Negotiation . . . . . . . . . . . . . . 41 2.8.2. Simultaneous IKE SA Rekeying .......................40
2.9.1. Traffic Selectors Violating Own Policy . . . . . . . 44 2.8.3. Rekeying the IKE SA versus Reauthentication ........42
2.10. Nonces . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.9. Traffic Selector Negotiation ..............................42
2.11. Address and Port Agility . . . . . . . . . . . . . . . . 45 2.9.1. Traffic Selectors Violating Own Policy .............45
2.12. Reuse of Diffie-Hellman Exponentials . . . . . . . . . . 45 2.9.2. Traffic Selectors in Rekeying ......................46
2.13. Generating Keying Material . . . . . . . . . . . . . . . 46 2.10. Nonces ...................................................46
2.14. Generating Keying Material for the IKE SA . . . . . . . . 47 2.11. Address and Port Agility .................................47
2.15. Authentication of the IKE SA . . . . . . . . . . . . . . 48 2.12. Reuse of Diffie-Hellman Exponentials .....................47
2.16. Extensible Authentication Protocol Methods . . . . . . . 50 2.13. Generating Keying Material ...............................48
2.17. Generating Keying Material for Child SAs . . . . . . . . 52 2.14. Generating Keying Material for the IKE SA ................49
2.18. Rekeying IKE SAs Using a CREATE_CHILD_SA Exchange . . . . 53 2.15. Authentication of the IKE SA .............................50
2.19. Requesting an Internal Address on a Remote Network . . . 54 2.16. Extensible Authentication Protocol Methods ...............52
2.20. Requesting the Peer's Version . . . . . . . . . . . . . . 55 2.17. Generating Keying Material for Child SAs .................54
2.21. Error Handling . . . . . . . . . . . . . . . . . . . . . 56 2.18. Rekeying IKE SAs Using a CREATE_CHILD_SA Exchange ........55
2.21.1. Error Handling in IKE_SA_INIT . . . . . . . . . . . . 56 2.19. Requesting an Internal Address on a Remote Network .......56
2.21.2. Error Handling in IKE_AUTH . . . . . . . . . . . . . 57 2.20. Requesting the Peer's Version ............................58
2.21.3. Error Handling after IKE SA is Authenticated . . . . 58 2.21. Error Handling ...........................................58
2.21.4. Error Handling Outside IKE SA . . . . . . . . . . . . 58 2.21.1. Error Handling in IKE_SA_INIT .....................59
2.22. IPComp . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.21.2. Error Handling in IKE_AUTH ........................59
2.23. NAT Traversal . . . . . . . . . . . . . . . . . . . . . . 60 2.21.3. Error Handling after IKE SA is Authenticated ......60
2.23.1. Transport Mode NAT Traversal . . . . . . . . . . . . 64 2.21.4. Error Handling Outside IKE SA .....................60
2.24. Explicit Congestion Notification (ECN) . . . . . . . . . 68 2.22. IPComp ...................................................61
2.25. Exchange Collisions . . . . . . . . . . . . . . . . . . . 68 2.23. NAT Traversal ............................................62
2.25.1. Collisions while Rekeying or Closing Child SAs . . . 69 2.23.1. Transport Mode NAT Traversal ......................66
2.25.2. Collisions while Rekeying or Closing IKE SAs . . . . 70 2.24. Explicit Congestion Notification (ECN) ...................70
3. Header and Payload Formats . . . . . . . . . . . . . . . . . 70 2.25. Exchange Collisions ......................................70
3.1. The IKE Header . . . . . . . . . . . . . . . . . . . . . 70 2.25.1. Collisions while Rekeying or Closing Child SAs ....71
3.2. Generic Payload Header . . . . . . . . . . . . . . . . . 73 2.25.2. Collisions while Rekeying or Closing IKE SAs ......71
3.3. Security Association Payload . . . . . . . . . . . . . . 75 3. Header and Payload Formats .....................................72
3.3.1. Proposal Substructure . . . . . . . . . . . . . . . . 79 3.1. The IKE Header ............................................72
3.3.2. Transform Substructure . . . . . . . . . . . . . . . 80 3.2. Generic Payload Header ....................................75
3.3.3. Valid Transform Types by Protocol . . . . . . . . . . 84 3.3. Security Association Payload ..............................77
3.3.4. Mandatory Transform IDs . . . . . . . . . . . . . . . 84 3.3.1. Proposal Substructure ..............................80
3.3.5. Transform Attributes . . . . . . . . . . . . . . . . 85 3.3.2. Transform Substructure .............................81
3.3.6. Attribute Negotiation . . . . . . . . . . . . . . . . 87 3.3.3. Valid Transform Types by Protocol ..................85
3.4. Key Exchange Payload . . . . . . . . . . . . . . . . . . 88 3.3.4. Mandatory Transform IDs ............................85
3.5. Identification Payloads . . . . . . . . . . . . . . . . . 89 3.3.5. Transform Attributes ...............................86
3.6. Certificate Payload . . . . . . . . . . . . . . . . . . . 91 3.3.6. Attribute Negotiation ..............................88
3.7. Certificate Request Payload . . . . . . . . . . . . . . . 94 3.4. Key Exchange Payload ......................................89
3.8. Authentication Payload . . . . . . . . . . . . . . . . . 96 3.5. Identification Payloads ...................................90
3.9. Nonce Payload . . . . . . . . . . . . . . . . . . . . . . 97 3.6. Certificate Payload .......................................92
3.10. Notify Payload . . . . . . . . . . . . . . . . . . . . . 98 3.7. Certificate Request Payload ...............................95
3.10.1. Notify Message Types . . . . . . . . . . . . . . . . 99 3.8. Authentication Payload ....................................97
3.11. Delete Payload . . . . . . . . . . . . . . . . . . . . . 102 3.9. Nonce Payload .............................................98
3.12. Vendor ID Payload . . . . . . . . . . . . . . . . . . . . 103 3.10. Notify Payload ...........................................99
3.13. Traffic Selector Payload . . . . . . . . . . . . . . . . 105 3.10.1. Notify Message Types .............................101
3.13.1. Traffic Selector . . . . . . . . . . . . . . . . . . 106 3.11. Delete Payload ..........................................104
3.14. Encrypted Payload . . . . . . . . . . . . . . . . . . . . 108 3.12. Vendor ID Payload .......................................105
3.15. Configuration Payload . . . . . . . . . . . . . . . . . . 110 3.13. Traffic Selector Payload ................................106
3.15.1. Configuration Attributes . . . . . . . . . . . . . . 111 3.13.1. Traffic Selector .................................108
3.15.2. Meaning of INTERNAL_IP4_SUBNET and 3.14. Encrypted Payload .......................................110
INTERNAL_IP6_SUBNET . . . . . . . . . . . . . . . . . 114 3.15. Configuration Payload ...................................112
3.15.3. Configuration Payloads for IPv6 . . . . . . . . . . . 116 3.15.1. Configuration Attributes .........................113
3.15.4. Address Assignment Failures . . . . . . . . . . . . . 117 3.15.2. Meaning of INTERNAL_IP4_SUBNET and
3.16. Extensible Authentication Protocol (EAP) Payload . . . . 118 INTERNAL_IP6_SUBNET ..............................116
4. Conformance Requirements . . . . . . . . . . . . . . . . . . 119 3.15.3. Configuration Payloads for IPv6 ..................118
5. Security Considerations . . . . . . . . . . . . . . . . . . . 121 3.15.4. Address Assignment Failures ......................119
5.1. Traffic Selector Authorization . . . . . . . . . . . . . 124 3.16. Extensible Authentication Protocol (EAP) Payload ........120
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 125 4. Conformance Requirements ......................................122
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 125 5. Security Considerations .......................................124
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.1. Traffic Selector Authorization ...........................127
8.1. Normative References . . . . . . . . . . . . . . . . . . 127
8.2. Informative References . . . . . . . . . . . . . . . . . 128 6. IANA Considerations ...........................................128
Appendix A. Summary of Changes from IKEv1 . . . . . . . . . . . 132 7. References ....................................................128
Appendix B. Diffie-Hellman Groups . . . . . . . . . . . . . . . 133 7.1. Normative References .....................................128
B.1. Group 1 - 768-bit MODP . . . . . . . . . . . . . . . . . 134 7.2. Informative References ...................................130
B.2. Group 2 - 1024-bit MODP . . . . . . . . . . . . . . . . . 134 Appendix A. Summary of Changes from IKEv1 ........................136
Appendix C. Exchanges and Payloads . . . . . . . . . . . . . . . 134 Appendix B. Diffie-Hellman Groups ................................137
C.1. IKE_SA_INIT Exchange . . . . . . . . . . . . . . . . . . 135 B.1. Group 1 - 768-bit MODP ....................................137
C.2. IKE_AUTH Exchange without EAP . . . . . . . . . . . . . . 136 B.2. Group 2 - 1024-bit MODP ...................................137
C.3. IKE_AUTH Exchange with EAP . . . . . . . . . . . . . . . 137 Appendix C. Exchanges and Payloads ...............................138
C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying C.1. IKE_SA_INIT Exchange ......................................138
Child SAs . . . . . . . . . . . . . . . . . . . . . . . . 138 C.2. IKE_AUTH Exchange without EAP .............................138
C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE SA . . . . 138 C.3. IKE_AUTH Exchange with EAP ................................139
C.6. INFORMATIONAL Exchange . . . . . . . . . . . . . . . . . 138 C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying
Child SAs .................................................140
C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE SA ..........140
C.6. INFORMATIONAL Exchange ....................................141
Acknowledgements .................................................141
Authors' Addresses ...............................................142
1. Introduction 1. Introduction
IP Security (IPsec) provides confidentiality, data integrity, access IP Security (IPsec) provides confidentiality, data integrity, access
control, and data source authentication to IP datagrams. These control, and data source authentication to IP datagrams. These
services are provided by maintaining shared state between the source services are provided by maintaining shared state between the source
and the sink of an IP datagram. This state defines, among other and the sink of an IP datagram. This state defines, among other
things, the specific services provided to the datagram, which things, the specific services provided to the datagram, which
cryptographic algorithms will be used to provide the services, and cryptographic algorithms will be used to provide the services, and
the keys used as input to the cryptographic algorithms. the keys used as input to the cryptographic algorithms.
Establishing this shared state in a manual fashion does not scale Establishing this shared state in a manual fashion does not scale
well. Therefore, a protocol to establish this state dynamically is well. Therefore, a protocol to establish this state dynamically is
needed. This document describes such a protocol -- the Internet Key needed. This document describes such a protocol -- the Internet Key
Exchange (IKE). Version 1 of IKE was defined in RFCs 2407 [DOI], Exchange (IKE). Version 1 of IKE was defined in RFCs 2407 [DOI],
2408 [ISAKMP], and 2409 [IKEV1]. IKEv2 replaced all of those RFCs. 2408 [ISAKMP], and 2409 [IKEV1]. IKEv2 replaced all of those RFCs.
IKEv2 was defined in [IKEV2] (RFC 4306) and was clarified in [Clarif] IKEv2 was defined in [IKEV2] (RFC 4306) and was clarified in [Clarif]
(RFC 4718). The [RFC5996] replaced and updated RFC 4306 and RFC (RFC 4718). [RFC5996] replaced and updated RFCs 4306 and 4718. This
4718, and this document replaces the RFC 5996 and the intended status document replaces RFC 5996. IKEv2 as stated in RFC 4306 was a change
for this document will be Internet Standard. IKEv2 as stated in RFC to the IKE protocol that was not backward compatible. RFC 5996
4306 was a change to the IKE protocol that was not backward revised RFC 4306 to provide a clarification of IKEv2, making minimal
compatible. RFC 5996 revised RFC 4306 to provide a clarification of changes to the IKEv2 protocol. This document replaces RFC 5996,
IKEv2, making minimum changes to the IKEv2 protocol. The current slightly revising it to make it suitable for progression to Internet
document slightly revises RFC 5996 to make it suitable for Standard. A list of the significant differences between RFCs 4306
progression to Internet Standard. A list of the significant and 5996 is given in Section 1.7, and differences between RFC 5996
differences between RFC 4306 and RFC 5996 is given in Section 1.7 and and this document are given in Section 1.8.
differences between RFC 5996 and this document is given in
Section 1.8.
IKE performs mutual authentication between two parties and IKE performs mutual authentication between two parties and
establishes an IKE security association (SA) that includes shared establishes an IKE Security Association (SA) that includes shared
secret information that can be used to efficiently establish SAs for secret information that can be used to efficiently establish SAs for
Encapsulating Security Payload (ESP) [ESP] or Authentication Header Encapsulating Security Payload (ESP) [ESP] or Authentication Header
(AH) [AH] and a set of cryptographic algorithms to be used by the SAs (AH) [AH] and a set of cryptographic algorithms to be used by the SAs
to protect the traffic that they carry. In this document, the term to protect the traffic that they carry. In this document, the term
"suite" or "cryptographic suite" refers to a complete set of "suite" or "cryptographic suite" refers to a complete set of
algorithms used to protect an SA. An initiator proposes one or more algorithms used to protect an SA. An initiator proposes one or more
suites by listing supported algorithms that can be combined into suites by listing supported algorithms that can be combined into
suites in a mix-and-match fashion. IKE can also negotiate use of IP suites in a mix-and-match fashion. IKE can also negotiate use of IP
Compression (IPComp) [IP-COMP] in connection with an ESP or AH SA. Compression (IPComp) [IP-COMP] in connection with an ESP or AH SA.
The SAs for ESP or AH that get set up through that IKE SA we call The SAs for ESP or AH that get set up through that IKE SA we call
"Child SAs". "Child SAs".
All IKE communications consist of pairs of messages: a request and a All IKE communications consist of pairs of messages: a request and a
response. The pair is called an "exchange", and is sometimes called response. The pair is called an "exchange", and is sometimes called
a "request/response pair". The first exchange of messages a "request/response pair". The first two exchanges of messages
establishing an IKE SA are called the IKE_SA_INIT and IKE_AUTH establishing an IKE SA are called the IKE_SA_INIT exchange and the
exchanges; subsequent IKE exchanges are called the CREATE_CHILD_SA or IKE_AUTH exchange; subsequent IKE exchanges are called either
INFORMATIONAL exchanges. In the common case, there is a single CREATE_CHILD_SA exchanges or INFORMATIONAL exchanges. In the common
IKE_SA_INIT exchange and a single IKE_AUTH exchange (a total of four case, there is a single IKE_SA_INIT exchange and a single IKE_AUTH
messages) to establish the IKE SA and the first Child SA. In exchange (a total of four messages) to establish the IKE SA and the
exceptional cases, there may be more than one of each of these first Child SA. In exceptional cases, there may be more than one of
exchanges. In all cases, all IKE_SA_INIT exchanges MUST complete each of these exchanges. In all cases, all IKE_SA_INIT exchanges
before any other exchange type, then all IKE_AUTH exchanges MUST MUST complete before any other exchange type, then all IKE_AUTH
complete, and following that, any number of CREATE_CHILD_SA and exchanges MUST complete, and following that, any number of
INFORMATIONAL exchanges may occur in any order. In some scenarios, CREATE_CHILD_SA and INFORMATIONAL exchanges may occur in any order.
only a single Child SA is needed between the IPsec endpoints, and In some scenarios, only a single Child SA is needed between the IPsec
therefore there would be no additional exchanges. Subsequent endpoints, and therefore there would be no additional exchanges.
exchanges MAY be used to establish additional Child SAs between the Subsequent exchanges MAY be used to establish additional Child SAs
same authenticated pair of endpoints and to perform housekeeping between the same authenticated pair of endpoints and to perform
functions. housekeeping functions.
An IKE message flow always consists of a request followed by a An IKE message flow always consists of a request followed by a
response. It is the responsibility of the requester to ensure response. It is the responsibility of the requester to ensure
reliability. If the response is not received within a timeout reliability. If the response is not received within a timeout
interval, the requester needs to retransmit the request (or abandon interval, the requester needs to retransmit the request (or abandon
the connection). the connection).
The first exchange of an IKE session, IKE_SA_INIT, negotiates The first exchange of an IKE session, IKE_SA_INIT, negotiates
security parameters for the IKE SA, sends nonces, and sends Diffie- security parameters for the IKE SA, sends nonces, and sends
Hellman values. Diffie-Hellman values.
The second exchange, IKE_AUTH, transmits identities, proves knowledge The second exchange, IKE_AUTH, transmits identities, proves knowledge
of the secrets corresponding to the two identities, and sets up an SA of the secrets corresponding to the two identities, and sets up an SA
for the first (and often only) AH or ESP Child SA (unless there is for the first (and often only) AH or ESP Child SA (unless there is
failure setting up the AH or ESP Child SA, in which case the IKE SA failure setting up the AH or ESP Child SA, in which case the IKE SA
is still established without the Child SA). is still established without the Child SA).
The types of subsequent exchanges are CREATE_CHILD_SA (which creates The types of subsequent exchanges are CREATE_CHILD_SA (which creates
a Child SA) and INFORMATIONAL (which deletes an SA, reports error a Child SA) and INFORMATIONAL (which deletes an SA, reports error
conditions, or does other housekeeping). Every request requires a conditions, or does other housekeeping). Every request requires a
skipping to change at page 7, line 14 skipping to change at page 7, line 31
1.1.1. Security Gateway to Security Gateway in Tunnel Mode 1.1.1. Security Gateway to Security Gateway in Tunnel Mode
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
| | IPsec | | | | IPsec | |
Protected |Tunnel | tunnel |Tunnel | Protected Protected |Tunnel | tunnel |Tunnel | Protected
Subnet <-->|Endpoint |<---------->|Endpoint |<--> Subnet Subnet <-->|Endpoint |<---------->|Endpoint |<--> Subnet
| | | | | | | |
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
Figure 1: Security Gateway to Security Gateway Tunnel Figure 1: Security Gateway to Security Gateway Tunnel
In this scenario, neither endpoint of the IP connection implements In this scenario, neither endpoint of the IP connection implements
IPsec, but network nodes between them protect traffic for part of the IPsec, but network nodes between them protect traffic for part of the
way. Protection is transparent to the endpoints, and depends on way. Protection is transparent to the endpoints, and depends on
ordinary routing to send packets through the tunnel endpoints for ordinary routing to send packets through the tunnel endpoints for
processing. Each endpoint would announce the set of addresses processing. Each endpoint would announce the set of addresses
"behind" it, and packets would be sent in tunnel mode where the inner "behind" it, and packets would be sent in tunnel mode where the inner
IP header would contain the IP addresses of the actual endpoints. IP header would contain the IP addresses of the actual endpoints.
1.1.2. Endpoint-to-Endpoint Transport Mode 1.1.2. Endpoint-to-Endpoint Transport Mode
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
| | IPsec transport | | | | IPsec transport | |
|Protected| or tunnel mode SA |Protected| |Protected| or tunnel mode SA |Protected|
|Endpoint |<---------------------------------------->|Endpoint | |Endpoint |<---------------------------------------->|Endpoint |
| | | | | | | |
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
Figure 2: Endpoint to Endpoint Figure 2: Endpoint to Endpoint
In this scenario, both endpoints of the IP connection implement In this scenario, both endpoints of the IP connection implement
IPsec, as required of hosts in [IPSECARCH]. Transport mode will IPsec, as required of hosts in [IPSECARCH]. Transport mode will
commonly be used with no inner IP header. A single pair of addresses commonly be used with no inner IP header. A single pair of addresses
will be negotiated for packets to be protected by this SA. These will be negotiated for packets to be protected by this SA. These
endpoints MAY implement application-layer access controls based on endpoints MAY implement application-layer access controls based on
the IPsec authenticated identities of the participants. This the IPsec authenticated identities of the participants. This
scenario enables the end-to-end security that has been a guiding scenario enables the end-to-end security that has been a guiding
principle for the Internet since [ARCHPRINC], [TRANSPARENCY], and a principle for the Internet since [ARCHPRINC], [TRANSPARENCY], and a
method of limiting the inherent problems with complexity in networks method of limiting the inherent problems with complexity in networks
skipping to change at page 8, line 16 skipping to change at page 8, line 46
1.1.3. Endpoint to Security Gateway in Tunnel Mode 1.1.3. Endpoint to Security Gateway in Tunnel Mode
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
| | IPsec | | Protected | | IPsec | | Protected
|Protected| tunnel |Tunnel | Subnet |Protected| tunnel |Tunnel | Subnet
|Endpoint |<------------------------>|Endpoint |<--- and/or |Endpoint |<------------------------>|Endpoint |<--- and/or
| | | | Internet | | | | Internet
+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
Figure 3: Endpoint to Security Gateway Tunnel Figure 3: Endpoint to Security Gateway Tunnel
In this scenario, a protected endpoint (typically a portable roaming In this scenario, a protected endpoint (typically a portable roaming
computer) connects back to its corporate network through an IPsec- computer) connects back to its corporate network through an IPsec-
protected tunnel. It might use this tunnel only to access protected tunnel. It might use this tunnel only to access
information on the corporate network, or it might tunnel all of its information on the corporate network, or it might tunnel all of its
traffic back through the corporate network in order to take advantage traffic back through the corporate network in order to take advantage
of protection provided by a corporate firewall against Internet-based of protection provided by a corporate firewall against Internet-based
attacks. In either case, the protected endpoint will want an IP attacks. In either case, the protected endpoint will want an IP
address associated with the security gateway so that packets returned address associated with the security gateway so that packets returned
to it will go to the security gateway and be tunneled back. This IP to it will go to the security gateway and be tunneled back. This IP
address may be static or may be dynamically allocated by the security address may be static or may be dynamically allocated by the security
gateway. In support of the latter case, IKEv2 includes a mechanism gateway. In support of the latter case, IKEv2 includes a mechanism
(namely, configuration payloads) for the initiator to request an IP (namely, configuration payloads) for the initiator to request an IP
address owned by the security gateway for use for the duration of its address owned by the security gateway for use for the duration of
SA. its SA.
In this scenario, packets will use tunnel mode. On each packet from In this scenario, packets will use tunnel mode. On each packet from
the protected endpoint, the outer IP header will contain the source the protected endpoint, the outer IP header will contain the source
IP address associated with its current location (i.e., the address IP address associated with its current location (i.e., the address
that will get traffic routed to the endpoint directly), while the that will get traffic routed to the endpoint directly), while the
inner IP header will contain the source IP address assigned by the inner IP header will contain the source IP address assigned by the
security gateway (i.e., the address that will get traffic routed to security gateway (i.e., the address that will get traffic routed to
the security gateway for forwarding to the endpoint). The outer the security gateway for forwarding to the endpoint). The outer
destination address will always be that of the security gateway, destination address will always be that of the security gateway,
while the inner destination address will be the ultimate destination while the inner destination address will be the ultimate destination
skipping to change at page 10, line 28 skipping to change at page 11, line 8
IDr Identification - Responder IDr Identification - Responder
KE Key Exchange KE Key Exchange
Ni, Nr Nonce Ni, Nr Nonce
N Notify N Notify
SA Security Association SA Security Association
SK Encrypted and Authenticated SK Encrypted and Authenticated
TSi Traffic Selector - Initiator TSi Traffic Selector - Initiator
TSr Traffic Selector - Responder TSr Traffic Selector - Responder
V Vendor ID V Vendor ID
The details of the contents of each payload are described in section The details of the contents of each payload are described in
3. Payloads that may optionally appear will be shown in brackets, Section 3. Payloads that may optionally appear will be shown in
such as [CERTREQ]; this indicates that a Certificate Request payload brackets, such as [CERTREQ]; this indicates that a Certificate
can optionally be included. Request payload can optionally be included.
The initial exchanges are as follows: The initial exchanges are as follows:
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SAi1, KEi, Ni --> HDR, SAi1, KEi, Ni -->
HDR contains the Security Parameter Indexes (SPIs), version numbers, HDR contains the Security Parameter Indexes (SPIs), version numbers,
Exchange Type, Message ID, and flags of various sorts. The SAi1 Exchange Type, Message ID, and flags of various sorts. The SAi1
payload states the cryptographic algorithms the initiator supports payload states the cryptographic algorithms the initiator supports
skipping to change at page 14, line 13 skipping to change at page 14, line 42
context of an initial IKE exchange and reject any subsequent attempts context of an initial IKE exchange and reject any subsequent attempts
to add more. to add more.
1.3.1. Creating New Child SAs with the CREATE_CHILD_SA Exchange 1.3.1. Creating New Child SAs with the CREATE_CHILD_SA Exchange
A Child SA may be created by sending a CREATE_CHILD_SA request. The A Child SA may be created by sending a CREATE_CHILD_SA request. The
CREATE_CHILD_SA request for creating a new Child SA is: CREATE_CHILD_SA request for creating a new Child SA is:
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SK {SA, Ni, [KEi], HDR, SK {SA, Ni, [KEi,]
TSi, TSr} --> TSi, TSr} -->
The initiator sends SA offer(s) in the SA payload, a nonce in the Ni 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 payload, optionally a Diffie-Hellman value in the KEi payload, and
the proposed Traffic Selectors for the proposed Child SA in the TSi the proposed Traffic Selectors for the proposed Child SA in the TSi
and TSr payloads. and TSr payloads.
The CREATE_CHILD_SA response for creating a new Child SA is: The CREATE_CHILD_SA response for creating a new Child SA is:
<-- HDR, SK {SA, Nr, [KEr], <-- HDR, SK {SA, Nr, [KEr,]
TSi, TSr} TSi, TSr}
The responder replies (using the same Message ID to respond) with the The responder replies (using the same Message ID to respond) with the
accepted offer in an SA payload, nonce in the Nr payload, and a accepted offer in an SA payload, a nonce in the Nr payload, and a
Diffie-Hellman value in the KEr payload if KEi was included in the Diffie-Hellman value in the KEr payload if KEi was included in the
request and the selected cryptographic suite includes that group. request and the selected cryptographic suite includes that group.
The Traffic Selectors for traffic to be sent on that SA are specified The Traffic Selectors for traffic to be sent on that SA are specified
in the TS payloads in the response, which may be a subset of what the in the TS payloads in the response, which may be a subset of what the
initiator of the Child SA proposed. initiator of the Child SA proposed.
The USE_TRANSPORT_MODE notification MAY be included in a request The USE_TRANSPORT_MODE notification MAY be included in a request
message that also includes an SA payload requesting a Child SA. It message that also includes an SA payload requesting a Child SA. It
requests that the Child SA use transport mode rather than tunnel mode requests that the Child SA use transport mode rather than tunnel mode
skipping to change at page 15, line 10 skipping to change at page 15, line 38
neither endpoint accepts TFC padding, this notification is included neither endpoint accepts TFC padding, this notification is included
in both the request and the response. If this notification is in both the request and the response. If this notification is
included in only one of the messages, TFC padding can still be sent included in only one of the messages, TFC padding can still be sent
in the other direction. in the other direction.
The NON_FIRST_FRAGMENTS_ALSO notification is used for fragmentation The NON_FIRST_FRAGMENTS_ALSO notification is used for fragmentation
control. See [IPSECARCH] for a fuller explanation. Both parties control. See [IPSECARCH] for a fuller explanation. Both parties
need to agree to sending non-first fragments before either party does need to agree to sending non-first fragments before either party does
so. It is enabled only if NON_FIRST_FRAGMENTS_ALSO notification is so. It is enabled only if NON_FIRST_FRAGMENTS_ALSO notification is
included in both the request proposing an SA and the response included in both the request proposing an SA and the response
accepting it. If the responder does not want to send or receive non- accepting it. If the responder does not want to send or receive
first fragments, it only omits NON_FIRST_FRAGMENTS_ALSO notification non-first fragments, it only omits NON_FIRST_FRAGMENTS_ALSO
from its response, but does not reject the whole Child SA creation. notification from its response, but does not reject the whole Child
SA creation.
An IPCOMP_SUPPORTED notification, covered in Section 2.22, can also An IPCOMP_SUPPORTED notification, covered in Section 2.22, can also
be included in the exchange. be included in the exchange.
A failed attempt to create a Child SA SHOULD NOT tear down the IKE A failed attempt to create a Child SA SHOULD NOT tear down the IKE
SA: there is no reason to lose the work done to set up the IKE SA. SA: there is no reason to lose the work done to set up the IKE SA.
See Section 2.21 for a list of error messages that might occur if See Section 2.21 for a list of error messages that might occur if
creating a Child SA fails. creating a Child SA fails.
1.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA Exchange 1.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA Exchange
skipping to change at page 15, line 42 skipping to change at page 16, line 25
payload MUST be included. A new initiator SPI is supplied in the SPI payload MUST be included. A new initiator SPI is supplied in the SPI
field of the SA payload. Once a peer receives a request to rekey an field of the SA payload. Once a peer receives a request to rekey an
IKE SA or sends a request to rekey an IKE SA, it SHOULD NOT start any IKE SA or sends a request to rekey an IKE SA, it SHOULD NOT start any
new CREATE_CHILD_SA exchanges on the IKE SA that is being rekeyed. new CREATE_CHILD_SA exchanges on the IKE SA that is being rekeyed.
The CREATE_CHILD_SA response for rekeying an IKE SA is: The CREATE_CHILD_SA response for rekeying an IKE SA is:
<-- HDR, SK {SA, Nr, KEr} <-- HDR, SK {SA, Nr, KEr}
The responder replies (using the same Message ID to respond) with the The responder replies (using the same Message ID to respond) with the
accepted offer in an SA payload, nonce in the Nr payload, and a accepted offer in an SA payload, a nonce in the Nr payload, and a
Diffie-Hellman value in the KEr payload if the selected cryptographic Diffie-Hellman value in the KEr payload if the selected cryptographic
suite includes that group. A new responder SPI is supplied in the suite includes that group. A new responder SPI is supplied in the
SPI field of the SA payload. SPI field of the SA payload.
The new IKE SA has its message counters set to 0, regardless of what The new IKE SA has its message counters set to 0, regardless of what
they were in the earlier IKE SA. The first IKE requests from both they were in the earlier IKE SA. The first IKE requests from both
sides on the new IKE SA will have Message ID 0. The old IKE SA sides on the new IKE SA will have Message ID 0. The old IKE SA
retains its numbering, so any further requests (for example, to retains its numbering, so any further requests (for example, to
delete the IKE SA) will have consecutive numbering. The new IKE SA delete the IKE SA) will have consecutive numbering. The new IKE SA
also has its window size reset to 1, and the initiator in this rekey also has its window size reset to 1, and the initiator in this rekey
exchange is the new "original initiator" of the new IKE SA. exchange is the new "original initiator" of the new IKE SA.
Section 2.18 also covers IKE SA rekeying in detail. Section 2.18 also covers IKE SA rekeying in detail.
1.3.3. Rekeying Child SAs with the CREATE_CHILD_SA Exchange 1.3.3. Rekeying Child SAs with the CREATE_CHILD_SA Exchange
The CREATE_CHILD_SA request for rekeying a Child SA is: The CREATE_CHILD_SA request for rekeying a Child SA is:
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SK {N(REKEY_SA), SA, Ni, [KEi], HDR, SK {N(REKEY_SA), SA, Ni, [KEi,]
TSi, TSr} --> TSi, TSr} -->
The initiator sends SA offer(s) in the SA payload, a nonce in the Ni 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 payload, optionally a Diffie-Hellman value in the KEi payload, and
the proposed Traffic Selectors for the proposed Child SA in the TSi the proposed Traffic Selectors for the proposed Child SA in the TSi
and TSr payloads. and TSr payloads.
The notifications described in Section 1.3.1 may also be sent in a The notifications described in Section 1.3.1 may also be sent in a
rekeying exchange. Usually, these will be the same notifications rekeying exchange. Usually, these will be the same notifications
that were used in the original exchange; for example, when rekeying a that were used in the original exchange; for example, when rekeying a
skipping to change at page 16, line 38 skipping to change at page 17, line 21
exchange if the purpose of the exchange is to replace an existing ESP exchange if the purpose of the exchange is to replace an existing ESP
or AH SA. The SA being rekeyed is identified by the SPI field in the or AH SA. The SA being rekeyed is identified by the SPI field in the
Notify payload; this is the SPI the exchange initiator would expect Notify payload; this is the SPI the exchange initiator would expect
in inbound ESP or AH packets. There is no data associated with this in inbound ESP or AH packets. There is no data associated with this
Notify message type. The Protocol ID field of the REKEY_SA Notify message type. The Protocol ID field of the REKEY_SA
notification is set to match the protocol of the SA we are rekeying, notification is set to match the protocol of the SA we are rekeying,
for example, 3 for ESP and 2 for AH. for example, 3 for ESP and 2 for AH.
The CREATE_CHILD_SA response for rekeying a Child SA is: The CREATE_CHILD_SA response for rekeying a Child SA is:
<-- HDR, SK {SA, Nr, [KEr], <-- HDR, SK {SA, Nr, [KEr,]
TSi, TSr} TSi, TSr}
The responder replies (using the same Message ID to respond) with the The responder replies (using the same Message ID to respond) with the
accepted offer in an SA payload, nonce in the Nr, and a Diffie- accepted offer in an SA payload, a nonce in the Nr payload, and a
Hellman value in the KEr payload if KEi was included in the request Diffie-Hellman value in the KEr payload if KEi was included in the
and the selected cryptographic suite includes that group. request and the selected cryptographic suite includes that group.
The Traffic Selectors for traffic to be sent on that SA are specified The Traffic Selectors for traffic to be sent on that SA are specified
in the TS payloads in the response, which may be a subset of what the in the TS payloads in the response, which may be a subset of what the
initiator of the Child SA proposed. initiator of the Child SA proposed.
1.4. The INFORMATIONAL Exchange 1.4. The INFORMATIONAL Exchange
At various points during the operation of an IKE SA, peers may desire At various points during the operation of an IKE SA, peers may desire
to convey control messages to each other regarding errors or to convey control messages to each other regarding errors or
notifications of certain events. To accomplish this, IKE defines an notifications of certain events. To accomplish this, IKE defines an
INFORMATIONAL exchange. INFORMATIONAL exchanges MUST ONLY occur INFORMATIONAL exchange. INFORMATIONAL exchanges MUST ONLY occur
after the initial exchanges and are cryptographically protected with after the initial exchanges and are cryptographically protected with
the negotiated keys. Note that some informational messages, not the negotiated keys. Note that some informational messages, not
exchanges, can be sent outside the context of an IKE SA. Section exchanges, can be sent outside the context of an IKE SA.
2.21 also covers error messages in great detail. Section 2.21 also covers error messages in great detail.
Control messages that pertain to an IKE SA MUST be sent under that 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 IKE SA. Control messages that pertain to Child SAs MUST be sent
under the protection of the IKE SA that generated them (or its under the protection of the IKE SA that generated them (or its
successor if the IKE SA was rekeyed). successor if the IKE SA was rekeyed).
Messages in an INFORMATIONAL exchange contain zero or more Messages in an INFORMATIONAL exchange contain zero or more
Notification, Delete, and Configuration payloads. The recipient of Notification, Delete, and Configuration payloads. The recipient of
an INFORMATIONAL exchange request MUST send some response; otherwise, an INFORMATIONAL exchange request MUST send some response; otherwise,
the sender will assume the message was lost in the network and will the sender will assume the message was lost in the network and will
skipping to change at page 17, line 37 skipping to change at page 18, line 16
This is the expected way an endpoint can ask the other endpoint to This is the expected way an endpoint can ask the other endpoint to
verify that it is alive. verify that it is alive.
The INFORMATIONAL exchange is defined as: The INFORMATIONAL exchange is defined as:
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SK {[N,] [D,] HDR, SK {[N,] [D,]
[CP,] ...} --> [CP,] ...} -->
<-- HDR, SK {[N,] [D,] <-- HDR, SK {[N,] [D,]
[CP], ...} [CP,] ...}
The processing of an INFORMATIONAL exchange is determined by its The processing of an INFORMATIONAL exchange is determined by its
component payloads. component payloads.
1.4.1. Deleting an SA with INFORMATIONAL Exchanges 1.4.1. Deleting an SA with INFORMATIONAL Exchanges
ESP and AH SAs always exist in pairs, with one SA in each direction. ESP 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 (that When an SA is closed, both members of the pair MUST be closed (that
is, deleted). Each endpoint MUST close its incoming SAs and allow is, deleted). Each endpoint MUST close its incoming SAs and allow
the other endpoint to close the other SA in each pair. To delete an the other endpoint to close the other SA in each pair. To delete an
skipping to change at page 18, line 20 skipping to change at page 18, line 48
independently decide to close them, each may send a Delete payload 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 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 delete request for SAs for which it has already issued a delete
request, it MUST delete the outgoing SAs while processing the request request, it MUST delete the outgoing SAs while processing the request
and the incoming SAs while processing the response. In that case, and the incoming SAs while processing the response. In that case,
the responses MUST NOT include Delete payloads for the deleted SAs, the responses MUST NOT include Delete payloads for the deleted SAs,
since that would result in duplicate deletion and could in theory since that would result in duplicate deletion and could in theory
delete the wrong SA. delete the wrong SA.
Similar to ESP and AH SAs, IKE SAs are also deleted by sending an Similar to ESP and AH SAs, IKE SAs are also deleted by sending an
Informational exchange. Deleting an IKE SA implicitly closes any INFORMATIONAL exchange. Deleting an IKE SA implicitly closes any
remaining Child SAs negotiated under it. The response to a request remaining Child SAs negotiated under it. The response to a request
that deletes the IKE SA is an empty INFORMATIONAL response. that deletes the IKE SA is an empty INFORMATIONAL response.
Half-closed ESP or AH connections are anomalous, and a node with Half-closed ESP or AH connections are anomalous, and a node with
auditing capability should probably audit their existence if they auditing capability should probably audit their existence if they
persist. Note that this specification does not specify time periods, persist. Note that this specification does not specify time periods,
so it is up to individual endpoints to decide how long to wait. A so it is up to individual endpoints to decide how long to wait. A
node MAY refuse to accept incoming data on half-closed connections node MAY refuse to accept incoming data on half-closed connections
but MUST NOT unilaterally close them and reuse the SPIs. If but MUST NOT unilaterally close them and reuse the SPIs. If
connection state becomes sufficiently messed up, a node MAY close the connection state becomes sufficiently messed up, a node MAY close the
skipping to change at page 19, line 46 skipping to change at page 20, line 28
Definitions of the primitive terms in this document (such as Security Definitions of the primitive terms in this document (such as Security
Association or SA) can be found in [IPSECARCH]. It should be noted Association or SA) can be found in [IPSECARCH]. It should be noted
that parts of IKEv2 rely on some of the processing rules in that parts of IKEv2 rely on some of the processing rules in
[IPSECARCH], as described in various sections of this document. [IPSECARCH], as described in various sections of this document.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [MUSTSHOULD]. document are to be interpreted as described in [MUSTSHOULD].
1.7. Significant Differences between RFC 4306 and RFC5996 1.7. Significant Differences between RFC 4306 and RFC 5996
This document contains clarifications and amplifications to IKEv2 This document contains clarifications and amplifications to IKEv2
[IKEV2]. Many of the clarifications are based on [Clarif]. The [IKEV2]. Many of the clarifications are based on [Clarif]. The
changes listed in that document were discussed in the IPsec Working changes listed in that document were discussed in the IPsec Working
Group and, after the Working Group was disbanded, on the IPsec Group and, after the Working Group was disbanded, on the IPsec
mailing list. That document contains detailed explanations of areas mailing list. That document contains detailed explanations of areas
that were unclear in IKEv2, and is thus useful to implementers of that were unclear in IKEv2, and is thus useful to implementers of
IKEv2. IKEv2.
The protocol described in this document retains the same major The protocol described in this document retains the same major
version number (2) and minor version number (0) as was used in RFC version number (2) and minor version number (0) as was used in
4306. That is, the version number is *not* changed from RFC 4306. RFC 4306. That is, the version number is *not* changed from
The small number of technical changes listed here are not expected to RFC 4306. The small number of technical changes listed here are not
affect RFC 4306 implementations that have already been deployed at expected to affect RFC 4306 implementations that have already been
the time of publication of this document. deployed at the time of publication of this document.
This document makes the figures and references a bit more consistent This document makes the figures and references a bit more consistent
than they were in [IKEV2]. than they were in [IKEV2].
IKEv2 developers have noted that the SHOULD-level requirements in RFC IKEv2 developers have noted that the SHOULD-level requirements in
4306 are often unclear in that they don't say when it is OK to not RFC 4306 are often unclear in that they don't say when it is OK to
obey the requirements. They also have noted that there are MUST- not obey the requirements. They also have noted that there are MUST-
level requirements that are not related to interoperability. This level requirements that are not related to interoperability. This
document has more explanation of some of these requirements. All document has more explanation of some of these requirements. All
non-capitalized uses of the words SHOULD and MUST now mean their non-capitalized uses of the words SHOULD and MUST now mean their
normal English sense, not the interoperability sense of [MUSTSHOULD]. normal English sense, not the interoperability sense of [MUSTSHOULD].
IKEv2 (and IKEv1) developers have noted that there is a great deal of IKEv2 (and IKEv1) developers have noted that there is a great deal of
material in the tables of codes in Section 3.10.1 in RFC 4306. This material in the tables of codes in Section 3.10.1 in RFC 4306. This
leads to implementers not having all the needed information in the leads to implementers not having all the needed information in the
main body of the document. Much of the material from those tables main body of the document. Much of the material from those tables
has been moved into the associated parts of the main body of the has been moved into the associated parts of the main body of the
skipping to change at page 20, line 50 skipping to change at page 21, line 32
using a separate CREATE_CHILD_SA exchange. using a separate CREATE_CHILD_SA exchange.
This document removes discussion of the INTERNAL_ADDRESS_EXPIRY This document removes discussion of the INTERNAL_ADDRESS_EXPIRY
configuration attribute because its implementation was very configuration attribute because its implementation was very
problematic. Implementations that conform to this document MUST problematic. Implementations that conform to this document MUST
ignore proposals that have configuration attribute type 5, the old ignore proposals that have configuration attribute type 5, the old
value for INTERNAL_ADDRESS_EXPIRY. This document also removed value for INTERNAL_ADDRESS_EXPIRY. This document also removed
INTERNAL_IP6_NBNS as a configuration attribute. INTERNAL_IP6_NBNS as a configuration attribute.
This document removes the allowance for rejecting messages in which This document removes the allowance for rejecting messages in which
the payloads were not in the "right" order; now implementations MUST the payloads were not in the "right" order; now implementations
NOT reject them. This is due to the lack of clarity where the orders MUST NOT reject them. This is due to the lack of clarity where the
for the payloads are described. orders for the payloads are described.
The lists of items from RFC 4306 that ended up in the IANA registry The lists of items from RFC 4306 that ended up in the IANA registry
were trimmed to only include items that were actually defined in RFC were trimmed to only include items that were actually defined in
4306. Also, many of those lists are now preceded with the very RFC 4306. Also, many of those lists are now preceded with the very
important instruction to developers that they really should look at important instruction to developers that they really should look at
the IANA registry at the time of development because new items have the IANA registry at the time of development because new items have
been added since RFC 4306. been added since RFC 4306.
This document adds clarification on when notifications are and are This document adds clarification on when notifications are and are
not sent encrypted, depending on the state of the negotiation at the not sent encrypted, depending on the state of the negotiation at the
time. time.
This document discusses more about how to negotiate combined-mode This document discusses more about how to negotiate combined-mode
ciphers. ciphers.
skipping to change at page 21, line 37 skipping to change at page 22, line 22
This document clarifies the use of the critical flag in Section 2.5. This document clarifies the use of the critical flag in Section 2.5.
In Section 2.8, "Note that, when rekeying, the new Child SA MAY have In Section 2.8, "Note that, when rekeying, the new Child SA MAY have
different Traffic Selectors and algorithms than the old one" was different Traffic Selectors and algorithms than the old one" was
changed to "Note that, when rekeying, the new Child SA SHOULD NOT changed to "Note that, when rekeying, the new Child SA SHOULD NOT
have different Traffic Selectors and algorithms than the old one". have different Traffic Selectors and algorithms than the old one".
The new Section 2.8.2 covers simultaneous IKE SA rekeying. The new Section 2.8.2 covers simultaneous IKE SA rekeying.
The new Section 2.9.2 covers Traffic Selectors in rekeying.
This document adds the restriction in Section 2.13 that all This document adds the restriction in Section 2.13 that all
pseudorandom functions (PRFs) used with IKEv2 MUST take variable- pseudorandom functions (PRFs) used with IKEv2 MUST take variable-
sized keys. This should not affect any implementations because there sized keys. This should not affect any implementations because there
were no standardized PRFs that have fixed-size keys. were no standardized PRFs that have fixed-size keys.
Section 2.18 requires doing a Diffie-Hellman exchange when rekeying Section 2.18 requires doing a Diffie-Hellman exchange when rekeying
the IKE_SA. In theory, RFC 4306 allowed a policy where the Diffie- the IKE_SA. In theory, RFC 4306 allowed a policy where the Diffie-
Hellman exchange was optional, but this was not useful (or Hellman exchange was optional, but this was not useful (or
appropriate) when rekeying the IKE_SA. appropriate) when rekeying the IKE_SA.
skipping to change at page 22, line 17 skipping to change at page 22, line 48
need to be understood when receiving. need to be understood when receiving.
Added Section 2.23.1 to describe NAT traversal when transport mode is Added Section 2.23.1 to describe NAT traversal when transport mode is
requested. requested.
Added Section 2.25 to explain how to act when there are timing Added Section 2.25 to explain how to act when there are timing
collisions when deleting and/or rekeying SAs, and two new error collisions when deleting and/or rekeying SAs, and two new error
notifications (TEMPORARY_FAILURE and CHILD_SA_NOT_FOUND) were notifications (TEMPORARY_FAILURE and CHILD_SA_NOT_FOUND) were
defined. defined.
In Section 3.6, "Implementations MUST support the HTTP method for In Section 3.6, "Implementations MUST support the "http:" scheme for
hash-and-URL lookup. The behavior of other URL methods is not hash-and-URL lookup. The behavior of other URL schemes is not
currently specified, and such methods SHOULD NOT be used in the currently specified, and such schemes SHOULD NOT be used in the
absence of a document specifying them" was added. absence of a document specifying them" was added.
In Section 3.15.3, a pointer to a new document that is related to In Section 3.15.3, a pointer to a new document that is related to
configuration of IPv6 addresses was added. configuration of IPv6 addresses was added.
Appendix C was expanded and clarified. Appendix C was expanded and clarified.
1.8. Differences between RFC 5996 and This Document 1.8. Differences between RFC 5996 and This Document
Fixed section 3.6 and 3.10 as specified in the RFC5996 errata 2707 Clarified in the Abstract and the Introduction section that the
and 3036. status of this document is Internet Standard.
Deprecated Raw RSA Public keys. There is new work ongoing to replace The new Section 2.9.2 covers Traffic Selectors in rekeying.
that with more generic format for generic raw public keys.
Added reference to the RFC6989 when using non Sophie-Germain Diffie- Added reference to RFC 6989 when reusing Diffie-Hellman exponentials
Hellman groups, or when reusing Diffie-Hellman Exponentials. (Section 2.12).
Added reference to the RFC4945 in the Identification Payloads Added name "Last Substruc" for the Proposal Substructure and
section. Transform Substructure header (Sections 3.3.1 and 3.3.2) for the 0
(last) or 2/3 (more) field.
Added IANA Considerations section note about deprecating the Raw RSA Added reference to RFC 6989 when using groups that are not
Key, and removed the old contents which was already done during Sophie Germain Modular Exponentiation (MODP) groups (Section 3.3.2).
RFC5996 processing. Added note that IANA should update IKEv2
registry to point to this document instead of RFC5996.
Clarified that the intended status of this document is Internet Added reference to RFC 4945 in the Identification Payloads section
Standard both in abstract and Introduction section. (Section 3.5).
Added name Last Substruc for the Proposal and Transform Substructure Deprecated Raw RSA public keys in Section 3.6. There is new work in
header for the 0 (last) or 2/3 (more) field. progress adding a more generic format for raw public keys.
Fixed Sections 3.6 and 3.10 as specified in the errata for RFC 5996
(RFC Errata IDs 2707 and 3036).
Added a note in the IANA Considerations section (Section 6) about
deprecating the Raw RSA Key, and removed the old contents (which was
already done during RFC 5996 processing). Added a note that IANA
should update all references to RFC 5996 to point to this document.
2. IKE Protocol Details and Variations 2. IKE Protocol Details and Variations
IKE normally listens and sends on UDP port 500, though IKE messages IKE normally listens and sends on UDP port 500, though IKE messages
may also be received on UDP port 4500 with a slightly different may also be received on UDP port 4500 with a slightly different
format (see Section 2.23). Since UDP is a datagram (unreliable) format (see Section 2.23). Since UDP is a datagram (unreliable)
protocol, IKE includes in its definition recovery from transmission protocol, IKE includes in its definition recovery from transmission
errors, including packet loss, packet replay, and packet forgery. errors, including packet loss, packet replay, and packet forgery.
IKE is designed to function so long as (1) at least one of a series IKE is designed to function so long as (1) at least one of a series
of retransmitted packets reaches its destination before timing out; of retransmitted packets reaches its destination before timing out;
skipping to change at page 23, line 42 skipping to change at page 24, line 31
long. IKEv2 implementations need to be aware of the maximum UDP long. IKEv2 implementations need to be aware of the maximum UDP
message size supported and MAY shorten messages by leaving out some message size supported and MAY shorten messages by leaving out some
certificates or cryptographic suite proposals if that will keep certificates or cryptographic suite proposals if that will keep
messages below the maximum. Use of the "Hash and URL" formats rather messages below the maximum. Use of the "Hash and URL" formats rather
than including certificates in exchanges where possible can avoid than including certificates in exchanges where possible can avoid
most problems. Implementations and configuration need to keep in most problems. Implementations and configuration need to keep in
mind, however, that if the URL lookups are possible only after the mind, however, that if the URL lookups are possible only after the
Child SA is established, recursion issues could prevent this Child SA is established, recursion issues could prevent this
technique from working. technique from working.
The UDP payload of all packets containing IKE messages sent on port The UDP payload of all packets containing IKE messages sent on
4500 MUST begin with the prefix of four zeros; otherwise, the port 4500 MUST begin with the prefix of four zeros; otherwise, the
receiver won't know how to handle them. receiver won't know how to handle them.
2.1. Use of Retransmission Timers 2.1. Use of Retransmission Timers
All messages in IKE exist in pairs: a request and a response. The All messages in IKE exist in pairs: a request and a response. The
setup of an IKE SA normally consists of two exchanges. Once the IKE setup of an IKE SA normally consists of two exchanges. Once the IKE
SA is set up, either end of the Security Association may initiate SA is set up, either end of the Security Association may initiate
requests at any time, and there can be many requests and responses requests at any time, and there can be many requests and responses
"in flight" at any given moment. But each message is labeled as "in flight" at any given moment. But each message is labeled as
either a request or a response, and for each exchange, one end of the either a request or a response, and for each exchange, one end of the
skipping to change at page 27, line 7 skipping to change at page 27, line 46
particular implementation, and is not related to congestion control particular implementation, and is not related to congestion control
(unlike the window size in TCP, for example). In particular, what (unlike the window size in TCP, for example). In particular, what
the responder should do when it receives a SET_WINDOW_SIZE the responder should do when it receives a SET_WINDOW_SIZE
notification containing a smaller value than is currently in effect notification containing a smaller value than is currently in effect
is not defined. Thus, there is currently no way to reduce the window is not defined. Thus, there is currently no way to reduce the window
size of an existing IKE SA; you can only increase it. When rekeying size of an existing IKE SA; you can only increase it. When rekeying
an IKE SA, the new IKE SA starts with window size 1 until it is an IKE SA, the new IKE SA starts with window size 1 until it is
explicitly increased by sending a new SET_WINDOW_SIZE notification. explicitly increased by sending a new SET_WINDOW_SIZE notification.
The INVALID_MESSAGE_ID notification is sent when an IKE Message ID The INVALID_MESSAGE_ID notification is sent when an IKE Message ID
outside the supported window is received. This Notify message MUST outside the supported window is received. This Notify message
NOT be sent in a response; the invalid request MUST NOT be MUST NOT be sent in a response; the invalid request MUST NOT be
acknowledged. Instead, inform the other side by initiating an acknowledged. Instead, inform the other side by initiating an
INFORMATIONAL exchange with Notification data containing the four- INFORMATIONAL exchange with Notification Data containing the
octet invalid Message ID. Sending this notification is OPTIONAL, and four-octet invalid Message ID. Sending this notification is
notifications of this type MUST be rate limited. OPTIONAL, and notifications of this type MUST be rate limited.
2.4. State Synchronization and Connection Timeouts 2.4. State Synchronization and Connection Timeouts
An IKE endpoint is allowed to forget all of its state associated with 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. 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 This is the anticipated behavior in the event of an endpoint crash
and restart. It is important when an endpoint either fails or and restart. It is important when an endpoint either fails or
reinitializes its state that the other endpoint detect those reinitializes its state that the other endpoint detect those
conditions and not continue to waste network bandwidth by sending conditions and not continue to waste network bandwidth by sending
packets over discarded SAs and having them fall into a black hole. packets over discarded SAs and having them fall into a black hole.
skipping to change at page 27, line 49 skipping to change at page 28, line 40
failed based on any routing information (e.g., ICMP messages) or IKE failed based on any routing information (e.g., ICMP messages) or IKE
messages that arrive without cryptographic protection (e.g., Notify messages that arrive without cryptographic protection (e.g., Notify
messages complaining about unknown SPIs). An endpoint MUST conclude messages complaining about unknown SPIs). An endpoint MUST conclude
that the other endpoint has failed only when repeated attempts to that the other endpoint has failed only when repeated attempts to
contact it have gone unanswered for a timeout period or when a contact it have gone unanswered for a timeout period or when a
cryptographically protected INITIAL_CONTACT notification is received cryptographically protected INITIAL_CONTACT notification is received
on a different IKE SA to the same authenticated identity. An on a different IKE SA to the same authenticated identity. An
endpoint should suspect that the other endpoint has failed based on endpoint should suspect that the other endpoint has failed based on
routing information and initiate a request to see whether the other routing information and initiate a request to see whether the other
endpoint is alive. To check whether the other side is alive, IKE endpoint is alive. To check whether the other side is alive, IKE
specifies an empty INFORMATIONAL message that (like all IKE requests) specifies an empty INFORMATIONAL request that (like all IKE requests)
requires an acknowledgement (note that within the context of an IKE requires an acknowledgement (note that within the context of an IKE
SA, an "empty" message consists of an IKE header followed by an SA, an "empty" message consists of an IKE header followed by an
Encrypted payload that contains no payloads). If a cryptographically Encrypted payload that contains no payloads). If a cryptographically
protected (fresh, i.e., not retransmitted) message has been received protected (fresh, i.e., not retransmitted) message has been received
from the other side recently, unprotected Notify messages MAY be from the other side recently, unprotected Notify messages MAY be
ignored. Implementations MUST limit the rate at which they take ignored. Implementations MUST limit the rate at which they take
actions based on unprotected messages. actions based on unprotected messages.
The number of retries and length of timeouts are not covered in this The number of retries and length of timeouts are not covered in this
specification because they do not affect interoperability. It is specification because they do not affect interoperability. It is
skipping to change at page 28, line 35 skipping to change at page 29, line 25
cryptographically protected message on an IKE SA or any of its Child cryptographically protected message on an IKE SA or any of its Child
SAs ensures liveness of the IKE SA and all of its Child SAs. Note SAs ensures liveness of the IKE SA and all of its Child SAs. Note
that this places requirements on the failure modes of an IKE that this places requirements on the failure modes of an IKE
endpoint. An implementation needs to stop sending over any SA if endpoint. An implementation needs to stop sending over any SA if
some failure prevents it from receiving on all of the associated SAs. some failure prevents it from receiving on all of the associated SAs.
If a system creates Child SAs that can fail independently from one If a system creates Child SAs that can fail independently from one
another without the associated IKE SA being able to send a delete another without the associated IKE SA being able to send a delete
message, then the system MUST negotiate such Child SAs using separate message, then the system MUST negotiate such Child SAs using separate
IKE SAs. IKE SAs.
There is a DoS attack on the initiator of an IKE SA that can be One type of DoS attack on the initiator of an IKE SA can be avoided
avoided if the initiator takes the proper care. Since the first two if the initiator takes proper care: since the first two messages of
messages of an SA setup are not cryptographically protected, an an SA setup are not cryptographically protected, an attacker could
attacker could respond to the initiator's message before the genuine respond to the initiator's message before the genuine responder and
responder and poison the connection setup attempt. To prevent this, poison the connection setup attempt. To prevent this, the initiator
the initiator MAY be willing to accept multiple responses to its MAY be willing to accept multiple responses to its first message,
first message, treat each as potentially legitimate, respond to it, treat each response as potentially legitimate, respond to each one,
and then discard all the invalid half-open connections when it and then discard all the invalid half-open connections when it
receives a valid cryptographically protected response to any one of receives a valid cryptographically protected response to any one of
its requests. Once a cryptographically valid response is received, its requests. Once a cryptographically valid response is received,
all subsequent responses should be ignored whether or not they are all subsequent responses should be ignored whether or not they are
cryptographically valid. cryptographically valid.
Note that with these rules, there is no reason to negotiate and agree 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 upon an SA lifetime. If IKE presumes the partner is dead, based on
repeated lack of acknowledgement to an IKE message, then the IKE SA repeated lack of acknowledgement to an IKE message, then the IKE SA
and all Child SAs set up through that IKE SA are deleted. and all Child SAs set up through that IKE SA are deleted.
skipping to change at page 30, line 31 skipping to change at page 31, line 27
understand them. Similarly, payload types that are not defined are understand them. Similarly, payload types that are not defined are
reserved for future use; implementations of a version where they are reserved for future use; implementations of a version where they are
undefined MUST skip over those payloads and ignore their contents. undefined MUST skip over those payloads and ignore their contents.
IKEv2 adds a "critical" flag to each payload header for further IKEv2 adds a "critical" flag to each payload header for further
flexibility for forward compatibility. If the critical flag is set flexibility for forward compatibility. If the critical flag is set
and the payload type is unrecognized, the message MUST be rejected and the payload type is unrecognized, the message MUST be rejected
and the response to the IKE request containing that payload MUST and the response to the IKE request containing that payload MUST
include a Notify payload UNSUPPORTED_CRITICAL_PAYLOAD, indicating an include a Notify payload UNSUPPORTED_CRITICAL_PAYLOAD, indicating an
unsupported critical payload was included. In that Notify payload, unsupported critical payload was included. In that Notify payload,
the notification data contains the one-octet payload type. If the the Notification Data contains the one-octet payload type. If the
critical flag is not set and the payload type is unsupported, that critical flag is not set and the payload type is unsupported, that
payload MUST be ignored. Payloads sent in IKE response messages MUST payload MUST be ignored. Payloads sent in IKE response messages
NOT have the critical flag set. Note that the critical flag applies MUST NOT have the critical flag set. Note that the critical flag
only to the payload type, not the contents. If the payload type is applies only to the payload type, not the contents. If the payload
recognized, but the payload contains something that is not (such as type is recognized, but the payload contains something that is not
an unknown transform inside an SA payload, or an unknown Notify (such as an unknown transform inside an SA payload, or an unknown
Message Type inside a Notify payload), the critical flag is ignored. Notify Message Type inside a Notify payload), the critical flag is
ignored.
Although new payload types may be added in the future and may appear Although new payload types may be added in the future and may appear
interleaved with the fields defined in this specification, interleaved with the fields defined in this specification,
implementations SHOULD send the payloads defined in this implementations SHOULD send the payloads defined in this
specification in the order shown in the figures in Sections 1 and 2; specification in the order shown in the figures in Sections 1 and 2;
implementations MUST NOT reject as invalid a message with those implementations MUST NOT reject as invalid a message with those
payloads in any other order. payloads in any other order.
2.6. IKE SA SPIs and Cookies 2.6. IKE SA SPIs and Cookies
skipping to change at page 35, line 15 skipping to change at page 36, line 31
AUTH_HMAC_MD5, and AUTH_HMAC_SHA, the accepted suite MUST contain one AUTH_HMAC_MD5, and AUTH_HMAC_SHA, the accepted suite MUST contain one
of the ENCR_ transforms and one of the AUTH_ transforms. Thus, six of the ENCR_ transforms and one of the AUTH_ transforms. Thus, six
combinations are acceptable. combinations are acceptable.
If an initiator proposes both normal ciphers with integrity If an initiator proposes both normal ciphers with integrity
protection as well as combined-mode ciphers, then two proposals are protection as well as combined-mode ciphers, then two proposals are
needed. One of the proposals includes the normal ciphers with the needed. One of the proposals includes the normal ciphers with the
integrity algorithms for them, and the other proposal includes all integrity algorithms for them, and the other proposal includes all
the combined-mode ciphers without the integrity algorithms (because the combined-mode ciphers without the integrity algorithms (because
combined-mode ciphers are not allowed to have any integrity algorithm combined-mode ciphers are not allowed to have any integrity algorithm
other than "none"). other than "NONE").
2.8. Rekeying 2.8. Rekeying
IKE, ESP, and AH Security Associations use secret keys that should be IKE, ESP, and AH Security Associations use secret keys that should be
used only for a limited amount of time and to protect a limited used only for a limited amount of time and to protect a limited
amount of data. This limits the lifetime of the entire Security amount of data. This limits the lifetime of the entire Security
Association. When the lifetime of a Security Association expires, Association. When the lifetime of a Security Association expires,
the Security Association MUST NOT be used. If there is demand, new the Security Association MUST NOT be used. If there is demand, new
Security Associations MAY be established. Reestablishment of Security Associations MAY be established. Reestablishment of
Security Associations to take the place of ones that expire is Security Associations to take the place of ones that expire is
skipping to change at page 37, line 24 skipping to change at page 38, line 40
If the two ends have the same lifetime policies, it is possible that 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 both will initiate a rekeying at the same time (which will result in
redundant SAs). To reduce the probability of this happening, the redundant SAs). To reduce the probability of this happening, the
timing of rekeying requests SHOULD be jittered (delayed by a random timing of rekeying requests SHOULD be jittered (delayed by a random
amount of time after the need for rekeying is noticed). amount of time after the need for rekeying is noticed).
This form of rekeying may temporarily result in multiple similar SAs This form of rekeying may temporarily result in multiple similar SAs
between the same pairs of nodes. When there are two SAs eligible to between the same pairs of nodes. When there are two SAs eligible to
receive packets, a node MUST accept incoming packets through either receive packets, a node MUST accept incoming packets through either
SA. If redundant SAs are created though such a collision, the SA SA. If redundant SAs are created through such a collision, the SA
created with the lowest of the four nonces used in the two exchanges created with the lowest of the four nonces used in the two exchanges
SHOULD be closed by the endpoint that created it. "Lowest" means an SHOULD be closed by the endpoint that created it. "Lowest" means an
octet-by-octet comparison (instead of, for instance, comparing the octet-by-octet comparison (instead of, for instance, comparing the
nonces as large integers). In other words, start by comparing the nonces as large integers). In other words, start by comparing the
first octet; if they're equal, move to the next octet, and so on. If first octet; if they're equal, move to the next octet, and so on. If
you reach the end of one nonce, that nonce is the lower one. The you reach the end of one nonce, that nonce is the lower one. The
node that initiated the surviving rekeyed SA should delete the node that initiated the surviving rekeyed SA should delete the
replaced SA after the new one is established. replaced SA after the new one is established.
The following is an explanation on the impact this has on The following is an explanation on the impact this has on
skipping to change at page 41, line 7 skipping to change at page 42, line 29
payloads), creating new Child SAs within the new IKE SA (without payloads), creating new Child SAs within the new IKE SA (without
REKEY_SA Notify payloads), and finally deleting the old IKE SA (which REKEY_SA Notify payloads), and finally deleting the old IKE SA (which
deletes the old Child SAs as well). deletes the old Child SAs as well).
This means that reauthentication also establishes new keys for the This means that reauthentication also establishes new keys for the
IKE SA and Child SAs. Therefore, while rekeying can be performed IKE SA and Child SAs. Therefore, while rekeying can be performed
more often than reauthentication, the situation where "authentication more often than reauthentication, the situation where "authentication
lifetime" is shorter than "key lifetime" does not make sense. lifetime" is shorter than "key lifetime" does not make sense.
While creation of a new IKE SA can be initiated by either party While creation of a new IKE SA can be initiated by either party
(initiator or responder in the original IKE SA), the use of EAP (initiator or responder in the original IKE SA), the use of EAP and/
and/or Configuration payloads means in practice that reauthentication or Configuration payloads means in practice that reauthentication has
has to be initiated by the same party as the original IKE SA. IKEv2 to be initiated by the same party as the original IKE SA. IKEv2 does
does not currently allow the responder to request reauthentication in not currently allow the responder to request reauthentication in this
this case; however, there are extensions that add this functionality case; however, there are extensions that add this functionality such
such as [REAUTH]. as [REAUTH].
2.9. Traffic Selector Negotiation 2.9. Traffic Selector Negotiation
When an RFC4301-compliant IPsec subsystem receives an IP packet that When an RFC4301-compliant IPsec subsystem receives an IP packet that
matches a "protect" selector in its Security Policy Database (SPD), matches a "protect" selector in its Security Policy Database (SPD),
the subsystem protects that packet with IPsec. When no SA exists the subsystem protects that packet with IPsec. When no SA exists
yet, it is the task of IKE to create it. Maintenance of a system's yet, it is the task of IKE to create it. Maintenance of a system's
SPD is outside the scope of IKE, although some implementations might SPD is outside the scope of IKE, although some implementations might
update their SPD in connection with the running of IKE (for an update their SPD in connection with the running of IKE (for an
example scenario, see Section 1.1.3). example scenario, see Section 1.1.3).
skipping to change at page 44, line 14 skipping to change at page 45, line 33
2.9.1. Traffic Selectors Violating Own Policy 2.9.1. Traffic Selectors Violating Own Policy
When creating a new SA, the initiator needs to avoid proposing When creating a new SA, the initiator needs to avoid proposing
Traffic Selectors that violate its own policy. If this rule is not Traffic Selectors that violate its own policy. If this rule is not
followed, valid traffic may be dropped. If you use decorrelated followed, valid traffic may be dropped. If you use decorrelated
policies from [IPSECARCH], this kind of policy violations cannot policies from [IPSECARCH], this kind of policy violations cannot
happen. happen.
This is best illustrated by an example. Suppose that host A has a This is best illustrated by an example. Suppose that host A has a
policy whose effect is that traffic to 198.51.100.66 is sent via host policy whose effect is that traffic to 198.51.100.66 is sent via
B encrypted using AES, and traffic to all other hosts in host B encrypted using AES, and traffic to all other hosts in
198.51.100.0/24 is also sent via B, but must use 3DES. Suppose also 198.51.100.0/24 is also sent via B, but must use 3DES. Suppose also
that host B accepts any combination of AES and 3DES. that host B accepts any combination of AES and 3DES.
If host A now proposes an SA that uses 3DES, and includes TSr If host A now proposes an SA that uses 3DES, and includes TSr
containing (198.51.100.0-198.51.100.255), this will be accepted by containing (198.51.100.0 - 198.51.100.255), this will be accepted by
host B. Now, host B can also use this SA to send traffic from host B. Now, host B can also use this SA to send traffic from
198.51.100.66, but those packets will be dropped by A since it 198.51.100.66, but those packets will be dropped by A since it
requires the use of AES for this traffic. Even if host A creates a requires the use of AES for this traffic. Even if host A creates a
new SA only for 198.51.100.66 that uses AES, host B may freely new SA only for 198.51.100.66 that uses AES, host B may freely
continue to use the first SA for the traffic. In this situation, continue to use the first SA for the traffic. In this situation,
when proposing the SA, host A should have followed its own policy, when proposing the SA, host A should have followed its own policy,
and included a TSr containing ((198.51.100.0- and included a TSr containing ((198.51.100.0 - 198.51.100.65),
198.51.100.65),(198.51.100.67-198.51.100.255)) instead. (198.51.100.67 - 198.51.100.255)) instead.
In general, if (1) the initiator makes a proposal "for traffic X In general, if (1) the initiator makes a proposal "for traffic X
(TSi/TSr), do SA", and (2) for some subset X' of X, the initiator (TSi/TSr), do SA", and (2) for some subset X' of X, the initiator
does not actually accept traffic X' with SA, and (3) the initiator does not actually accept traffic X' with SA, and (3) the initiator
would be willing to accept traffic X' with some SA' (!=SA), valid would be willing to accept traffic X' with some SA' (!=SA), valid
traffic can be unnecessarily dropped since the responder can apply traffic can be unnecessarily dropped since the responder can apply
either SA or SA' to traffic X'. either SA or SA' to traffic X'.
2.9.2. Traffic Selectors in Rekeying
Rekeying is used to replace an existing Child SA with another. If
the new SA would be allowed to have a narrower set of selectors than
the original, traffic that was allowed on the old SA would be dropped
in the new SA, thus violating the idea of "replacing". Thus, the new
SA MUST NOT have narrower selectors than the original. If the
rekeyed SA would ever need to have a narrower scope than the
currently used SA, that would mean that the policy was changed in a
way such that the currently used SA is against the policy. In that
case, the SA should have been already deleted after the policy change
took effect.
When the initiator attempts to rekey the Child SA, the proposed
Traffic Selectors SHOULD be either the same as, or a superset of, the
Traffic Selectors used in the old Child SA. That is, they would be
the same as, or a superset of, the currently active (decorrelated)
policy. The responder MUST NOT narrow down the Traffic Selectors
narrower than the scope currently in use.
Because a rekeyed SA can never have a narrower scope than the one
currently in use, there is no need for the selectors from the packet,
so those selectors SHOULD NOT be sent.
2.10. Nonces 2.10. Nonces
The IKE_SA_INIT messages each contain a nonce. These nonces are used The IKE_SA_INIT messages each contain a nonce. These nonces are used
as inputs to cryptographic functions. The CREATE_CHILD_SA request as inputs to cryptographic functions. The CREATE_CHILD_SA request
and the CREATE_CHILD_SA response also contain nonces. These nonces and the CREATE_CHILD_SA response also contain nonces. These nonces
are used to add freshness to the key derivation technique used to are used to add freshness to the key derivation technique used to
obtain keys for Child SA, and to ensure creation of strong obtain keys for Child SA, and to ensure creation of strong
pseudorandom bits from the Diffie-Hellman key. Nonces used in IKEv2 pseudorandom bits from the Diffie-Hellman key. Nonces used in IKEv2
MUST be randomly chosen, MUST be at least 128 bits in size, and MUST MUST be randomly chosen, MUST be at least 128 bits in size, and MUST
be at least half the key size of the negotiated pseudorandom function be at least half the key size of the negotiated pseudorandom function
skipping to change at page 46, line 4 skipping to change at page 48, line 5
connection was closed. This would allow the exponential to be reused connection was closed. This would allow the exponential to be reused
without losing perfect forward secrecy at the cost of maintaining without losing perfect forward secrecy at the cost of maintaining
more state. more state.
Whether and when to reuse Diffie-Hellman exponentials are private Whether and when to reuse Diffie-Hellman exponentials are private
decisions in the sense that they will not affect interoperability. decisions in the sense that they will not affect interoperability.
An implementation that reuses exponentials MAY choose to remember the An implementation that reuses exponentials MAY choose to remember the
exponential used by the other endpoint on past exchanges and if one exponential used by the other endpoint on past exchanges and if one
is reused to avoid the second half of the calculation. See [REUSE] is reused to avoid the second half of the calculation. See [REUSE]
and [RFC6989] for a security analysis of this practice and for and [RFC6989] for a security analysis of this practice and for
additional security considerations when reusing ephemeral Diffie- additional security considerations when reusing ephemeral
Hellman keys. Diffie-Hellman keys.
2.13. Generating Keying Material 2.13. Generating Keying Material
In the context of the IKE SA, four cryptographic algorithms are In the context of the IKE SA, four cryptographic algorithms are
negotiated: an encryption algorithm, an integrity protection negotiated: an encryption algorithm, an integrity protection
algorithm, a Diffie-Hellman group, and a pseudorandom function (PRF). algorithm, a Diffie-Hellman group, and a pseudorandom function (PRF).
The PRF is used for the construction of keying material for all of The PRF is used for the construction of keying material for all of
the cryptographic algorithms used in both the IKE SA and the Child the cryptographic algorithms used in both the IKE SA and the
SAs. Child SAs.
We assume that each encryption algorithm and integrity protection We assume that each encryption algorithm and integrity protection
algorithm uses a fixed-size key and that any randomly chosen value of algorithm uses a fixed-size key and that any randomly chosen value of
that fixed size can serve as an appropriate key. For algorithms that that fixed size can serve as an appropriate key. For algorithms that
accept a variable-length key, a fixed key size MUST be specified as accept a variable-length key, a fixed key size MUST be specified as
part of the cryptographic transform negotiated (see Section 3.3.5 for part of the cryptographic transform negotiated (see Section 3.3.5 for
the definition of the Key Length transform attribute). For the definition of the Key Length transform attribute). For
algorithms for which not all values are valid keys (such as DES or algorithms for which not all values are valid keys (such as DES or
3DES with key parity), the algorithm by which keys are derived from 3DES with key parity), the algorithm by which keys are derived from
arbitrary values MUST be specified by the cryptographic transform. arbitrary values MUST be specified by the cryptographic transform.
skipping to change at page 46, line 43 skipping to change at page 49, line 5
length of the output of the underlying hash function. Other types of length of the output of the underlying hash function. Other types of
PRFs MUST specify their preferred key size. PRFs MUST specify their preferred key size.
Keying material will always be derived as the output of the Keying material will always be derived as the output of the
negotiated PRF algorithm. Since the amount of keying material needed negotiated PRF algorithm. Since the amount of keying material needed
may be greater than the size of the output of the PRF, the PRF is may be greater than the size of the output of the PRF, the PRF is
used iteratively. The term "prf+" describes a function that outputs used iteratively. The term "prf+" describes a function that outputs
a pseudorandom stream based on the inputs to a pseudorandom function a pseudorandom stream based on the inputs to a pseudorandom function
called "prf". called "prf".
In the following, | indicates concatenation. prf+ is defined as: In the following, | indicates concatenation. prf+ is defined as:
prf+ (K,S) = T1 | T2 | T3 | T4 | ... prf+ (K,S) = T1 | T2 | T3 | T4 | ...
where: where:
T1 = prf (K, S | 0x01) T1 = prf (K, S | 0x01)
T2 = prf (K, T1 | S | 0x02) T2 = prf (K, T1 | S | 0x02)
T3 = prf (K, T2 | S | 0x03) T3 = prf (K, T2 | S | 0x03)
T4 = prf (K, T3 | S | 0x04) T4 = prf (K, T3 | S | 0x04)
... ...
skipping to change at page 47, line 36 skipping to change at page 49, line 46
algorithm for authenticating the component messages of subsequent algorithm for authenticating the component messages of subsequent
exchanges; SK_ei and SK_er used for encrypting (and of course exchanges; SK_ei and SK_er used for encrypting (and of course
decrypting) all subsequent exchanges; and SK_pi and SK_pr, which are decrypting) all subsequent exchanges; and SK_pi and SK_pr, which are
used when generating an AUTH payload. The lengths of SK_d, SK_pi, used when generating an AUTH payload. The lengths of SK_d, SK_pi,
and SK_pr MUST be the preferred key length of the PRF agreed upon. and SK_pr MUST be the preferred key length of the PRF agreed upon.
SKEYSEED and its derivatives are computed as follows: SKEYSEED and its derivatives are computed as follows:
SKEYSEED = prf(Ni | Nr, g^ir) SKEYSEED = prf(Ni | Nr, g^ir)
{SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr } {SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr}
= prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr ) = prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr)
(indicating that the quantities SK_d, SK_ai, SK_ar, SK_ei, SK_er, (indicating that the quantities SK_d, SK_ai, SK_ar, SK_ei, SK_er,
SK_pi, and SK_pr are taken in order from the generated bits of the SK_pi, and SK_pr are taken in order from the generated bits of the
prf+). g^ir is the shared secret from the ephemeral Diffie-Hellman 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 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 order padded with zeros if necessary to make it the length of the
modulus. Ni and Nr are the nonces, stripped of any headers. For modulus. Ni and Nr are the nonces, stripped of any headers. For
historical backward-compatibility reasons, there are two PRFs that historical backward-compatibility reasons, there are two PRFs that
are treated specially in this calculation. If the negotiated PRF is are treated specially in this calculation. If the negotiated PRF is
AES-XCBC-PRF-128 [AESXCBCPRF128] or AES-CMAC-PRF-128 [AESCMACPRF128], AES-XCBC-PRF-128 [AESXCBCPRF128] or AES-CMAC-PRF-128 [AESCMACPRF128],
only the first 64 bits of Ni and the first 64 bits of Nr are used in only the first 64 bits of Ni and the first 64 bits of Nr are used in
calculating SKEYSEED, but all the bits are used for input to the prf+ calculating SKEYSEED, but all the bits are used for input to the prf+
function. function.
The two directions of traffic flow use different keys. The keys used The two directions of traffic flow use different keys. The keys used
skipping to change at page 49, line 32 skipping to change at page 51, line 43
used in both directions. used in both directions.
Note that it is a common but typically insecure practice to have a Note that it is a common but typically insecure practice to have a
shared key derived solely from a user-chosen password without shared key derived solely from a user-chosen password without
incorporating another source of randomness. This is typically incorporating another source of randomness. This is typically
insecure because user-chosen passwords are unlikely to have insecure because user-chosen passwords are unlikely to have
sufficient unpredictability to resist dictionary attacks and these sufficient unpredictability to resist dictionary attacks and these
attacks are not prevented in this authentication method. attacks are not prevented in this authentication method.
(Applications using password-based authentication for bootstrapping (Applications using password-based authentication for bootstrapping
and IKE SA should use the authentication method in Section 2.16, and IKE SA should use the authentication method in Section 2.16,
which is designed to prevent off-line dictionary attacks.) The pre- which is designed to prevent off-line dictionary attacks.) The
shared key needs to contain as much unpredictability as the strongest pre-shared key needs to contain as much unpredictability as the
key being negotiated. In the case of a pre-shared key, the AUTH strongest key being negotiated. In the case of a pre-shared key, the
value is computed as: AUTH value is computed as:
For the initiator: For the initiator:
AUTH = prf( prf(Shared Secret, "Key Pad for IKEv2"), AUTH = prf( prf(Shared Secret, "Key Pad for IKEv2"),
<InitiatorSignedOctets>) <InitiatorSignedOctets>)
For the responder: For the responder:
AUTH = prf( prf(Shared Secret, "Key Pad for IKEv2"), AUTH = prf( prf(Shared Secret, "Key Pad for IKEv2"),
<ResponderSignedOctets>) <ResponderSignedOctets>)
where the string "Key Pad for IKEv2" is 17 ASCII characters without where the string "Key Pad for IKEv2" is 17 ASCII characters without
null termination. The shared secret can be variable length. The pad null termination. The shared secret can be variable length. The pad
string is added so that if the shared secret is derived from a string is added so that if the shared secret is derived from a
password, the IKE implementation need not store the password in password, the IKE implementation need not store the password in
cleartext, but rather can store the value prf(Shared Secret,"Key Pad cleartext, but rather can store the value prf(Shared Secret,"Key Pad
for IKEv2"), which could not be used as a password equivalent for for IKEv2"), which could not be used as a password equivalent for
skipping to change at page 50, line 23 skipping to change at page 52, line 36
Section 2.16), and each type uses different values in the AUTH Section 2.16), and each type uses different values in the AUTH
computations shown above. If the EAP method is key-generating, computations shown above. If the EAP method is key-generating,
substitute master session key (MSK) for the shared secret in the substitute master session key (MSK) for the shared secret in the
computation. For non-key-generating methods, substitute SK_pi and computation. For non-key-generating methods, substitute SK_pi and
SK_pr, respectively, for the shared secret in the two AUTH SK_pr, respectively, for the shared secret in the two AUTH
computations. computations.
2.16. Extensible Authentication Protocol Methods 2.16. Extensible Authentication Protocol Methods
In addition to authentication using public key signatures and shared In addition to authentication using public key signatures and shared
secrets, IKE supports authentication using methods defined in RFC secrets, IKE supports authentication using methods defined in
3748 [EAP]. Typically, these methods are asymmetric (designed for a RFC 3748 [EAP]. Typically, these methods are asymmetric (designed
user authenticating to a server), and they may not be mutual. For for a user authenticating to a server), and they may not be mutual.
this reason, these protocols are typically used to authenticate the For this reason, these protocols are typically used to authenticate
initiator to the responder and MUST be used in conjunction with a the initiator to the responder and MUST be used in conjunction with a
public-key-signature-based authentication of the responder to the public-key-signature-based authentication of the responder to the
initiator. These methods are often associated with mechanisms initiator. These methods are often associated with mechanisms
referred to as "Legacy Authentication" mechanisms. referred to as "Legacy Authentication" mechanisms.
While this document references [EAP] with the intent that new methods While this document references [EAP] with the intent that new methods
can be added in the future without updating this specification, some can be added in the future without updating this specification, some
simpler variations are documented here. [EAP] defines an simpler variations are documented here. [EAP] defines an
authentication protocol requiring a variable number of messages. authentication protocol requiring a variable number of messages.
Extensible Authentication is implemented in IKE as additional Extensible authentication is implemented in IKE as additional
IKE_AUTH exchanges that MUST be completed in order to initialize the IKE_AUTH exchanges that MUST be completed in order to initialize the
IKE SA. IKE SA.
An initiator indicates a desire to use EAP by leaving out the AUTH An initiator indicates a desire to use EAP by leaving out the AUTH
payload from the first message in the IKE_AUTH exchange. (Note that payload from the first message in the IKE_AUTH exchange. (Note that
the AUTH payload is required for non-EAP authentication, and is thus the AUTH payload is required for non-EAP authentication, and is thus
not marked as optional in the rest of this document.) By including not marked as optional in the rest of this document.) By including
an IDi payload but not an AUTH payload, the initiator has declared an an IDi payload but not an AUTH payload, the initiator has declared an
identity but has not proven it. If the responder is willing to use identity but has not proven it. If the responder is willing to use
an EAP method, it will place an Extensible Authentication Protocol an EAP method, it will place an Extensible Authentication Protocol
skipping to change at page 51, line 13 skipping to change at page 53, line 25
method, the initial SA establishment will appear as follows: method, the initial SA establishment will appear as follows:
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SAi1, KEi, Ni --> HDR, SAi1, KEi, Ni -->
<-- HDR, SAr1, KEr, Nr, [CERTREQ] <-- HDR, SAr1, KEr, Nr, [CERTREQ]
HDR, SK {IDi, [CERTREQ,] HDR, SK {IDi, [CERTREQ,]
[IDr,] SAi2, [IDr,] SAi2,
TSi, TSr} --> TSi, TSr} -->
<-- HDR, SK {IDr, [CERT,] AUTH, <-- HDR, SK {IDr, [CERT,] AUTH,
EAP } EAP}
HDR, SK {EAP} --> HDR, SK {EAP} -->
<-- HDR, SK {EAP (success)} <-- HDR, SK {EAP (success)}
HDR, SK {AUTH} --> HDR, SK {AUTH} -->
<-- HDR, SK {AUTH, SAr2, TSi, TSr } <-- HDR, SK {AUTH, SAr2, TSi, TSr}
As described in Section 2.2, when EAP is used, each pair of IKE SA As described in Section 2.2, when EAP is used, each pair of IKE SA
initial setup messages will have their message numbers incremented; initial setup messages will have their message numbers incremented;
the first pair of IKE_AUTH messages will have an ID of 1, the second the first pair of IKE_AUTH messages will have an ID of 1, the second
will be 2, and so on. will be 2, and so on.
For EAP methods that create a shared key as a side effect of For EAP methods that create a shared key as a side effect of
authentication, that shared key MUST be used by both the initiator authentication, that shared key MUST be used by both the initiator
and responder to generate AUTH payloads in messages 7 and 8 using the and responder to generate AUTH payloads in messages 7 and 8 using the
syntax for shared secrets specified in Section 2.15. The shared key syntax for shared secrets specified in Section 2.15. The shared key
skipping to change at page 52, line 33 skipping to change at page 54, line 47
KEYMAT = prf+(SK_d, Ni | Nr) KEYMAT = prf+(SK_d, Ni | Nr)
Where Ni and Nr are the nonces from the IKE_SA_INIT exchange if this Where Ni and Nr are the nonces from the IKE_SA_INIT exchange if this
request is the first Child SA created or the fresh Ni and Nr from the request is the first Child SA created or the fresh Ni and Nr from the
CREATE_CHILD_SA exchange if this is a subsequent creation. CREATE_CHILD_SA exchange if this is a subsequent creation.
For CREATE_CHILD_SA exchanges including an optional Diffie-Hellman For CREATE_CHILD_SA exchanges including an optional Diffie-Hellman
exchange, the keying material is defined as: exchange, the keying material is defined as:
KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr ) KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr)
where g^ir (new) is the shared secret from the ephemeral Diffie- where g^ir (new) is the shared secret from the ephemeral Diffie-
Hellman exchange of this CREATE_CHILD_SA exchange (represented as an Hellman exchange of this CREATE_CHILD_SA exchange (represented as an
octet string in big endian order padded with zeros in the high-order octet string in big endian order padded with zeros in the high-order
bits if necessary to make it the length of the modulus). bits if necessary to make it the length of the modulus).
A single CREATE_CHILD_SA negotiation may result in multiple Security A single CREATE_CHILD_SA negotiation may result in multiple Security
Associations. ESP and AH SAs exist in pairs (one in each direction), Associations. ESP and AH SAs exist in pairs (one in each direction),
so two SAs are created in a single Child SA negotiation for them. so two SAs are created in a single Child SA negotiation for them.
Furthermore, Child SA negotiation may include some future IPsec Furthermore, Child SA negotiation may include some future IPsec
skipping to change at page 55, line 7 skipping to change at page 57, line 18
containing the SA payloads. containing the SA payloads.
CP(CFG_REQUEST) MUST contain at least an INTERNAL_ADDRESS attribute CP(CFG_REQUEST) MUST contain at least an INTERNAL_ADDRESS attribute
(either IPv4 or IPv6) but MAY contain any number of additional (either IPv4 or IPv6) but MAY contain any number of additional
attributes the initiator wants returned in the response. attributes the initiator wants returned in the response.
For example, message from initiator to responder: For example, message from initiator to responder:
CP(CFG_REQUEST)= CP(CFG_REQUEST)=
INTERNAL_ADDRESS() INTERNAL_ADDRESS()
TSi = (0, 0-65535,0.0.0.0-255.255.255.255) TSi = (0, 0-65535, 0.0.0.0-255.255.255.255)
TSr = (0, 0-65535,0.0.0.0-255.255.255.255) TSr = (0, 0-65535, 0.0.0.0-255.255.255.255)
NOTE: Traffic Selectors contain (protocol, port range, address NOTE: Traffic Selectors contain (protocol, port range, address
range). range).
Message from responder to initiator: Message from responder to initiator:
CP(CFG_REPLY)= CP(CFG_REPLY)=
INTERNAL_ADDRESS(192.0.2.202) INTERNAL_ADDRESS(192.0.2.202)
INTERNAL_NETMASK(255.255.255.0) INTERNAL_NETMASK(255.255.255.0)
INTERNAL_SUBNET(192.0.2.0/255.255.255.0) INTERNAL_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535,192.0.2.202-192.0.2.202) TSi = (0, 0-65535, 192.0.2.202-192.0.2.202)
TSr = (0, 0-65535,192.0.2.0-192.0.2.255) TSr = (0, 0-65535, 192.0.2.0-192.0.2.255)
All returned values will be implementation dependent. As can be seen All returned values will be implementation dependent. As can be seen
in the above example, the IRAS MAY also send other attributes that in the above example, the IRAS MAY also send other attributes that
were not included in CP(CFG_REQUEST) and MAY ignore the non- were not included in CP(CFG_REQUEST) and MAY ignore the non-mandatory
mandatory attributes that it does not support. attributes that it does not support.
The responder MUST NOT send a CFG_REPLY without having first received The responder MUST NOT send a CFG_REPLY without having first received
a CP(CFG_REQUEST) from the initiator, because we do not want the IRAS a CP(CFG_REQUEST) from the initiator, because we do not want the IRAS
to perform an unnecessary configuration lookup if the IRAC cannot to perform an unnecessary configuration lookup if the IRAC cannot
process the REPLY. process the REPLY.
In the case where the IRAS's configuration requires that CP be used In the case where the IRAS's configuration requires that CP be used
for a given identity IDi, but IRAC has failed to send a for a given identity IDi, but IRAC has failed to send a
CP(CFG_REQUEST), IRAS MUST fail the request, and terminate the Child CP(CFG_REQUEST), IRAS MUST fail the request, and terminate the Child
SA creation with a FAILED_CP_REQUIRED error. The FAILED_CP_REQUIRED SA creation with a FAILED_CP_REQUIRED error. The FAILED_CP_REQUIRED
skipping to change at page 56, line 5 skipping to change at page 58, line 18
version information MAY use the method below. This is an example of version information MAY use the method below. This is an example of
a configuration request within an INFORMATIONAL exchange, after the a configuration request within an INFORMATIONAL exchange, after the
IKE SA and first Child SA have been created. IKE SA and first Child SA have been created.
An IKE implementation MAY decline to give out version information An IKE implementation MAY decline to give out version information
prior to authentication or even after authentication in case some prior to authentication or even after authentication in case some
implementation is known to have some security weakness. In that implementation is known to have some security weakness. In that
case, it MUST either return an empty string or no CP payload if CP is case, it MUST either return an empty string or no CP payload if CP is
not supported. not supported.
Initiator Responder Initiator Responder
------------------------------------------------------------------- -------------------------------------------------------------------
HDR, SK{CP(CFG_REQUEST)} --> HDR, SK {CP(CFG_REQUEST)} -->
<-- HDR, SK{CP(CFG_REPLY)} <-- HDR, SK {CP(CFG_REPLY)}
CP(CFG_REQUEST)= CP(CFG_REQUEST)=
APPLICATION_VERSION("") APPLICATION_VERSION("")
CP(CFG_REPLY) APPLICATION_VERSION("foobar v1.3beta, (c) Foo Bar CP(CFG_REPLY) APPLICATION_VERSION("foobar v1.3beta, (c) Foo Bar
Inc.") Inc.")
2.21. Error Handling 2.21. Error Handling
There are many kinds of errors that can occur during IKE processing. There are many kinds of errors that can occur during IKE processing.
skipping to change at page 57, line 14 skipping to change at page 59, line 28
before giving up. The recipient should not immediately act based on before giving up. The recipient should not immediately act based on
the error notification unless corrective actions are defined in this the error notification unless corrective actions are defined in this
specification, such as for COOKIE, INVALID_KE_PAYLOAD, and specification, such as for COOKIE, INVALID_KE_PAYLOAD, and
INVALID_MAJOR_VERSION. INVALID_MAJOR_VERSION.
2.21.2. Error Handling in IKE_AUTH 2.21.2. Error Handling in IKE_AUTH
All errors that occur in an IKE_AUTH exchange, causing the All errors that occur in an IKE_AUTH exchange, causing the
authentication to fail for whatever reason (invalid shared secret, authentication to fail for whatever reason (invalid shared secret,
invalid ID, untrusted certificate issuer, revoked or expired invalid ID, untrusted certificate issuer, revoked or expired
certificate, etc.) SHOULD result in an AUTHENTICATION_FAILED certificate, etc.) SHOULD result in an AUTHENTICATION_FAILED
notification. If the error occurred on the responder, the notification. If the error occurred on the responder, the
notification is returned in the protected response, and is usually notification is returned in the protected response, and is usually
the only payload in that response. Although the IKE_AUTH messages the only payload in that response. Although the IKE_AUTH messages
are encrypted and integrity protected, if the peer receiving this are encrypted and integrity protected, if the peer receiving this
notification has not authenticated the other end yet, that peer needs notification has not authenticated the other end yet, that peer needs
to treat the information with caution. to treat the information with caution.
If the error occurs on the initiator, the notification MAY be If the error occurs on the initiator, the notification MAY be
returned in a separate INFORMATIONAL exchange, usually with no other returned in a separate INFORMATIONAL exchange, usually with no other
payloads. This is an exception for the general rule of not starting payloads. This is an exception for the general rule of not starting
skipping to change at page 58, line 9 skipping to change at page 60, line 22
IKE_AUTH), the UNSUPPORTED_CRITICAL_PAYLOAD, INVALID_SYNTAX, and IKE_AUTH), the UNSUPPORTED_CRITICAL_PAYLOAD, INVALID_SYNTAX, and
AUTHENTICATION_FAILED notifications are the only ones to cause the AUTHENTICATION_FAILED notifications are the only ones to cause the
IKE SA to be deleted or not created, without a Delete payload. IKE SA to be deleted or not created, without a Delete payload.
Extension documents may define new error notifications with these Extension documents may define new error notifications with these
semantics, but MUST NOT use them unless the peer has been shown to semantics, but MUST NOT use them unless the peer has been shown to
understand them, such as by using the Vendor ID payload. understand them, such as by using the Vendor ID payload.
2.21.3. Error Handling after IKE SA is Authenticated 2.21.3. Error Handling after IKE SA is Authenticated
After the IKE SA is authenticated, all requests having errors MUST After the IKE SA is authenticated, all requests having errors MUST
result in a response notifying about the error. result in a response notifying the other end of the error.
In normal situations, there should not be cases where a valid In normal situations, there should not be cases where a valid
response from one peer results in an error situation in the other response from one peer results in an error situation in the other
peer, so there should not be any reason for a peer to send error peer, so there should not be any reason for a peer to send error
messages to the other end except as a response. Because sending such messages to the other end except as a response. Because sending such
error messages as an INFORMATIONAL exchange might lead to further error messages as an INFORMATIONAL exchange might lead to further
errors that could cause loops, such errors SHOULD NOT be sent. If errors that could cause loops, such errors SHOULD NOT be sent. If
errors are seen that indicate that the peers do not have the same errors are seen that indicate that the peers do not have the same
state, it might be good to delete the IKE SA to clean up state and state, it might be good to delete the IKE SA to clean up state and
start over. start over.
skipping to change at page 60, line 6 skipping to change at page 62, line 19
notifications to indicate multiple supported algorithms. A message notifications to indicate multiple supported algorithms. A message
accepting an SA may contain at most one. accepting an SA may contain at most one.
The Transform IDs are listed here. The values in the following table The Transform IDs are listed here. The values in the following table
are only current as of the publication date of RFC 4306. Other are only current as of the publication date of RFC 4306. Other
values may have been added since then or will be added after the values may have been added since then or will be added after the
publication of this document. Readers should refer to [IKEV2IANA] publication of this document. Readers should refer to [IKEV2IANA]
for the latest values. for the latest values.
Name Number Defined In Name Number Defined In
------------------------------------- ----------------------------------------
IPCOMP_OUI 1 IPCOMP_OUI 1 (UNSPECIFIED)
IPCOMP_DEFLATE 2 RFC 2394 IPCOMP_DEFLATE 2 RFC 2394
IPCOMP_LZS 3 RFC 2395 IPCOMP_LZS 3 RFC 2395
IPCOMP_LZJH 4 RFC 3051 IPCOMP_LZJH 4 RFC 3051
Although there has been discussion of allowing multiple compression Although there has been discussion of allowing multiple compression
algorithms to be accepted and to have different compression algorithms to be accepted and to have different compression
algorithms available for the two directions of a Child SA, algorithms available for the two directions of a Child SA,
implementations of this specification MUST NOT accept an IPComp implementations of this specification MUST NOT accept an IPComp
algorithm that was not proposed, MUST NOT accept more than one, and algorithm that was not proposed, MUST NOT accept more than one, and
MUST NOT compress using an algorithm other than one proposed and MUST NOT compress using an algorithm other than one proposed and
skipping to change at page 60, line 35 skipping to change at page 62, line 48
In some cases, Robust Header Compression (ROHC) may be more In some cases, Robust Header Compression (ROHC) may be more
appropriate than IP Compression. [ROHCV2] defines the use of ROHC appropriate than IP Compression. [ROHCV2] defines the use of ROHC
with IKEv2 and IPsec. with IKEv2 and IPsec.
2.23. NAT Traversal 2.23. NAT Traversal
Network Address Translation (NAT) gateways are a controversial Network Address Translation (NAT) gateways are a controversial
subject. This section briefly describes what they are and how they subject. This section briefly describes what they are and how they
are likely to act on IKE traffic. Many people believe that NATs are 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 evil and that we should not design our protocols so as to make them
work better. IKEv2 does specify some unintuitive processing rules in work better. IKEv2 does indeed specify some unintuitive processing
order that NATs are more likely to work. rules so that NATs are more likely to work.
NATs exist primarily because of the shortage of IPv4 addresses, NATs exist primarily because of the shortage of IPv4 addresses,
though there are other rationales. IP nodes that are "behind" a NAT though there are other rationales. IP nodes that are "behind" a NAT
have IP addresses that are not globally unique, but rather are have IP addresses that are not globally unique, but rather are
assigned from some space that is unique within the network behind the assigned from some space that is unique within the network behind the
NAT but that are likely to be reused by nodes behind other NATs. NAT but that are likely to be reused by nodes behind other NATs.
Generally, nodes behind NATs can communicate with other nodes behind Generally, nodes behind NATs can communicate with other nodes behind
the same NAT and with nodes with globally unique addresses, but not the same NAT and with nodes with globally unique addresses, but not
with nodes behind other NATs. There are exceptions to that rule. with nodes behind other NATs. There are exceptions to that rule.
When those nodes make connections to nodes on the real Internet, the When those nodes make connections to nodes on the real Internet, the
skipping to change at page 62, line 34 skipping to change at page 64, line 51
message if the sender does not know which of several network message if the sender does not know which of several network
attachments will be used to send the packet. attachments will be used to send the packet.
o The data associated with the NAT_DETECTION_DESTINATION_IP o The data associated with the NAT_DETECTION_DESTINATION_IP
notification is a SHA-1 digest of the SPIs (in the order they notification is a SHA-1 digest of the SPIs (in the order they
appear in the header), IP address, and port to which this packet appear in the header), IP address, and port to which this packet
was sent. was sent.
o The recipient of either the NAT_DETECTION_SOURCE_IP or o The recipient of either the NAT_DETECTION_SOURCE_IP or
NAT_DETECTION_DESTINATION_IP notification MAY compare the supplied NAT_DETECTION_DESTINATION_IP notification MAY compare the supplied
value to a SHA-1 hash of the SPIs, source or recipient IP address value to a SHA-1 hash of the SPIs, source or recipient IP address,
(respectively), address, and port, and if they don't match, it and port (respectively), and if they don't match, it SHOULD enable
SHOULD enable NAT traversal. In the case there is a mismatch of NAT traversal. In the case there is a mismatch of the
the NAT_DETECTION_SOURCE_IP hash with all of the NAT_DETECTION_SOURCE_IP hash with all of the
NAT_DETECTION_SOURCE_IP payloads received, the recipient MAY NAT_DETECTION_SOURCE_IP payloads received, the recipient MAY
reject the connection attempt if NAT traversal is not supported. reject the connection attempt if NAT traversal is not supported.
In the case of a mismatching NAT_DETECTION_DESTINATION_IP hash, it In the case of a mismatching NAT_DETECTION_DESTINATION_IP hash, it
means that the system receiving the NAT_DETECTION_DESTINATION_IP means that the system receiving the NAT_DETECTION_DESTINATION_IP
payload is behind a NAT and that system SHOULD start sending payload is behind a NAT and that system SHOULD start sending
keepalive packets as defined in [UDPENCAPS]; alternately, it MAY keepalive packets as defined in [UDPENCAPS]; alternately, it MAY
reject the connection attempt if NAT traversal is not supported. reject the connection attempt if NAT traversal is not supported.
o If none of the NAT_DETECTION_SOURCE_IP payload(s) received matches o If none of the NAT_DETECTION_SOURCE_IP payload(s) received matches
the expected value of the source IP and port found from the IP the expected value of the source IP and port found from the IP
header of the packet containing the payload, it means that the header of the packet containing the payload, it means that the
system sending those payloads is behind a NAT (i.e., someone along system sending those payloads is behind a NAT (i.e., someone along
the route changed the source address of the original packet to the route changed the source address of the original packet to
match the address of the NAT box). In this case, the system match the address of the NAT box). In this case, the system
receiving the payloads should allow dynamic updates of the other receiving the payloads should allow dynamic updates of the other
systems' IP address, as described later. system's IP address, as described later.
o The IKE initiator MUST check the NAT_DETECTION_SOURCE_IP or o The IKE initiator MUST check the NAT_DETECTION_SOURCE_IP or
NAT_DETECTION_DESTINATION_IP payloads if present, and if they do NAT_DETECTION_DESTINATION_IP payloads if present, and if they do
not match the addresses in the outer packet, MUST tunnel all not match the addresses in the outer packet, MUST tunnel all
future IKE and ESP packets associated with this IKE SA over UDP future IKE and ESP packets associated with this IKE SA over UDP
port 4500. port 4500.
o To tunnel IKE packets over UDP port 4500, the IKE header has four o To tunnel IKE packets over UDP port 4500, the IKE header has
octets of zero prepended and the result immediately follows the four octets of zeros prepended and the result immediately follows
UDP header. To tunnel ESP packets over UDP port 4500, the ESP the UDP header. To tunnel ESP packets over UDP port 4500, the ESP
header immediately follows the UDP header. Since the first four header immediately follows the UDP header. Since the first
octets of the ESP header contain the SPI, and the SPI cannot four octets of the ESP header contain the SPI, and the SPI cannot
validly be zero, it is always possible to distinguish ESP and IKE validly be zero, it is always possible to distinguish ESP and IKE
messages. messages.
o Implementations MUST process received UDP-encapsulated ESP packets o Implementations MUST process received UDP-encapsulated ESP packets
even when no NAT was detected. even when no NAT was detected.
o The original source and destination IP address required for the o The original source and destination IP address required for the
transport mode TCP and UDP packet checksum fixup (see [UDPENCAPS]) transport mode TCP and UDP packet checksum fixup (see [UDPENCAPS])
are obtained from the Traffic Selectors associated with the are obtained from the Traffic Selectors associated with the
exchange. In the case of transport mode NAT traversal, the exchange. In the case of transport mode NAT traversal, the
skipping to change at page 64, line 11 skipping to change at page 66, line 27
be done in response to a new packet; otherwise, an attacker can be done in response to a new packet; otherwise, an attacker can
revert the addresses with old replayed packets. Because of this, revert the addresses with old replayed packets. Because of this,
dynamic updates can only be done safely if replay protection is dynamic updates can only be done safely if replay protection is
enabled. When IKEv2 is used with MOBIKE, dynamically updating the enabled. When IKEv2 is used with MOBIKE, dynamically updating the
addresses described above interferes with MOBIKE's way of addresses described above interferes with MOBIKE's way of
recovering from the same situation. See Section 3.8 of [MOBIKE] recovering from the same situation. See Section 3.8 of [MOBIKE]
for more information. for more information.
2.23.1. Transport Mode NAT Traversal 2.23.1. Transport Mode NAT Traversal
Transport mode used with NAT Traversal requires special handling of Transport mode used with NAT traversal requires special handling of
the Traffic Selectors used in the IKEv2. The complete scenario looks the Traffic Selectors used in the IKEv2. The complete scenario looks
like: like:
+------+ +------+ +------+ +------+ +------+ +------+ +------+ +------+
|Client| IP1 | NAT | IPN1 IPN2 | NAT | IP2 |Server| |Client| IP1 | NAT | IPN1 IPN2 | NAT | IP2 |Server|
|node |<------>| A |<---------->| B |<------->| | |node |<------>| A |<---------->| B |<------->| |
+------+ +------+ +------+ +------+ +------+ +------+ +------+ +------+
(Other scenarios are simplifications of this complex case, so this (Other scenarios are simplifications of this complex case, so this
discussion uses the complete scenario.) discussion uses the complete scenario.)
skipping to change at page 66, line 4 skipping to change at page 68, line 20
does SPD lookup based on those new Traffic Selectors. If an entry is does SPD lookup based on those new Traffic Selectors. If an entry is
found and it allows transport mode, then that entry is used. If an found and it allows transport mode, then that entry is used. If an
entry is found but it does not allow transport mode, then the server entry is found but it does not allow transport mode, then the server
MAY undo the address substitution and redo the SPD lookup using the MAY undo the address substitution and redo the SPD lookup using the
original Traffic Selectors. If the second lookup succeeds, the original Traffic Selectors. If the second lookup succeeds, the
server will create an SA in tunnel mode using real Traffic Selectors server will create an SA in tunnel mode using real Traffic Selectors
sent by the other end. sent by the other end.
This address substitution in transport mode is needed because the SPD This address substitution in transport mode is needed because the SPD
is looked up using the addresses that will be seen by the local host. is looked up using the addresses that will be seen by the local host.
This will also ensure that the Security Association Database (SAD)
This also will make sure the Security Association Database (SAD) entries for the tunnel exit checks and return packets are added using
entries for the tunnel exit checks and return packets is added using
the addresses as seen by the local operating system stack. the addresses as seen by the local operating system stack.
The most common case is that the server's SPD will contain wildcard The most common case is that the server's SPD will contain wildcard
entries matching any addresses, but this also allows making different entries matching any addresses, but this also allows making different
SPD entries, for example, for different known NATs' outer addresses. SPD entries, for example, for different known NATs' outer addresses.
After the SPD lookup, the server will do Traffic Selector narrowing After the SPD lookup, the server will do Traffic Selector narrowing
based on the SPD entry it found. It will again use the already based on the SPD entry it found. It will again use the already
substituted Traffic Selectors, and it will thus send back Traffic substituted Traffic Selectors, and it will thus send back Traffic
Selectors having IPN1 and IP2 as their IP addresses; it can still Selectors having IPN1 and IP2 as their IP addresses; it can still
skipping to change at page 68, line 8 skipping to change at page 69, line 41
TSi entries with the local address of the IKE SA. TSi entries with the local address of the IKE SA.
- Do address substitution before using those Traffic Selectors - Do address substitution before using those Traffic Selectors
for anything other than storing original content of them. for anything other than storing original content of them.
This includes verification that Traffic Selectors were narrowed This includes verification that Traffic Selectors were narrowed
correctly by the other end, creation of the SAD entry, and so on. correctly by the other end, creation of the SAD entry, and so on.
For the responder, when transport mode is proposed by client: For the responder, when transport mode is proposed by client:
- Store the original Traffic Selector IP addresses as received source - Store the original Traffic Selector IP addresses as received source
and destination address, in case undo address and destination address, in case undo address substitution is
substitution is needed, to use as the "real source and destination needed, to use as the "real source and destination address"
address" specified by [UDPENCAPS], and for TCP/UDP checksum fixup. specified by [UDPENCAPS], and for TCP/UDP checksum fixup.
- If the client is behind a NAT, substitute the IP address in the - If the client is behind a NAT, substitute the IP address in the
TSi entries with the remote address of the IKE SA. TSi entries with the remote address of the IKE SA.
- If the server is behind a NAT, substitute the IP address in the - If the server is behind a NAT, substitute the IP address in the
TSr entries with the local address of the IKE SA. TSr entries with the local address of the IKE SA.
- Do PAD and SPD lookup using the ID and substituted Traffic - Do PAD and SPD lookup using the ID and substituted Traffic
Selectors. Selectors.
- If no SPD entry was found, or if found SPD entry does not - If no SPD entry was found, or (if found) the SPD entry does not
allow transport mode, undo the Traffic Selector substitutions. allow transport mode, undo the Traffic Selector substitutions.
Do PAD and SPD lookup again using the ID and original Traffic Do PAD and SPD lookup again using the ID and original Traffic
Selectors, but also searching for tunnel mode SPD entry (that Selectors, but also searching for tunnel mode SPD entry (that
is, fall back to tunnel mode). is, fall back to tunnel mode).
- However, if a transport mode SPD entry was found, do normal - However, if a transport mode SPD entry was found, do normal
traffic selection narrowing based on the substituted Traffic traffic selection narrowing based on the substituted Traffic
Selectors and SPD entry. Use the resulting Traffic Selectors when Selectors and SPD entry. Use the resulting Traffic Selectors when
creating SAD entries, and when sending Traffic Selectors back to creating SAD entries, and when sending Traffic Selectors back to
the client. the client.
2.24. Explicit Congestion Notification (ECN) 2.24. Explicit Congestion Notification (ECN)
When IPsec tunnels behave as originally specified in [IPSECARCH-OLD], When IPsec tunnels behave as originally specified in [IPSECARCH-OLD],
ECN usage is not appropriate for the outer IP headers because tunnel ECN usage is not appropriate for the outer IP headers because tunnel
decapsulation processing discards ECN congestion indications to the decapsulation processing discards ECN congestion indications to the
detriment of the network. ECN support for IPsec tunnels for IKEv1- detriment of the network. ECN support for IPsec tunnels for
based IPsec requires multiple operating modes and negotiation (see IKEv1-based IPsec requires multiple operating modes and negotiation
[ECN]). IKEv2 simplifies this situation by requiring that ECN be (see [ECN]). IKEv2 simplifies this situation by requiring that ECN
usable in the outer IP headers of all tunnel mode Child SAs created be usable in the outer IP headers of all tunnel mode Child SAs
by IKEv2. Specifically, tunnel encapsulators and decapsulators for created by IKEv2. Specifically, tunnel encapsulators and
all tunnel mode SAs created by IKEv2 MUST support the ECN full- decapsulators for all tunnel mode SAs created by IKEv2 MUST support
functionality option for tunnels specified in [ECN] and MUST the ECN full-functionality option for tunnels specified in [ECN] and
implement the tunnel encapsulation and decapsulation processing MUST implement the tunnel encapsulation and decapsulation processing
specified in [IPSECARCH] to prevent discarding of ECN congestion specified in [IPSECARCH] to prevent discarding of ECN congestion
indications. indications.
2.25. Exchange Collisions 2.25. Exchange Collisions
Because IKEv2 exchanges can be initiated by either peer, it is Because IKEv2 exchanges can be initiated by either peer, it is
possible that two exchanges affecting the same SA partly overlap. possible that two exchanges affecting the same SA partly overlap.
This can lead to a situation where the SA state information is This can lead to a situation where the SA state information is
temporarily not synchronized, and a peer can receive a request that temporarily not synchronized, and a peer can receive a request that
it cannot process in a normal fashion. it cannot process in a normal fashion.
Obviously, using a window size greater than 1 leads to more complex Obviously, using a window size greater than 1 leads to more complex
situations, especially if requests are processed out of order. This situations, especially if requests are processed out of order. This
section concentrates on problems that can arise even with a window section concentrates on problems that can arise even with a window
size of 1, and recommends solutions. size of 1, and recommends solutions.
A TEMPORARY_FAILURE notification SHOULD be sent when a peer receives A TEMPORARY_FAILURE notification SHOULD be sent when a peer receives
skipping to change at page 70, line 45 skipping to change at page 72, line 29
"UNSPECIFIED" in implementations that are meant to be interoperable. "UNSPECIFIED" in implementations that are meant to be interoperable.
3.1. The IKE Header 3.1. The IKE Header
IKE messages use UDP ports 500 and/or 4500, with one IKE message per IKE messages use UDP ports 500 and/or 4500, with one IKE message per
UDP datagram. Information from the beginning of the packet through UDP datagram. Information from the beginning of the packet through
the UDP header is largely ignored except that the IP addresses and the UDP header is largely ignored except that the IP addresses and
UDP ports from the headers are reversed and used for return packets. UDP ports from the headers are reversed and used for return packets.
When sent on UDP port 500, IKE messages begin immediately following When sent on UDP port 500, IKE messages begin immediately following
the UDP header. When sent on UDP port 4500, IKE messages have the UDP header. When sent on UDP port 4500, IKE messages have
prepended four octets of zero. These four octets of zeros are not prepended four octets of zeros. These four octets of zeros are not
part of the IKE message and are not included in any of the length part of the IKE message and are not included in any of the length
fields or checksums defined by IKE. Each IKE message begins with the fields or checksums defined by IKE. Each IKE message begins with the
IKE header, denoted HDR in this document. Following the header are IKE header, denoted HDR in this document. Following the header are
one or more IKE payloads each identified by a "Next Payload" field in one or more IKE payloads each identified by a Next Payload field in
the preceding payload. Payloads are identified in the order in which the preceding payload. Payloads are identified in the order in which
they appear in an IKE message by looking in the "Next Payload" field they appear in an IKE message by looking in the Next Payload field in
in the IKE header, and subsequently according to the "Next Payload" the IKE header, and subsequently according to the Next Payload field
field in the IKE payload itself until a "Next Payload" field of zero in the IKE payload itself until a Next Payload field of zero
indicates that no payloads follow. If a payload of type "Encrypted" indicates that no payloads follow. If a payload of type "Encrypted"
is found, that payload is decrypted and its contents parsed as is found, that payload is decrypted and its contents parsed as
additional payloads. An Encrypted payload MUST be the last payload additional payloads. An Encrypted payload MUST be the last payload
in a packet and an Encrypted payload MUST NOT contain another in a packet and an Encrypted payload MUST NOT contain another
Encrypted payload. Encrypted payload.
The responder's SPI in the header identifies an instance of an IKE The responder's SPI in the header identifies an instance of an IKE
Security Association. It is therefore possible for a single instance Security Association. It is therefore possible for a single instance
of IKE to multiplex distinct sessions with multiple peers, including of IKE to multiplex distinct sessions with multiple peers, including
multiple sessions per peer. multiple sessions per peer.
skipping to change at page 71, line 39 skipping to change at page 73, line 23
| IKE SA Responder's SPI | | IKE SA Responder's SPI |
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload | MjVer | MnVer | Exchange Type | Flags | | Next Payload | MjVer | MnVer | Exchange Type | Flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID | | Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length | | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: IKE Header Format Figure 4: IKE Header Format
o Initiator's SPI (8 octets) - A value chosen by the initiator to o Initiator's SPI (8 octets) - A value chosen by the initiator to
identify a unique IKE Security Association. This value MUST NOT identify a unique IKE Security Association. This value MUST NOT
be zero. be zero.
o Responder's SPI (8 octets) - A value chosen by the responder to o Responder's SPI (8 octets) - A value chosen by the responder to
identify a unique IKE Security Association. This value MUST be identify a unique IKE Security Association. This value MUST be
zero in the first message of an IKE initial exchange (including zero in the first message of an IKE initial exchange (including
repeats of that message including a cookie). repeats of that message including a cookie).
o Next Payload (1 octet) - Indicates the type of payload that o Next Payload (1 octet) - Indicates the type of payload that
immediately follows the header. The format and value of each immediately follows the header. The format and value of each
payload are defined below. payload are defined below.
o Major Version (4 bits) - Indicates the major version of the IKE o Major Version (4 bits) - Indicates the major version of the IKE
protocol in use. Implementations based on this version of IKE protocol in use. Implementations based on this version of IKE
MUST set the major version to 2. Implementations based on MUST set the major version to 2. Implementations based on
previous versions of IKE and ISAKMP MUST set the major version to previous versions of IKE and ISAKMP MUST set the major version
1. Implementations based on this document's version (version 2) to 1. Implementations based on this document's version
of IKE MUST reject or ignore messages containing a version number (version 2) of IKE MUST reject or ignore messages containing a
greater than 2 with an INVALID_MAJOR_VERSION notification message version number greater than 2 with an INVALID_MAJOR_VERSION
as described in Section 2.5. notification message as described in Section 2.5.
o Minor Version (4 bits) - Indicates the minor version of the IKE o Minor Version (4 bits) - Indicates the minor version of the IKE
protocol in use. Implementations based on this version of IKE protocol in use. Implementations based on this version of IKE
MUST set the minor version to 0. They MUST ignore the minor MUST set the minor version to 0. They MUST ignore the minor
version number of received messages. version number of received messages.
o Exchange Type (1 octet) - Indicates the type of exchange being o Exchange Type (1 octet) - Indicates the type of exchange being
used. This constrains the payloads sent in each message in an used. This constrains the payloads sent in each message in an
exchange. The values in the following table are only current as exchange. The values in the following table are only current as
of the publication date of RFC 4306. Other values may have been of the publication date of RFC 4306. Other values may have been
skipping to change at page 73, line 41 skipping to change at page 75, line 27
generic payload header, shown in Figure 5. Figures for each payload generic payload header, shown in Figure 5. Figures for each payload
below will include the generic payload header, but for brevity, the below will include the generic payload header, but for brevity, the
description of each field will be omitted. description of each field will be omitted.
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: Generic Payload Header Figure 5: Generic Payload Header
The Generic Payload Header fields are defined as follows: The Generic Payload Header fields are defined as follows:
o Next Payload (1 octet) - Identifier for the payload type of the o Next Payload (1 octet) - Identifier for the payload type of the
next payload in the message. If the current payload is the last next payload in the message. If the current payload is the last
in the message, then this field will be 0. This field provides a in the message, then this field will be 0. This field provides a
"chaining" capability whereby additional payloads can be added to "chaining" capability whereby additional payloads can be added to
a message by appending each one to the end of the message and a message by appending each one to the end of the message and
setting the "Next Payload" field of the preceding payload to setting the Next Payload field of the preceding payload to
indicate the new payload's type. An Encrypted payload, which must indicate the new payload's type. An Encrypted payload, which must
always be the last payload of a message, is an exception. It always be the last payload of a message, is an exception. It
contains data structures in the format of additional payloads. In contains data structures in the format of additional payloads. In
the header of an Encrypted payload, the Next Payload field is set the header of an Encrypted payload, the Next Payload field is set
to the payload type of the first contained payload (instead of 0); to the payload type of the first contained payload (instead of 0);
conversely, the Next Payload field of the last contained payload conversely, the Next Payload field of the last contained payload
is set to zero. The payload type values are listed here. The is set to zero. The payload type values are listed here. The
values in the following table are only current as of the values in the following table are only current as of the
publication date of RFC 4306. Other values may have been added publication date of RFC 4306. Other values may have been added
since then or will be added after the publication of this since then or will be added after the publication of this
skipping to change at page 76, line 11 skipping to change at page 77, line 49
cases. cases.
The Proposal structure contains within it a Proposal Num and an IPsec The Proposal structure contains within it a Proposal Num and an IPsec
protocol ID. Each structure MUST have a proposal number one (1) protocol ID. Each structure MUST have a proposal number one (1)
greater than the previous structure. The first Proposal in the greater than the previous structure. The first Proposal in the
initiator's SA payload MUST have a Proposal Num of one (1). One initiator's SA payload MUST have a Proposal Num of one (1). One
reason to use multiple proposals is to propose both standard crypto reason to use multiple proposals is to propose both standard crypto
ciphers and combined-mode ciphers. Combined-mode ciphers include ciphers and combined-mode ciphers. Combined-mode ciphers include
both integrity and encryption in a single encryption algorithm, and both integrity and encryption in a single encryption algorithm, and
MUST either offer no integrity algorithm or a single integrity MUST either offer no integrity algorithm or a single integrity
algorithm of "none", with no integrity algorithm being the algorithm of "NONE", with no integrity algorithm being the
RECOMMENDED method. If an initiator wants to propose both combined- RECOMMENDED method. If an initiator wants to propose both combined-
mode ciphers and normal ciphers, it must include two proposals: one mode ciphers and normal ciphers, it must include two proposals: one
will have all the combined-mode ciphers, and the other will have all will have all the combined-mode ciphers, and the other will have all
the normal ciphers with the integrity algorithms. For example, one the normal ciphers with the integrity algorithms. For example, one
such proposal would have two proposal structures. Proposal 1 is ESP such proposal would have two proposal structures. Proposal 1 is ESP
with AES-128, AES-192, and AES-256 bits in Cipher Block Chaining with AES-128, AES-192, and AES-256 bits in Cipher Block Chaining
(CBC) mode, with either HMAC-SHA1-96 or XCBC-96 as the integrity (CBC) mode, with either HMAC-SHA1-96 or XCBC-96 as the integrity
algorithm; Proposal 2 is AES-128 or AES-256 in GCM mode with an algorithm; Proposal 2 is AES-128 or AES-256 in GCM mode with an
8-octet Integrity Check Value (ICV). Both proposals allow but do not 8-octet Integrity Check Value (ICV). Both proposals allow but do not
require the use of ESNs (Extended Sequence Numbers). This can be require the use of ESNs (Extended Sequence Numbers). This can be
skipping to change at page 77, line 50 skipping to change at page 79, line 11
ESP generally has three: ESN, an encryption algorithm, and an ESP generally has three: ESN, an encryption algorithm, and an
integrity check algorithm. IKE generally has four transforms: a integrity check algorithm. IKE generally has four transforms: a
Diffie-Hellman group, an integrity check algorithm, a PRF algorithm, Diffie-Hellman group, an integrity check algorithm, a PRF algorithm,
and an encryption algorithm. For each Protocol, the set of and an encryption algorithm. For each Protocol, the set of
permissible transforms is assigned Transform ID numbers, which appear permissible transforms is assigned Transform ID numbers, which appear
in the header of each transform. in the header of each transform.
If there are multiple transforms with the same Transform Type, the If there are multiple transforms with the same Transform Type, the
proposal is an OR of those transforms. If there are multiple proposal is an OR of those transforms. If there are multiple
transforms with different Transform Types, the proposal is an AND of transforms with different Transform Types, the proposal is an AND of
the different groups. For example, to propose ESP with (3DES or AES- the different groups. For example, to propose ESP with (3DES or
CBC) and (HMAC_MD5 or HMAC_SHA), the ESP proposal would contain two AES-CBC) and (HMAC_MD5 or HMAC_SHA), the ESP proposal would contain
Transform Type 1 candidates (one for 3DES and one for AEC-CBC) and two Transform Type 1 candidates (one for 3DES and one for AEC-CBC)
two Transform Type 3 candidates (one for HMAC_MD5 and one for and two Transform Type 3 candidates (one for HMAC_MD5 and one for
HMAC_SHA). This effectively proposes four combinations of HMAC_SHA). This effectively proposes four combinations of
algorithms. If the initiator wanted to propose only a subset of algorithms. If the initiator wanted to propose only a subset of
those, for example (3DES and HMAC_MD5) or (IDEA and HMAC_SHA), there those, for example (3DES and HMAC_MD5) or (IDEA and HMAC_SHA), there
is no way to encode that as multiple transforms within a single is no way to encode that as multiple transforms within a single
Proposal. Instead, the initiator would have to construct two Proposal. Instead, the initiator would have to construct two
different Proposals, each with two transforms. different Proposals, each with two transforms.
A given transform MAY have one or more Attributes. Attributes are A given transform MAY have one or more Attributes. Attributes are
necessary when the transform can be used in more than one way, as necessary when the transform can be used in more than one way, as
when an encryption algorithm has a variable key size. The transform when an encryption algorithm has a variable key size. The transform
skipping to change at page 78, line 37 skipping to change at page 79, line 47
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ <Proposals> ~ ~ <Proposals> ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6: Security Association Payload Figure 6: Security Association Payload
o Proposals (variable) - One or more proposal substructures. o Proposals (variable) - One or more proposal substructures.
The payload type for the Security Association payload is thirty-three The payload type for the Security Association payload is
(33). thirty-three (33).
3.3.1. Proposal Substructure 3.3.1. Proposal Substructure
1 2 3 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Substruc | RESERVED | Proposal Length | | Last Substruc | RESERVED | Proposal Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Proposal Num | Protocol ID | SPI Size |Num Transforms| | Proposal Num | Protocol ID | SPI Size |Num Transforms|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ SPI (variable) ~ ~ SPI (variable) ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ <Transforms> ~ ~ <Transforms> ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: Proposal Substructure Figure 7: Proposal Substructure
o Last Substruc (1 octet) - Specifies whether or not this is the o Last Substruc (1 octet) - Specifies whether or not this is the
last Proposal Substructure in the SA. This field has a value of 0 last Proposal Substructure in the SA. This field has a value of 0
if this was last Proposal Substructure, and a value of 2 if there if this was the last Proposal Substructure, and a value of 2 if
are more Proposal Substructures. This syntax is inherited from there are more Proposal Substructures. This syntax is inherited
ISAKMP, but is unnecessary because the last Proposal could be from ISAKMP, but is unnecessary because the last Proposal could be
identified from the length of the SA. The value (2) corresponds identified from the length of the SA. The value (2) corresponds
to a payload type of Proposal in IKEv1, and the first four octets to a payload type of Proposal in IKEv1, and the first four octets
of the Proposal structure are designed to look somewhat like the of the Proposal structure are designed to look somewhat like the
header of a payload. header of a payload.
o RESERVED (1 octet) - MUST be sent as zero; MUST be ignored on o RESERVED (1 octet) - MUST be sent as zero; MUST be ignored on
receipt. receipt.
o Proposal Length (2 octets, unsigned integer) - Length of this o Proposal Length (2 octets, unsigned integer) - Length of this
proposal, including all transforms and attributes that follow. proposal, including all transforms and attributes that follow.
skipping to change at page 80, line 14 skipping to change at page 81, line 21
Protocol Protocol ID Protocol Protocol ID
----------------------------------- -----------------------------------
IKE 1 IKE 1
AH 2 AH 2
ESP 3 ESP 3
o SPI Size (1 octet) - For an initial IKE SA negotiation, this field o SPI Size (1 octet) - For an initial IKE SA negotiation, this field
MUST be zero; the SPI is obtained from the outer header. During MUST be zero; the SPI is obtained from the outer header. During
subsequent negotiations, it is equal to the size, in octets, of subsequent negotiations, it is equal to the size, in octets, of
the SPI of the corresponding protocol (8 for IKE, 4 for ESP and the SPI of the corresponding protocol (8 for IKE, 4 for ESP
AH). and AH).
o Num Transforms (1 octet) - Specifies the number of transforms in o Num Transforms (1 octet) - Specifies the number of transforms in
this proposal. this proposal.
o SPI (variable) - The sending entity's SPI. Even if the SPI Size o SPI (variable) - The sending entity's SPI. Even if the SPI Size
is not a multiple of 4 octets, there is no padding applied to the is not a multiple of 4 octets, there is no padding applied to the
payload. When the SPI Size field is zero, this field is not payload. When the SPI Size field is zero, this field is not
present in the Security Association payload. present in the Security Association payload.
o Transforms (variable) - One or more transform substructures. o Transforms (variable) - One or more transform substructures.
skipping to change at page 80, line 41 skipping to change at page 81, line 48
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Substruc | RESERVED | Transform Length | | Last Substruc | RESERVED | Transform Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Transform Type | RESERVED | Transform ID | |Transform Type | RESERVED | Transform ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Transform Attributes ~ ~ Transform Attributes ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: Transform Substructure Figure 8: Transform Substructure
o Last Substruc (1 octet) - Specifies whether or not this is the o Last Substruc (1 octet) - Specifies whether or not this is the
last Transform Substructure in the Proposal. This field has a last Transform Substructure in the Proposal. This field has a
value of 0 if this was last Transform Substructure, and a value of value of 0 if this was the last Transform Substructure, and a
3 if there are more Transform Substructures. This syntax is value of 3 if there are more Transform Substructures. This syntax
inherited from ISAKMP, but is unnecessary because the last is inherited from ISAKMP, but is unnecessary because the last
transform could be identified from the length of the proposal. transform could be identified from the length of the proposal.
The value (3) corresponds to a payload type of Transform in IKEv1, The value (3) corresponds to a payload type of Transform in IKEv1,
and the first four octets of the Transform structure are designed and the first four octets of the Transform structure are designed
to look somewhat like the header of a payload. to look somewhat like the header of a payload.
o RESERVED - MUST be sent as zero; MUST be ignored on receipt. o RESERVED - MUST be sent as zero; MUST be ignored on receipt.
o Transform Length - The length (in octets) of the Transform o Transform Length - The length (in octets) of the Transform
Substructure including Header and Attributes. Substructure including Header and Attributes.
skipping to change at page 81, line 24 skipping to change at page 82, line 30
to propose that the transform be omitted, no transform of the to propose that the transform be omitted, no transform of the
given type is included in the proposal. If the initiator wishes given type is included in the proposal. If the initiator wishes
to make use of the transform optional to the responder, it to make use of the transform optional to the responder, it
includes a transform substructure with Transform ID = 0 as one of includes a transform substructure with Transform ID = 0 as one of
the options. the options.
o Transform ID (2 octets) - The specific instance of the Transform o Transform ID (2 octets) - The specific instance of the Transform
Type being proposed. Type being proposed.
The Transform Type values are listed below. The values in the The Transform Type values are listed below. The values in the
following table are only current as of the publication date of RFC following table are only current as of the publication date of
4306. Other values may have been added since then or will be added RFC 4306. Other values may have been added since then or will be
after the publication of this document. Readers should refer to added after the publication of this document. Readers should refer
[IKEV2IANA] for the latest values. to [IKEV2IANA] for the latest values.
Description Trans. Used In Description Trans. Used In
Type Type
------------------------------------------------------------------ ------------------------------------------------------------------
Encryption Algorithm (ENCR) 1 IKE and ESP Encryption Algorithm (ENCR) 1 IKE and ESP
Pseudorandom Function (PRF) 2 IKE Pseudorandom Function (PRF) 2 IKE
Integrity Algorithm (INTEG) 3 IKE*, AH, optional in ESP Integrity Algorithm (INTEG) 3 IKE*, AH, optional in ESP
Diffie-Hellman group (D-H) 4 IKE, optional in AH & ESP Diffie-Hellman Group (D-H) 4 IKE, optional in AH & ESP
Extended Sequence Numbers (ESN) 5 AH and ESP Extended Sequence Numbers (ESN) 5 AH and ESP
(*) Negotiating an integrity algorithm is mandatory for the (*) Negotiating an integrity algorithm is mandatory for the
Encrypted payload format specified in this document. For example, Encrypted payload format specified in this document. For example,
[AEAD] specifies additional formats based on authenticated [AEAD] specifies additional formats based on authenticated
encryption, in which a separate integrity algorithm is not encryption, in which a separate integrity algorithm is not
negotiated. negotiated.
For Transform Type 1 (Encryption Algorithm), the Transform IDs are For Transform Type 1 (Encryption Algorithm), the Transform IDs are
listed below. The values in the following table are only current as listed below. The values in the following table are only current as
of the publication date of RFC 4306. Other values may have been of the publication date of RFC 4306. Other values may have been
added since then or will be added after the publication of this added since then or will be added after the publication of this
document. Readers should refer to [IKEV2IANA] for the latest values. document. Readers should refer to [IKEV2IANA] for the latest values.
Name Number Defined In Name Number Defined In
--------------------------------------------------- ---------------------------------------------------
ENCR_DES_IV64 1 (UNSPECIFIED) ENCR_DES_IV64 1 (UNSPECIFIED)
ENCR_DES 2 (RFC2405), [DES] ENCR_DES 2 [RFC2405], [DES]
ENCR_3DES 3 (RFC2451) ENCR_3DES 3 [RFC2451]
ENCR_RC5 4 (RFC2451) ENCR_RC5 4 [RFC2451]
ENCR_IDEA 5 (RFC2451), [IDEA] ENCR_IDEA 5 [RFC2451], [IDEA]
ENCR_CAST 6 (RFC2451) ENCR_CAST 6 [RFC2451]
ENCR_BLOWFISH 7 (RFC2451) ENCR_BLOWFISH 7 [RFC2451]
ENCR_3IDEA 8 (UNSPECIFIED) ENCR_3IDEA 8 (UNSPECIFIED)
ENCR_DES_IV32 9 (UNSPECIFIED) ENCR_DES_IV32 9 (UNSPECIFIED)
ENCR_NULL 11 (RFC2410) ENCR_NULL 11 [RFC2410]
ENCR_AES_CBC 12 (RFC3602) ENCR_AES_CBC 12 [RFC3602]
ENCR_AES_CTR 13 (RFC3686) ENCR_AES_CTR 13 [RFC3686]
For Transform Type 2 (Pseudorandom Function), the Transform IDs are For Transform Type 2 (Pseudorandom Function), the Transform IDs are
listed below. The values in the following table are only current as listed below. The values in the following table are only current as
of the publication date of RFC 4306. Other values may have been of the publication date of RFC 4306. Other values may have been
added since then or will be added after the publication of this added since then or will be added after the publication of this
document. Readers should refer to [IKEV2IANA] for the latest values. document. Readers should refer to [IKEV2IANA] for the latest values.
Name Number Defined In Name Number Defined In
------------------------------------------------------ ------------------------------------------------------------------
PRF_HMAC_MD5 1 (RFC2104), [MD5] PRF_HMAC_MD5 1 [RFC2104], [MD5]
PRF_HMAC_SHA1 2 (RFC2104), [SHA] PRF_HMAC_SHA1 2 [RFC2104], [FIPS.180-4.2012]
PRF_HMAC_TIGER 3 (UNSPECIFIED) PRF_HMAC_TIGER 3 (UNSPECIFIED)
For Transform Type 3 (Integrity Algorithm), defined Transform IDs are For Transform Type 3 (Integrity Algorithm), defined Transform IDs are
listed below. The values in the following table are only current as listed below. The values in the following table are only current as
of the publication date of RFC 4306. Other values may have been of the publication date of RFC 4306. Other values may have been
added since then or will be added after the publication of this added since then or will be added after the publication of this
document. Readers should refer to [IKEV2IANA] for the latest values. document. Readers should refer to [IKEV2IANA] for the latest values.
Name Number Defined In Name Number Defined In
---------------------------------------- ----------------------------------------
NONE 0 NONE 0
AUTH_HMAC_MD5_96 1 (RFC2403) AUTH_HMAC_MD5_96 1 [RFC2403]
AUTH_HMAC_SHA1_96 2 (RFC2404) AUTH_HMAC_SHA1_96 2 [RFC2404]
AUTH_DES_MAC 3 (UNSPECIFIED) AUTH_DES_MAC 3 (UNSPECIFIED)
AUTH_KPDK_MD5 4 (UNSPECIFIED) AUTH_KPDK_MD5 4 (UNSPECIFIED)
AUTH_AES_XCBC_96 5 (RFC3566) AUTH_AES_XCBC_96 5 [RFC3566]
For Transform Type 4 (Diffie-Hellman group), defined Transform IDs For Transform Type 4 (Diffie-Hellman group), defined Transform IDs
are listed below. The values in the following table are only current are listed below. The values in the following table are only current
as of the publication date of RFC 4306. Other values may have been as of the publication date of RFC 4306. Other values may have been
added since then or will be added after the publication of this added since then or will be added after the publication of this
document. Readers should refer to [IKEV2IANA] for the latest values. document. Readers should refer to [IKEV2IANA] for the latest values.
Name Number Defined In Name Number Defined In
---------------------------------------- ------------------------------------------
NONE 0 NONE 0
768-bit MODP 1 Appendix B 768-bit MODP Group 1 Appendix B
1024-bit MODP 2 Appendix B 1024-bit MODP Group 2 Appendix B
1536-bit MODP 5 [ADDGROUP] 1536-bit MODP Group 5 [ADDGROUP]
2048-bit MODP 14 [ADDGROUP] 2048-bit MODP Group 14 [ADDGROUP]
3072-bit MODP 15 [ADDGROUP] 3072-bit MODP Group 15 [ADDGROUP]
4096-bit MODP 16 [ADDGROUP] 4096-bit MODP Group 16 [ADDGROUP]
6144-bit MODP 17 [ADDGROUP] 6144-bit MODP Group 17 [ADDGROUP]
8192-bit MODP 18 [ADDGROUP] 8192-bit MODP Group 18 [ADDGROUP]
Although ESP and AH do not directly include a Diffie-Hellman Although ESP and AH do not directly include a Diffie-Hellman
exchange, a Diffie-Hellman group MAY be negotiated for the Child SA. exchange, a Diffie-Hellman group MAY be negotiated for the Child SA.
This allows the peers to employ Diffie-Hellman in the CREATE_CHILD_SA This allows the peers to employ Diffie-Hellman in the CREATE_CHILD_SA
exchange, providing perfect forward secrecy for the generated Child exchange, providing perfect forward secrecy for the generated Child
SA keys. SA keys.
Note, that MODP Diffie-Hellman groups listed above does not need any Note that the MODP Diffie-Hellman groups listed above do not need any
special validity tests to be performed, but other types of groups special validity tests to be performed, but other types of groups
(ECP and MODP groups with small subgroups) need to have some (elliptic curve groups, and MODP groups with small subgroups) need to
additional tests to be performed on them to use them securely. See have some additional tests performed on them to use them securely.
"Additional Diffie-Hellman Tests for IKEv2" ([RFC6989]) for more See "Additional Diffie-Hellman Tests for IKEv2" ([RFC6989]) for more
information. information.
For Transform Type 5 (Extended Sequence Numbers), defined Transform For Transform Type 5 (Extended Sequence Numbers), defined Transform
IDs are listed below. The values in the following table are only IDs are listed below. The values in the following table are only
current as of the publication date of RFC 4306. Other values may current as of the publication date of RFC 4306. Other values may
have been added since then or will be added after the publication of have been added since then or will be added after the publication of
this document. Readers should refer to [IKEV2IANA] for the latest this document. Readers should refer to [IKEV2IANA] for the latest
values. values.
Name Number Name Number
-------------------------------------------- --------------------------------------------
No Extended Sequence Numbers 0 No Extended Sequence Numbers 0
Extended Sequence Numbers 1 Extended Sequence Numbers 1
Note that an initiator who supports ESNs will usually include two ESN Note that an initiator who supports ESNs will usually include two ESN
transforms, with values "0" and "1", in its proposals. A proposal transforms, with values "0" and "1", in its proposals. A proposal
containing a single ESN transform with value "1" means that using containing a single ESN transform with value "1" means that using
normal (non-extended) sequence numbers is not acceptable. normal (non-extended) sequence numbers is not acceptable.
Numerous additional Transform Types have been defined since the Numerous additional Transform Types have been defined since the
publication of RFC 4306. Please refer to the IANA IKEv2 registry for publication of RFC 4306. Please refer to the IANA "Internet Key
details. Exchange Version 2 (IKEv2) Parameters" registry for details.
3.3.3. Valid Transform Types by Protocol 3.3.3. Valid Transform Types by Protocol
The number and type of transforms that accompany an SA payload are The number and type of transforms that accompany an SA payload are
dependent on the protocol in the SA itself. An SA payload proposing dependent on the protocol in the SA itself. An SA payload proposing
the establishment of an SA has the following mandatory and optional the establishment of an SA has the following mandatory and optional
Transform Types. A compliant implementation MUST understand all Transform Types. A compliant implementation MUST understand all
mandatory and optional types for each protocol it supports (though it mandatory and optional types for each protocol it supports (though it
need not accept proposals with unacceptable suites). A proposal MAY need not accept proposals with unacceptable suites). A proposal MAY
omit the optional types if the only value for them it will accept is omit the optional types if the only value for them it will accept is
skipping to change at page 85, line 40 skipping to change at page 86, line 43
1 2 3 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|A| Attribute Type | AF=0 Attribute Length | |A| Attribute Type | AF=0 Attribute Length |
|F| | AF=1 Attribute Value | |F| | AF=1 Attribute Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AF=0 Attribute Value | | AF=0 Attribute Value |
| AF=1 Not Transmitted | | AF=1 Not Transmitted |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: Data Attributes Figure 9: Data Attributes
o Attribute Format (AF) (1 bit) - Indicates whether the data o Attribute Format (AF) (1 bit) - Indicates whether the data
attribute follows the Type/Length/Value (TLV) format or a attribute follows the Type/Length/Value (TLV) format or a
shortened Type/Value (TV) format. If the AF bit is zero (0), then shortened Type/Value (TV) format. If the AF bit is zero (0), then
the attribute uses TLV format; if the AF bit is one (1), the TV the attribute uses TLV format; if the AF bit is one (1), the TV
format (with two-byte value) is used. format (with two-byte value) is used.
o Attribute Type (15 bits) - Unique identifier for each type of o Attribute Type (15 bits) - Unique identifier for each type of
attribute (see below). attribute (see below).
skipping to change at page 86, line 35 skipping to change at page 87, line 41
Key Length (in bits) 14 TV Key Length (in bits) 14 TV
Values 0-13 and 15-17 were used in a similar context in IKEv1, and Values 0-13 and 15-17 were used in a similar context in IKEv1, and
should not be assigned except to matching values. should not be assigned except to matching values.
The Key Length attribute specifies the key length in bits (MUST use The Key Length attribute specifies the key length in bits (MUST use
network byte order) for certain transforms as follows: network byte order) for certain transforms as follows:
o The Key Length attribute MUST NOT be used with transforms that use o The Key Length attribute MUST NOT be used with transforms that use
a fixed-length key. For example, this includes ENCR_DES, a fixed-length key. For example, this includes ENCR_DES,
ENCR_IDEA, and all the Type 2 (Pseudorandom function) and Type 3 ENCR_IDEA, and all the Type 2 (Pseudorandom Function) and Type 3
(Integrity Algorithm) transforms specified in this document. It (Integrity Algorithm) transforms specified in this document. It
is recommended that future Type 2 or 3 transforms do not use this is recommended that future Type 2 or 3 transforms do not use this
attribute. attribute.
o Some transforms specify that the Key Length attribute MUST be o Some transforms specify that the Key Length attribute MUST be
always included (omitting the attribute is not allowed, and always included (omitting the attribute is not allowed, and
proposals not containing it MUST be rejected). For example, this proposals not containing it MUST be rejected). For example, this
includes ENCR_AES_CBC and ENCR_AES_CTR. includes ENCR_AES_CBC and ENCR_AES_CTR.
o Some transforms allow variable-length keys, but also specify a o Some transforms allow variable-length keys, but also specify a
skipping to change at page 87, line 50 skipping to change at page 89, line 9
Negotiating Diffie-Hellman groups presents some special challenges. Negotiating Diffie-Hellman groups presents some special challenges.
SA offers include proposed attributes and a Diffie-Hellman public SA offers include proposed attributes and a Diffie-Hellman public
number (KE) in the same message. If in the initial exchange the number (KE) in the same message. If in the initial exchange the
initiator offers to use one of several Diffie-Hellman groups, it initiator offers to use one of several Diffie-Hellman groups, it
SHOULD pick the one the responder is most likely to accept and SHOULD pick the one the responder is most likely to accept and
include a KE corresponding to that group. If the responder selects a include a KE corresponding to that group. If the responder selects a
proposal using a different Diffie-Hellman group (other than NONE), proposal using a different Diffie-Hellman group (other than NONE),
the responder will indicate the correct group in the response and the the responder will indicate the correct group in the response and the
initiator SHOULD pick an element of that group for its KE value when initiator SHOULD pick an element of that group for its KE value when
retrying the first message. It SHOULD, however, continue to propose retrying the first message. It SHOULD, however, continue to propose
its full supported set of groups in order to prevent a man-in-the- its full supported set of groups in order to prevent a
middle downgrade attack. If one of the proposals offered is for the man-in-the-middle downgrade attack. If one of the proposals offered
Diffie-Hellman group of NONE, and the responder selects that Diffie- is for the Diffie-Hellman group of NONE, and the responder selects
Hellman group, then it MUST ignore the initiator's KE payload and that Diffie-Hellman group, then it MUST ignore the initiator's KE
omit the KE payload from the response. payload and omit the KE payload from the response.
3.4. Key Exchange Payload 3.4. Key Exchange Payload
The Key Exchange payload, denoted KE in this document, is used to The Key Exchange payload, denoted KE in this document, is used to
exchange Diffie-Hellman public numbers as part of a Diffie-Hellman exchange Diffie-Hellman public numbers as part of a Diffie-Hellman
key exchange. The Key Exchange payload consists of the IKE generic key exchange. The Key Exchange payload consists of the IKE generic
payload header followed by the Diffie-Hellman public value itself. payload header followed by the Diffie-Hellman public value itself.
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Diffie-Hellman Group Num | RESERVED | | Diffie-Hellman Group Num | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Key Exchange Data ~ ~ Key Exchange Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 10: Key Exchange Payload Format Figure 10: Key Exchange Payload Format
A Key Exchange payload is constructed by copying one's Diffie-Hellman A Key Exchange payload is constructed by copying one's Diffie-Hellman
public value into the "Key Exchange Data" portion of the payload. public value into the "Key Exchange Data" portion of the payload.
The length of the Diffie-Hellman public value for modular The length of the Diffie-Hellman public value for MODP groups MUST be
exponentiation group (MODP) groups MUST be equal to the length of the equal to the length of the prime modulus over which the
prime modulus over which the exponentiation was performed, prepending exponentiation was performed, prepending zero bits to the value if
zero bits to the value if necessary. necessary.
The Diffie-Hellman Group Num identifies the Diffie-Hellman group in The Diffie-Hellman Group Num identifies the Diffie-Hellman group in
which the Key Exchange Data was computed (see Section 3.3.2). This which the Key Exchange Data was computed (see Section 3.3.2). This
Diffie-Hellman Group Num MUST match a Diffie-Hellman group specified Diffie-Hellman Group Num MUST match a Diffie-Hellman group specified
in a proposal in the SA payload that is sent in the same message, and in a proposal in the SA payload that is sent in the same message, and
SHOULD match the Diffie-Hellman group in the first group in the first SHOULD match the Diffie-Hellman group in the first group in the first
proposal, if such exists. If none of the proposals in that SA proposal, if such exists. If none of the proposals in that SA
payload specifies a Diffie-Hellman group, the KE payload MUST NOT be payload specifies a Diffie-Hellman group, the KE payload MUST NOT be
present. If the selected proposal uses a different Diffie-Hellman present. If the selected proposal uses a different Diffie-Hellman
group (other than NONE), the message MUST be rejected with a Notify group (other than NONE), the message MUST be rejected with a Notify
skipping to change at page 89, line 27 skipping to change at page 90, line 32
NOTE: In IKEv1, two ID payloads were used in each direction to hold NOTE: In IKEv1, two ID payloads were used in each direction to hold
Traffic Selector (TS) information for data passing over the SA. In Traffic Selector (TS) information for data passing over the SA. In
IKEv2, this information is carried in TS payloads (see Section 3.13). IKEv2, this information is carried in TS payloads (see Section 3.13).
The Peer Authorization Database (PAD) as described in RFC 4301 The Peer Authorization Database (PAD) as described in RFC 4301
[IPSECARCH] describes the use of the ID payload in IKEv2 and provides [IPSECARCH] describes the use of the ID payload in IKEv2 and provides
a formal model for the binding of identity to policy in addition to a formal model for the binding of identity to policy in addition to
providing services that deal more specifically with the details of providing services that deal more specifically with the details of
policy enforcement. The PAD is intended to provide a link between policy enforcement. The PAD is intended to provide a link between
the SPD and the IKE Security Association management. See Section the SPD and the IKE Security Association management. See
4.4.3 of RFC 4301 for more details. Section 4.4.3 of RFC 4301 for more details.
The Identification payload consists of the IKE generic payload header The Identification payload consists of the IKE generic payload header
followed by identification fields as follows: followed by identification fields as follows:
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ID Type | RESERVED | | ID Type | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Identification Data ~ ~ Identification Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 11: Identification Payload Format Figure 11: Identification Payload Format
o ID Type (1 octet) - Specifies the type of Identification being o ID Type (1 octet) - Specifies the type of Identification being
used. used.
o RESERVED - MUST be sent as zero; MUST be ignored on receipt. o RESERVED - MUST be sent as zero; MUST be ignored on receipt.
o Identification Data (variable length) - Value, as indicated by the o Identification Data (variable length) - Value, as indicated by the
Identification Type. The length of the Identification Data is Identification Type. The length of the Identification Data is
computed from the size in the ID payload header. computed from the size in the ID payload header.
skipping to change at page 90, line 27 skipping to change at page 91, line 32
values. values.
ID Type Value ID Type Value
------------------------------------------------------------------- -------------------------------------------------------------------
ID_IPV4_ADDR 1 ID_IPV4_ADDR 1
A single four (4) octet IPv4 address. A single four (4) octet IPv4 address.
ID_FQDN 2 ID_FQDN 2
A fully-qualified domain name string. An example of an ID_FQDN A fully-qualified domain name string. An example of an ID_FQDN
is "example.com". The string MUST NOT contain any terminators is "example.com". The string MUST NOT contain any terminators
(e.g., NULL, CR, etc.). All characters in the ID_FQDN are ASCII; (e.g., NULL, CR, etc.). All characters in the ID_FQDN are ASCII;
for an "internationalized domain name", the syntax is as defined for an "internationalized domain name", the syntax is as defined
in [IDNA], for example "xn--tmonesimerkki-bfbb.example.net". in [IDNA], for example "xn--tmonesimerkki-bfbb.example.net".
ID_RFC822_ADDR 3 ID_RFC822_ADDR 3
A fully-qualified RFC 822 email address string. An example of a A fully-qualified RFC 822 email address string. An example of a
ID_RFC822_ADDR is "jsmith@example.com". The string MUST NOT ID_RFC822_ADDR is "jsmith@example.com". The string MUST NOT
contain any terminators. Because of [EAI], implementations would contain any terminators. Because of [EAI], implementations would
be wise to treat this field as UTF-8 encoded text, not as be wise to treat this field as UTF-8 encoded text, not as
pure ASCII. pure ASCII.
skipping to change at page 91, line 28 skipping to change at page 92, line 33
(NAIs) defined in [NAI]. Although NAIs look a bit like email (NAIs) defined in [NAI]. Although NAIs look a bit like email
addresses (e.g., "joe@example.com"), the syntax is not exactly the addresses (e.g., "joe@example.com"), the syntax is not exactly the
same as the syntax of email address in [MAILFORMAT]. For those NAIs same as the syntax of email address in [MAILFORMAT]. For those NAIs
that include the realm component, the ID_RFC822_ADDR identification that include the realm component, the ID_RFC822_ADDR identification
type SHOULD be used. Responder implementations should not attempt to type SHOULD be used. Responder implementations should not attempt to
verify that the contents actually conform to the exact syntax given verify that the contents actually conform to the exact syntax given
in [MAILFORMAT], but instead should accept any reasonable-looking in [MAILFORMAT], but instead should accept any reasonable-looking
NAI. For NAIs that do not include the realm component, the ID_KEY_ID NAI. For NAIs that do not include the realm component, the ID_KEY_ID
identification type SHOULD be used. identification type SHOULD be used.
See "IPsec PKI Profile of IKEv1, IKEv2 and PKIX" ([RFC4945]) for more See "The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and
information about matching Identification payloads and the contents PKIX" ([RFC4945]) for more information about matching Identification
of the PKIX Certificates. payloads and the contents of the PKIX Certificates.
3.6. Certificate Payload 3.6. Certificate Payload
The Certificate payload, denoted CERT in this document, provides a The Certificate payload, denoted CERT in this document, provides a
means to transport certificates or other authentication-related means to transport certificates or other authentication-related
information via IKE. Certificate payloads SHOULD be included in an information via IKE. Certificate payloads SHOULD be included in an
exchange if certificates are available to the sender. The Hash and exchange if certificates are available to the sender. The Hash and
URL formats of the Certificate payloads should be used in case the URL formats of the Certificate payloads should be used in case the
peer has indicated an ability to retrieve this information from peer has indicated an ability to retrieve this information from
elsewhere using an HTTP_CERT_LOOKUP_SUPPORTED Notify payload. Note elsewhere using an HTTP_CERT_LOOKUP_SUPPORTED Notify payload. Note
skipping to change at page 92, line 16 skipping to change at page 93, line 18
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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cert Encoding | | | Cert Encoding | |
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ |
~ Certificate Data ~ ~ Certificate Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 12: Certificate Payload Format Figure 12: Certificate Payload Format
o Certificate Encoding (1 octet) - This field indicates the type of o Certificate Encoding (1 octet) - This field indicates the type of
certificate or certificate-related information contained in the certificate or certificate-related information contained in the
Certificate Data field. The values in the following table are Certificate Data field. The values in the following table are
only current as of the publication date of RFC 4306. Other values only current as of the publication date of RFC 4306. Other values
may have been added since then or will be added after the may have been added since then or will be added after the
publication of this document. Readers should refer to [IKEV2IANA] publication of this document. Readers should refer to [IKEV2IANA]
for the latest values. for the latest values.
Certificate Encoding Value Certificate Encoding Value
---------------------------------------------------- ----------------------------------------------------
PKCS #7 wrapped X.509 certificate 1 UNSPECIFIED PKCS #7 wrapped X.509 certificate 1 UNSPECIFIED
PGP Certificate 2 UNSPECIFIED PGP Certificate 2 UNSPECIFIED
DNS Signed Key 3 UNSPECIFIED DNS Signed Key 3 UNSPECIFIED
X.509 Certificate - Signature 4 X.509 Certificate - Signature 4
Kerberos Token 6 UNSPECIFIED Kerberos Token 6 UNSPECIFIED
Certificate Revocation List (CRL) 7 Certificate Revocation List (CRL) 7
Authority Revocation List (ARL) 8 UNSPECIFIED Authority Revocation List (ARL) 8 UNSPECIFIED
SPKI Certificate 9 UNSPECIFIED SPKI Certificate 9 UNSPECIFIED
X.509 Certificate - Attribute 10 UNSPECIFIED X.509 Certificate - Attribute 10 UNSPECIFIED
Deprecated (Was Raw RSA Key) 11 DEPRECATED Deprecated (was Raw RSA Key) 11 DEPRECATED
Hash and URL of X.509 certificate 12 Hash and URL of X.509 certificate 12
Hash and URL of X.509 bundle 13 Hash and URL of X.509 bundle 13
o Certificate Data (variable length) - Actual encoding of o Certificate Data (variable length) - Actual encoding of
certificate data. The type of certificate is indicated by the certificate data. The type of certificate is indicated by the
Certificate Encoding field. Certificate Encoding field.
The payload type for the Certificate payload is thirty-seven (37). The payload type for the Certificate payload is thirty-seven (37).
Specific syntax for some of the certificate type codes above is not Specific syntax for some of the certificate type codes above is not
skipping to change at page 93, line 17 skipping to change at page 94, line 21
payload. Note that with this encoding, if a chain of certificates payload. Note that with this encoding, if a chain of certificates
needs to be sent, multiple CERT payloads are used, only the first needs to be sent, multiple CERT payloads are used, only the first
of which holds the public key used to validate the sender's AUTH of which holds the public key used to validate the sender's AUTH
payload. payload.
o "Certificate Revocation List" contains a DER-encoded X.509 o "Certificate Revocation List" contains a DER-encoded X.509
certificate revocation list. certificate revocation list.
o Hash and URL encodings allow IKE messages to remain short by o Hash and URL encodings allow IKE messages to remain short by
replacing long data structures with a 20-octet SHA-1 hash (see replacing long data structures with a 20-octet SHA-1 hash (see
[SHA]) of the replaced value followed by a variable-length URL [FIPS.180-4.2012]) of the replaced value followed by a variable-
that resolves to the DER-encoded data structure itself. This length URL that resolves to the DER-encoded data structure itself.
improves efficiency when the endpoints have certificate data This improves efficiency when the endpoints have certificate data
cached and makes IKE less subject to DoS attacks that become cached and makes IKE less subject to DoS attacks that become
easier to mount when IKE messages are large enough to require IP easier to mount when IKE messages are large enough to require IP
fragmentation [DOSUDPPROT]. fragmentation [DOSUDPPROT].
The "Hash and URL of a bundle" type uses the following ASN.1 The "Hash and URL of a bundle" type uses the following ASN.1
definition for the X.509 bundle: definition for the X.509 bundle:
CertBundle CertBundle
{ iso(1) identified-organization(3) dod(6) internet(1) { iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0) security(5) mechanisms(5) pkix(7) id-mod(0)
skipping to change at page 93, line 49 skipping to change at page 95, line 4
internet(1) security(5) mechanisms(5) pkix(7) internet(1) security(5) mechanisms(5) pkix(7)
id-mod(0) id-pkix1-explicit(18) } ; id-mod(0) id-pkix1-explicit(18) } ;
CertificateOrCRL ::= CHOICE { CertificateOrCRL ::= CHOICE {
cert [0] Certificate, cert [0] Certificate,
crl [1] CertificateList } crl [1] CertificateList }
CertificateBundle ::= SEQUENCE OF CertificateOrCRL CertificateBundle ::= SEQUENCE OF CertificateOrCRL
END END
Implementations MUST be capable of being configured to send and Implementations MUST be capable of being configured to send and
accept up to four X.509 certificates in support of authentication, accept up to four X.509 certificates in support of authentication,
and also MUST be capable of being configured to send and accept the and also MUST be capable of being configured to send and accept the
two Hash and URL formats (with HTTP URLs). If multiple certificates two Hash and URL formats (with HTTP URLs). If multiple certificates
are sent, the first certificate MUST contain the public key are sent, the first certificate MUST contain the public key
associated with the private key used to sign the AUTH payload. The associated with the private key used to sign the AUTH payload. The
other certificates may be sent in any order. other certificates may be sent in any order.
Implementations MUST support the HTTP [HTTP] method for hash-and-URL Implementations MUST support the "http:" scheme for hash-and-URL
lookup. The behavior of other URL methods [URLS] is not currently lookup. The behavior of other URL schemes [URLS] is not currently
specified, and such methods SHOULD NOT be used in the absence of a specified, and such schemes SHOULD NOT be used in the absence of a
document specifying them. document specifying them.
3.7. Certificate Request Payload 3.7. Certificate Request Payload
The Certificate Request payload, denoted CERTREQ in this document, The Certificate Request payload, denoted CERTREQ in this document,
provides a means to request preferred certificates via IKE and can provides a means to request preferred certificates via IKE and can
appear in the IKE_INIT_SA response and/or the IKE_AUTH request. appear in the IKE_INIT_SA response and/or the IKE_AUTH request.
Certificate Request payloads MAY be included in an exchange when the Certificate Request payloads MAY be included in an exchange when the
sender needs to get the certificate of the receiver. sender needs to get the certificate of the receiver.
skipping to change at page 94, line 35 skipping to change at page 95, line 38
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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cert Encoding | | | Cert Encoding | |
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ |
~ Certification Authority ~ ~ Certification Authority ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 13: Certificate Request Payload Format Figure 13: Certificate Request Payload Format
o Certificate Encoding (1 octet) - Contains an encoding of the type o Certificate Encoding (1 octet) - Contains an encoding of the type
or format of certificate requested. Values are listed in or format of certificate requested. Values are listed in
Section 3.6. Section 3.6.
o Certification Authority (variable length) - Contains an encoding o Certification Authority (variable length) - Contains an encoding
of an acceptable certification authority for the type of of an acceptable certification authority for the type of
certificate requested. certificate requested.
The payload type for the Certificate Request payload is thirty-eight The payload type for the Certificate Request payload is
(38). thirty-eight (38).
The Certificate Encoding field has the same values as those defined The Certificate Encoding field has the same values as those defined
in Section 3.6. The Certification Authority field contains an in Section 3.6. The Certification Authority field contains an
indicator of trusted authorities for this certificate type. The indicator of trusted authorities for this certificate type. The
Certification Authority value is a concatenated list of SHA-1 hashes Certification Authority value is a concatenated list of SHA-1 hashes
of the public keys of trusted Certification Authorities (CAs). Each of the public keys of trusted Certification Authorities (CAs). Each
is encoded as the SHA-1 hash of the Subject Public Key Info element is encoded as the SHA-1 hash of the Subject Public Key Info element
(see section 4.1.2.7 of [PKIX]) from each Trust Anchor certificate. (see Section 4.1.2.7 of [PKIX]) from each Trust Anchor certificate.
The 20-octet hashes are concatenated and included with no other The 20-octet hashes are concatenated and included with no other
formatting. formatting.
The contents of the "Certification Authority" field are defined only The contents of the Certification Authority field are defined only
for X.509 certificates, which are types 4, 12, and 13. Other values for X.509 certificates, which are types 4, 12, and 13. Other values
SHOULD NOT be used until Standards-Track specifications that specify SHOULD NOT be used until Standards-Track specifications that specify
their use are published. their use are published.
Note that the term "Certificate Request" is somewhat misleading, in Note that the term "Certificate Request" is somewhat misleading, in
that values other than certificates are defined in a "Certificate" that values other than certificates are defined in a "Certificate"
payload and requests for those values can be present in a Certificate payload and requests for those values can be present in a Certificate
Request payload. The syntax of the Certificate Request payload in Request payload. The syntax of the Certificate Request payload in
such cases is not defined in this document. such cases is not defined in this document.
The Certificate Request payload is processed by inspecting the "Cert The Certificate Request payload is processed by inspecting the
Encoding" field to determine whether the processor has any Cert Encoding field to determine whether the processor has any
certificates of this type. If so, the "Certification Authority" certificates of this type. If so, the Certification Authority field
field is inspected to determine if the processor has any certificates is inspected to determine if the processor has any certificates that
that can be validated up to one of the specified certification can be validated up to one of the specified certification
authorities. This can be a chain of certificates. authorities. This can be a chain of certificates.
If an end-entity certificate exists that satisfies the criteria If an end-entity certificate exists that satisfies the criteria
specified in the CERTREQ, a certificate or certificate chain SHOULD specified in the CERTREQ, a certificate or certificate chain SHOULD
be sent back to the certificate requestor if the recipient of the be sent back to the certificate requestor if the recipient of the
CERTREQ: CERTREQ:
o is configured to use certificate authentication, o is configured to use certificate authentication,
o is allowed to send a CERT payload, o is allowed to send a CERT payload,
skipping to change at page 96, line 4 skipping to change at page 97, line 9
Certificate revocation checking must be considered during the Certificate revocation checking must be considered during the
chaining process used to select a certificate. Note that even if two chaining process used to select a certificate. Note that even if two
peers are configured to use two different CAs, cross-certification peers are configured to use two different CAs, cross-certification
relationships should be supported by appropriate selection logic. relationships should be supported by appropriate selection logic.
The intent is not to prevent communication through the strict The intent is not to prevent communication through the strict
adherence of selection of a certificate based on CERTREQ, when an adherence of selection of a certificate based on CERTREQ, when an
alternate certificate could be selected by the sender that would alternate certificate could be selected by the sender that would
still enable the recipient to successfully validate and trust it still enable the recipient to successfully validate and trust it
through trust conveyed by cross-certification, CRLs, or other out-of- through trust conveyed by cross-certification, CRLs, or other
band configured means. Thus, the processing of a CERTREQ should be out-of-band configured means. Thus, the processing of a CERTREQ
seen as a suggestion for a certificate to select, not a mandated one. should be seen as a suggestion for a certificate to select, not a
If no certificates exist, then the CERTREQ is ignored. This is not mandated one. If no certificates exist, then the CERTREQ is ignored.
an error condition of the protocol. There may be cases where there This is not an error condition of the protocol. There may be cases
is a preferred CA sent in the CERTREQ, but an alternate might be where there is a preferred CA sent in the CERTREQ, but an alternate
acceptable (perhaps after prompting a human operator). might be acceptable (perhaps after prompting a human operator).
The HTTP_CERT_LOOKUP_SUPPORTED notification MAY be included in any The HTTP_CERT_LOOKUP_SUPPORTED notification MAY be included in any
message that can include a CERTREQ payload and indicates that the message that can include a CERTREQ payload and indicates that the
sender is capable of looking up certificates based on an HTTP-based sender is capable of looking up certificates based on an HTTP-based
URL (and hence presumably would prefer to receive certificate URL (and hence presumably would prefer to receive certificate
specifications in that format). specifications in that format).
3.8. Authentication Payload 3.8. Authentication Payload
The Authentication payload, denoted AUTH in this document, contains The Authentication payload, denoted AUTH in this document, contains
data used for authentication purposes. The syntax of the data used for authentication purposes. The syntax of the
Authentication data varies according to the Auth Method as specified Authentication Data varies according to the Auth Method as specified
below. below.
The Authentication payload is defined as follows: The Authentication payload is defined as follows:
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Auth Method | RESERVED | | Auth Method | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Authentication Data ~ ~ Authentication Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 14: Authentication Payload Format Figure 14: Authentication Payload Format
o Auth Method (1 octet) - Specifies the method of authentication o Auth Method (1 octet) - Specifies the method of authentication
used. The types of signatures are listed here. The values in the used. The types of signatures are listed here. The values in the
following table are only current as of the publication date of RFC following table are only current as of the publication date of
4306. Other values may have been added since then or will be RFC 4306. Other values may have been added since then or will be
added after the publication of this document. Readers should added after the publication of this document. Readers should
refer to [IKEV2IANA] for the latest values. refer to [IKEV2IANA] for the latest values.
Mechanism Value Mechanism Value
----------------------------------------------------------------- -----------------------------------------------------------------
RSA Digital Signature 1 RSA Digital Signature 1
Computed as specified in Section 2.15 using an RSA private key Computed as specified in Section 2.15 using an RSA private key
with RSASSA-PKCS1-v1_5 signature scheme specified in [PKCS1] with RSASSA-PKCS1-v1_5 signature scheme specified in [PKCS1]
(implementers should note that IKEv1 used a different method for (implementers should note that IKEv1 used a different method for
RSA signatures). To promote interoperability, implementations RSA signatures). To promote interoperability, implementations
skipping to change at page 97, line 23 skipping to change at page 98, line 23
as the hash function and SHOULD use SHA-1 as the default hash as the hash function and SHOULD use SHA-1 as the default hash
function when generating signatures. Implementations can use the function when generating signatures. Implementations can use the
certificates received from a given peer as a hint for selecting a certificates received from a given peer as a hint for selecting a
mutually understood hash function for the AUTH payload signature. mutually understood hash function for the AUTH payload signature.
Note, however, that the hash algorithm used in the AUTH payload Note, however, that the hash algorithm used in the AUTH payload
signature doesn't have to be the same as any hash algorithm(s) signature doesn't have to be the same as any hash algorithm(s)
used in the certificate(s). used in the certificate(s).
Shared Key Message Integrity Code 2 Shared Key Message Integrity Code 2
Computed as specified in Section 2.15 using the shared key Computed as specified in Section 2.15 using the shared key
associated with the identity in the ID payload and the negotiated associated with the identity in the ID payload and the
PRF. negotiated PRF.
DSS Digital Signature 3 DSS Digital Signature 3
Computed as specified in Section 2.15 using a DSS private key Computed as specified in Section 2.15 using a DSS private key
(see [DSS]) over a SHA-1 hash. (see [DSS]) over a SHA-1 hash.
o RESERVED - MUST be sent as zero; MUST be ignored on receipt.
o Authentication Data (variable length) - see Section 2.15. o Authentication Data (variable length) - see Section 2.15.
The payload type for the Authentication payload is thirty-nine (39). The payload type for the Authentication payload is thirty-nine (39).
3.9. Nonce Payload 3.9. Nonce Payload
The Nonce payload, denoted as Ni and Nr in this document for the The Nonce payload, denoted as Ni and Nr in this document for the
initiator's and responder's nonce, respectively, contains random data initiator's and responder's nonce, respectively, contains random data
used to guarantee liveness during an exchange and protect against used to guarantee liveness during an exchange and protect against
replay attacks. replay attacks.
skipping to change at page 98, line 4 skipping to change at page 99, line 16
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Nonce Data ~ ~ Nonce Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 15: Nonce Payload Format
Figure 15: Nonce Payload Format
o Nonce Data (variable length) - Contains the random data generated o Nonce Data (variable length) - Contains the random data generated
by the transmitting entity. by the transmitting entity.
The payload type for the Nonce payload is forty (40). The payload type for the Nonce payload is forty (40).
The size of the Nonce Data MUST be between 16 and 256 octets, The size of the Nonce Data MUST be between 16 and 256 octets,
inclusive. Nonce values MUST NOT be reused. inclusive. Nonce values MUST NOT be reused.
3.10. Notify Payload 3.10. Notify Payload
The Notify payload, denoted N in this document, is used to transmit The Notify payload, denoted N in this document, is used to transmit
informational data, such as error conditions and state transitions, informational data, such as error conditions and state transitions,
to an IKE peer. A Notify payload may appear in a response message to an IKE peer. A Notify payload may appear in a response message
(usually specifying why a request was rejected), in an INFORMATIONAL (usually specifying why a request was rejected), in an INFORMATIONAL
Exchange (to report an error not in an IKE request), or in any other exchange (to report an error not in an IKE request), or in any other
message to indicate sender capabilities or to modify the meaning of message to indicate sender capabilities or to modify the meaning of
the request. the request.
The Notify payload is defined as follows: The Notify payload is defined as follows:
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 98, line 42 skipping to change at page 100, line 23
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Security Parameter Index (SPI) ~ ~ Security Parameter Index (SPI) ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Notification Data ~ ~ Notification Data ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 16: Notify Payload Format Figure 16: Notify Payload Format
o Protocol ID (1 octet) - If this notification concerns an existing o Protocol ID (1 octet) - If this notification concerns an existing
SA whose SPI is given in the SPI field, this field indicates the SA whose SPI is given in the SPI field, this field indicates the
type of that SA. For notifications concerning Child SAs, this type of that SA. For notifications concerning Child SAs, this
field MUST contain either (2) to indicate AH or (3) to indicate field MUST contain either (2) to indicate AH or (3) to indicate
ESP. Of the notifications defined in this document, the SPI is ESP. Of the notifications defined in this document, the SPI is
included only with INVALID_SELECTORS, REKEY_SA and included only with INVALID_SELECTORS, REKEY_SA, and
CHILD_SA_NOT_FOUND. If the SPI field is empty, this field MUST be CHILD_SA_NOT_FOUND. If the SPI field is empty, this field MUST be
sent as zero and MUST be ignored on receipt. sent as zero and MUST be ignored on receipt.
o SPI Size (1 octet) - Length in octets of the SPI as defined by the o SPI Size (1 octet) - Length in octets of the SPI as defined by the
IPsec protocol ID or zero if no SPI is applicable. For a IPsec protocol ID or zero if no SPI is applicable. For a
notification concerning the IKE SA, the SPI Size MUST be zero and notification concerning the IKE SA, the SPI Size MUST be zero and
the field must be empty. the field must be empty.
o Notify Message Type (2 octets) - Specifies the type of o Notify Message Type (2 octets) - Specifies the type of
notification message. notification message.
skipping to change at page 99, line 26 skipping to change at page 101, line 10
transmitted in addition to the Notify Message Type. Values for transmitted in addition to the Notify Message Type. Values for
this field are type specific (see below). this field are type specific (see below).
The payload type for the Notify payload is forty-one (41). The payload type for the Notify payload is forty-one (41).
3.10.1. Notify Message Types 3.10.1. Notify Message Types
Notification information can be error messages specifying why an SA Notification information can be error messages specifying why an SA
could not be established. It can also be status data that a process could not be established. It can also be status data that a process
managing an SA database wishes to communicate with a peer process. managing an SA database wishes to communicate with a peer process.
The table below lists the Notification messages and their
The table below lists the notification messages and their
corresponding values. The number of different error statuses was corresponding values. The number of different error statuses was
greatly reduced from IKEv1 both for simplification and to avoid greatly reduced from IKEv1 both for simplification and to avoid
giving configuration information to probers. giving configuration information to probers.
Types in the range 0 - 16383 are intended for reporting errors. An Types in the range 0 - 16383 are intended for reporting errors. An
implementation receiving a Notify payload with one of these types implementation receiving a Notify payload with one of these types
that it does not recognize in a response MUST assume that the that it does not recognize in a response MUST assume that the
corresponding request has failed entirely. Unrecognized error types corresponding request has failed entirely. Unrecognized error types
in a request and status types in a request or response MUST be in a request and status types in a request or response MUST be
ignored, and they should be logged. ignored, and they should be logged.
skipping to change at page 101, line 23 skipping to change at page 103, line 14
INVALID_SELECTORS 39 INVALID_SELECTORS 39
MAY be sent in an IKE INFORMATIONAL exchange when a node receives MAY be sent in an IKE INFORMATIONAL exchange when a node receives
an ESP or AH packet whose selectors do not match those of the SA an ESP or AH packet whose selectors do not match those of the SA
on which it was delivered (and that caused the packet to be on which it was delivered (and that caused the packet to be
dropped). The Notification Data contains the start of the dropped). The Notification Data contains the start of the
offending packet (as in ICMP messages) and the SPI field of the offending packet (as in ICMP messages) and the SPI field of the
notification is set to match the SPI of the Child SA. notification is set to match the SPI of the Child SA.
TEMPORARY_FAILURE 43 TEMPORARY_FAILURE 43
See section 2.25. See Section 2.25.
CHILD_SA_NOT_FOUND 44 CHILD_SA_NOT_FOUND 44
See section 2.25. See Section 2.25.
NOTIFY messages: status types Value NOTIFY messages: status types Value
------------------------------------------------------------------- -------------------------------------------------------------------
INITIAL_CONTACT 16384 INITIAL_CONTACT 16384
See Section 2.4. See Section 2.4.
SET_WINDOW_SIZE 16385 SET_WINDOW_SIZE 16385
See Section 2.3. See Section 2.3.
ADDITIONAL_TS_POSSIBLE 16386 ADDITIONAL_TS_POSSIBLE 16386
skipping to change at page 102, line 45 skipping to change at page 104, line 13
See Section 1.3.3. See Section 1.3.3.
ESP_TFC_PADDING_NOT_SUPPORTED 16394 ESP_TFC_PADDING_NOT_SUPPORTED 16394
See Section 1.3.1. See Section 1.3.1.
NON_FIRST_FRAGMENTS_ALSO 16395 NON_FIRST_FRAGMENTS_ALSO 16395
See Section 1.3.1. See Section 1.3.1.
3.11. Delete Payload 3.11. Delete Payload
The Delete payload, denoted D in this document, contains a protocol- The Delete payload, denoted D in this document, contains a
specific Security Association identifier that the sender has removed protocol-specific Security Association identifier that the sender has
from its Security Association database and is, therefore, no longer removed from its Security Association database and is, therefore, no
valid. Figure 17 shows the format of the Delete payload. It is longer valid. Figure 17 shows the format of the Delete payload. It
possible to send multiple SPIs in a Delete payload; however, each SPI is possible to send multiple SPIs in a Delete payload; however, each
MUST be for the same protocol. Mixing of protocol identifiers MUST SPI MUST be for the same protocol. Mixing of protocol identifiers
NOT be performed in the Delete payload. It is permitted, however, to MUST NOT be performed in the Delete payload. It is permitted,
include multiple Delete payloads in a single INFORMATIONAL exchange however, to include multiple Delete payloads in a single
where each Delete payload lists SPIs for a different protocol. INFORMATIONAL exchange where each Delete payload lists SPIs for a
different protocol.
Deletion of the IKE SA is indicated by a protocol ID of 1 (IKE) but Deletion of the IKE SA is indicated by a protocol ID of 1 (IKE) but
no SPIs. Deletion of a Child SA, such as ESP or AH, will contain the no SPIs. Deletion of a Child SA, such as ESP or AH, will contain the
IPsec protocol ID of that protocol (2 for AH, 3 for ESP), and the SPI IPsec protocol ID of that protocol (2 for AH, 3 for ESP), and the SPI
is the SPI the sending endpoint would expect in inbound ESP or AH is the SPI the sending endpoint would expect in inbound ESP or AH
packets. packets.
The Delete payload is defined as follows: The Delete payload is defined as follows:
1 2 3 1 2 3
skipping to change at page 103, line 26 skipping to change at page 104, line 44
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol ID | SPI Size | Num of SPIs | | Protocol ID | SPI Size | Num of SPIs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Security Parameter Index(es) (SPI) ~ ~ Security Parameter Index(es) (SPI) ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 17: Delete Payload Format Figure 17: Delete Payload Format
o Protocol ID (1 octet) - Must be 1 for an IKE SA, 2 for AH, or 3 o Protocol ID (1 octet) - Must be 1 for an IKE SA, 2 for AH, or 3
for ESP. for ESP.
o SPI Size (1 octet) - Length in octets of the SPI as defined by the o SPI Size (1 octet) - Length in octets of the SPI as defined by the
protocol ID. It MUST be zero for IKE (SPI is in message header) protocol ID. It MUST be zero for IKE (SPI is in message header)
or four for AH and ESP. or four for AH and ESP.
o Num of SPIs (2 octets, unsigned integer) - The number of SPIs o Num of SPIs (2 octets, unsigned integer) - The number of SPIs
contained in the Delete payload. The size of each SPI is defined contained in the Delete payload. The size of each SPI is defined
skipping to change at page 104, line 38 skipping to change at page 106, line 17
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Vendor ID (VID) ~ ~ Vendor ID (VID) ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 18: Vendor ID Payload Format Figure 18: Vendor ID Payload Format
o Vendor ID (variable length) - It is the responsibility of the o Vendor ID (variable length) - It is the responsibility of the
person choosing the Vendor ID to assure its uniqueness in spite of person choosing the Vendor ID to assure its uniqueness in spite of
the absence of any central registry for IDs. Good practice is to the absence of any central registry for IDs. Good practice is to
include a company name, a person name, or some such information. include a company name, a person name, or some such information.
If you want to show off, you might include the latitude and If you want to show off, you might include the latitude and
longitude and time where you were when you chose the ID and some longitude and time where you were when you chose the ID and some
random input. A message digest of a long unique string is random input. A message digest of a long unique string is
preferable to the long unique string itself. preferable to the long unique string itself.
skipping to change at page 105, line 24 skipping to change at page 106, line 49
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of TSs | RESERVED | | Number of TSs | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ <Traffic Selectors> ~ ~ <Traffic Selectors> ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 19: Traffic Selectors Payload Format Figure 19: Traffic Selectors Payload Format
o Number of TSs (1 octet) - Number of Traffic Selectors being o Number of TSs (1 octet) - Number of Traffic Selectors being
provided. provided.
o RESERVED - This field MUST be sent as zero and MUST be ignored on o RESERVED - This field MUST be sent as zero and MUST be ignored on
receipt. receipt.
o Traffic Selectors (variable length) - One or more individual o Traffic Selectors (variable length) - One or more individual
Traffic Selectors. Traffic Selectors.
skipping to change at page 106, line 33 skipping to change at page 108, line 23
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Starting Address* ~ ~ Starting Address* ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Ending Address* ~ ~ Ending Address* ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 20: Traffic Selector Figure 20: Traffic Selector
*Note: All fields other than TS Type and Selector Length depend on *Note: All fields other than TS Type and Selector Length depend on
the TS Type. The fields shown are for TS Types 7 and 8, the only two the TS Type. The fields shown are for TS Types 7 and 8, the only two
values currently defined. values currently defined.
o TS Type (one octet) - Specifies the type of Traffic Selector. o TS Type (one octet) - Specifies the type of Traffic Selector.
o IP protocol ID (1 octet) - Value specifying an associated IP o IP protocol ID (1 octet) - Value specifying an associated IP
protocol ID (such as UDP, TCP, and ICMP). A value of zero means protocol ID (such as UDP, TCP, and ICMP). A value of zero means
that the protocol ID is not relevant to this Traffic Selector -- that the protocol ID is not relevant to this Traffic Selector --
the SA can carry all protocols. the SA can carry all protocols.
o Selector Length - Specifies the length of this Traffic Selector o Selector Length (2 octets, unsigned integer) - Specifies the
substructure including the header. length of this Traffic Selector substructure including the header.
o Start Port (2 octets, unsigned integer) - Value specifying the o Start Port (2 octets, unsigned integer) - Value specifying the
smallest port number allowed by this Traffic Selector. For smallest port number allowed by this Traffic Selector. For
protocols for which port is undefined (including protocol 0), or protocols for which port is undefined (including protocol 0), or
if all ports are allowed, this field MUST be zero. ICMP and if all ports are allowed, this field MUST be zero. ICMP and
ICMPv6 Type and Code values, as well as Mobile IP version 6 ICMPv6 Type and Code values, as well as Mobile IP version 6
(MIPv6) mobility header (MH) Type values, are represented in this (MIPv6) mobility header (MH) Type values, are represented in this
field as specified in Section 4.4.1.1 of [IPSECARCH]. ICMP Type field as specified in Section 4.4.1.1 of [IPSECARCH]. ICMP Type
and Code values are treated as a single 16-bit integer port and Code values are treated as a single 16-bit integer port
number, with Type in the most significant eight bits and Code in number, with Type in the most significant eight bits and Code in
skipping to change at page 107, line 38 skipping to change at page 109, line 28
o Starting Address - The smallest address included in this Traffic o Starting Address - The smallest address included in this Traffic
Selector (length determined by TS Type). Selector (length determined by TS Type).
o Ending Address - The largest address included in this Traffic o Ending Address - The largest address included in this Traffic
Selector (length determined by TS Type). Selector (length determined by TS Type).
Systems that are complying with [IPSECARCH] that wish to indicate Systems that are complying with [IPSECARCH] that wish to indicate
"ANY" ports MUST set the start port to 0 and the end port to 65535; "ANY" ports MUST set the start port to 0 and the end port to 65535;
note that according to [IPSECARCH], "ANY" includes "OPAQUE". Systems note that according to [IPSECARCH], "ANY" includes "OPAQUE". Systems
working with [IPSECARCH] that wish to indicate "OPAQUE" ports, but working with [IPSECARCH] that wish to indicate "OPAQUE" ports, but
not "ANY" ports, MUST set the start port to 65535 and the end port to not "ANY" ports, MUST set the start port to 65535 and the end port
0. to 0.
The Traffic Selector types 7 and 8 can also refer to ICMP or ICMPv6 The Traffic Selector types 7 and 8 can also refer to ICMP or ICMPv6
type and code fields, as well as MH Type fields for the IPv6 mobility type and code fields, as well as MH Type fields for the IPv6 mobility
header [MIPV6]. Note, however, that neither ICMP nor MIPv6 packets header [MIPV6]. Note, however, that neither ICMP nor MIPv6 packets
have separate source and destination fields. The method for have separate source and destination fields. The method for
specifying the Traffic Selectors for ICMP and MIPv6 is shown by specifying the Traffic Selectors for ICMP and MIPv6 is shown by
example in Section 4.4.1.3 of [IPSECARCH]. example in Section 4.4.1.3 of [IPSECARCH].
The following table lists values for the Traffic Selector Type field The following table lists values for the Traffic Selector Type field
and the corresponding Address Selector Data. The values in the and the corresponding Address Selector Data. The values in the
following table are only current as of the publication date of RFC following table are only current as of the publication date of
4306. Other values may have been added since then or will be added RFC 4306. Other values may have been added since then or will be
after the publication of this document. Readers should refer to added after the publication of this document. Readers should refer
[IKEV2IANA] for the latest values. to [IKEV2IANA] for the latest values.
TS Type Value TS Type Value
------------------------------------------------------------------- -------------------------------------------------------------------
TS_IPV4_ADDR_RANGE 7 TS_IPV4_ADDR_RANGE 7
A range of IPv4 addresses, represented by two four-octet A range of IPv4 addresses, represented by two four-octet
values. The first value is the beginning IPv4 address values. The first value is the beginning IPv4 address
(inclusive) and the second value is the ending IPv4 address (inclusive) and the second value is the ending IPv4 address
(inclusive). All addresses falling between the two specified (inclusive). All addresses falling between the two specified
addresses are considered to be within the list. addresses are considered to be within the list.
skipping to change at page 108, line 27 skipping to change at page 110, line 32
TS_IPV6_ADDR_RANGE 8 TS_IPV6_ADDR_RANGE 8
A range of IPv6 addresses, represented by two sixteen-octet A range of IPv6 addresses, represented by two sixteen-octet
values. The first value is the beginning IPv6 address values. The first value is the beginning IPv6 address
(inclusive) and the second value is the ending IPv6 address (inclusive) and the second value is the ending IPv6 address
(inclusive). All addresses falling between the two specified (inclusive). All addresses falling between the two specified
addresses are considered to be within the list. addresses are considered to be within the list.
3.14. Encrypted Payload 3.14. Encrypted Payload
The Encrypted payload, denoted SK{...} in this document, contains The Encrypted payload, denoted SK {...} in this document, contains
other payloads in encrypted form. The Encrypted payload, if present other payloads in encrypted form. The Encrypted payload, if present
in a message, MUST be the last payload in the message. Often, it is in a message, MUST be the last payload in the message. Often, it is
the only payload in the message. This payload is also called the the only payload in the message. This payload is also called the
"Encrypted and Authenticated" payload. "Encrypted and Authenticated" payload.
The algorithms for encryption and integrity protection are negotiated The algorithms for encryption and integrity protection are negotiated
during IKE SA setup, and the keys are computed as specified in during IKE SA setup, and the keys are computed as specified in
Sections 2.14 and 2.18. Sections 2.14 and 2.18.
This document specifies the cryptographic processing of Encrypted This document specifies the cryptographic processing of Encrypted
skipping to change at page 109, line 27 skipping to change at page 111, line 31
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Encrypted IKE Payloads ~ ~ Encrypted IKE Payloads ~
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | Padding (0-255 octets) | | | Padding (0-255 octets) |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
| | Pad Length | | | Pad Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Integrity Checksum Data ~ ~ Integrity Checksum Data ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 21: Encrypted Payload Format Figure 21: Encrypted Payload Format
o Next Payload - The payload type of the first embedded payload. o Next Payload - The payload type of the first embedded payload.
Note that this is an exception in the standard header format, Note that this is an exception in the standard header format,
since the Encrypted payload is the last payload in the message and since the Encrypted payload is the last payload in the message and
therefore the Next Payload field would normally be zero. But therefore the Next Payload field would normally be zero. But
because the content of this payload is embedded payloads and there because the content of this payload is embedded payloads and there
was no natural place to put the type of the first one, that type was no natural place to put the type of the first one, that type
is placed here. is placed here.
o Payload Length - Includes the lengths of the header, o Payload Length - Includes the lengths of the header,
skipping to change at page 110, line 48 skipping to change at page 112, line 51
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CFG Type | RESERVED | | CFG Type | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Configuration Attributes ~ ~ Configuration Attributes ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 22: Configuration Payload Format Figure 22: Configuration Payload Format
The payload type for the Configuration payload is forty-seven (47). The payload type for the Configuration payload is forty-seven (47).
o CFG Type (1 octet) - The type of exchange represented by the o CFG Type (1 octet) - The type of exchange represented by the
Configuration Attributes. The values in the following table are Configuration Attributes. The values in the following table are
only current as of the publication date of RFC 4306. Other values only current as of the publication date of RFC 4306. Other values
may have been added since then or will be added after the may have been added since then or will be added after the
publication of this document. Readers should refer to [IKEV2IANA] publication of this document. Readers should refer to [IKEV2IANA]
for the latest values. for the latest values.
skipping to change at page 111, line 39 skipping to change at page 113, line 41
1 2 3 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 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 | Length | |R| Attribute Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ Value ~ ~ Value ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 23: Configuration Attribute Format Figure 23: Configuration Attribute Format
o Reserved (1 bit) - This bit MUST be set to zero and MUST be o Reserved (1 bit) - This bit MUST be set to zero and MUST be
ignored on receipt. ignored on receipt.
o Attribute Type (15 bits) - A unique identifier for each of the o Attribute Type (15 bits) - A unique identifier for each of the
Configuration Attribute Types. Configuration Attribute Types.
o Length (2 octets, unsigned integer) - Length in octets of value. o Length (2 octets, unsigned integer) - Length in octets of value.
o Value (0 or more octets) - The variable-length value of this o Value (0 or more octets) - The variable-length value of this
Configuration Attribute. The following lists the attribute types. Configuration Attribute. The following lists the attribute types.
The values in the following table are only current as of the The values in the following table are only current as of the
publication date of RFC 4306 (except INTERNAL_ADDRESS_EXPIRY and publication date of RFC 4306 (except INTERNAL_ADDRESS_EXPIRY and
INTERNAL_IP6_NBNS which were removed by this document). Other values INTERNAL_IP6_NBNS, which were removed by RFC 5996). Other values may
may have been added since then or will be added after the publication have been added since then or will be added after the publication of
of this document. Readers should refer to [IKEV2IANA] for the latest this document. Readers should refer to [IKEV2IANA] for the latest
values. values.
Attribute Type Value Multi-Valued Length Attribute Type Value Multi-Valued Length
------------------------------------------------------------ ------------------------------------------------------------
INTERNAL_IP4_ADDRESS 1 YES* 0 or 4 octets INTERNAL_IP4_ADDRESS 1 YES* 0 or 4 octets
INTERNAL_IP4_NETMASK 2 NO 0 or 4 octets INTERNAL_IP4_NETMASK 2 NO 0 or 4 octets
INTERNAL_IP4_DNS 3 YES 0 or 4 octets INTERNAL_IP4_DNS 3 YES 0 or 4 octets
INTERNAL_IP4_NBNS 4 YES 0 or 4 octets INTERNAL_IP4_NBNS 4 YES 0 or 4 octets
INTERNAL_IP4_DHCP 6 YES 0 or 4 octets INTERNAL_IP4_DHCP 6 YES 0 or 4 octets
APPLICATION_VERSION 7 NO 0 or more APPLICATION_VERSION 7 NO 0 or more
skipping to change at page 113, line 45 skipping to change at page 115, line 46
more detail in Section 3.15.2. more detail in Section 3.15.2.
o SUPPORTED_ATTRIBUTES - When used within a Request, this attribute o SUPPORTED_ATTRIBUTES - When used within a Request, this attribute
MUST be zero-length and specifies a query to the responder to MUST be zero-length and specifies a query to the responder to
reply back with all of the attributes that it supports. The reply back with all of the attributes that it supports. The
response contains an attribute that contains a set of attribute response contains an attribute that contains a set of attribute
identifiers each in 2 octets. The length divided by 2 (octets) identifiers each in 2 octets. The length divided by 2 (octets)
would state the number of supported attributes contained in the would state the number of supported attributes contained in the
response. response.
o INTERNAL_IP6_SUBNET - The protected sub-networks that this edge- o INTERNAL_IP6_SUBNET - The protected sub-networks that this
device protects. This attribute is made up of two fields: the edge-device protects. This attribute is made up of two fields:
first is a 16-octet IPv6 address, and the second is a one-octet the first is a 16-octet IPv6 address, and the second is a
prefix-length as defined in [ADDRIPV6]. Multiple sub-networks MAY one-octet prefix-length as defined in [ADDRIPV6]. Multiple
be requested. The responder MAY respond with zero or more sub- sub-networks MAY be requested. The responder MAY respond with
network attributes. This is discussed in more detail in zero or more sub-network attributes. This is discussed in more
Section 3.15.2. detail in Section 3.15.2.
Note that no recommendations are made in this document as to how an Note that no recommendations are made in this document as to how an
implementation actually figures out what information to send in a implementation actually figures out what information to send in a
response. That is, we do not recommend any specific method of an response. That is, we do not recommend any specific method of an
IRAS determining which DNS server should be returned to a requesting IRAS determining which DNS server should be returned to a requesting
IRAC. IRAC.
The CFG_REQUEST and CFG_REPLY pair allows an IKE endpoint to request The CFG_REQUEST and CFG_REPLY pair allows an IKE endpoint to request
information from its peer. If an attribute in the CFG_REQUEST information from its peer. If an attribute in the CFG_REQUEST
Configuration payload is not zero-length, it is taken as a suggestion Configuration payload is not zero-length, it is taken as a suggestion
for that attribute. The CFG_REPLY Configuration payload MAY return for that attribute. The CFG_REPLY Configuration payload MAY return
that value, or a new one. It MAY also add new attributes and not that value, or a new one. It MAY also add new attributes and not
include some requested ones. Unrecognized or unsupported attributes include some requested ones. Unrecognized or unsupported attributes
MUST be ignored in both requests and responses. MUST be ignored in both requests and responses.
The CFG_SET and CFG_ACK pair allows an IKE endpoint to push The CFG_SET and CFG_ACK pair allows an IKE endpoint to push
configuration data to its peer. In this case, the CFG_SET configuration data to its peer. In this case, the CFG_SET
Configuration payload contains attributes the initiator wants its Configuration payload contains attributes the initiator wants its
peer to alter. The responder MUST return a Configuration payload if peer to alter. The responder MUST return a Configuration payload if
it accepted any of the configuration data and it MUST contain the it accepted any of the configuration data, and the Configuration
attributes that the responder accepted with zero-length data. Those payload MUST contain the attributes that the responder accepted with
attributes that it did not accept MUST NOT be in the CFG_ACK zero-length data. Those attributes that it did not accept MUST NOT
Configuration payload. If no attributes were accepted, the responder be in the CFG_ACK Configuration payload. If no attributes were
MUST return either an empty CFG_ACK payload or a response message accepted, the responder MUST return either an empty CFG_ACK payload
without a CFG_ACK payload. There are currently no defined uses for or a response message without a CFG_ACK payload. There are currently
the CFG_SET/CFG_ACK exchange, though they may be used in connection no defined uses for the CFG_SET/CFG_ACK exchange, though they may be
with extensions based on Vendor IDs. An implementation of this used in connection with extensions based on Vendor IDs. An
specification MAY ignore CFG_SET payloads. implementation of this specification MAY ignore CFG_SET payloads.
3.15.2. Meaning of INTERNAL_IP4_SUBNET and INTERNAL_IP6_SUBNET 3.15.2. Meaning of INTERNAL_IP4_SUBNET and INTERNAL_IP6_SUBNET
INTERNAL_IP4/6_SUBNET attributes can indicate additional subnets, INTERNAL_IP4/6_SUBNET attributes can indicate additional subnets,
ones that need one or more separate SAs, that can be reached through ones that need one or more separate SAs, that can be reached through
the gateway that announces the attributes. INTERNAL_IP4/6_SUBNET the gateway that announces the attributes. INTERNAL_IP4/6_SUBNET
attributes may also express the gateway's policy about what traffic attributes may also express the gateway's policy about what traffic
should be sent through the gateway; the client can choose whether should be sent through the gateway; the client can choose whether
other traffic (covered by TSr, but not in INTERNAL_IP4/6_SUBNET) is other traffic (covered by TSr, but not in INTERNAL_IP4/6_SUBNET) is
sent through the gateway or directly to the destination. Thus, sent through the gateway or directly to the destination. Thus,
skipping to change at page 115, line 36 skipping to change at page 117, line 43
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234) TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = (0, 0-65535, 0.0.0.0-255.255.255.255) TSr = (0, 0-65535, 0.0.0.0-255.255.255.255)
That response would mean that the client can send all its traffic That response would mean that the client can send all its traffic
through the gateway, but the gateway does not mind if the client through the gateway, but the gateway does not mind if the client
sends traffic not included by INTERNAL_IP4_SUBNET directly to the sends traffic not included by INTERNAL_IP4_SUBNET directly to the
destination (without going through the gateway). destination (without going through the gateway).
A different situation arises if the gateway has a policy that A different situation arises if the gateway has a policy that
requires the traffic for the two subnets to be carried in separate requires the traffic for the two subnets to be carried in separate
SAs. Then a response like this would indicate to the client that if SAs. Then a response like this would indicate to the client that
it wants access to the second subnet, it needs to create a separate if it wants access to the second subnet, it needs to create a
SA: separate SA:
CP(CFG_REPLY) = CP(CFG_REPLY) =
INTERNAL_IP4_ADDRESS(198.51.100.234) INTERNAL_IP4_ADDRESS(198.51.100.234)
INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192) INTERNAL_IP4_SUBNET(198.51.100.0/255.255.255.192)
INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0) INTERNAL_IP4_SUBNET(192.0.2.0/255.255.255.0)
TSi = (0, 0-65535, 198.51.100.234-198.51.100.234) TSi = (0, 0-65535, 198.51.100.234-198.51.100.234)
TSr = (0, 0-65535, 198.51.100.0-198.51.100.63) TSr = (0, 0-65535, 198.51.100.0-198.51.100.63)
INTERNAL_IP4_SUBNET can also be useful if the client's TSr included INTERNAL_IP4_SUBNET can also be useful if the client's TSr included
only part of the address space. For instance, if the client requests only part of the address space. For instance, if the client requests
the following: the following:
CP(CFG_REQUEST) = CP(CFG_REQUEST) =
INTERNAL_IP4_ADDRESS() INTERNAL_IP4_ADDRESS()
TSi = (0, 0-65535, 0.0.0.0-255.255.255.255) TSi = (0, 0-65535, 0.0.0.0-255.255.255.255)
TSr = (0, 0-65535, 192.0.2.155-192.0.2.155) TSr = (0, 0-65535, 192.0.2.155-192.0.2.155)
then the gateway's response might be: then the gateway's response might be:
skipping to change at page 118, line 35 skipping to change at page 121, line 15
1 2 3 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 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 | | Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
~ EAP Message ~ ~ EAP Message ~
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 24: EAP Payload Format Figure 24: EAP Payload Format
The payload type for an EAP payload is forty-eight (48). The payload type for an EAP payload is forty-eight (48).
1 2 3 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Identifier | Length | | Code | Identifier | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Type_Data... | Type | Type_Data...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Figure 25: EAP Message Format Figure 25: EAP Message Format
o Code (1 octet) indicates whether this message is a Request (1), o Code (1 octet) - Indicates whether this message is a Request (1),
Response (2), Success (3), or Failure (4). Response (2), Success (3), or Failure (4).
o Identifier (1 octet) is used in PPP to distinguish replayed o Identifier (1 octet) - Used in PPP to distinguish replayed
messages from repeated ones. Since in IKE, EAP runs over a messages from repeated ones. Since in IKE, EAP runs over a
reliable protocol, it serves no function here. In a response reliable protocol, the Identifier serves no function here. In a
message, this octet MUST be set to match the identifier in the response message, this octet MUST be set to match the identifier
corresponding request. in the corresponding request.
o Length (2 octets, unsigned integer) is the length of the EAP o Length (2 octets, unsigned integer) - The length of the EAP
message and MUST be four less than the Payload Length of the message. MUST be four less than the Payload Length of the
encapsulating payload. encapsulating payload.
o Type (1 octet) is present only if the Code field is Request (1) or o Type (1 octet) - Present only if the Code field is Request (1) or
Response (2). For other codes, the EAP message length MUST be Response (2). For other codes, the EAP message length MUST be
four octets and the Type and Type_Data fields MUST NOT be present. four octets and the Type and Type_Data fields MUST NOT be present.
In a Request (1) message, Type indicates the data being requested. In a Request (1) message, Type indicates the data being requested.
In a Response (2) message, Type MUST either be Nak or match the In a Response (2) message, Type MUST either be Nak or match the
type of the data requested. Note that since IKE passes an type of the data requested. Note that since IKE passes an
indication of initiator identity in the first message in the indication of initiator identity in the first message in the
IKE_AUTH exchange, the responder SHOULD NOT send EAP Identity IKE_AUTH exchange, the responder SHOULD NOT send EAP Identity
requests (type 1). The initiator MAY, however, respond to such requests (type 1). The initiator MAY, however, respond to such
requests if it receives them. requests if it receives them.
o Type_Data (Variable Length) varies with the Type of Request and o Type_Data (variable length) - Varies with the Type of Request and
the associated Response. For the documentation of the EAP the associated Response. For the documentation of the EAP
methods, see [EAP]. methods, see [EAP].
Note that since IKE passes an indication of initiator identity in the Note that since IKE passes an indication of initiator identity in the
first message in the IKE_AUTH exchange, the responder should not send first message in the IKE_AUTH exchange, the responder SHOULD NOT send
EAP Identity requests. The initiator may, however, respond to such EAP Identity requests. The initiator MAY, however, respond to such
requests if it receives them. requests if it receives them.
4. Conformance Requirements 4. Conformance Requirements
In order to assure that all implementations of IKEv2 can In order to assure that all implementations of IKEv2 can
interoperate, there are "MUST support" requirements in addition to interoperate, there are "MUST support" requirements in addition to
those listed elsewhere. Of course, IKEv2 is a security protocol, and those listed elsewhere. Of course, IKEv2 is a security protocol, and
one of its major functions is to allow only authorized parties to one of its major functions is to allow only authorized parties to
successfully complete establishment of SAs. So a particular successfully complete establishment of SAs. So a particular
implementation may be configured with any of a number of restrictions implementation may be configured with any of a number of restrictions
skipping to change at page 120, line 12 skipping to change at page 122, line 39
o Ability to negotiate SAs through a NAT and tunnel the resulting o Ability to negotiate SAs through a NAT and tunnel the resulting
ESP SA over UDP. ESP SA over UDP.
o Ability to request (and respond to a request for) a temporary IP o Ability to request (and respond to a request for) a temporary IP
address on the remote end of a tunnel. address on the remote end of a tunnel.
o Ability to support EAP-based authentication. o Ability to support EAP-based authentication.
o Ability to support window sizes greater than one. o Ability to support window sizes greater than one.
o Ability to establish multiple ESP or AH SAs within a single IKE o Ability to establish multiple ESP or AH SAs within a single
SA. IKE SA.
o Ability to rekey SAs. o Ability to rekey SAs.
To assure interoperability, all implementations MUST be capable of To assure interoperability, all implementations MUST be capable of
parsing all payload types (if only to skip over them) and to ignore parsing all payload types (if only to skip over them) and to ignore
payload types that it does not support unless the critical bit is set payload types that it does not support unless the critical bit is set
in the payload header. If the critical bit is set in an unsupported in the payload header. If the critical bit is set in an unsupported
payload header, all implementations MUST reject the messages payload header, all implementations MUST reject the messages
containing those payloads. containing those payloads.
skipping to change at page 120, line 38 skipping to change at page 123, line 19
capable of responding to an INFORMATIONAL exchange, but a minimal capable of responding to an INFORMATIONAL exchange, but a minimal
implementation MAY respond to any request in the INFORMATIONAL implementation MAY respond to any request in the INFORMATIONAL
exchange with an empty response (note that within the context of an exchange with an empty response (note that within the context of an
IKE SA, an "empty" message consists of an IKE header followed by an IKE SA, an "empty" message consists of an IKE header followed by an
Encrypted payload with no payloads contained in it). A minimal Encrypted payload with no payloads contained in it). A minimal
implementation MAY support the CREATE_CHILD_SA exchange only in so implementation MAY support the CREATE_CHILD_SA exchange only in so
far as to recognize requests and reject them with a Notify payload of far as to recognize requests and reject them with a Notify payload of
type NO_ADDITIONAL_SAS. A minimal implementation need not be able to type NO_ADDITIONAL_SAS. A minimal implementation need not be able to
initiate CREATE_CHILD_SA or INFORMATIONAL exchanges. When an SA initiate CREATE_CHILD_SA or INFORMATIONAL exchanges. When an SA
expires (based on locally configured values of either lifetime or expires (based on locally configured values of either lifetime or
octets passed), and implementation MAY either try to renew it with a octets passed), an implementation MAY either try to renew it with a
CREATE_CHILD_SA exchange or it MAY delete (close) the old SA and CREATE_CHILD_SA exchange or it MAY delete (close) the old SA and
create a new one. If the responder rejects the CREATE_CHILD_SA create a new one. If the responder rejects the CREATE_CHILD_SA
request with a NO_ADDITIONAL_SAS notification, the implementation request with a NO_ADDITIONAL_SAS notification, the implementation
MUST be capable of instead deleting the old SA and creating a new MUST be capable of instead deleting the old SA and creating a
one. new one.
Implementations are not required to support requesting temporary IP Implementations are not required to support requesting temporary IP
addresses or responding to such requests. If an implementation does addresses or responding to such requests. If an implementation does
support issuing such requests and its policy requires using temporary support issuing such requests and its policy requires using temporary
IP addresses, it MUST include a CP payload in the first message in IP addresses, it MUST include a CP payload in the first message in
the IKE_AUTH exchange containing at least a field of type the IKE_AUTH exchange containing at least a field of type
INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS. All other fields are INTERNAL_IP4_ADDRESS or INTERNAL_IP6_ADDRESS. All other fields are
optional. If an implementation supports responding to such requests, optional. If an implementation supports responding to such requests,
it MUST parse the CP payload of type CFG_REQUEST in the first message it MUST parse the CP payload of type CFG_REQUEST in the first message
in the IKE_AUTH exchange and recognize a field of type in the IKE_AUTH exchange and recognize a field of type
skipping to change at page 121, line 35 skipping to change at page 124, line 19
5. Security Considerations 5. Security Considerations
While this protocol is designed to minimize disclosure of While this protocol is designed to minimize disclosure of
configuration information to unauthenticated peers, some such configuration information to unauthenticated peers, some such
disclosure is unavoidable. One peer or the other must identify disclosure is unavoidable. One peer or the other must identify
itself first and prove its identity first. To avoid probing, the itself first and prove its identity first. To avoid probing, the
initiator of an exchange is required to identify itself first, and initiator of an exchange is required to identify itself first, and
usually is required to authenticate itself first. The initiator can, usually is required to authenticate itself first. The initiator can,
however, learn that the responder supports IKE and what cryptographic however, learn that the responder supports IKE and what cryptographic
protocols it supports. The responder (or someone impersonating the protocols it supports. The responder (or someone impersonating the
responder) can probe the initiator not only for its identity, but responder) not only can probe the initiator for its identity but may,
using CERTREQ payloads may be able to determine what certificates the by using CERTREQ payloads, be able to determine what certificates the
initiator is willing to use. initiator is willing to use.
Use of EAP authentication changes the probing possibilities somewhat. Use of EAP authentication changes the probing possibilities somewhat.
When EAP authentication is used, the responder proves its identity When EAP authentication is used, the responder proves its identity
before the initiator does, so an initiator that knew the name of a before the initiator does, so an initiator that knew the name of a
valid initiator could probe the responder for both its name and valid initiator could probe the responder for both its name and
certificates. certificates.
Repeated rekeying using CREATE_CHILD_SA without additional Diffie- Repeated rekeying using CREATE_CHILD_SA without additional Diffie-
Hellman exchanges leaves all SAs vulnerable to cryptanalysis of a Hellman exchanges leaves all SAs vulnerable to cryptanalysis of a
skipping to change at page 122, line 37 skipping to change at page 125, line 20
The IKE_SA_INIT and IKE_AUTH exchanges happen before the initiator The IKE_SA_INIT and IKE_AUTH exchanges happen before the initiator
has been authenticated. As a result, an implementation of this has been authenticated. As a result, an implementation of this
protocol needs to be completely robust when deployed on any insecure protocol needs to be completely robust when deployed on any insecure
network. Implementation vulnerabilities, particularly DoS attacks, network. Implementation vulnerabilities, particularly DoS attacks,
can be exploited by unauthenticated peers. This issue is can be exploited by unauthenticated peers. This issue is
particularly worrisome because of the unlimited number of messages in particularly worrisome because of the unlimited number of messages in
EAP-based authentication. EAP-based authentication.
The strength of all keys is limited by the size of the output of the The strength of all keys is limited by the size of the output of the
negotiated PRF. For this reason, a PRF whose output is less than 128 negotiated PRF. For this reason, a PRF whose output is less than
bits (e.g., 3DES-CBC) MUST NOT be used with this protocol. 128 bits (e.g., 3DES-CBC) MUST NOT be used with this protocol.
The security of this protocol is critically dependent on the The security of this protocol is critically dependent on the
randomness of the randomly chosen parameters. These should be randomness of the randomly chosen parameters. These should be
generated by a strong random or properly seeded pseudorandom source generated by a strong random or properly seeded pseudorandom source
(see [RANDOMNESS]). Implementers should take care to ensure that use (see [RANDOMNESS]). Implementers should take care to ensure that use
of random numbers for both keys and nonces is engineered in a fashion of random numbers for both keys and nonces is engineered in a fashion
that does not undermine the security of the keys. that does not undermine the security of the keys.
For information on the rationale of many of the cryptographic design For information on the rationale of many of the cryptographic design
choices in this protocol, see [SIGMA] and [SKEME]. Though the choices in this protocol, see [SIGMA] and [SKEME]. Though the
skipping to change at page 124, line 30 skipping to change at page 127, line 13
a great deal of leeway in defining the security policy for a trusted a great deal of leeway in defining the security policy for a trusted
peer's identity, credentials, and the correlation between them, peer's identity, credentials, and the correlation between them,
having such security policy defined explicitly is essential to a having such security policy defined explicitly is essential to a
secure implementation. secure implementation.
5.1. Traffic Selector Authorization 5.1. Traffic Selector Authorization
IKEv2 relies on information in the Peer Authorization Database (PAD) IKEv2 relies on information in the Peer Authorization Database (PAD)
when determining what kind of Child SAs a peer is allowed to create. when determining what kind of Child SAs a peer is allowed to create.
This process is described in Section 4.4.3 of [IPSECARCH]. When a This process is described in Section 4.4.3 of [IPSECARCH]. When a
peer requests the creation of an Child SA with some Traffic peer requests the creation of a Child SA with some Traffic Selectors,
Selectors, the PAD must contain "Child SA Authorization Data" linking the PAD must contain "Child SA Authorization Data" linking the
the identity authenticated by IKEv2 and the addresses permitted for identity authenticated by IKEv2 and the addresses permitted for
Traffic Selectors. Traffic Selectors.
For example, the PAD might be configured so that authenticated For example, the PAD might be configured so that authenticated
identity "sgw23.example.com" is allowed to create Child SAs for identity "sgw23.example.com" is allowed to create Child SAs for
192.0.2.0/24, meaning this security gateway is a valid 192.0.2.0/24, meaning this security gateway is a valid
"representative" for these addresses. Host-to-host IPsec requires "representative" for these addresses. Host-to-host IPsec requires
similar entries, linking, for example, "fooserver4.example.com" with similar entries, linking, for example, "fooserver4.example.com" with
198.51.100.66/32, meaning this identity is a valid "owner" or 198.51.100.66/32, meaning this identity is a valid "owner" or
"representative" of the address in question. "representative" of the address in question.
skipping to change at page 125, line 40 skipping to change at page 128, line 24
configuration in most circumstances. See [H2HIPSEC] for an extensive configuration in most circumstances. See [H2HIPSEC] for an extensive
discussion about this issue, and the limitations of host-to-host discussion about this issue, and the limitations of host-to-host
IPsec in general. IPsec in general.
6. IANA Considerations 6. IANA Considerations
[IKEV2] defined many field types and values. IANA has already [IKEV2] defined many field types and values. IANA has already
registered those types and values in [IKEV2IANA], so they are not registered those types and values in [IKEV2IANA], so they are not
listed here again. listed here again.
One item has been deprecated from the IKEv2 Certificate Encodings One item has been deprecated from the "IKEv2 Certificate Encodings"
table: "Raw RSA Key". registry: "Raw RSA Key".
IANA has updated all references to RFC 5996 to point to this IANA has updated all references to RFC 5996 to point to this
document. document.
7. Acknowledgements 7. References
Many individuals in the IPsecME Working Group were very helpful in
contributing ideas and text for this document, as well as in
reviewing the clarifications suggested by others.
The acknowledgements from the IKEv2 document were:
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, John
Ioannidis, Charlie Kaufman, Steve Kent, Angelos Keromytis, Tero
Kivinen, Hugo Krawczyk, Andrew Krywaniuk, Radia Perlman, Omer
Reingold, and Michael Richardson. 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 Smyslov helped refine the design of the
Traffic Selector negotiation.
8. References
8.1. Normative References 7.1. Normative References
[ADDGROUP] [ADDGROUP] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
Diffie-Hellman groups for Internet Key Exchange (IKE)", Diffie-Hellman groups for Internet Key Exchange (IKE)",
RFC 3526, May 2003. RFC 3526, May 2003,
<http://www.rfc-editor.org/info/rfc3526>.
[ADDRIPV6] [ADDRIPV6] Hinden, R. and S. Deering, "IP Version 6 Addressing
Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006,
Architecture", RFC 4291, February 2006. <http://www.rfc-editor.org/info/rfc4291>.
[AEAD] Black, D. and D. McGrew, "Using Authenticated Encryption [AEAD] Black, D. and D. McGrew, "Using Authenticated Encryption
Algorithms with the Encrypted Payload of the Internet Key Algorithms with the Encrypted Payload of the Internet Key
Exchange version 2 (IKEv2) Protocol", RFC 5282, Exchange version 2 (IKEv2) Protocol", RFC 5282, August
August 2008. 2008, <http://www.rfc-editor.org/info/rfc5282>.
[AESCMACPRF128] [AESCMACPRF128]
Song, J., Poovendran, R., Lee, J., and T. Iwata, "The Song, J., Poovendran, R., Lee, J., and T. Iwata, "The
Advanced Encryption Standard-Cipher-based Message Advanced Encryption Standard-Cipher-based Message
Authentication Code-Pseudo-Random Function-128 (AES-CMAC- Authentication Code-Pseudo-Random Function-128 (AES-CMAC-
PRF-128) Algorithm for the Internet Key Exchange Protocol PRF-128) Algorithm for the Internet Key Exchange Protocol
(IKE)", RFC 4615, August 2006. (IKE)", RFC 4615, August 2006,
<http://www.rfc-editor.org/info/rfc4615>.
[AESXCBCPRF128] [AESXCBCPRF128]
Hoffman, P., "The AES-XCBC-PRF-128 Algorithm for the Hoffman, P., "The AES-XCBC-PRF-128 Algorithm for the
Internet Key Exchange Protocol (IKE)", RFC 4434, Internet Key Exchange Protocol (IKE)", RFC 4434, February
February 2006. 2006, <http://www.rfc-editor.org/info/rfc4434>.
[EAP] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. [EAP] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H.
Levkowetz, "Extensible Authentication Protocol (EAP)", Levkowetz, "Extensible Authentication Protocol (EAP)", RFC
RFC 3748, June 2004. 3748, June 2004, <http://www.rfc-editor.org/info/rfc3748>.
[ECN] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition [ECN] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition
of Explicit Congestion Notification (ECN) to IP", of Explicit Congestion Notification (ECN) to IP", RFC
RFC 3168, September 2001. 3168, September 2001,
<http://www.rfc-editor.org/info/rfc3168>.
[ESPCBC] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher [ESPCBC] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher
Algorithms", RFC 2451, November 1998. Algorithms", RFC 2451, November 1998,
<http://www.rfc-editor.org/info/rfc2451>.
[HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[IKEV2IANA] [IKEV2IANA]
"Internet Key Exchange Version 2 (IKEv2) Parameters", <htt IANA, "Internet Key Exchange Version 2 (IKEv2)
p://www.iana.org/assignments/ikev2-parameters/ Parameters",
ikev2-parameters.xhtml>. <http://www.iana.org/assignments/ikev2-parameters/>.
[IPSECARCH] [IPSECARCH]
Kent, S. and K. Seo, "Security Architecture for the Kent, S. and K. Seo, "Security Architecture for the
Internet Protocol", RFC 4301, December 2005. Internet Protocol", RFC 4301, December 2005,
<http://www.rfc-editor.org/info/rfc4301>.
[MUSTSHOULD] [MUSTSHOULD]
Bradner, S., "Key words for use in RFCs to Indicate Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[PKCS1] Jonsson, J. and B. Kaliski, "Public-Key Cryptography [PKCS1] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
Standards (PKCS) #1: RSA Cryptography Specifications Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1", RFC 3447, February 2003. Version 2.1", RFC 3447, February 2003,
<http://www.rfc-editor.org/info/rfc3447>.
[PKIX] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [PKIX] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, May 2008. (CRL) Profile", RFC 5280, May 2008,
<http://www.rfc-editor.org/info/rfc5280>.
[RFC4307] Schiller, J., "Cryptographic Algorithms for Use in the [RFC4307] Schiller, J., "Cryptographic Algorithms for Use in the
Internet Key Exchange Version 2 (IKEv2)", RFC 4307, Internet Key Exchange Version 2 (IKEv2)", RFC 4307,
December 2005. December 2005, <http://www.rfc-editor.org/info/rfc4307>.
[UDPENCAPS] [UDPENCAPS]
Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M.
Stenberg, "UDP Encapsulation of IPsec ESP Packets", Stenberg, "UDP Encapsulation of IPsec ESP Packets", RFC
RFC 3948, January 2005. 3948, January 2005,
<http://www.rfc-editor.org/info/rfc3948>.
[URLS] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [URLS] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66, RFC
RFC 3986, January 2005. 3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>.
8.2. Informative References 7.2. Informative References
[AH] Kent, S., "IP Authentication Header", RFC 4302, [AH] Kent, S., "IP Authentication Header", RFC 4302, December
December 2005. 2005, <http://www.rfc-editor.org/info/rfc4302>.
[ARCHGUIDEPHIL] [ARCHGUIDEPHIL]
Bush, R. and D. Meyer, "Some Internet Architectural Bush, R. and D. Meyer, "Some Internet Architectural
Guidelines and Philosophy", RFC 3439, December 2002. Guidelines and Philosophy", RFC 3439, December 2002,
<http://www.rfc-editor.org/info/rfc3439>.
[ARCHPRINC] [ARCHPRINC]
Carpenter, B., "Architectural Principles of the Internet", Carpenter, B., "Architectural Principles of the Internet",
RFC 1958, June 1996. RFC 1958, June 1996,
<http://www.rfc-editor.org/info/rfc1958>.
[Clarif] Eronen, P. and P. Hoffman, "IKEv2 Clarifications and [Clarif] Eronen, P. and P. Hoffman, "IKEv2 Clarifications and
Implementation Guidelines", RFC 4718, October 2006. Implementation Guidelines", RFC 4718, October 2006,
<http://www.rfc-editor.org/info/rfc4718>.
[DES] American National Standards Institute, "American National [DES] American National Standards Institute, "American National
Standard for Information Systems-Data Link Encryption", Standard for Information Systems-Data Link Encryption",
ANSI X3.106, 1983. ANSI X3.106, 1983.
[DH] Diffie, W. and M. Hellman, "New Directions in [DH] Diffie, W. and M. Hellman, "New Directions in
Cryptography", IEEE Transactions on Information Theory, Cryptography", IEEE Transactions on Information Theory,
V.IT-22 n. 6, June 1977. V.IT-22 n. 6, June 1977.
[DIFFSERVARCH] [DIFFSERVARCH]
Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z.,
and W. Weiss, "An Architecture for Differentiated and W. Weiss, "An Architecture for Differentiated
Services", RFC 2475, December 1998. Services", RFC 2475, December 1998,
<http://www.rfc-editor.org/info/rfc2475>.
[DIFFSERVFIELD] [DIFFSERVFIELD]
Nichols, K., Blake, S., Baker, F., and D. Black, Nichols, K., Blake, S., Baker, F., and D. Black,
"Definition of the Differentiated Services Field (DS "Definition of the Differentiated Services Field (DS
Field) in the IPv4 and IPv6 Headers", RFC 2474, Field) in the IPv4 and IPv6 Headers", RFC 2474, December
December 1998. 1998, <http://www.rfc-editor.org/info/rfc2474>.
[DIFFTUNNEL] [DIFFTUNNEL]
Black, D., "Differentiated Services and Tunnels", Black, D., "Differentiated Services and Tunnels", RFC
RFC 2983, October 2000. 2983, October 2000,
<http://www.rfc-editor.org/info/rfc2983>.
[DOI] Piper, D., "The Internet IP Security Domain of [DOI] Piper, D., "The Internet IP Security Domain of
Interpretation for ISAKMP", RFC 2407, November 1998. Interpretation for ISAKMP", RFC 2407, November 1998,
<http://www.rfc-editor.org/info/rfc2407>.
[DOSUDPPROT] [DOSUDPPROT]
C. Kaufman, R. Perlman, and B. Sommerfeld, "DoS protection Kaufman, C., Perlman, R., and B. Sommerfeld, "DoS
for UDP-based protocols", ACM Conference on Computer and protection for UDP-based protocols", ACM Conference on
Communications Security, October 2003. Computer and Communications Security, October 2003.
[DSS] National Institute of Standards and Technology, U.S. [DSS] National Institute of Standards and Technology, U.S.
Department of Commerce, "Digital Signature Standard", Department of Commerce, "Digital Signature Standard
Draft FIPS 186-3, June 2008. (DSS)", FIPS 186-4, July 2013,
<http://nvlpubs.nist.gov/nistpubs/FIPS/
NIST.FIPS.186-4.pdf>.
[EAI] Yang, A., Steele, S., and N. Freed, "Internationalized [EAI] Yang, A., Steele, S., and N. Freed, "Internationalized
Email Headers", RFC 6532, February 2012. Email Headers", RFC 6532, February 2012,
<http://www.rfc-editor.org/info/rfc6532>.
[EAP-IANA] [EAP-IANA] IANA, "Extensible Authentication Protocol (EAP) Registry:
"Extensible Authentication Protocol (EAP) Registry: Method Method Types",
Types", <http://www.iana.org>. <http://http://www.iana.org/assignments/eap-eke/>.
[EAPMITM] N. Asokan, V. Nierni, and K. Nyberg, "Man-in-the-Middle in [EAPMITM] Asokan, N., Niemi, V., and K. Nyberg, "Man-in-the-Middle
Tunneled Authentication Protocols", November 2002, in Tunneled Authentication Protocols", November 2002,
<http://eprint.iacr.org/2002/163>. <http://eprint.iacr.org/2002/163>.
[ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", [ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC
RFC 4303, December 2005. 4303, December 2005,
<http://www.rfc-editor.org/info/rfc4303>.
[EXCHANGEANALYSIS] [EXCHANGEANALYSIS]
R. Perlman and C. Kaufman, "Analysis of the IPsec key Perlman, R. and C. Kaufman, "Analysis of the IPsec key
exchange Standard", WET-ICE Security Conference, MIT, exchange Standard", WET-ICE Security Conference, MIT,
2001, 2001, <http://www.computer.org/csdl/proceedings/
<http://sec.femto.org/wetice-2001/papers/radia-paper.pdf>. wetice/2001/1269/00/12690150.pdf>.
[H2HIPSEC] [FIPS.180-4.2012]
Aura, T., Roe, M., and A. Mohammed, "Experiences with National Institute of Standards and Technology, U.S.
Department of Commerce, "Secure Hash Standard (SHS)", FIPS
180-4, March 2012,
<http://csrc.nist.gov/publications/fips/fips180-4/
fips-180-4.pdf>.
[H2HIPSEC] Aura, T., Roe, M., and A. Mohammed, "Experiences with
Host-to-Host IPsec", 13th International Workshop on Host-to-Host IPsec", 13th International Workshop on
Security Protocols, Cambridge, UK, April 2005. Security Protocols, Cambridge, UK, April 2005.
[HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104, February
February 1997. 1997, <http://www.rfc-editor.org/info/rfc2104>.
[IDEA] X. Lai, "On the Design and Security of Block Ciphers", ETH [IDEA] Lai, X., "On the Design and Security of Block Ciphers",
Series in Information Processing, v. 1, Konstanz: Hartung- ETH Series in Information Processing, v. 1, Konstanz:
Gorre Verlag, 1992. Hartung-Gorre Verlag, 1992.
[IDNA] Klensin, J., "Internationalized Domain Names for [IDNA] Klensin, J., "Internationalized Domain Names for
Applications (IDNA): Definitions and Document Framework", Applications (IDNA): Definitions and Document Framework",
RFC 5890, August 2010. RFC 5890, August 2010,
<http://www.rfc-editor.org/info/rfc5890>.
[IKEV1] Harkins, D. and D. Carrel, "The Internet Key Exchange [IKEV1] Harkins, D. and D. Carrel, "The Internet Key Exchange
(IKE)", RFC 2409, November 1998. (IKE)", RFC 2409, November 1998,
<http://www.rfc-editor.org/info/rfc2409>.
[IKEV2] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", [IKEV2] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", RFC
RFC 4306, December 2005. 4306, December 2005,
<http://www.rfc-editor.org/info/rfc4306>.
[IP] Postel, J., "Internet Protocol", STD 5, RFC 791, [IP] Postel, J., "Internet Protocol", STD 5, RFC 791, September
September 1981. 1981, <http://www.rfc-editor.org/info/rfc791>.
[IP-COMP] Shacham, A., Monsour, B., Pereira, R., and M. Thomas, "IP [IP-COMP] Shacham, A., Monsour, B., Pereira, R., and M. Thomas, "IP
Payload Compression Protocol (IPComp)", RFC 3173, Payload Compression Protocol (IPComp)", RFC 3173,
September 2001. September 2001, <http://www.rfc-editor.org/info/rfc3173>.
[IPSECARCH-OLD] [IPSECARCH-OLD]
Kent, S. and R. Atkinson, "Security Architecture for the Kent, S. and R. Atkinson, "Security Architecture for the
Internet Protocol", RFC 2401, November 1998. Internet Protocol", RFC 2401, November 1998,
<http://www.rfc-editor.org/info/rfc2401>.
[IPV6CONFIG] [IPV6CONFIG]
Eronen, P., Laganier, J., and C. Madson, "IPv6 Eronen, P., Laganier, J., and C. Madson, "IPv6
Configuration in Internet Key Exchange Protocol Version 2 Configuration in Internet Key Exchange Protocol Version 2
(IKEv2)", RFC 5739, February 2010. (IKEv2)", RFC 5739, February 2010,
<http://www.rfc-editor.org/info/rfc5739>.
[ISAKMP] Maughan, D., Schneider, M., and M. Schertler, "Internet [ISAKMP] Maughan, D., Schneider, M., and M. Schertler, "Internet
Security Association and Key Management Protocol Security Association and Key Management Protocol
(ISAKMP)", RFC 2408, November 1998. (ISAKMP)", RFC 2408, November 1998,
<http://www.rfc-editor.org/info/rfc2408>.
[MAILFORMAT] [MAILFORMAT]
Resnick, P., Ed., "Internet Message Format", RFC 5322, Resnick, P., Ed., "Internet Message Format", RFC 5322,
October 2008. October 2008, <http://www.rfc-editor.org/info/rfc5322>.
[MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, [MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
April 1992. April 1992, <http://www.rfc-editor.org/info/rfc1321>.
[MIPV6] Perkins, C., Johnson, D., and J. Arkko, "Mobility Support [MIPV6] Perkins, C., Johnson, D., and J. Arkko, "Mobility Support
in IPv6", RFC 6275, July 2011. in IPv6", RFC 6275, July 2011,
<http://www.rfc-editor.org/info/rfc6275>.
[MLDV2] Vida, R. and L. Costa, "Multicast Listener Discovery [MLDV2] Vida, R. and L. Costa, "Multicast Listener Discovery
Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. Version 2 (MLDv2) for IPv6", RFC 3810, June 2004,
<http://www.rfc-editor.org/info/rfc3810>.
[MOBIKE] Eronen, P., "IKEv2 Mobility and Multihoming Protocol [MOBIKE] Eronen, P., "IKEv2 Mobility and Multihoming Protocol
(MOBIKE)", RFC 4555, June 2006. (MOBIKE)", RFC 4555, June 2006,
<http://www.rfc-editor.org/info/rfc4555>.
[MODES] National Institute of Standards and Technology, U.S. [MODES] Dworkin, M., "Recommendation for Block Cipher Modes of
Department of Commerce, "Recommendation for Block Cipher Operation", National Institute of Standards and
Modes of Operation", SP 800-38A, 2001. Technology, NIST Special Publication 800-38A 2001 Edition,
December 2001.
[NAI] Aboba, B., Beadles, M., Arkko, J., and P. Eronen, "The [NAI] Aboba, B., Beadles, M., Arkko, J., and P. Eronen, "The
Network Access Identifier", RFC 4282, December 2005. Network Access Identifier", RFC 4282, December 2005,
<http://www.rfc-editor.org/info/rfc4282>.
[NATREQ] Aboba, B. and W. Dixon, "IPsec-Network Address Translation [NATREQ] Aboba, B. and W. Dixon, "IPsec-Network Address Translation
(NAT) Compatibility Requirements", RFC 3715, March 2004. (NAT) Compatibility Requirements", RFC 3715, March 2004,
<http://www.rfc-editor.org/info/rfc3715>.
[OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol", [OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol", RFC
RFC 2412, November 1998. 2412, November 1998,
<http://www.rfc-editor.org/info/rfc2412>.
[PFKEY] McDonald, D., Metz, C., and B. Phan, "PF_KEY Key [PFKEY] McDonald, D., Metz, C., and B. Phan, "PF_KEY Key
Management API, Version 2", RFC 2367, July 1998. Management API, Version 2", RFC 2367, July 1998,
<http://www.rfc-editor.org/info/rfc2367>.
[PHOTURIS] [PHOTURIS] Karn, P. and W. Simpson, "Photuris: Session-Key Management
Karn, P. and W. Simpson, "Photuris: Session-Key Management Protocol", RFC 2522, March 1999,
Protocol", RFC 2522, March 1999. <http://www.rfc-editor.org/info/rfc2522>.
[RANDOMNESS] [RANDOMNESS]
Eastlake, D., Schiller, J., and S. Crocker, "Randomness Eastlake 3rd, D., Schiller, J., and S. Crocker,
Requirements for Security", BCP 106, RFC 4086, June 2005. "Randomness Requirements for Security", BCP 106, RFC 4086,
June 2005, <http://www.rfc-editor.org/info/rfc4086>.
[REAUTH] Nir, Y., "Repeated Authentication in Internet Key Exchange [REAUTH] Nir, Y., "Repeated Authentication in Internet Key Exchange
(IKEv2) Protocol", RFC 4478, April 2006. (IKEv2) Protocol", RFC 4478, April 2006,
<http://www.rfc-editor.org/info/rfc4478>.
[REUSE] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In [REUSE] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In
Diffie-Hellman Key Agreement Protocols", December 2008, < Diffie-Hellman Key Agreement Protocols", December 2008,
http://www.cacr.math.uwaterloo.ca/techreports/2008/ <http://www.cacr.math.uwaterloo.ca/techreports/2008/
cacr2008-24.pdf>. cacr2008-24.pdf>.
[RFC4945] Korver, B., "The Internet IP Security PKI Profile of [RFC4945] Korver, B., "The Internet IP Security PKI Profile of
IKEv1/ISAKMP, IKEv2, and PKIX", RFC 4945, August 2007. IKEv1/ISAKMP, IKEv2, and PKIX", RFC 4945, August 2007,
<http://www.rfc-editor.org/info/rfc4945>.
[RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, [RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen,
"Internet Key Exchange Protocol Version 2 (IKEv2)", "Internet Key Exchange Protocol Version 2 (IKEv2)", RFC
RFC 5996, September 2010. 5996, September 2010,
<http://www.rfc-editor.org/info/rfc5996>.
[RFC6989] Sheffer, Y. and S. Fluhrer, "Additional Diffie-Hellman [RFC6989] Sheffer, Y. and S. Fluhrer, "Additional Diffie-Hellman
Tests for the Internet Key Exchange Protocol Version 2 Tests for the Internet Key Exchange Protocol Version 2
(IKEv2)", RFC 6989, July 2013. (IKEv2)", RFC 6989, July 2013,
<http://www.rfc-editor.org/info/rfc6989>.
[ROHCV2] Ertekin, E., Christou, C., Jasani, R., Kivinen, T., and C. [ROHCV2] Ertekin, E., Christou, C., Jasani, R., Kivinen, T., and C.
Bormann, "IKEv2 Extensions to Support Robust Header Bormann, "IKEv2 Extensions to Support Robust Header
Compression over IPsec", RFC 5857, May 2010. Compression over IPsec", RFC 5857, May 2010,
<http://www.rfc-editor.org/info/rfc5857>.
[SHA] National Institute of Standards and Technology, U.S.
Department of Commerce, "Secure Hash Standard",
FIPS 180-3, October 2008.
[SIGMA] H. Krawczyk, "SIGMA: the `SIGn-and-MAc' Approach to [SIGMA] Krawczyk, H., "SIGMA: the 'SIGn-and-MAc' Approach to
Authenticated Diffie-Hellman and its Use in the IKE Authenticated Diffie-Hellman and its Use in the IKE
Protocols", Advances in Cryptography - CRYPTO 2003 Protocols", Advances in Cryptography - CRYPTO 2003
Proceedings LNCS 2729, 2003, <http:// Proceedings LNCS 2729, 2003,
www.informatik.uni-trier.de/~ley/db/conf/crypto/ <http://www.informatik.uni-trier.de/~ley/db/conf/crypto/
crypto2003.html>. crypto2003.html>.
[SKEME] H. Krawczyk, "SKEME: A Versatile Secure Key Exchange [SKEME] Krawczyk, H., "SKEME: A Versatile Secure Key Exchange
Mechanism for Internet", IEEE Proceedings of the 1996 Mechanism for Internet", IEEE Proceedings of the 1996
Symposium on Network and Distributed Systems Security , Symposium on Network and Distributed Systems Security,
1996. 1996.
[TRANSPARENCY] [TRANSPARENCY]
Carpenter, B., "Internet Transparency", RFC 2775, Carpenter, B., "Internet Transparency", RFC 2775, February
February 2000. 2000, <http://www.rfc-editor.org/info/rfc2775>.
Appendix A. Summary of Changes from IKEv1 Appendix A. Summary of Changes from IKEv1
The goals of this revision to IKE are: The goals of this revision to IKE are:
1. To define the entire IKE protocol in a single document, 1. To define the entire IKE protocol in a single document,
replacing RFCs 2407, 2408, and 2409 and incorporating subsequent replacing RFCs 2407, 2408, and 2409 and incorporating subsequent
changes to support NAT Traversal, Extensible Authentication, and changes to support NAT traversal, Extensible Authentication, and
Remote Address acquisition; Remote Address acquisition;
2. To simplify IKE by replacing the eight different initial 2. To simplify IKE by replacing the eight different initial
exchanges with a single four-message exchange (with changes in exchanges with a single four-message exchange (with changes in
authentication mechanisms affecting only a single AUTH payload authentication mechanisms affecting only a single AUTH payload
rather than restructuring the entire exchange) see rather than restructuring the entire exchange) see
[EXCHANGEANALYSIS]; [EXCHANGEANALYSIS];
3. To remove the Domain of Interpretation (DOI), Situation (SIT), 3. To remove the Domain of Interpretation (DOI), Situation (SIT),
and Labeled Domain Identifier fields, and the Commit and and Labeled Domain Identifier fields, and the Commit and
Authentication only bits; Authentication only bits;
4. To decrease IKE's latency in the common case by making the 4. To decrease IKE's latency in the common case by making the
initial exchange be 2 round trips (4 messages), and allowing the initial exchange be 2 round trips (4 messages), and allowing the
ability to piggyback setup of a Child SA on that exchange; ability to piggyback setup of a Child SA on that exchange;
skipping to change at page 135, line 7 skipping to change at page 138, line 17
This appendix contains a short summary of the IKEv2 exchanges, and This appendix contains a short summary of the IKEv2 exchanges, and
what payloads can appear in which message. This appendix is purely what payloads can appear in which message. This appendix is purely
informative; if it disagrees with the body of this document, the informative; if it disagrees with the body of this document, the
other text is considered correct. other text is considered correct.
Vendor ID (V) payloads may be included in any place in any message. Vendor ID (V) payloads may be included in any place in any message.
This sequence here shows what are the most logical places for them. This sequence here shows what are the most logical places for them.
C.1. IKE_SA_INIT Exchange C.1. IKE_SA_INIT Exchange
request --> [N(COOKIE)], request --> [N(COOKIE),]
SA, KE, Ni, SA, KE, Ni,
[N(NAT_DETECTION_SOURCE_IP)+, [N(NAT_DETECTION_SOURCE_IP)+,
N(NAT_DETECTION_DESTINATION_IP)], N(NAT_DETECTION_DESTINATION_IP),]
[V+][N+] [V+][N+]
normal response <-- SA, KE, Nr, normal response <-- SA, KE, Nr,
(no cookie) [N(NAT_DETECTION_SOURCE_IP), (no cookie) [N(NAT_DETECTION_SOURCE_IP),
N(NAT_DETECTION_DESTINATION_IP)], N(NAT_DETECTION_DESTINATION_IP),]
[[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [[N(HTTP_CERT_LOOKUP_SUPPORTED),] CERTREQ+,]
[V+][N+] [V+][N+]
cookie response <-- N(COOKIE), cookie response <-- N(COOKIE),
[V+][N+] [V+][N+]
different Diffie- <-- N(INVALID_KE_PAYLOAD), different Diffie- <-- N(INVALID_KE_PAYLOAD),
Hellman group [V+][N+] Hellman group [V+][N+]
wanted wanted
C.2. IKE_AUTH Exchange without EAP C.2. IKE_AUTH Exchange without EAP
request --> IDi, [CERT+], request --> IDi, [CERT+,]
[N(INITIAL_CONTACT)], [N(INITIAL_CONTACT),]
[[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [[N(HTTP_CERT_LOOKUP_SUPPORTED),] CERTREQ+,]
[IDr], [IDr,]
AUTH, AUTH,
[CP(CFG_REQUEST)], [CP(CFG_REQUEST),]
[N(IPCOMP_SUPPORTED)+], [N(IPCOMP_SUPPORTED)+,]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, TSi, TSr, SA, TSi, TSr,
[V+][N+] [V+][N+]
response <-- IDr, [CERT+], response <-- IDr, [CERT+,]
AUTH, AUTH,
[CP(CFG_REPLY)], [CP(CFG_REPLY),]
[N(IPCOMP_SUPPORTED)], [N(IPCOMP_SUPPORTED),]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, TSi, TSr, SA, TSi, TSr,
[N(ADDITIONAL_TS_POSSIBLE)], [N(ADDITIONAL_TS_POSSIBLE),]
[V+][N+] [V+][N+]
error in Child SA <-- IDr, [CERT+], error in Child SA <-- IDr, [CERT+,]
creation AUTH, creation AUTH,
N(error), N(error),
[V+][N+] [V+][N+]
C.3. IKE_AUTH Exchange with EAP C.3. IKE_AUTH Exchange with EAP
first request --> IDi, first request --> IDi,
[N(INITIAL_CONTACT)], [N(INITIAL_CONTACT),]
[[N(HTTP_CERT_LOOKUP_SUPPORTED)], CERTREQ+], [[N(HTTP_CERT_LOOKUP_SUPPORTED),] CERTREQ+,]
[IDr], [IDr,]
[CP(CFG_REQUEST)], [CP(CFG_REQUEST),]
[N(IPCOMP_SUPPORTED)+], [N(IPCOMP_SUPPORTED)+,]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, TSi, TSr, SA, TSi, TSr,
[V+][N+] [V+][N+]
first response <-- IDr, [CERT+], AUTH, first response <-- IDr, [CERT+,] AUTH,
EAP, EAP,
[V+][N+] [V+][N+]
/ --> EAP / --> EAP
repeat 1..N times | repeat 1..N times |
\ <-- EAP \ <-- EAP
last request --> AUTH last request --> AUTH
last response <-- AUTH, last response <-- AUTH,
[CP(CFG_REPLY)], [CP(CFG_REPLY),]
[N(IPCOMP_SUPPORTED)], [N(IPCOMP_SUPPORTED),]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, TSi, TSr, SA, TSi, TSr,
[N(ADDITIONAL_TS_POSSIBLE)], [N(ADDITIONAL_TS_POSSIBLE),]
[V+][N+] [V+][N+]
C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying Child SAs C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying Child SAs
request --> [N(REKEY_SA)], request --> [N(REKEY_SA),]
[CP(CFG_REQUEST)], [CP(CFG_REQUEST),]
[N(IPCOMP_SUPPORTED)+], [N(IPCOMP_SUPPORTED)+,]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, Ni, [KEi], TSi, TSr SA, Ni, [KEi,] TSi, TSr,
[V+][N+] [V+][N+]
normal <-- [CP(CFG_REPLY)], normal <-- [CP(CFG_REPLY),]
response [N(IPCOMP_SUPPORTED)], response [N(IPCOMP_SUPPORTED),]
[N(USE_TRANSPORT_MODE)], [N(USE_TRANSPORT_MODE),]
[N(ESP_TFC_PADDING_NOT_SUPPORTED)], [N(ESP_TFC_PADDING_NOT_SUPPORTED),]
[N(NON_FIRST_FRAGMENTS_ALSO)], [N(NON_FIRST_FRAGMENTS_ALSO),]
SA, Nr, [KEr], TSi, TSr, SA, Nr, [KEr,] TSi, TSr,
[N(ADDITIONAL_TS_POSSIBLE)] [N(ADDITIONAL_TS_POSSIBLE),]
[V+][N+] [V+][N+]
error case <-- N(error) error case <-- N(error)
different Diffie- <-- N(INVALID_KE_PAYLOAD), different Diffie- <-- N(INVALID_KE_PAYLOAD),
Hellman group [V+][N+] Hellman group [V+][N+]
wanted wanted
C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE SA C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE SA
request --> SA, Ni, KEi request --> SA, Ni, KEi,
[V+][N+] [V+][N+]
response <-- SA, Nr, KEr response <-- SA, Nr, KEr,
[V+][N+] [V+][N+]
C.6. INFORMATIONAL Exchange C.6. INFORMATIONAL Exchange
request --> [N+], request --> [N+,]
[D+], [D+,]
[CP(CFG_REQUEST)] [CP(CFG_REQUEST)]
response <-- [N+], response <-- [N+,]
[D+], [D+,]
[CP(CFG_REPLY)] [CP(CFG_REPLY)]
Acknowledgements
Many individuals in the IPsecME Working Group were very helpful in
contributing ideas and text for this document, as well as in
reviewing the clarifications suggested by others.
The acknowledgements from the IKEv2 document were:
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, John
Ioannidis, Charlie Kaufman, Steve Kent, Angelos Keromytis, Tero
Kivinen, Hugo Krawczyk, Andrew Krywaniuk, Radia Perlman, Omer
Reingold, and Michael Richardson. 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 Smyslov helped refine the design of the
Traffic Selector negotiation.
Authors' Addresses Authors' Addresses
Charlie Kaufman Charlie Kaufman
Microsoft Microsoft
1 Microsoft Way 1 Microsoft Way
Redmond, WA 98052 Redmond, WA 98052
US United States
Phone: 1-425-707-3335 EMail: charliekaufman@outlook.com
EMail: charliek@microsoft.com
Paul Hoffman Paul Hoffman
VPN Consortium VPN Consortium
127 Segre Place 127 Segre Place
Santa Cruz, CA 95060 Santa Cruz, CA 95060
US United States
Phone: 1-831-426-9827 Phone: 1-831-426-9827
EMail: paul.hoffman@vpnc.org EMail: paul.hoffman@vpnc.org
Yoav Nir Yoav Nir
Check Point Software Technologies Ltd. Check Point Software Technologies Ltd.
5 Hasolelim St. 5 Hasolelim St.
Tel Aviv 6789735 Tel Aviv 6789735
Israel Israel
EMail: ynir@checkpoint.com EMail: ynir.ietf@gmail.com
Pasi Eronen Pasi Eronen
Independent Independent
EMail: pe@iki.fi EMail: pe@iki.fi
Tero Kivinen Tero Kivinen
INSIDE Secure INSIDE Secure
Eerikinkatu 28 Eerikinkatu 28
HELSINKI FI-00180 HELSINKI FI-00180
FI Finland
EMail: kivinen@iki.fi EMail: kivinen@iki.fi
 End of changes. 274 change blocks. 
721 lines changed or deleted 786 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/