RFC5996(IKEv2)_1

Internet Engineering Task Force (IETF)                        C. Kaufman
Request for Comments: 5996                                     Microsoft
Obsoletes: 4306, 4718                                         P. Hoffman
Category: Standards Track                                 VPN Consortium
ISSN: 2070-1721                                                   Y. Nir
                                                             Check Point
                                                               P. Eronen
                                                             Independent
                                                          September 2010


            Internet Key Exchange Protocol Version 2 (IKEv2)

Abstract

   This document describes version 2 of the Internet Key Exchange (IKE)
   protocol.  IKE is a component of IPsec used for performing mutual
   authentication and establishing and maintaining Security Associations
   (SAs).  This document replaces and updates RFC 4306, and includes all
   of the clarifications from RFC 4718.
     Internet Key Exchange(IKE) version 2について説明する。
   IKEは相互認証とSecurity Association(SA)の管理に使用されるIPsecの構成要素である。
   このドキュメントにはRFC 4306、RFC 4718からの変更点がすべて含まれている。

Status of This Memo

   This is an Internet Standards Track document.
   Internet Standards Trackドキュメントである。
     
   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.
   Internet標準化の詳細はRFC 5741 Section 2参照。

   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/rfc5996.
   正誤表などの情報はhttp://www.rfc-editor.org/info/rfc5996参照。

Kaufman, et al.              Standards Track                    [Page 1]

RFC 5996                        IKEv2bis                  September 2010


Copyright Notice

   Copyright (c) 2010 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.

Table of Contents

   1. Introduction ....................................................5
      1.1. Usage Scenarios ............................................6
           1.1.1. Security Gateway to Security Gateway in
                  Tunnel Mode .........................................7
           1.1.2. Endpoint-to-Endpoint Transport Mode .................7
           1.1.3. Endpoint to Security Gateway in Tunnel Mode .........8
           1.1.4. Other Scenarios .....................................9
      1.2. The Initial Exchanges ......................................9
      1.3. The CREATE_CHILD_SA Exchange ..............................13
           1.3.1. Creating New Child SAs with the
                  CREATE_CHILD_SA Exchange ...........................14
           1.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA
                  Exchange ...........................................15
           1.3.3. Rekeying Child SAs with the CREATE_CHILD_SA
                  Exchange ...........................................16
      1.4. The INFORMATIONAL Exchange ................................17
           1.4.1. Deleting an SA with INFORMATIONAL Exchanges ........17
      1.5. Informational Messages outside of an IKE SA ...............18
      1.6. Requirements Terminology ..................................19

Kaufman, et al.              Standards Track                    [Page 2]

RFC 5996                        IKEv2bis                  September 2010


      1.7. Significant Differences between RFC 4306 and This
           Document ..................................................20
   2. IKE Protocol Details and Variations ............................22
      2.1. Use of Retransmission Timers ..............................23
      2.2. Use of Sequence Numbers for Message ID ....................24
      2.3. Window Size for Overlapping Requests ......................25
      2.4. State Synchronization and Connection Timeouts .............26
      2.5. Version Numbers and Forward Compatibility .................28
      2.6. IKE SA SPIs and Cookies ...................................30
           2.6.1. Interaction of COOKIE and INVALID_KE_PAYLOAD .......33
      2.7. Cryptographic Algorithm Negotiation .......................34
      2.8. Rekeying ..................................................34
           2.8.1. Simultaneous Child SA Rekeying .....................36
           2.8.2. Simultaneous IKE SA Rekeying .......................39
           2.8.3. Rekeying the IKE SA versus Reauthentication ........40
      2.9. Traffic Selector Negotiation ..............................40
           2.9.1. Traffic Selectors Violating Own Policy .............43
      2.10. Nonces ...................................................44
      2.11. Address and Port Agility .................................44
      2.12. Reuse of Diffie-Hellman Exponentials .....................44
      2.13. Generating Keying Material ...............................45
      2.14. Generating Keying Material for the IKE SA ................46
      2.15. Authentication of the IKE SA .............................47
      2.16. Extensible Authentication Protocol Methods ...............50
      2.17. Generating Keying Material for Child SAs .................52
      2.18. Rekeying IKE SAs Using a CREATE_CHILD_SA Exchange ........53
      2.19. Requesting an Internal Address on a Remote Network .......53
      2.20. Requesting the Peer's Version ............................55
      2.21. Error Handling ...........................................56
           2.21.1. Error Handling in IKE_SA_INIT .....................56
           2.21.2. Error Handling in IKE_AUTH ........................57
           2.21.3. Error Handling after IKE SA is Authenticated ......58
           2.21.4. Error Handling Outside IKE SA .....................58
      2.22. IPComp ...................................................59
      2.23. NAT Traversal ............................................60
           2.23.1. Transport Mode NAT Traversal ......................64
      2.24. Explicit Congestion Notification (ECN) ...................68
      2.25. Exchange Collisions ......................................68
           2.25.1. Collisions while Rekeying or Closing Child SAs ....69
           2.25.2. Collisions while Rekeying or Closing IKE SAs ......69
   3. Header and Payload Formats .....................................69
      3.1. The IKE Header ............................................70
      3.2. Generic Payload Header ....................................73
      3.3. Security Association Payload ..............................75
           3.3.1. Proposal Substructure ..............................78
           3.3.2. Transform Substructure .............................79
           3.3.3. Valid Transform Types by Protocol ..................82
           3.3.4. Mandatory Transform IDs ............................83

Kaufman, et al.              Standards Track                    [Page 3]

RFC 5996                        IKEv2bis                  September 2010

           3.3.5. Transform Attributes ...............................84
           3.3.6. Attribute Negotiation ..............................86
      3.4. Key Exchange Payload ......................................87
      3.5. Identification Payloads ...................................87
      3.6. Certificate Payload .......................................90
      3.7. Certificate Request Payload ...............................93
      3.8. Authentication Payload ....................................95
      3.9. Nonce Payload .............................................96
      3.10. Notify Payload ...........................................97
           3.10.1. Notify Message Types ..............................98
      3.11. Delete Payload ..........................................101
      3.12. Vendor ID Payload .......................................102
      3.13. Traffic Selector Payload ................................103
           3.13.1. Traffic Selector .................................105
      3.14. Encrypted Payload .......................................107
      3.15. Configuration Payload ...................................109
           3.15.1. Configuration Attributes .........................110
           3.15.2. Meaning of INTERNAL_IP4_SUBNET and
                   INTERNAL_IP6_SUBNET ..............................113
           3.15.3. Configuration Payloads for IPv6 ..................115
           3.15.4. Address Assignment Failures ......................116
      3.16. Extensible Authentication Protocol (EAP) Payload ........117
   4. Conformance Requirements ......................................118
   5. Security Considerations .......................................120
      5.1. Traffic Selector Authorization ...........................123
   6. IANA Considerations ...........................................124
   7. Acknowledgements ..............................................125
   8. References ....................................................126
      8.1. Normative References .....................................126
      8.2. Informative References ...................................127
   Appendix A. Summary of Changes from IKEv1 ........................132
   Appendix B. Diffie-Hellman Groups ................................133
     B.1. Group 1 - 768-bit MODP ....................................133
     B.2. Group 2 - 1024-bit MODP ...................................133
   Appendix C.  Exchanges and Payloads ..............................134
     C.1. IKE_SA_INIT Exchange  .....................................134
     C.2. IKE_AUTH Exchange without EAP .............................135
     C.3. IKE_AUTH Exchange with EAP  ...............................136
     C.4. CREATE_CHILD_SA Exchange for Creating or Rekeying
          Child SAs .................................................137
     C.5. CREATE_CHILD_SA Exchange for Rekeying the IKE SA ..........137
     C.6. INFORMATIONAL Exchange ....................................137

Kaufman, et al.              Standards Track                    [Page 4]

RFC 5996                        IKEv2bis                  September 2010


1.  Introduction

   IP Security (IPsec) provides confidentiality, data integrity, access
   control, and data source authentication to IP datagrams.  These
   services are provided by maintaining shared state between the source
   and the sink of an IP datagram.  This state defines, among other
   things, the specific services provided to the datagram, which
   cryptographic algorithms will be used to provide the services, and
   the keys used as input to the cryptographic algorithms.
   IP Security(IPsec)は機密性、データ完全性、アクセス制御、認証を提供する。これらのサービスはIP datagramの送受信側の間で状態を共有し維持することで提供される。この状態は、datagramに適用されるサービス(サービス提供のために使用される暗号化アルゴリズム、暗号化アルゴリズムに入力されるキー)を定義する。
     
   Establishing this shared state in a manual fashion does not scale
   well.  Therefore, a protocol to establish this state dynamically is
   needed.  This document describes such a protocol -- the Internet Key
   Exchange (IKE).  Version 1 of IKE was defined in RFCs 2407 [DOI],
   2408 [ISAKMP], and 2409 [IKEV1].  IKEv2 replaced all of those RFCs.
   IKEv2 was defined in [IKEV2] (RFC 4306) and was clarified in [Clarif]
   (RFC 4718).  This document replaces and updates RFC 4306 and RFC
   4718.  IKEv2 was a change to the IKE protocol that was not backward
   compatible.  In contrast, the current document not only provides a
   clarification of IKEv2, but makes minimum changes to the IKE
   protocol.  A list of the significant differences between RFC 4306 and
   this document is given in Section 1.7.
     手動でこの状態の共有を確立することはscale(規模に対して)しない。そのため、動的に状態を確立するプロトコルが必要である。このドキュメントではそのようなプロトコル Internet Key Exchange(IKE)について説明する。
   IKE version 1はRFC 2407 [DOI]、RFC 2408 [ISAKMP]、RFC 2409 [IKEV1]で定義された。IKEv2はそれらのRFCをすべて置き換える。IKEv2はRFC4306[IKEV2]で定義され、RFC4718[Clarif]で明確化された。このドキュメントはRFC4306とRFC4718を更新する。IKEv2は下位互換のないIKEプロトコルの変更である。このドキュメントはIKEv2の定義だけでなく、IKEプロトコルの変更点も含む。
   RFC4306とこのドキュメントの主要な変更点はSection 1.7に示される。
     
   IKE performs mutual authentication between two parties and
   establishes an IKE security association (SA) that includes shared
   secret information that can be used to efficiently establish SAs for
   Encapsulating Security Payload (ESP) [ESP] or Authentication Header
   (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
   "suite" or "cryptographic suite" refers to a complete set of
   algorithms used to protect an SA.  An initiator proposes one or more
   suites by listing supported algorithms that can be combined into
   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.
   The SAs for ESP or AH that get set up through that IKE SA we call
   "Child SAs".
     IKEは2者間の相互認証を行い、Encapsulating Security Payload(ESP) or Authentication Header(AH)を使用するためのIKE security association(SA)の確立、SAによる暗号化アルゴリズムの初期化をする。
   このドキュメントでは、"suite" or "cryptographic suite"はSAを保護するために使用するアルゴリズムのすべてを意味する。Initiatorはサポートアルゴリズムの組み合わせの中から1つ以上のsuiteを提案する。IKEはESP/AH SAにIP Commpression(IPComp)[IP-COMP]の使用をネゴシエーションできる。IKE SAで設定されるESP/AHのためのSAを"Child SA"という。

   All IKE communications consist of pairs of messages: a request and a
   response.  The pair is called an "exchange", and is sometimes called
   a "request/response pair".  The first exchange of messages
   establishing an IKE SA are called the IKE_SA_INIT and IKE_AUTH
   exchanges; subsequent IKE exchanges are called the CREATE_CHILD_SA or
   INFORMATIONAL exchanges.  In the common case, there is a single
   IKE_SA_INIT exchange and a single IKE_AUTH exchange (a total of four
   messages) to establish the IKE SA and the first Child SA.  In
   exceptional cases, there may be more than one of each of these
   exchanges.  In all cases, all IKE_SA_INIT exchanges MUST complete
   before any other exchange type, then all IKE_AUTH exchanges MUST
   complete, and following that, any number of CREATE_CHILD_SA and
   INFORMATIONAL exchanges may occur in any order.  In some scenarios,
   only a single Child SA is needed between the IPsec endpoints, and
   therefore there would be no additional exchanges.  Subsequent
   exchanges MAY be used to establish additional Child SAs between the
   same authenticated pair of endpoints and to perform housekeeping
   functions.
     すべてのIKE通信はRequest/Responseのメッセージのペアで構成される。そのペアは"exchange"といい、"request/response pair"ともいう。
   IKE SAを最初のexchangeはIKE_SA_INIT exchange and IKE_SA_AUTH exchangeという。その後のIKE exchangeはCREATE_CHILD_SA echange or INFORMATIONAL exchangeという。
   一般的に、IKE_SA_INIT exchangeとIKE_AUTH exchange(計4メッセージ)によりIKE SAとChild SAが確立される。例外的な場合、これらのexchangeが複数あってもよい。すべての場合において、IKE_SA_INIT exchangeは他のexchange typeの前に完了し、次にIKE_AUTHが完了していること。次にCREATE_CHILD_SA exchangeおよびINFORMATIONAL exchangeが任意のタイミングで発生する。
   1 Child SAのみIPsec endpointで必要とされている場合、追加のexchangeはない。
   その後のexchangeはChild SA追加やhousekeeping機能(DPD)のために使用してよい。

   An IKE message flow always consists of a request followed by a
   response.  It is the responsibility of the requester to ensure
   reliability.  If the response is not received within a timeout
   interval, the requester needs to retransmit the request (or abandon
   the connection).
   IKEメッセージフローは常にrequestとresponseで構成される。信頼性を保証するのはrequesterの責任である。
   responseがタイムアウト時間内に受信されない場合、requesterはrequestを再送するか、接続を放棄する。
     
   The first exchange of an IKE session, IKE_SA_INIT, negotiates
   security parameters for the IKE SA, sends nonces, and sends Diffie-
   Hellman values.
   IKEセッションの最初のexchange(IKE_SA_INIT)はIKE SAのためのパラメータをネゴシエーションし、nonce、Difiie-Hellman値を送信する。
     
   The second exchange, IKE_AUTH, transmits identities, proves knowledge
   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
   failure setting up the AH or ESP Child SA, in which case the IKE SA
   is still established without the Child SA).
   第2のexchange(IKE_AUTH)は双方で認証済みのidentityを送信し、AH/ESPのChild SAをセットアップする。AH/ESP Child SAの設定に失敗がなければ(その場合、IKE SAがChild SA無しで確立する)。
     
   The types of subsequent exchanges are CREATE_CHILD_SA (which creates
   a Child SA) and INFORMATIONAL (which deletes an SA, reports error
   conditions, or does other housekeeping).  Every request requires a
   response.  An INFORMATIONAL request with no payloads (other than the
   empty Encrypted payload required by the syntax) is commonly used as a
   check for liveness.  These subsequent exchanges cannot be used until
   the initial exchanges have completed.
   その後のexchangeはCREATE_CHILD_SA(Child SAを作成する)、INFORMATIONAL(SAの削除、エラー状態の報告、housekeeping)である。
   すべてのrequestはresponseを必要とする。
   payloadがない(パケット構造上、必要なempty Encrypted payloadは除く)INFORMATIONAL requestは生存性チェックに使用される。
   最初のexchangeが完了するまでこれらのexchangeを使用することはできない。
     
   In the description that follows, we assume that no errors occur.
   Modifications to the flow when errors occur are described in
   Section 2.21.
   以下の説明はエラーが発生しないことを仮定している。
   エラーが発生するフローはSection 2.21で述べる。
     
1.1.  Usage Scenarios

   IKE is used to negotiate ESP or AH SAs in a number of different
   scenarios, each with its own special requirements.
   IKEは様々なシナリオと、それぞれ独自の要求をもつEAP/AH SAのネゴシエーションのために使用される。

Kaufman, et al.              Standards Track                    [Page 6]

RFC 5996                        IKEv2bis                  September 2010

 

1.1.1.  Security Gateway to Security Gateway in Tunnel Mode

                +-+-+-+-+-+            +-+-+-+-+-+
                |         | IPsec      |         |
   Protected    |Tunnel   | tunnel     |Tunnel   |     Protected
   Subnet   <-->|Endpoint |<---------->|Endpoint |<--> Subnet
                |         |            |         |
                +-+-+-+-+-+            +-+-+-+-+-+

          Figure 1:  Security Gateway to Security Gateway Tunnel

   In this scenario, neither endpoint of the IP connection implements
   IPsec, but network nodes between them protect traffic for part of the
   way.  Protection is transparent to the endpoints, and depends on
   ordinary routing to send packets through the tunnel endpoints for
   processing.  Each endpoint would announce the set of addresses
   "behind" it, and packets would be sent in tunnel mode where the inner
   IP header would contain the IP addresses of the actual endpoints.
   このシナリオでは、IP接続するendpointはIPsecを実装していないが、接続するノードのトラフィックは保護される。endpointの保護は透過的ありTunnel Endpoint間で処理される。各endpointはアドレス(inner IP)を割り当てると、inner IPヘッダは実際のTunnel PointのIPアドレス(Outer)によりTunnel Modeで送信される。

1.1.2.  Endpoint-to-Endpoint Transport Mode

   +-+-+-+-+-+                                          +-+-+-+-+-+
   |         |                 IPsec transport          |         |
   |Protected|                or tunnel mode SA         |Protected|
   |Endpoint |<---------------------------------------->|Endpoint |
   |         |                                          |         |
   +-+-+-+-+-+                                          +-+-+-+-+-+

                    Figure 2:  Endpoint to Endpoint

   In this scenario, both endpoints of the IP connection implement
   IPsec, as required of hosts in [IPSECARCH].  Transport mode will
   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
   endpoints MAY implement application-layer access controls based on
   the IPsec authenticated identities of the participants.  This
   scenario enables the end-to-end security that has been a guiding
   principle for the Internet since [ARCHPRINC], [TRANSPARENCY], and a
   method of limiting the inherent problems with complexity in networks
   noted by [ARCHGUIDEPHIL].  Although this scenario may not be fully
   applicable to the IPv4 Internet, it has been deployed successfully in
   specific scenarios within intranets using IKEv1.  It should be more
   broadly enabled during the transition to IPv6 and with the adoption
   of IKEv2.
        このシナリオでは、IP接続する両方のendpointでIPsecを実装する。Transport modeでは一般的にinner IP headerは使用されない。
   一組のアドレスがこのSAによって保護されるパケットのためにネゴシエーションされる。
   endpointはIPsecのIdentityに基づき、アプリケーション層のアクセス制御を実装してもよい(SPD的なこと。)。このシナリオでは、end-to-endの機密性を確保できる。このシナリオはIKEv1を使用したシナリオのIPv4インターネットでは完全に適用できない場合がある。IPv6の使用とIKEv2の適用が必要である。

Kaufman, et al.              Standards Track                    [Page 7]

RFC 5996                        IKEv2bis                  September 2010


   It is possible in this scenario that one or both of the protected
   endpoints will be behind a network address translation (NAT) node, in
   which case the tunneled packets will have to be UDP encapsulated so
   that port numbers in the UDP headers can be used to identify
   individual endpoints "behind" the NAT (see Section 2.23).
        NAT配下に複数のノードがあり、UDPカプセル化する必要がある場合、NAT配下で各エンドポイントを識別する。(Section 2.23参照)

1.1.3.  Endpoint to Security Gateway in Tunnel Mode

   +-+-+-+-+-+                          +-+-+-+-+-+
   |         |         IPsec            |         |     Protected
   |Protected|         tunnel           |Tunnel   |     Subnet
   |Endpoint |<------------------------>|Endpoint |<--- and/or
   |         |                          |         |     Internet
   +-+-+-+-+-+                          +-+-+-+-+-+

              Figure 3:  Endpoint to Security Gateway Tunnel

   In this scenario, a protected endpoint (typically a portable roaming
   computer) connects back to its corporate network through an IPsec-
   protected tunnel.  It might use this tunnel only to access
   information on the corporate network, or it might tunnel all of its
   traffic back through the corporate network in order to take advantage
   of protection provided by a corporate firewall against Internet-based
   attacks.  In either case, the protected endpoint will want an IP
   address associated with the security gateway so that packets returned
   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
   gateway.  In support of the latter case, IKEv2 includes a mechanism
   (namely, configuration payloads) for the initiator to request an IP
   address owned by the security gateway for use for the duration of its
   SA.
このシナリオでは、保護されたエンドポイント(PC等)はIPsecで保護されたトンネルを経由して企業ネットワークに接続する。企業ネットワークの情報にアクセスするためにはトンネルを使用する必要があってよい。保護されたエンドポイントはSeGWにIPアドレスを要求し、SeGWはそれを返す。このIPアドレスは静的/動的にSeGWから割り当てられる。通常は動的で払いだされ、IKEv2にはSeGWにSAに使用するIPアドレスをinitiatorが要求するメカニズム(Configuration Payload)が存在する。

   In this scenario, packets will use tunnel mode.  On each packet from
   the protected endpoint, the outer IP header will contain the source
   IP address associated with its current location (i.e., the address
   that will get traffic routed to the endpoint directly), while 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
   the security gateway for forwarding to the endpoint).  The outer
   destination address will always be that of the security gateway,
   while the inner destination address will be the ultimate destination
   for the packet.
        このシナリオでは、パケットはトンネルモードを使用する。保護されたエンドポイントのパケットは、Outer IPヘッダーにはエンドポイントのlocationの送信先IPアドレス(エンドポイントが直接ルーティングするIPアドレス)が設定され、Inner IPヘッダーにはSeGWに割り当てられた送信元IPアドレス(SeGWがルーティングするIPアドレス)を設定する。outer宛先IPアドレスはSeGW、Inner宛先IPアドレスは最終的な宛先のものになる。

   In this scenario, it is possible that the protected endpoint will be
   behind a NAT.  In that case, the IP address as seen by the security
   gateway will not be the same as the IP address sent by the protected
   endpoint, and packets will have to be UDP encapsulated in order to be
   routed properly.  Interaction with NATs is covered in detail in
   Section 2.23.
     このシナリオでは保護されたエンドポイントがNAT配下にあってもよい。その場合、SeGWが認識するIPアドレスは保護されたエンドポイントから送信されたものとは異なるため、パケットはUDPカプセル化される必要がある。
   NATとの相互運用はSection 2.23で述べる。

1.1.4.  Other Scenarios

   Other scenarios are possible, as are nested combinations of the
   above.  One notable example combines aspects of Sections 1.1.1 and
   1.1.3.  A subnet may make all external accesses through a remote
   security gateway using an IPsec tunnel, where the addresses on the
   subnet are routed to the security gateway by the rest of the
   Internet.  An example would be someone's home network being virtually
   on the Internet with static IP addresses even though connectivity is
   provided by an ISP that assigns a single dynamically assigned IP
   address to the user's security gateway (where the static IP addresses
   and an IPsec relay are provided by a third party located elsewhere).
        上記を組み合わせた他のシナリオもある。例はSection 1.1.1(Tunnel Mode)とSection 1.1.3(Endpoint-SeGW)の組み合わせである。サブネットからSeGWにIPsec Tunnel で接続し、外部アクセスをする。例えば、ホームネットワークではISPから固定IPを割り当てられるが、実際はユーザのSeGWからダイナミックにIPアドレスを割り当てられている。(静的IPアドレスとIPsec relayは第三者によって提供される。)

1.2.  The Initial Exchanges

   Communication using IKE always begins with IKE_SA_INIT and IKE_AUTH
   exchanges (known in IKEv1 as Phase 1).  These initial exchanges
   normally consist of four messages, though in some scenarios that
   number can grow.  All communications using IKE consist of request/
   response pairs.  We'll describe the base exchange first, followed by
   variations.  The first pair of messages (IKE_SA_INIT) negotiate
   cryptographic algorithms, exchange nonces, and do a Diffie-Hellman
   exchange [DH].
        IKEの通信は常に、IKE_SA_INIT exchange and IKE_AUTH exchangeから始まる。
   これらのinitial exchangeはシナリオによって増えるが、通常は4つのメッセージで構成される。すべてのIKEの通信はrequest/responseのペアで構成される。このexchangeの後、他のバリエーションを説明する。
   最初のメッセージ(IKE_SA_INIT)は暗号化アルゴリズムのネゴシエーション、nonce、Diffie-Hellmanのexchangeをする。


   The second pair of messages (IKE_AUTH) authenticate the previous
   messages, exchange identities and certificates, and establish the
   first Child SA.  Parts of these messages are encrypted and integrity
   protected with keys established through the IKE_SA_INIT exchange, so
   the identities are hidden from eavesdroppers and all fields in all
   the messages are authenticated.  See Section 2.14 for information on
   how the encryption keys are generated.  (A man-in-the-middle attacker
   who cannot complete the IKE_AUTH exchange can nonetheless see the
   identity of the initiator.)
        第2のメッセージ(INIT_AUTH)は前のメッセージの認証、identity、証明書を認証し、Child SAを確立する。
   これらのメッセージの一部はIKE_SA_INIT exchangeにより確立されたkeyにより暗号化/完全性保証されるため、identityは盗聴者から隠蔽され、メッセージのフィールドが認証される。暗号化キー生成の詳細についてはSection 2.14参照。

   All messages following the initial exchange are cryptographically
   protected using the cryptographic algorithms and keys negotiated in
   the IKE_SA_INIT exchange.  These subsequent messages use the syntax
   of the Encrypted payload described in Section 3.14, encrypted with
   keys that are derived as described in Section 2.14.  All subsequent
   messages include an Encrypted payload, even if they are referred to
   in the text as "empty".  For the CREATE_CHILD_SA, IKE_AUTH, or
   INFORMATIONAL exchanges, the message following the header is
   encrypted and the message including the header is integrity protected
   using the cryptographic algorithms negotiated for the IKE SA.
        initial exchange以降のメッセージはIKE_SA_INIT exchangeの暗号化アルゴリズム、キーにより保護される。
   これらのメッセージにはSection 2.14で導出されたキーで暗号化され、Section 3.14のEncrypted payloadが使用される。以降のすべてのメッセージは"empty"と書かれていてもEncrypted payloadを含んでいる。
   CREATE_CHILD_SA exhange、IKE_AUTH exhange、INFORMATIONAL exhangeは、IKE SAでネゴシエーションされたアルゴリズムを用いて、ヘッダーに続くメッセージが暗号化されており、ヘッダーを含むメッセージ全体は完全性保証されている。

 

Kaufman, et al.              Standards Track                    [Page 9]

RFC 5996                        IKEv2bis                  September 2010


   Every IKE message contains a Message ID as part of its fixed header.
   This Message ID is used to match up requests and responses, and to
   identify retransmissions of messages.
        すべてのIKEメッセージは固定ヘッダーの一部にメッセージIDを含む。
   このメッセージIDはrequest/responseの一致確認と再送確認のために使用される。

   In the following descriptions, the payloads contained in the message
   are indicated by names as listed below.
        以下の説明では、メッセージのpayloadは下記の名前で示される。

   Notation    Payload
   -----------------------------------------
   AUTH        Authentication
   CERT        Certificate
   CERTREQ     Certificate Request
   CP          Configuration
   D           Delete
   EAP         Extensible Authentication
   HDR         IKE header (not a payload)
   IDi         Identification - Initiator
   IDr         Identification - Responder
   KE          Key Exchange
   Ni, Nr      Nonce
   N           Notify
   SA          Security Association
   SK          Encrypted and Authenticated
   TSi         Traffic Selector - Initiator
   TSr         Traffic Selector - Responder
   V           Vendor ID

   The details of the contents of each payload are described in section
   3.  Payloads that may optionally appear will be shown in brackets,
   such as [CERTREQ]; this indicates that a Certificate Request payload
   can optionally be included.
        各payloadの詳細はSection 3に記載される。オプションのpayloadは[CERTREQ]のように括弧内に表示される。これはCertificate Request payloadをオプションで含めることができることを示している。

   The initial exchanges are as follows:
        initial exchangeを下記に示す。

   Initiator                         Responder
   -------------------------------------------------------------------
   HDR, SAi1, KEi, Ni  -->

   HDR contains the Security Parameter Indexes (SPIs), version numbers,
   and flags of various sorts.  The SAi1 payload states the
   cryptographic algorithms the initiator supports for the IKE SA.  The
   KE payload sends the initiator's Diffie-Hellman value.  Ni is the
   initiator's nonce.
        HDRはSecurity Parameter Index(SPI)、バージョン番号、様々なflagを含む。SAi1 payloadはinitiatorがIKE SAのためにサポートしている暗号化アルゴリズムを示す。
   KE paylaodはinitiatorのDiffie-Hellman値である。Niはinitiatorのnonceである。

                                <--  HDR, SAr1, KEr, Nr, [CERTREQ]

 

 


Kaufman, et al.              Standards Track                   [Page 10]

RFC 5996                        IKEv2bis                  September 2010


   The responder chooses a cryptographic suite from the initiator's
   offered choices and expresses that choice in the SAr1 payload,
   completes the Diffie-Hellman exchange with the KEr payload, and sends
   its nonce in the Nr payload.
        responderはinitiatorが提供した選択肢からcryptographic suiteを選択しSAr1 payloadに設定する。KEr payloadでDiffie-Hellman exchangeを完了し、nonceをNr payloadで送信する。

   At this point in the negotiation, each party can generate SKEYSEED,
   from which all keys are derived for that IKE SA.  The messages that
   follow are encrypted and integrity protected in their entirety, with
   the exception of the message headers.  The keys used for the
   encryption and integrity protection are derived from SKEYSEED and are
   known as SK_e (encryption) and SK_a (authentication, a.k.a. integrity
   protection); see Sections 2.13 and 2.14 for details on the key
   derivation.  A separate SK_e and SK_a is computed for each direction.
   In addition to the keys SK_e and SK_a derived from the Diffie-Hellman
   value for protection of the IKE SA, another quantity SK_d is derived
   and used for derivation of further keying material for Child SAs.
   The notation SK { ... } indicates that these payloads are encrypted
   and integrity protected using that direction's SK_e and SK_a.
        ネゴシエーションのこの時点では、各endpointはIKE SAのキーを導出するSKEYSEEDを生成する。続くメッセージはメッセージヘッダを除いて暗号化され、完全性保証される。
   暗号化と完全性保証に使用されるキーはSKEYSEEDとSK_e(encryption)、SK_a(authentication, a.k.a, integrity protection)があるキー導出の詳細はSection 2.13、2.14参照。個々のSK_eとSK_aは各方向(initiator/responder)で計算できる。IKE SAの保護に使用するDiffie-Hellman値から得られたSK_e、SK_aとSK_dがその他の要素とともにChild SAに使用される。表記SK{...}はpayloadの暗号化と完全性保証がその方向のSK_eとSK_aでされていることを表す。

   HDR, SK {IDi, [CERT,] [CERTREQ,]
       [IDr,] AUTH, SAi2,
       TSi, TSr}  -->

   The initiator asserts its identity with the IDi payload, proves
   knowledge of the secret corresponding to IDi and integrity protects
   the contents of the first message using the AUTH payload (see
   Section 2.15).  It might also send its certificate(s) in CERT
   payload(s) and a list of its trust anchors in CERTREQ payload(s).  If
   any CERT payloads are included, the first certificate provided MUST
   contain the public key used to verify the AUTH field.
        InitiatorはIDi payloadでIDを送信し、IDiに対してAUTH payloadを使用して認証する。CERT payloadで証明書、CERTREQ payloadでtrust anchorのリストを送信する。
   CERT payloadが含まれている場合、最初の証明書はAUTH filedを検証するために使用する公開鍵を含むこと。

   trust anchor:ルートCA

   The optional payload IDr enables the initiator to specify to which of
   the responder's identities it wants to talk.  This is useful when the
   machine on which the responder is running is hosting multiple
   identities at the same IP address.  If the IDr proposed by the
   initiator is not acceptable to the responder, the responder might use
   some other IDr to finish the exchange.  If the initiator then does
   not accept the fact that responder used an IDr different than the one
   that was requested, the initiator can close the SA after noticing the
   fact.
オプションのIDrはinitiatorが通信するresponderのIDを指定できる。これはresponderが動作しているマシンが同じIPアドレスで複数のIDを持っている場合に便利である。Initiatorによって提示されたIDrをresponderが許可しない場合、Responderはexchangeを終了するために他のIDrを使用してもよい。Initiatorはresponderが要求したIDrを許容できない場合、SAをcloseしてよい。

   The Traffic Selectors (TSi and TSr) are discussed in Section 2.9.
   Traffic Selector (TSi and TSr)はSection 2.9で述べる。
     
   The initiator begins negotiation of a Child SA using the SAi2
   payload.  The final fields (starting with SAi2) are described in the
   description of the CREATE_CHILD_SA exchange.
   initiatorはSAi2 payloadを使用してChild SAのネゴシエーションを開始する。最後のフィールド(SAi2から始まる)はCREATE_CHILD_SA exchangeに記載されている。

Kaufman, et al.              Standards Track                   [Page 11]

RFC 5996                        IKEv2bis                  September 2010


                                <--  HDR, SK {IDr, [CERT,] AUTH,
                                         SAr2, TSi, TSr}

   The responder asserts its identity with the IDr payload, optionally
   sends one or more certificates (again with the certificate containing
   the public key used to verify AUTH listed first), authenticates its
   identity and protects the integrity of the second message with the
   AUTH payload, and completes negotiation of a Child SA with the
   additional fields described below in the CREATE_CHILD_SA exchange.
        ResponderはIDr paylaodでIDを通知し、オプションで一つ以上の証明書を送信し(最初のAUTHを検証するために使用される公開鍵を含む証明書)、IDを認証し2回目以降のAUTH payloadの完全性保護をし、Child SAのネゴシエーションを完了する。

   Both parties in the IKE_AUTH exchange MUST verify that all signatures
   and Message Authentication Codes (MACs) are computed correctly.  If
   either side uses a shared secret for authentication, the names in the
   ID payload MUST correspond to the key used to generate the AUTH
   payload.
   IKE AUTH exchangeにおける双方はすべての署名とMessage Authentication Code(MAC)の検証をすること。どちらかが認証にshared方式を使っている場合、ID payloadのnameはAUTH payloadを生成するキーと同じであること。
     
   Because the initiator sends its Diffie-Hellman value in the
   IKE_SA_INIT, it must guess the Diffie-Hellman group that the
   responder will select from its list of supported groups.  If the
   initiator guesses wrong, the responder will respond with a Notify
   payload of type INVALID_KE_PAYLOAD indicating the selected group.  In
   this case, the initiator MUST retry the IKE_SA_INIT with the
   corrected Diffie-Hellman group.  The initiator MUST again propose its
   full set of acceptable cryptographic suites because the rejection
   message was unauthenticated and otherwise an active attacker could
   trick the endpoints into negotiating a weaker suite than a stronger
   one that they both prefer.
     InitiatorはIKE_SA_INITでDiffie-Hellman値を送信するため、responderが選択するグループを推測すること。initiatorの設定が合わなかった場合、responderは選択されたgroupを示すINVALID_KE_PAYLOAD typeのNotify payloadで応答する。その場合、Initiatorは変更したDiffie-Hellman groupでIKE_SA_INITを再試行してよい。Initiatorはフルセットのcryptographic suitesを提示すること。なぜなら、rejection messageは認証されていないのと、中間攻撃者が弱いcryptographic suiteにネゴシエーションしようとするのを防ぐため。

   If creating the Child SA during the IKE_AUTH exchange fails for some
   reason, the IKE SA is still created as usual.  The list of Notify
   message types in the IKE_AUTH exchange that do not prevent an IKE SA
   from being set up include at least the following: NO_PROPOSAL_CHOSEN,
   TS_UNACCEPTABLE, SINGLE_PAIR_REQUIRED, INTERNAL_ADDRESS_FAILURE, and
   FAILED_CP_REQUIRED.
        IKE_AUTH exchangeでChild SAの作成が失敗した場合でもIKE SAは作成される。IKE SAが許可するIKE_AUTH exchangeのNotify messageは、NO_PROPOSAL_CHOSEN, TS_UNACCEPTABLE, SINGLE_PAIR_REQUIRED, INTERNAL_ADDRESS_FAILURE, and
   FAILED_CP_REQUIREDがある。

   If the failure is related to creating the IKE SA (for example, an
   AUTHENTICATION_FAILED Notify error message is returned), the IKE SA
   is not created.  Note that although the IKE_AUTH messages are
   encrypted and integrity protected, if the peer receiving this Notify
   error message has not yet authenticated the other end (or if the peer
   fails to authenticate the other end for some reason), the information
   needs to be treated with caution.  More precisely, assuming that the
   MAC verifies correctly, the sender of the error Notify message is
   known to be the responder of the IKE_SA_INIT exchange, but the
   sender's identity cannot be assured.
   障害がIKE SAの作成に関連している場合(例:AUTHENTICATION_FAULED Notify error messageが返ってきた場合)、IKE SAは作成されない。IKE_AUTH messageは暗号化と完全性保護されているが、Notify error massageを受信したpeerが送信側peerを認証していない場合、その情報は慎重に扱う必要がある。正確にいうと、MACが正しいと仮定すると、error Nitufy messageのIKE_SA_INIT exchangeの受信者であるとわかるが、送信者のIDはまだ保証されていないため。

Kaufman, et al.              Standards Track                   [Page 12]

RFC 5996                        IKEv2bis                  September 2010


   Note that IKE_AUTH messages do not contain KEi/KEr or Ni/Nr payloads.
   Thus, the SA payloads in the IKE_AUTH exchange cannot contain
   Transform Type 4 (Diffie-Hellman group) with any value other than
   NONE.  Implementations SHOULD omit the whole transform substructure
   instead of sending value NONE.
        IKE_AUTH messageがKEi/KEr、Ni/Nr payloadを含まないことに注意せよ。IKE_AUTH exchangeにおけるSA payloadにはNONE以外のTransform Type 4(Diffie-Hellman group)を含めることはできない。実装ではNONEを送信しないにする実装にすること。

1.3.  The CREATE_CHILD_SA Exchange

   The CREATE_CHILD_SA exchange is used to create new Child SAs and to
   rekey both IKE SAs and Child SAs.  This exchange consists of a single
   request/response pair, and some of its function was referred to as a
   Phase 2 exchange in IKEv1.  It MAY be initiated by either end of the
   IKE SA after the initial exchanges are completed.
        CREATE_CHILD_SA exchangeは新しいChild SAの作成とIKE SA/Child SAのrekeyに使用される。このexchangeは一つのrequest/responseで構成され、IKEv1のPhase 2 exchangeと呼ばれていた。IKE SAが終わった後はどちら側からも開始してよい。

   An SA is rekeyed by creating a new SA and then deleting the old one.
   This section describes the first part of rekeying, the creation of
   new SAs; Section 2.8 covers the mechanics of rekeying, including
   moving traffic from old to new SAs and the deletion of the old SAs.
   The two sections must be read together to understand the entire
   process of rekeying.
        SAは新しいSAを作成し、古いSAを削除することでrekeyされる。rekeyingと新しいSAの生成について述べる。Section 2.8では古いSAから新しいSAへのトラフィックの移動、古いSAの削除等のrekeyの仕組みを述べる。2つのSectionはrekeyを理解するために一緒に読むこと。

   Either endpoint may initiate a CREATE_CHILD_SA exchange, so in this
   section the term initiator refers to the endpoint initiating this
   exchange.  An implementation MAY refuse all CREATE_CHILD_SA requests
   within an IKE SA.
        どちらのエンドポイントからでもCREATE_CHILD_SA exchangeを開始できる。このSectionのinitiatorはexchangeを開始するエンドポイントを意味する。実装では、IKE SA内のすべてのCREATE_CHILD_SA requestを拒否してもよい。

   The CREATE_CHILD_SA request MAY optionally contain a KE payload for
   an additional Diffie-Hellman exchange to enable stronger guarantees
   of forward secrecy for the Child SA.  The keying material for the
   Child SA is a function of SK_d established during the establishment
   of the IKE SA, the nonces exchanged during the CREATE_CHILD_SA
   exchange, and the Diffie-Hellman value (if KE payloads are included
   in the CREATE_CHILD_SA exchange).
        CREATE_CHILD_SA requestは、必要に応じてChild SAのforward secrecyのため、Diffie-Hellman exchangeをKE payloadを含んでよい。KE payloadがCREATE_CHILD_SAに含まれている場合、Child SAのためのnonce、Diffie-Hellman valueはSK_dはIKE SAのCREATE_CHILD_SA exchangeで交換される。

   If a CREATE_CHILD_SA exchange includes a KEi payload, at least one of
   the SA offers MUST include the Diffie-Hellman group of the KEi.  The
   Diffie-Hellman group of the KEi MUST be an element of the group the
   initiator expects the responder to accept (additional Diffie-Hellman
   groups can be proposed).  If the responder selects a proposal using a
   different Diffie-Hellman group (other than NONE), the responder MUST
   reject the request and indicate its preferred Diffie-Hellman group in
   the INVALID_KE_PAYLOAD Notify payload.  There are two octets of data
   associated with this notification: the accepted Diffie-Hellman group
   number in big endian order.  In the case of such a rejection, the
   CREATE_CHILD_SA exchange fails, and the initiator will probably retry
   the exchange with a Diffie-Hellman proposal and KEi in the group that
   the responder gave in the INVALID_KE_PAYLOAD Notify payload.
   KEi payloadを含むCREATE_CHILD_SA exchangeは、SAを構成するどちらか一方がKEiのDiffie-Hellman groupを含めること。KEiのDiffie-Hellman groupはresponderが使用する予定のものであること(追加のDiffie-Hellman groupが提案されてもよい)。responderが別のDiffie-Hellman group(NONE以外)を選択した場合、responderはrequestを拒否し、INVALID_KE_PAYLOAD Notify payloadでDiffie-Hellman groupを示すこと。notificationに関する2オクテットがある。big endianで受け入れるDiffie-Hellman group番号。拒否の場合はCREATE_CHILDSA exchangeは失敗し、initiatorはINVALID_KE_PAYLOAD notify payloadを受け取る。

Kaufman, et al.              Standards Track                   [Page 13]

RFC 5996                        IKEv2bis                  September 2010


   The responder sends a NO_ADDITIONAL_SAS notification to indicate that
   a CREATE_CHILD_SA request is unacceptable because the responder is
   unwilling to accept any more Child SAs on this IKE SA.  This
   notification can also be used to reject IKE SA rekey.  Some minimal
   implementations may only accept a single Child SA setup in the
   context of an initial IKE exchange and reject any subsequent attempts
   to add more.
        ResponderがIKE SAでChild SAの作成を許容しない場合、CREATE_CHILD_SA requestを拒否することを示すため、NO_ADDITIONAL_SAS notificationを送信する。この通知はIKE SA rekeyを拒否するためにも使用される。実装によっては、initial IKE exchangeによる最初のChild SAのみ許可し、以降のChild SAの追加を拒否してもよい。

1.3.1.  Creating New Child SAs with the CREATE_CHILD_SA Exchange

   A Child SA may be created by sending a CREATE_CHILD_SA request.  The
   CREATE_CHILD_SA request for creating a new Child SA is:
   Child SAはCREATE_CHILD_SA requestによって作成できる。新しいChild SAを作るためのCREATE_CHILD_SA requestは下記の通り
     
   Initiator                         Responder
   -------------------------------------------------------------------
   HDR, SK {SA, Ni, [KEi],
              TSi, TSr}  -->

   The initiator sends SA offer(s) in the SA payload, a nonce in the Ni
   payload, optionally a Diffie-Hellman value in the KEi payload, and
   the proposed Traffic Selectors for the proposed Child SA in the TSi
   and TSr payloads.
        initiatorはSA payloadでSA(複数可)要求、Ni paylaodでnonce、オプションのKEi payloadでDiffie-Hellman値、TSi、TSr paylodでTraffic Selectorを送信する。

   The CREATE_CHILD_SA response for creating a new Child SA is:
        新しいChild SAを作るためのCREATE_CHILD_SA responseは下記の通り。

                                <--  HDR, SK {SA, Nr, [KEr],
                                         TSi, TSr}

   The responder replies (using the same Message ID to respond) with the
   accepted offer in an SA payload, and a Diffie-Hellman value in the
   KEr payload if KEi was included in the request and the selected
   cryptographic suite includes that group.
        SA payloadで許可、KEiがrequestに含まれていていた場合Diffie-Hellman値をKErを、同じMessage IDで応答する。

   The Traffic Selectors for traffic to be sent on that SA are specified
   in the TS payloads in the response, which may be a subset of what the
   initiator of the Child SA proposed.
        Traffic SelectorがTS paylaodで指定される。それはinitiatorが提示したものでもよい。

   The USE_TRANSPORT_MODE notification MAY be included in a request
   message that also includes an SA payload requesting a Child SA.  It
   requests that the Child SA use transport mode rather than tunnel mode
   for the SA created.  If the request is accepted, the response MUST
   also include a notification of type USE_TRANSPORT_MODE.  If the
   responder declines the request, the Child SA will be established in
   tunnel mode.  If this is unacceptable to the initiator, the initiator
   MUST delete the SA.  Note: Except when using this option to negotiate
   transport mode, all Child SAs will use tunnel mode.
   USE_TRANSPORT_MODE notificationがChild SAのrequestのSA payloadに含まれてよい。その要求はトランスポートモードのSAの作成要求を意味する。要求を許容した場合、応答にもUSE_TRANSPORT_MODEを含めること。responderが要求を拒否した場合、Child SAはトンネルモードで確立される。initiatorがそれを許容できない場合、SAを削除すること。トランスポートモードのネゴシエーションを使用する場合を除き、すべてのChild SAはトンネルモードで作成されること。

Kaufman, et al.              Standards Track                   [Page 14]

RFC 5996                        IKEv2bis                  September 2010

 

   The ESP_TFC_PADDING_NOT_SUPPORTED notification asserts that the
   sending endpoint will not accept packets that contain Traffic Flow
   Confidentiality (TFC) padding over the Child SA being negotiated.  If
   neither endpoint accepts TFC padding, this notification is included
   in both the request and the response.  If this notification is
   included in only one of the messages, TFC padding can still be sent
   in the other direction.
          ESP_TFC_PADDING_NOT_SUPPOERTED notificationはネゴシエーションしているChid SAでTraffic Flow confidentiality(TFC) paddingを含むパケットを、送信したendpointが許容しないことを示す。

   The NON_FIRST_FRAGMENTS_ALSO notification is used for fragmentation
   control.  See [IPSECARCH] for a fuller explanation.  Both parties
   need to agree to sending non-first fragments before either party does
   so.  It is enabled only if NON_FIRST_FRAGMENTS_ALSO notification is
   included in both the request proposing an SA and the response
   accepting it.  If the responder does not want to send or receive non-
   first fragments, it only omits NON_FIRST_FRAGMENTS_ALSO notification
   from its response, but does not reject the whole Child SA creation.
        NON_FIRST_FRAGMENTS_ALSO notificationはfragmentation制御のために使用される。詳細は[IPSECARCH]参照。両側で非fragmentのメッセージにより合意する必要がある。NON_FIRST_FRAGMENTS_ALSO notificationが両方のSAのrequest/responseに含まれる場合にのみ有効になる。responderがnon-first fragmentを送信/受信しない場合はNON_FIRST_FRAGMENTS_ALSOを送信しないが、Child SAの作成は拒否しない。

   An IPCOMP_SUPPORTED notification, covered in Section 2.22, can also
   be included in the exchange.
        IPCOMP_SUPPORTED notificationはSection 2.22参照。exchangeに含めてよい。

   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.
   See Section 2.21 for a list of error messages that might occur if
   creating a Child SA fails.
        Child SAの作成に失敗した場合、IKE SAを削除しないこと。IKE SAを削除する理由はない。Child SA作成失敗のエラーメッセージはSection 2.21参照。

1.3.2.  Rekeying IKE SAs with the CREATE_CHILD_SA Exchange

   The CREATE_CHILD_SA request for rekeying an IKE SA is:
        IKE SAをrekeyするためのCREATE_CHILD_SA requestは下記に示す。

   Initiator                         Responder
   -------------------------------------------------------------------
   HDR, SK {SA, Ni, KEi} -->

   The initiator sends SA offer(s) in the SA payload, a nonce in the Ni
   payload, and a Diffie-Hellman value in the KEi payload.  The KEi
   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
   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.
        initiatorはSA payload(SA offer)、Ni payload(nonce)とKEi payload(Diffie-Hellman値)を送信する。新しいinitiatorのSPIはSA payloadのSPI fieldで提供される。peerがIKE SAのrekeyの要求を受信/送信した場合、そのIKE SAで新しいCREATE_CHILD_SA exchangeを開始しないこと。

   The CREATE_CHILD_SA response for rekeying an IKE SA is:
        IKE SAをrekeyするためのCREATE_CHILD_SA responseは下記に示す。

                                <--  HDR, SK {SA, Nr, KEr}

   The responder replies (using the same Message ID to respond) with the
   accepted offer in an SA payload, and a Diffie-Hellman value in the
   KEr payload if the selected cryptographic suite includes that group.
   A new responder SPI is supplied in the SPI field of the SA payload.
   SA payload(許可したoffer)、KEr payload(Diffie-Hellman値。選択したcryptographic suiteにそのグループが含まれている場合)を応答する(Message IDを用いて照会する)。
   新しいresponderのSPIはSA payloadのSPI fieldで提供される。


Kaufman, et al.              Standards Track                   [Page 15]

RFC 5996                        IKEv2bis                  September 2010


   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
   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
   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
   exchange is the new "original initiator" of the new IKE SA.
        新しいIKE SAは以前のIKE SAに関係なくメッセージカウンタが0である。新しいIKE SAの両側の最初のIKE requestはMessage ID 0である。
   古いIKE SAは番号を保持しているため、request(例:IKE SAの削除)は連番をもつ。
   新しいIKE SAはwindow sizeを1に設定し、rekey exchangeしたinitiatorは新しいIKE SAの"original initiator"となる。

   Section 2.18 also covers IKE SA rekeying in detail.
        Section 2.18に詳細なIKE SA rekeyingを述べる。

1.3.3.  Rekeying Child SAs with the CREATE_CHILD_SA Exchange

   The CREATE_CHILD_SA request for rekeying a Child SA is:
        Child SAをrekeyするためのCREATE_CHILD_SA requestは下記に示す。

   Initiator                         Responder
   -------------------------------------------------------------------
   HDR, SK {N(REKEY_SA), SA, Ni, [KEi],
       TSi, TSr}   -->

   The initiator sends SA offer(s) in the SA payload, a nonce in the Ni
   payload, optionally a Diffie-Hellman value in the KEi payload, and
   the proposed Traffic Selectors for the proposed Child SA in the TSi
   and TSr payloads.
        initiatorはSA payload(SA offer)、Ni payload(nonce)、オプションのKEi payload(Diffie-Hellman値)とTSi payload、TSr payload(Child SAのTraffic Selector)を送信する。

   The notifications described in Section 1.3.1 may also be sent in a
   rekeying exchange.  Usually, these will be the same notifications
   that were used in the original exchange; for example, when rekeying a
   transport mode SA, the USE_TRANSPORT_MODE notification will be used.
        Section 1.3.1で説明したnotificationはrekeying exchangeを送信してもよい。
   通常、original exchangeと同じ内容が通知される。例えば、transport mode SAでrekeyingする場合、USE_TRANSPORT_MODE notificationが使用される。

   The REKEY_SA notification MUST be included in a CREATE_CHILD_SA
   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
   Notify payload; this is the SPI the exchange initiator would expect
   in inbound ESP or AH packets.  There is no data associated with this
   Notify message type.  The Protocol ID field of the REKEY_SA
   notification is set to match the protocol of the SA we are rekeying,
   for example, 3 for ESP and 2 for AH.
        exchangeの目的が既存のESP/AH SAの取り替えの場合、REKEY_SA notificationはCREATE_CHILD_SA exchangeに含まれていること。rekeyされたSAはNotify payloadのSPI fieldで識別する。これはexchange initiatorがinbound ESP/AHパケットに期待するSPIである。このNotifiy message typeには関連付けられたデータはない。REKEY_SA notificationのProtocol ID fieldはESP 3、AH 3のようにrekeyされたSAのプロトコルに一致するように設定されている。

   The CREATE_CHILD_SA response for rekeying a Child SA is:
        Child SAをrekeyするためのCREATE_CHILD_SA responseは下記に示す。

                                <--  HDR, SK {SA, Nr, [KEr],
                                         TSi, TSr}

   The responder replies (using the same Message ID to respond) with the
   accepted offer in an SA payload, and a Diffie-Hellman value in the
   KEr payload if KEi was included in the request and the selected
   cryptographic suite includes that group.
   SA payload(許可したoffer)、KEr payload(Diffie-Hellman値。KEiがrequestに含まれており選択したcryptographic suiteにそのグループが含まれている場合)を応答する(Message IDを用いて照会する)。

Kaufman, et al.              Standards Track                   [Page 16]

RFC 5996                        IKEv2bis                  September 2010


   The Traffic Selectors for traffic to be sent on that SA are specified
   in the TS payloads in the response, which may be a subset of what the
   initiator of the Child SA proposed.
        SAで送信されるトラフィックのためのTraffic SelectorはresponseのTS payloadで規定される。それはinitiatorがChild SA提案で送信したものでもよい。

 

1.4.  The INFORMATIONAL Exchange

   At various points during the operation of an IKE SA, peers may desire
   to convey control messages to each other regarding errors or
   notifications of certain events.  To accomplish this, IKE defines an
   INFORMATIONAL exchange.  INFORMATIONAL exchanges MUST ONLY occur
   after the initial exchanges and are cryptographically protected with
   the negotiated keys.  Note that some informational messages, not
   exchanges, can be sent outside the context of an IKE SA.  Section
   2.21 also covers error messages in great detail.
     SAの動作中、peerは様々なエラー、通知など様々な制御メッセージを送信する。これを実現するために、IKEではINFORMATIONAL exchangeを定義する。INFORMATIONAL exchangeはinitial exchane後にのみ実行され、暗号化されていること。いくつかのinformational messageはexchangeではなく(エラーとか)、IKE SAのコネテキスト外で送信される(DPDとか)。Section 2.21には詳細なエラーメッセージを記載する。

   Control messages that pertain to an IKE SA MUST be sent under that
   IKE SA.  Control messages that pertain to Child SAs MUST be sent
   under the protection of the IKE SA that generated them (or its
   successor if the IKE SA was rekeyed).
        IKE SAのための制御メッセージはIKE SAで送信されること。Child SAの制御メッセージはそれを生成した(rekeyを含む)IKE SAで送信されること。

   Messages in an INFORMATIONAL exchange contain zero or more
   Notification, Delete, and Configuration payloads.  The recipient of
   an INFORMATIONAL exchange request MUST send some response; otherwise,
   the sender will assume the message was lost in the network and will
   retransmit it.  That response MAY be an empty message.  The request
   message in an INFORMATIONAL exchange MAY also contain no payloads.
   This is the expected way an endpoint can ask the other endpoint to
   verify that it is alive.
        INFORMATIONAL exchangeは0~複数のNotification、Delete、Configuration paylaodを含む。INFORMATIONAL exchange requestの受信者は応答を返すこと。応答がなければ、送信者はネットワーク内でメッセージが失われたと想定し、再送する。応答はempty messageでもよい。request messageもpayloadを含んでいなくてもよい。これはエンドポイントの生存確認に使用される。

   The INFORMATIONAL exchange is defined as:
        INFORMATIONAL exchangeは下記のように定義される。

   Initiator                         Responder
   -------------------------------------------------------------------
   HDR, SK {[N,] [D,]
       [CP,] ...}  -->
                                <--  HDR, SK {[N,] [D,]
                                         [CP], ...}

   The processing of an INFORMATIONAL exchange is determined by its
   component payloads.
        INFORMATIONAL exchnageの処理はpaylaodによって決まる。

1.4.1.  Deleting an SA with INFORMATIONAL Exchanges

   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
   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
   SA, an INFORMATIONAL exchange with one or more Delete payloads is
   sent listing the SPIs (as they would be expected in the headers of
   inbound packets) of the SAs to be deleted.  The recipient MUST close
   the designated SAs.  Note that one never sends Delete payloads for
   the two sides of an SA in a single message.  If there are many SAs to
   delete at the same time, one includes Delete payloads for the inbound
   half of each SA pair in the INFORMATIONAL exchange.
     SAはペアで各方向に1つのSAが存在する。SAを削除するときはペアの両方のSAが削除されること。各エンドポイントはSAを削除し、対向のエンドポイントがそのペアのSAを削除できるようにすること。SA削除のため、1つ以上のDelete payloadをもつINFORMATIONAL exchnageにより削除するSPI(パケットのヘッダに設定される)のリストが送信される。受信者は指定されたSAを削除すること。1つのメッセージで両側のSAが削除されないことに注意すること。同時に削除するSAが大量の場合、INFORMATIONAL exchangeでは各SAペアの半分のDelete payloadを含む。

   Normally, the response in the INFORMATIONAL exchange will contain
   Delete payloads for the paired SAs going in the other direction.
   There is one exception.  If, by chance, both ends of a set of SAs
   independently decide to close them, each may send a Delete payload
   and the two requests may cross in the network.  If a node receives a
   delete request for SAs for which it has already issued a delete
   request, it MUST delete the outgoing SAs while processing the request
   and the incoming SAs while processing the response.  In that case,
   the responses MUST NOT include Delete payloads for the deleted SAs,
   since that would result in duplicate deletion and could in theory
   delete the wrong SA.
        INFORMATIONAL exchangeの応答は逆方向のSAペアのDelete paylaodを含む。
   ただし、例外がある。同時に各ペアの削除が決定した場合、各々がDelete payloadを送信し、その要求を同時に実行してもよい。すでに削除したSAの削除要求を受信した場合、発信したSAを削除すること。その場合、応答にはDelete payloadは含めないこと。

   Similar to ESP and AH SAs, IKE SAs are also deleted by sending an
   Informational exchange.  Deleting an IKE SA implicitly closes any
   remaining Child SAs negotiated under it.  The response to a request
   that deletes the IKE SA is an empty INFORMATIONAL response.
   ESP/AH SAもIKE SAと同様にINFORMATIONAL exchangeで削除される。IKE SAが削除されると、そのIKE SAでネゴシエーションされたChild SAも削除される。IKE SA削除の応答はempty INFORMATIONAL responseである。
     
   Half-closed ESP or AH connections are anomalous, and a node with
   auditing capability should probably audit their existence if they
   persist.  Note that this specification does not specify time periods,
   so it is up to individual endpoints to decide how long to wait.  A
   node MAY refuse to accept incoming data on half-closed connections
   but MUST NOT unilaterally close them and reuse the SPIs.  If
   connection state becomes sufficiently messed up, a node MAY close the
   IKE SA, as described above.  It can then rebuild the SAs it needs on
   a clean base under a new IKE SA.
     ESP/AHの片方の接続が切断されていることを検証する必要がある。この仕様の期間は規定せず、各エンドポイントの設定に従う。エンドポイントはhalf-close connectionのデータ受信を拒否してよい。ただし、一方的に削除したりSPIを再利用しないこと。接続が完全に不可能になった場合、上記の方法でIKE SAを削除してよい。その後、新しいIKE SAでSAを再構築する。

1.5.  Informational Messages outside of an IKE SA

   There are some cases in which a node receives a packet that it cannot
   process, but it may want to notify the sender about this situation.
        エンドポイントが処理できないパケットを受信した場合、それを送信者に通知する必要がある場合がある。

   o  If an ESP or AH packet arrives with an unrecognized SPI.  This
      might be due to the receiving node having recently crashed and
      lost state, or because of some other system malfunction or attack.
                  認識しないSPIでESP/AHパケットを受信した場合。受信ノードがクラッシュしたか、システムエラーか攻撃の可能性がある。

   o  If an encrypted IKE request packet arrives on port 500 or 4500
      with an unrecognized IKE SPI.  This might be due to the receiving
      node having recently crashed and lost state, or because of some
      other system malfunction or attack.
      暗号化されたIKE request packetがport 500 or 4500で認識しないSPIで受信した場合。受信ノードがクラッシュしたか、システムエラーか攻撃の可能性がある。

   o  If an IKE request packet arrives with a higher major version
      number than the implementation supports.
                  IKE request packetが実装でサポートするバージョンより高いメジャーバージョンだった場合。

   In the first case, if the receiving node has an active IKE SA to the
   IP address from whence the packet came, it MAY send an INVALID_SPI
   notification of the wayward packet over that IKE SA in an
   INFORMATIONAL exchange.  The Notification Data contains the SPI of
   the invalid packet.  The recipient of this notification cannot tell
   whether the SPI is for AH or ESP, but this is not important because
   the SPIs are supposed to be different for the two.  If no suitable
   IKE SA exists, the node MAY send an informational message without
   cryptographic protection to the source IP address, using the source
   UDP port as the destination port if the packet was UDP (UDP-
   encapsulated ESP or AH).  In this case, it should only be used by the
   recipient as a hint that something might be wrong (because it could
   easily be forged).  This message is not part of an INFORMATIONAL
   exchange, and the receiving node MUST NOT respond to it because doing
   so could cause a message loop.  The message is constructed as
   follows: there are no IKE SPI values that would be meaningful to the
   recipient of such a notification; using zero values or random values
   are both acceptable, this being the exception to the rule in
   Section 3.1 that prohibits zero IKE Initiator SPIs.  The Initiator
   flag is set to 1, the Response flag is set to 0, and the version
   flags are set in the normal fashion; these flags are described in
   Section 3.1.
     最初のケースでは、受信したnodeが受信パケットのIPアドレスへのactiveなIKE SAを持っている場合、そのパケットを受信したIKE_SAでINFORMATIONAL exchangeによりINVALID_SPI notificationを送信してもよい。Notification Dataはinvalid packetのSPIを含む。notificationの受信者はこの通知によりSPIがAHかESPか識別できないが、両者のSPIは異なることになっているため重要ではない。適当なIKE SAが存在しない場合、nodeはcryptographic protection無しに、source IPアドレスにinformational messageを送信してもよい。そのときパケットがUDP(ESP or AHのUDPカプセル化)であった場合、destination portとしてsource port(受信パケットの)を使用する。このケースでは、何らかの問題があったことを受信者に知らせるためだけに使用されること。簡単に偽造パケットを作成できるため。このメッセージはINFORMATIONAL exchangeとして使用せず、受信者は応答をしないこと。なぜなら、これはループを引き起こす可能性があるため。メッセージは下記のように構築される。notificationの受信者に意味のないIKE SPIで、0やランダム値は許容され(Section 3.1の0 IKE initiator SPIのルールの例外のため)使用される。Initiator flagは1、Responder flagは0、version flagは通常のSection 3.1の値が設定される。
     
   In the second and third cases, the message is always sent without
   cryptographic protection (outside of an IKE SA), and includes either
   an INVALID_IKE_SPI or an INVALID_MAJOR_VERSION notification (with no
   notification data).  The message is a response message, and thus it
   is sent to the IP address and port from whence it came with the same
   IKE SPIs and the Message ID and Exchange Type are copied from the
   request.  The Response flag is set to 1, and the version flags are
   set in the normal fashion.
     第2、第3のケースでは、メッセージは常にcryptographic protectionなし(IKE_SA外)で、INVALID_IKE_SPIかINVALID_MAJOR_VERSION notification(notification dataなし)が送信される。responseメッセージなので、受信したIKE SPI、Message ID、Exchange TypeをコピーしてIPアドレスとポート番号に向けて送信される。Response flagは1に設定され、version flagは通常通り設定される。
     
1.6.  Requirements Terminology

   Definitions of the primitive terms in this document (such as Security
   Association or SA) can be found in [IPSECARCH].  It should be noted
   that parts of IKEv2 rely on some of the processing rules in
   [IPSECARCH], as described in various sections of this document.
   基本的な用語は[IPSECARCH]で定義される。
     
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [MUSTSHOULD].
   "MUST"等は[MUSTSHOULD]で定義される。

Kaufman, et al.              Standards Track                   [Page 19]

RFC 5996                        IKEv2bis                  September 2010


1.7.  Significant Differences between RFC 4306 and This Document

   This document contains clarifications and amplifications to IKEv2
   [IKEV2].  Many of the clarifications are based on [Clarif].  The
   changes listed in that document were discussed in the IPsec Working
   Group and, after the Working Group was disbanded, on the IPsec
   mailing list.  That document contains detailed explanations of areas
   that were unclear in IKEv2, and is thus useful to implementers of
   IKEv2.
     このドキュメントはIKEv2[IKEV2]を明確化している。多くは[Clarif]をベースにしている。IKEv2の実装に有用な内容を含む。
     
   The protocol described in this document retains the same major
   version number (2) and minor version number (0) as was used in RFC
   4306.  That is, the version number is *not* changed from RFC 4306.
   The small number of technical changes listed here are not expected to
   affect RFC 4306 implementations that have already been deployed at
   the time of publication of this document.
   このドキュメントのプロトコルはRFC 4306と同じmafor version 2、minor version 0を維持する。バージョン番号はRFC4306から変更しない。技術的な変更点はないためRFC4306の実装には影響を与えないだろう。
     
   This document makes the figures and references a bit more consistent
   than they were in [IKEV2].
     figureや参照などは[IKEV2]と大体同じである。
     
   IKEv2 developers have noted that the SHOULD-level requirements in RFC
   4306 are often unclear in that they don't say when it is OK to not
   obey the requirements.  They also have noted that there are MUST-
   level requirements that are not related to interoperability.  This
   document has more explanation of some of these requirements.  All
   non-capitalized uses of the words SHOULD and MUST now mean their
   normal English sense, not the interoperability sense of [MUSTSHOULD].
IKEv2の開発者はRFC4306のSHOULD-level要求が明確でないと指摘した。また相互運用性に関係しないMUST-level要求があることも指摘した。このドキュメントにはこれらの明確な説明がある。大文字のSHOULD、MUSTは通常の英語の意味ではなく、[MUSTSHOULD]の意味である。

   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
   leads to implementers not having all the needed information in the
   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
   document.
Section 3.10.1 in RFC 4306にCode tableがある。その表の内容はこの文章に移動されている。

   This document removes discussion of nesting AH and ESP.  This was a
   mistake in RFC 4306 caused by the lag between finishing RFC 4306 and
   RFC 4301.  Basically, IKEv2 is based on RFC 4301, which does not
   include "SA bundles" that were part of RFC 2401.  While a single
   packet can go through IPsec processing multiple times, each of these
   passes uses a separate SA, and the passes are coordinated by the
   forwarding tables.  In IKEv2, each of these SAs has to be created
   using a separate CREATE_CHILD_SA exchange.
   AH/ESPの説明は削除した。基本的にIKEv2はRFC4301に基づくき、RFC2401の"SA bundles"は含まない。一つのパケットがIPsec処理を複数回実行されるときがあるが、別々のSAが使用される。IKEv2ではこれらの複数のパスはCRATE_CHILD_SA exchangeで作成される。
     
   This document removes discussion of the INTERNAL_ADDRESS_EXPIRY
   configuration attribute because its implementation was very
   problematic.  Implementations that conform to this document MUST
   ignore proposals that have configuration attribute type 5, the old
   value for INTERNAL_ADDRESS_EXPIRY.  This document also removed
   INTERNAL_IP6_NBNS as a configuration attribute.
        実装に問題があったため、INTERNAL_ADDRESS_EXPIRY configuration attributeは削除した。このドキュメントに準拠するためにはconfiguration attribute type 5、INTERNAL_ADDRESS_EXPIRYを無視すること。INTERNAL_IP6_NBNS configuration attributeも削除した。

   This document removes the allowance for rejecting messages in which
   the payloads were not in the "right" order; now implementations MUST
   NOT reject them.  This is due to the lack of clarity where the orders
   for the payloads are described.
paylaodが右から並ばなければメッセージを拒否する手順を削除した。実装ではそれを拒否しないこと。payloadの順序についての説明が明確でないことに起因している。

   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
   4306.  Also, many of those lists are now preceded with the very
   important instruction to developers that they really should look at
   the IANA registry at the time of development because new items have
   been added since RFC 4306.
     IANA registryに記載されている項目はRFC 4306以外のものを取り除いた。

   This document adds clarification on when notifications are and are
   not sent encrypted, depending on the state of the negotiation at the
   time.
   notificationがネゴシエーションの状態によって暗号化されないで送られることを明記した。
     
   This document discusses more about how to negotiate combined-mode
   ciphers.
   combined-mode(組み合わせモード)の暗号をネゴシエーションする方法を説明する。
     
   In Section 1.3.2, "The KEi payload SHOULD be included" was changed to
   be "The KEi payload MUST be included".  This also led to changes in
   Section 2.18.
   [変更前]KEi payloadが含まれることが望ましい(SHOULD)
   [変更後]KEi payloadが必ず含まれること(MUST)
   これにより、Section 1.3.2、Section 2.18が変更になった。
     
   In Section 2.1, there is new material covering how the initiator's
   SPI and/or IP is used to differentiate if this is a "half-open" IKE
   SA or a new request.
   Section 2.1。initiatorのSPI/IPが"half-open" IKE SAかまたは新しいrequestであるかを区別する方法が提示された。
     
   This document clarifies the use of the critical flag in Section 2.5.
   Section 2.5でcritical flagを明記している。
     
   In Section 2.8, "Note that, when rekeying, the new Child SA MAY have
   different Traffic Selectors and algorithms than the old one" was
   changed to "Note that, when rekeying, the new Child SA SHOULD NOT
   have different Traffic Selectors and algorithms than the old one".
   [変更前]rekeyのとき、新しいChild SAはTraffic Selectorとalgorithmが異なってもよい。
   [変更後]rekeyのとき、新しいChild SAはTraffic Selectorとalgorithmが異ならないこと。
     
   The new Section 2.8.2 covers simultaneous IKE SA rekeying.
   Section 2.8.2に同時のIKE SA rekeyをカバー。
     
   The new Section 2.9.2 covers Traffic Selectors in rekeying.
   Section 2.9.2にTraffic Selector rekeyingをカバー。
     
   This document adds the restriction in Section 2.13 that all
   pseudorandom functions (PRFs) used with IKEv2 MUST take variable-
   sized keys.  This should not affect any implementations because there
   were no standardized PRFs that have fixed-size keys.
   Section 2.13に制限が追加され、IKEv2で使用するPRFのvariable-size keyを設定することになった。fixed-size keyを設定するPRF標準がないためこれは実装には影響を与えない。

Kaufman, et al.              Standards Track                   [Page 21]

RFC 5996                        IKEv2bis                  September 2010

   Section 2.18 requires doing a Diffie-Hellman exchange when rekeying
   the IKE_SA.  In theory, RFC 4306 allowed a policy where the Diffie-
   Hellman exchange was optional, but this was not useful (or
   appropriate) when rekeying the IKE_SA.
   Section 2.18はIKE_SAをrekeyするときDiffie-Hellman exchangeを要求する。
   RFC4306ではDiffie-Hellman exchangeはオプションだったが、IKE_SAのrekeyでは適切でなかった。
     
   Section 2.21 has been greatly expanded to cover the different cases
   where error responses are needed and the appropriate responses to
   them.
   Section 2.21にはエラー応答が必要とされるケースが明記された。
     
   Section 2.23 clarified that, in NAT traversal, now both UDP-
   encapsulated IPsec packets and non-UDP-encapsulated IPsec packets
   need to be understood when receiving.
   Section 2.23のNAT traversalではUDPカプセル化 IPsec packetと非UDPカプセル化IPsec packetを受信したときの動作を明記した。
     
   Added Section 2.23.1 to describe NAT traversal when transport mode is
   requested.
   Section 2.23にトランスポートモードのときのNAT traversalの説明が追加された。
     
   Added Section 2.25 to explain how to act when there are timing
   collisions when deleting and/or rekeying SAs, and two new error
   notifications (TEMPORARY_FAILURE and CHILD_SA_NOT_FOUND) were
   defined.
   deleting/rekey SAが衝突したときの動作、エラー通知(TEMPORARY_FAILURE/CHILD_SA_NOT_FOUND)の定義がSection 2.25に追加された。
     
   In Section 3.6, "Implementations MUST support the HTTP method for
   hash-and-URL lookup.  The behavior of other URL methods is not
   currently specified, and such methods SHOULD NOT be used in the
   absence of a document specifying them" was added.
     Section 3.6ではImplementationsはhash-and-URL lookupのためHTTP methodをサポートすること。他のURL methodは規定されておらず、そのようなmethodはドキュメントに記載されない限り使用しないことというのが記載された。
     
   In Section 3.15.3, a pointer to a new document that is related to
   configuration of IPv6 addresses was added.
   Section 3.15.3にIPv6アドレスのconfiguration関連を追加した。
     
   Appendix C was expanded and clarified.
     Appendix Cの充実化。

2.  IKE Protocol Details and Variations

   IKE normally listens and sends on UDP port 500, though IKE messages
   may also be received on UDP port 4500 with a slightly different
   format (see Section 2.23).  Since UDP is a datagram (unreliable)
   protocol, IKE includes in its definition recovery from transmission
   errors, including packet loss, packet replay, and packet forgery.
   IKE is designed to function so long as (1) at least one of a series
   of retransmitted packets reaches its destination before timing out;
   and (2) the channel is not so full of forged and replayed packets so
   as to exhaust the network or CPU capacities of either endpoint.  Even
   in the absence of those minimum performance requirements, IKE is
   designed to fail cleanly (as though the network were broken).
        IKEは通常UDP port500で通信するが、UDP port4500で受信してもよい(Section 2.23参照)。
   UDP datagram(信頼性なし)のため、IKEは再送、パケットロス、重複受信の定義を含む。IKEでは再送と偽装、再送の検出の機能が設計された。最小の要求事項での動作でもIKEは障害検知できるように設計された。

   Although IKEv2 messages are intended to be short, they contain
   structures with no hard upper bound on size (in particular, digital
   certificates), and IKEv2 itself does not have a mechanism for
     fragmenting large messages.  IP defines a mechanism for fragmentation
   of oversized UDP messages, but implementations vary in the maximum
   message size supported.  Furthermore, use of IP fragmentation opens
   an implementation to denial-of-service (DoS) attacks [DOSUDPPROT].
   Finally, some NAT and/or firewall implementations may block IP
   fragments.
IKEv2はメッセージが短くなるように意図されているが、大きなサイズ構造(特にデジタル証明書)をもち、IKEv2自体は大きなメッセージをフラグメントするメカニズムを持っていない。IPは大きなUDPメッセージをフラグメントするメカニズムを持っているが実装によってサポートされる最大サイズは異なる。またIPのフラグメントの実装はDoS攻撃を招く[DOSUOOROT]。また、NATやfirewallの実装はIPフラグメントをブロックする。

   All IKEv2 implementations MUST be able to send, receive, and process
   IKE messages that are up to 1280 octets long, and they SHOULD be able
   to send, receive, and process messages that are up to 3000 octets
   long.  IKEv2 implementations need to be aware of the maximum UDP
   message size supported and MAY shorten messages by leaving out some
   certificates or cryptographic suite proposals if that will keep
   messages below the maximum.  Use of the "Hash and URL" formats rather
   than including certificates in exchanges where possible can avoid
   most problems.  Implementations and configuration need to keep in
   mind, however, that if the URL lookups are possible only after the
   Child SA is established, recursion issues could prevent this
   technique from working.
     IKEv2の実装は1280 octet以上のIKEメッセージを送受信/処理できること。また、最大3000 octetのメッセージを送受信/処理できること。IKEv2の実装はサポートされる最大のUDPメッセージサイズに注意する必要がある。最大以下のメッセージにするために、証明書やcriptographic suiteを除外してもよい。"Hash and URL" formatsにより、exchangeに証明書を含むより様々な問題を解決できる。URL lookupがChild SAが確立したあとに可能になる場合は、recursion issuesのためこの方法は使用できない。
     
   The UDP payload of all packets containing IKE messages sent on port
   4500 MUST begin with the prefix of four zeros; otherwise, the
   receiver won't know how to handle them.
        UDP PORT 4500で送信されるIKE messageは4つの0のprefixで始まる。そうでないと受信側が処理方法を判断できない。

2.1.  Use of Retransmission Timers

   All messages in IKE exist in pairs: a request and a response.  The
   setup of an IKE SA normally consists of two exchanges.  Once the IKE
   SA is set up, either end of the Security Association may initiate
   requests at any time, and there can be many requests and responses
   "in flight" at any given moment.  But each message is labeled as
   either a request or a response, and for each exchange, one end of the
   Security Association is the initiator and the other is the responder.
   IKEメッセージはすべてresponse/requestのペアである。IKE SAのsetupは2exchangeである。IKE SAのsetupが完了するとどちらからでもrequest/responseを送信できる。
     
   For every pair of IKE messages, the initiator is responsible for
   retransmission in the event of a timeout.  The responder MUST never
   retransmit a response unless it receives a retransmission of the
   request.  In that event, the responder MUST ignore the retransmitted
   request except insofar as it causes a retransmission of the response.
   The initiator MUST remember each request until it receives the
   corresponding response.  The responder MUST remember each response
   until it receives a request whose sequence number is larger than or
   equal to the sequence number in the response plus its window size
   (see Section 2.3).  In order to allow saving memory, responders are
   allowed to forget the response after a timeout of several minutes.
   If the responder receives a retransmitted request for which it has
   already forgotten the response, it MUST ignore the request (and not,
   for example, attempt constructing a new response).
IKEメッセージのすべてはinitiatorがタイムアウト時の再送を担う。responderはrequestを受信しない限りresponseを再送しない。initiatorはrequestのresponseを受信するまで各requestを覚えておくこと。メモリ節約のためresponderは数分のタイムアウト後、responseを忘れてよい。responderがresponseを忘れた後、再送されたのrequestを受信した場合、その要求を無視すること。


Kaufman, et al.              Standards Track                   [Page 23]

RFC 5996                        IKEv2bis                  September 2010


   IKE is a reliable protocol: the initiator MUST retransmit a request
   until it either receives a corresponding response or deems the IKE SA
   to have failed.  In the latter case, the initiator discards all state
   associated with the IKE SA and any Child SAs that were negotiated
   using that IKE SA.  A retransmission from the initiator MUST be
   bitwise identical to the original request.  That is, everything
   starting from the IKE header (the IKE SA initiator's SPI onwards)
   must be bitwise identical; items before it (such as the IP and UDP
   headers) do not have to be identical.
   IKEは信頼性が高い。responseを受信するか、IKE SAが失敗と認識するまでinitiatorはrequestを再送すること。後者の場合、initiatorはIKE SAとChild SAを破棄する。initiatorからの再送はもとのrequestと同一であること。IP、UDPレベルでは異なってよい。
     
   Retransmissions of the IKE_SA_INIT request require some special
   handling.  When a responder receives an IKE_SA_INIT request, it has
   to determine whether the packet is a retransmission belonging to an
   existing "half-open" IKE SA (in which case the responder retransmits
   the same response), or a new request (in which case the responder
   creates a new IKE SA and sends a fresh response), or it belongs to an
   existing IKE SA where the IKE_AUTH request has been already received
   (in which case the responder ignores it).
requestの再送は特別である。responderがIKE_SA_INITを受信したときhalf-openな場合は同じresponseを返し、既存のIKE SAの場合は無視し、新しいrequestの場合は新しいresponseを返す。

   It is not sufficient to use the initiator's SPI and/or IP address to
   differentiate between these three cases because two different peers
   behind a single NAT could choose the same initiator SPI.  Instead, a
   robust responder will do the IKE SA lookup using the whole packet,
   its hash, or the Ni payload.
単一NAT配下の異なるinitiatorが同じSPIを使用した可能性があるため、上記3パターンを判別するのはSPI/IPアドレスではないこと。パケット全体またはそのハッシュ、Ni payloadを使用してIKE SAのルックアップをする。

   The retransmission policy for one-way messages is somewhat different
   from that for regular messages.  Because no acknowledgement is ever
   sent, there is no reason to gratuitously retransmit one-way messages.
   Given that all these messages are errors, it makes sense to send them
   only once per "offending" packet, and only retransmit if further
   offending packets are received.  Still, it also makes sense to limit
   retransmissions of such error messages.
     一方向のメッセージの再送ポリシーは通常のメッセージとは異なる。acknowledgementは送信されないため、一方向のメッセージを再送するべきではない。すべてのメッセージにはエラーがあるため、問題のあるパケット毎に1度だけ送信し、さらに問題のあるパケットを受信した場合にのみ再送すること。

2.2.  Use of Sequence Numbers for Message ID

   Every IKE message contains a Message ID as part of its fixed header.
   This Message ID is used to match up requests and responses and to
   identify retransmissions of messages.  Retransmission of a message
   MUST use the same Message ID as the original message.
     すべてのIKEメッセージは固定ヘッダーの一部としてMessage IDを含む。Message IDはrequestとresponseの照合とメッセージの再送を識別するために使用される。メッセージの再送では元のメッセージと同じMessage IDを使用すること。
         
   The Message ID is a 32-bit quantity, which is zero for the
   IKE_SA_INIT messages (including retries of the message due to
   responses such as COOKIE and INVALID_KE_PAYLOAD), and incremented for
   each subsequent exchange.  Thus, the first pair of IKE_AUTH messages
   will have an ID of 1, the second (when EAP is used) will be 2, and so
   on.  The Message ID is reset to zero in the new IKE SA after the IKE
   SA is rekeyed.
IDは32ビットになり、0はIKE_SA_INITメッセージ(COOKIE、INVALID_KE_PAULOADなどによるresponseの再送を含む)でその後、インクリメントされる。
   そのためIKE_AUTHメッセージの最初のペアはID 1である。EAPが使用される場合はそれ以上になる。
   IKE SAがrekeyされた後のMessage IDは新しいIKE SAで0にリセットされる。

Kaufman, et al.              Standards Track                   [Page 24]

RFC 5996                        IKEv2bis                  September 2010


   Each endpoint in the IKE Security Association maintains two "current"
   Message IDs: the next one to be used for a request it initiates and
   the next one it expects to see in a request from the other end.
   These counters increment as requests are generated and received.
   Responses always contain the same Message ID as the corresponding
   request.  That means that after the initial exchange, each integer n
   may appear as the Message ID in four distinct messages: the nth
   request from the original IKE initiator, the corresponding response,
   the nth request from the original IKE responder, and the
   corresponding response.  If the two ends make a very different number
   of requests, the Message IDs in the two directions can be very
   different.  There is no ambiguity in the messages, however, because
   the Initiator and Response flags in the message header specify which
   of the four messages a particular one is.
     IKE Security Associationの各Endpointは2つのMessage IDを管理する。1つ目はrequestを開始するためのMessage ID、2つ目は対向からのrequestとして期待するMessage ID。これらはrequestの生成およびrequestの受信のたびに増加する。responseには対応するrequestと同じMessage IDが含まれる。これはInitial Exchangeの後、各整数nが異なるメッセージにMessage IDとして設定されることを意味する。original IKE initiatorのrequestとそのresponse、original IKE responderのrequestとresponseである。それはメッセージヘッダーのInitiator flag and Response flagで一意に識別することができる。
         
   Throughout this document, "initiator" refers to the party who
   initiated the exchange being described.  The "original initiator"
   always refers to the party who initiated the exchange that resulted
   in the current IKE SA.  In other words, if the "original responder"
   starts rekeying the IKE SA, that party becomes the "original
   initiator" of the new IKE SA.
     本ドキュメントではinitiatorはexchangeを開始した側を指す。original initiatorは現在のIKE SAを作成するexchangeを開始した側を指す。言い換えれば、original responderがIKE SAをrekeyすれば、それが新しいIKE SAのoriginal initiatorになる。

   Note that Message IDs are cryptographically protected and provide
   protection against message replays.  In the unlikely event that
   Message IDs grow too large to fit in 32 bits, the IKE SA MUST be
   closed or rekeyed.
     Message IDは暗号的保護とmessage replayに対する保護が提供される。Message IDが32bitに収まらないほど大きくなる場合、IKE SAはcloseされるかrekeyされること。

 

2.3.  Window Size for Overlapping Requests

   The SET_WINDOW_SIZE notification asserts that the sending endpoint is
   capable of keeping state for multiple outstanding exchanges,
   permitting the recipient to send multiple requests before getting a
   response to the first.  The data associated with a SET_WINDOW_SIZE
   notification MUST be 4 octets long and contain the big endian
   representation of the number of messages the sender promises to keep.
   The window size is always one until the initial exchanges complete.
     SET_WINDOW_SIZE notificationは送信endpointが複数のexhangeを維持し、responseが返される前に、受信者が複数のrequestを送信することを許容することを示す。SET_WINDWO_SIZE notificationのデータは、4 octet長で、送信者が維持するmessage数をbig endianで示す。window sizeはinitial exchangeが完了するまでは常に1である。

   An IKE endpoint MUST wait for a response to each of its messages
   before sending a subsequent message unless it has received a
   SET_WINDOW_SIZE Notify message from its peer informing it that the
   peer is prepared to maintain state for multiple outstanding messages
   in order to allow greater throughput.
     IKE endpointはSET_WINDOW_SIZE Notifyを受信していない場合、次のメッセージを送信する前に送信したメッセージの応答を待つこと。Notifyは高いIKE スループットを可能にするため、複数の未処理メッセージの状態を維持するため。

   After an IKE SA is set up, in order to maximize IKE throughput, an
   IKE endpoint MAY issue multiple requests before getting a response to
   any of them, up to the limit set by its peer's SET_WINDOW_SIZE.
   These requests may pass one another over the network.  An IKE
   endpoint MUST be prepared to accept and process a request while it
   has a request outstanding in order to avoid a deadlock in this
   situation.  An IKE endpoint may also accept and process multiple
   requests while it has a request outstanding.
     IKE SAがsetupされた後、IKEスループットの最大化のため、peerのSET_WINDOW_SIZEで設定された制限までIKE endpointはresponseを受信する前に複数のrequestを送信してよい。IKE endpointはこれを許容し、deadlockを防ぐため、未処理のrequestがある状態でrequestを処理できるようにすること。IKE endpointは許容し、request処理中に複数のrequestを処理してもよい。

   An IKE endpoint MUST NOT exceed the peer's stated window size for
   transmitted IKE requests.  In other words, if the responder stated
   its window size is N, then when the initiator needs to make a request
   X, it MUST wait until it has received responses to all requests up
   through request X-N.  An IKE endpoint MUST keep a copy of (or be able
   to regenerate exactly) each request it has sent until it receives the
   corresponding response.  An IKE endpoint MUST keep a copy of (or be
   able to regenerate exactly) the number of previous responses equal to
   its declared window size in case its response was lost and the
   initiator requests its retransmission by retransmitting the request.
     IKE endpointはpeerのIKE request送信のwindows sizeを超えてはいけない。つまり、responderのwindows sizeがNの場合、initiatorがrequest Xを送るとき、X-Nのresponseを受信するまでinitiatorは待たなければいけない。IKE endpointはresponseを受信するまで、各requestのコピーを保持するか、正確に再生成できること。IKE endpointはresponseがlostした場合のwindow sizeと同じ数のresponseのため、保持しているコピーか同じrequestの再生成によりrequest再送する。

   The window size is normally a (possibly configurable) property of a
   particular implementation, and is not related to congestion control
   (unlike the window size in TCP, for example).  In particular, what
   the responder should do when it receives a SET_WINDOW_SIZE
   notification containing a smaller value than is currently in effect
   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
   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.
     window sizeは通常は実装依存(変更可能)で、congestion control(TCPのwindow size等)とは関係がない。responderが現在のwindow sizeより小さいSET_WINDOW_SIZE notificationを受信した場合の動作は定義されない。そのため、既存のIKE SAのwindow sizeお小さくすることはできず、大きくするしかできない。IKE SAをrekeyすると、SET_WINDWO_SIZE notificationを受信するまでwindow sizeは1になる。

   The INVALID_MESSAGE_ID notification is sent when an IKE Message ID
   outside the supported window is received.  This Notify message MUST
   NOT be sent in a response; the invalid request MUST NOT be
   acknowledged.  Instead, inform the other side by initiating an
   INFORMATIONAL exchange with Notification data containing the four-
   octet invalid Message ID.  Sending this notification is OPTIONAL, and
   notifications of this type MUST be rate limited.
     許容するwindow外のIKE Message IDを受信した場合、INVALID_MESSAGE_ID notificatioを送信する。このNotify messageは応答ではない。無効なrequestにはacknowledgeしないこと。その代わり、4octetの invalid Message IDをdataに含む、INFORMATIONAL exchangeを返す。このnotificationはOPTIONALであり、このtypeのnotificationはレートが制限されること(DoSになる可能性があるから)。

2.4.  State Synchronization and Connection Timeouts

   An IKE endpoint is allowed to forget all of its state associated with
   an IKE SA and the collection of corresponding Child SAs at any time.
   This is the anticipated behavior in the event of an endpoint crash
   and restart.  It is important when an endpoint either fails or
   reinitializes its state that the other endpoint detect those
   conditions and not continue to waste network bandwidth by sending
   packets over discarded SAs and having them fall into a black hole.
     IKE endpointはIKE SAと対応するChild SAの状態をいつでも忘れることを許可される。これは、endpointがcrashしたときや再起動したときに発生する動作である。endpointが障害になったときや再起動のとき、他方のendpointがその状態を検知すること、破棄されたSAにパケットを送信し続けないことは重要である。

Kaufman, et al.              Standards Track                   [Page 26]

RFC 5996                        IKEv2bis                  September 2010


   The INITIAL_CONTACT notification asserts that this IKE SA is the only
   IKE SA currently active between the authenticated identities.  It MAY
   be sent when an IKE SA is established after a crash, and the
   recipient MAY use this information to delete any other IKE SAs it has
   to the same authenticated identity without waiting for a timeout.
   This notification MUST NOT be sent by an entity that may be
   replicated (e.g., a roaming user's credentials where the user is
   allowed to connect to the corporate firewall from two remote systems
   at the same time).  The INITIAL_CONTACT notification, if sent, MUST
   be in the first IKE_AUTH request or response, not as a separate
   exchange afterwards; receiving parties MAY ignore it in other
   messages.
     INITIAL_CONTACT notificationはこのIKE SAが同じidentityをもつIKE SAで唯一アクティブであることを示す。IKE SAがクラッシュした後に確立したとき、受信者は同じidentityをもつIKE SAを削除するときにこの情報を用いてよい。このnotificationは同時に接続することを許可された場合には使用しないこと。(例:同一ユーザーが同じidentityで2つのリモートポイントからログインすることを許可されたシステム)。INITIAL_CONTACT notificationを送信した場合、それは最初のIKE_AUTH request or responseであること。別のexchangeではないこと。他のメッセージで受信した場合は無視してよい。
         
   Since IKE is designed to operate in spite of DoS attacks from the
   network, an endpoint MUST NOT conclude that the other endpoint has
   failed based on any routing information (e.g., ICMP messages) or IKE
   messages that arrive without cryptographic protection (e.g., Notify
   messages complaining about unknown SPIs).  An endpoint MUST conclude
   that the other endpoint has failed only when repeated attempts to
   contact it have gone unanswered for a timeout period or when a
   cryptographically protected INITIAL_CONTACT notification is received
   on a different IKE SA to the same authenticated identity.  An
   endpoint should suspect that the other endpoint has failed based on
   routing information and initiate a request to see whether the other
   endpoint is alive.  To check whether the other side is alive, IKE
   specifies an empty INFORMATIONAL message that (like all IKE requests)
   requires an acknowledgement (note that within the context of an IKE
   SA, an "empty" message consists of an IKE header followed by an
   Encrypted payload that contains no payloads).  If a cryptographically
   protected (fresh, i.e., not retransmitted) message has been received
   from the other side recently, unprotected Notify messages MAY be
   ignored.  Implementations MUST limit the rate at which they take
   actions based on unprotected messages.
     IKEはDoS攻撃でも動作するように設計されているため、endpointが他のendpointのrouting情報(例:ICMP message)や暗号化されていないIKE message(例:未知のSPIからのNotify message)により障害と決定しないこと。endpointはリトライ超過時か、INITIAL_CONTACT notificationを同じauthenticated identityをもつ他のIKE SAで暗号化保護されて受信した場合にのみ、対向endpointが障害であるとすること。endpointはルーティング情報に問題があり新しいrequestが開始されたとみるべきである。対向の生存確認のため、IKEは空のINFORMATIONAL messageの送受信を規定する。"empty"メッセージは、IKE headerのみで暗号化されたpayloadが無い。IKE SAのコンテキスト内で送信される。暗号化保護されたメッセージを受信した場合、暗号化されていないNotifyメッセージは無視してもよい。実装では保護されていないメッセージのレートを制限すること(DoS攻撃になるため)。
         
   The number of retries and length of timeouts are not covered in this
   specification because they do not affect interoperability.  It is
   suggested that messages be retransmitted at least a dozen times over
   a period of at least several minutes before giving up on an SA, but
   different environments may require different rules.  To be a good
   network citizen, retransmission times MUST increase exponentially to
   avoid flooding the network and making an existing congestion
   situation worse.  If there has only been outgoing traffic on all of
   the SAs associated with an IKE SA, it is essential to confirm
   liveness of the other endpoint to avoid black holes.  If no
   cryptographically protected messages have been received on an IKE SA
   or any of its Child SAs recently, the system needs to perform a
   liveness check in order to prevent sending messages to a dead peer.
   (This is sometimes called "dead peer detection" or "DPD", although it
   is really detecting live peers, not dead ones.)  Receipt of a fresh
   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
   that this places requirements on the failure modes of an IKE
   endpoint.  An implementation needs to stop sending over any SA if
   some failure prevents it from receiving on all of the associated SAs.
   If a system creates Child SAs that can fail independently from one
   another without the associated IKE SA being able to send a delete
   message, then the system MUST negotiate such Child SAs using separate
   IKE SAs.
     リトライ回数とタイムアウト時間はこの仕様に適用されない。SAがgiving upするまでに数分程度かかり、数十回再送することが示唆されているが、環境によって異なる設定が必要になる。ネットワーク環境がよい場合、再送時間はネットワークを溢れさせないようにincrease exponentiallyであること。すべてのIKE SAが発信トラフィックのみの場合、black holeを避けるため、endpointの生存確認が必要である。IKE SAかChild SAで暗号化保護メッセージが受信されていない場合、dead peerへのメッセージ送信を防ぐために生存確認が必要である。これはdead peerではなくlive peerを検知するが、"dead peer detection"か"DPD"と呼ばれる。IKE SAかChild SAで暗号化保護メッセージを受信したらそのIKE SAとすべてのChild SAの生存は保証される。これがIKE endpointのfailure mode 要求であることに注意せよ。実装は、障害が複数のSAにおよぶ場合はそれらのSAでの送信を停止すること。

   There is a DoS attack on the initiator of an IKE SA that can be
   avoided if the initiator takes the proper care.  Since the first two
   messages of an SA setup are not cryptographically protected, an
   attacker could respond to the initiator's message before the genuine
   responder and poison the connection setup attempt.  To prevent this,
   the initiator MAY be willing to accept multiple responses to its
   first message, treat each as potentially legitimate, respond to it,
   and then discard all the invalid half-open connections when it
   receives a valid cryptographically protected response to any one of
   its requests.  Once a cryptographically valid response is received,
   all subsequent responses should be ignored whether or not they are
   cryptographically valid.
     initiatorが適切に処理することで避ける事ができるinitiatorのIKE SAへのDoS攻撃がある。最初のSA setupの2 messageは暗号化されていないため、攻撃者が本物の応答者の応答の前に割り込むことができる。これを防ぐためには、initiatorは最初のメッセージに複数のresponseを受けてもよいこととし、それに応答し、さらに有効な応答を受信したときに他のすべてのhalf-open connectionを破棄する。暗号化された有効な応答が受信されると、以降のすべての応答が有効であるかの検証は不要である。

   Note that with these rules, there is no reason to negotiate and agree
   upon an SA lifetime.  If IKE presumes the partner is dead, based on
   repeated lack of acknowledgement to an IKE message, then the IKE SA
   and all Child SAs set up through that IKE SA are deleted.
     これらのルールでは、SA lifetimeに関係がないことに注意してください。IKEがIKE messageの応答がないことに基づき、対向の障害を検知した場合、IKE SA、そのIKE SAのChild SAが削除される。

   An IKE endpoint may at any time delete inactive Child SAs to recover
   resources used to hold their state.  If an IKE endpoint chooses to
   delete Child SAs, it MUST send Delete payloads to the other end
   notifying it of the deletion.  It MAY similarly time out the IKE SA.
   Closing the IKE SA implicitly closes all associated Child SAs.  In
   this case, an IKE endpoint SHOULD send a Delete payload indicating
   that it has closed the IKE SA unless the other endpoint is no longer
   responding.
     IKE endpointはリソースの回収のためinactiveなChild SAを削除する。IKE endpointがChild SAを削除するときは、対向にDelete payloadを送信し、通知すること。それはIKE SAのタイムアウトのときも同様。閉じるIKE SAに関連するChild SAもクローズする。その場合、IKE endpointは対向が応答しなくなった場合を除き、IKE SAを閉じるDelete payloadを送信すること。

2.5.  Version Numbers and Forward Compatibility

   This document describes version 2.0 of IKE, meaning the major version
   number is 2 and the minor version number is 0.  This document is a
   replacement for [IKEV2].  It is likely that some implementations will
   want to support version 1.0 and version 2.0, and in the future, other
   versions.
   このドキュメントはIKE version 2.0。major 2、minor 0である。

   The major version number should be incremented only if the packet
   formats or required actions have changed so dramatically that an
   older version node would not be able to interoperate with a newer
   version node if it simply ignored the fields it did not understand
   and took the actions specified in the older specification.  The minor
   version number indicates new capabilities, and MUST be ignored by a
   node with a smaller minor version number, but used for informational
   purposes by the node with the larger minor version number.  For
   example, it might indicate the ability to process a newly defined
   Notify message type.  The node with the larger minor version number
   would simply note that its correspondent would not be able to
   understand that message and therefore would not send it.
majorはパケットフォーマット、処理が大幅に変わり、古い仕様と相互運用できないときにインクリメントされる。minorは新たな機能が追加されたときにインクリメントし、古い仕様ではその機能は無視される。例えば新しいnotification typeの追加時。

   If an endpoint receives a message with a higher major version number,
   it MUST drop the message and SHOULD send an unauthenticated Notify
   message of type INVALID_MAJOR_VERSION containing the highest
   (closest) version number it supports.  If an endpoint supports major
   version n, and major version m, it MUST support all versions between
   n and m.  If it receives a message with a major version that it
   supports, it MUST respond with that version number.  In order to
   prevent two nodes from being tricked into corresponding with a lower
   major version number than the maximum that they both support, IKE has
   a flag that indicates that the node is capable of speaking a higher
   major version number.
   endpointが高いメジャーバージョンのメッセージを受信したらサポートする最も高いバージョンを含むINVALID_MAJOR_VERSION notificationを通知する。エンドポイントがm、nのメジャーバージョンをサポートする場合、mとnの間のすべてのメジャーバージョンをサポートすること。ノードは自分がサポートする最大のメジャーバージョンを設定すること。(そうしないと低いメジャーバージョンを設定される攻撃を受ける。)
     
   Thus, the major version number in the IKE header indicates the
   version number of the message, not the highest version number that
   the transmitter supports.  If the initiator is capable of speaking
   versions n, n+1, and n+2, and the responder is capable of speaking
   versions n and n+1, then they will negotiate speaking n+1, where the
   initiator will set a flag indicating its ability to speak a higher
   version.  If they mistakenly (perhaps through an active attacker
   sending error messages) negotiate to version n, then both will notice
   that the other side can support a higher version number, and they
   MUST break the connection and reconnect using version n+1.
   initiatorがn,n+1,n+2をサポートしていて、responderがn,n+1をサポートしていればn+1にネゴシエーションする。
     
   Note that IKEv1 does not follow these rules, because there is no way
   in v1 of noting that you are capable of speaking a higher version
   number.  So an active attacker can trick two v2-capable nodes into
   speaking v1.  When a v2-capable node negotiates down to v1, it should
   note that fact in its logs.
   IKEv1では上記のネゴシエーションはされない。IKEv1を使用するノードには注意すること。
     
   Also, for forward compatibility, all fields marked RESERVED MUST be
   set to zero by an implementation running version 2.0, and their
   content MUST be ignored by an implementation running version 2.0 ("Be
   conservative in what you send and liberal in what you receive" [IP]).
   In this way, future versions of the protocol can use those fields in
   a way that is guaranteed to be ignored by implementations that do not
     understand them.  Similarly, payload types that are not defined are
   reserved for future use; implementations of a version where they are
   undefined MUST skip over those payloads and ignore their contents.
   version 2.0ではRESERVEDは0が設定され、無視されること。未定義のpayload typeも無視すること。
     
   IKEv2 adds a "critical" flag to each payload header for further
   flexibility for forward compatibility.  If the critical flag is set
   and the payload type is unrecognized, the message MUST be rejected
   and the response to the IKE request containing that payload MUST
   include a Notify payload UNSUPPORTED_CRITICAL_PAYLOAD, indicating an
   unsupported critical payload was included.  In that Notify payload,
   the notification data contains the one-octet payload type.  If the
   critical flag is not set and the payload type is unsupported, that
   payload MUST be ignored.  Payloads sent in IKE response messages MUST
   NOT have the critical flag set.  Note that the critical flag applies
   only to the payload type, not the contents.  If the payload type is
   recognized, but the payload contains something that is not (such as
   an unknown transform inside an SA payload, or an unknown Notify
   Message Type inside a Notify payload), the critical flag is ignored.
        IKEv2は上位互換に対応するためcritical flagを設定する。criticalが設定され、payload typeが認識できない場合、そのpayloadを含むUNSUPPORTED_CRITICAL_PAYLOAD notifyを通知する。notification dataには1octetのpayloda typeを含む。critical flagが含まれ、payload typeが未サポートの場合は無視すること。responseにはcriticalを設定しないこと。critical flagはcontentではなくpayload typeに設定されることに注意せよ。payload typeが認識できてもpayloadが認識しないNotify Message Typeだったり、未サポートだった場合はcritical flagは無視される。

   Although new payload types may be added in the future and may appear
   interleaved with the fields defined in this specification,
   implementations SHOULD send the payloads defined in this
   specification in the order shown in the figures in Sections 1 and 2;
   implementations MUST NOT reject as invalid a message with those
   payloads in any other order.
     新しいpayload typeは今後追加されてもよいが、実装ではこの仕様のSection 1、2で規定された順序の定義に従ってpayloadを送信する。実装は他の順序のpayloadを無効としてメッセージを拒否しないこと。

2.6.  IKE SA SPIs and Cookies

   The initial two eight-octet fields in the header, called the "IKE
   SPIs", are used as a connection identifier at the beginning of IKE
   packets.  Each endpoint chooses one of the two SPIs and MUST choose
   them so as to be unique identifiers of an IKE SA.  An SPI value of
   zero is special: it indicates that the remote SPI value is not yet
   known by the sender.
     SPIはヘッダの最初の28オクテットで、IKEパケットの識別子として使用される。各エンドポイントは2つのSPIのいずれかを選択し、IKE SAのユニークな識別子として選択する必要がある。SPI 0はまだSPIが決まっていないことを示す。

   Incoming IKE packets are mapped to an IKE SA only using the packet's
   SPI, not using (for example) the source IP address of the packet.
        着信したパケットはSPIを使用してIKE SAにマッピングされる。パケットのsource IPは使用されない。

 

   Unlike ESP and AH where only the recipient's SPI appears in the
   header of a message, in IKE the sender's SPI is also sent in every
   message.  Since the SPI chosen by the original initiator of the IKE
   SA is always sent first, an endpoint with multiple IKE SAs open that
   wants to find the appropriate IKE SA using the SPI it assigned must
   look at the Initiator flag in the header to determine whether it
   assigned the first or the second eight octets.
     受信者のSPIだけがheaderに設定されるESP/AHと異なり、IKEは送信者のSPIもすべてのmessageに設定される(ESP/AHは片方向、IKEは両方向)。IKE SAのoriginal initiatorによって選択されたSPIは常に最初に送信され、複数のIKE SAをもつendpointはheaderのInitiator flagとSPIを用いてIKE SAをみつける。

Kaufman, et al.              Standards Track                   [Page 30]

RFC 5996                        IKEv2bis                  September 2010

   In the first message of an initial IKE exchange, the initiator will
   not know the responder's SPI value and will therefore set that field
   to zero.  When the IKE_SA_INIT exchange does not result in the
   creation of an IKE SA due to INVALID_KE_PAYLOAD, NO_PROPOSAL_CHOSEN,
   or COOKIE (see Section 2.6), the responder's SPI will be zero also in
   the response message.  However, if the responder sends a non-zero
   responder SPI, the initiator should not reject the response for only
   that reason.
        initial IKE exchangeではinitiatorがresponderのSPIを知ることができないため、responder SPIを0にする。IKE_SA_INIT exchangeでINVALID_KE_PAYLOAD, NO_PROPOSAL_CHOSEN,or COOKIE(Section 2.6参照)によりIKE SAが作成されなかった場合、responseのresponder SPIも0になる。しかし、responderが非0のresponder SPIを送信してきた場合でもinitiatorはそれを理由にresponseを拒否してはいけない。

   Two expected attacks against IKE are state and CPU exhaustion, where
   the target is flooded with session initiation requests from forged IP
   addresses.  These attacks can be made less effective if a responder
   uses minimal CPU and commits no state to an SA until it knows the
   initiator can receive packets at the address from which it claims to
   be sending them.
   2つの攻撃が予想される。偽装した大量のinitiation requestによるsession floodingとCPU負荷である。これらの攻撃はresponderがCPU使用を抑え、session確立までにSAに状態をコミットしない限りあまり問題にはならない。
     
   When a responder detects a large number of half-open IKE SAs, it
   SHOULD reply to IKE_SA_INIT requests with a response containing the
   COOKIE notification.  The data associated with this notification MUST
   be between 1 and 64 octets in length (inclusive), and its generation
   is described later in this section.  If the IKE_SA_INIT response
   includes the COOKIE notification, the initiator MUST then retry the
   IKE_SA_INIT request, and include the COOKIE notification containing
   the received data as the first payload, and all other payloads
   unchanged.  The initial exchange will then be as follows:
        Responderは大量のhalf-open IKE SAを検出すると、COOKIE notificationを含むIKE_SA_INIT Responseを返すこと。この通知のデータ長さは1~64オクテットであること。IKE_SA_INIT responseにCOOKIE notificationが含まれている場合、initiatorはIKE_SA_INITを再送し、COOKIEに含まれたデータを含むCOOKIE通知を含める。他のpayloadは変化させない。下記のような動作になる。

   Initiator                         Responder
   -------------------------------------------------------------------
   HDR(A,0), SAi1, KEi, Ni  -->
                                <--  HDR(A,0), N(COOKIE)
   HDR(A,0), N(COOKIE), SAi1,
       KEi, Ni  -->
                                <--  HDR(A,B), SAr1, KEr,
                                         Nr, [CERTREQ]
   HDR(A,B), SK {IDi, [CERT,]
       [CERTREQ,] [IDr,] AUTH,
       SAi2, TSi, TSr}  -->
                                <--  HDR(A,B), SK {IDr, [CERT,]
                                         AUTH, SAr2, TSi, TSr}

   The first two messages do not affect any initiator or responder state
   except for communicating the cookie.  In particular, the message
   sequence numbers in the first four messages will all be zero and the
   message sequence numbers in the last two messages will be one.  'A'
   is the SPI assigned by the initiator, while 'B' is the SPI assigned
   by the responder.
   最初の2メッセージはresponder/initiatorの状態に影響しない。最初の4メッセージのmessage sequence numberは0になり、最後の2メッセージは1になる。Bはresponderが割り当てたSPIでAはinitiatorが割り当てたSPIである。

Kaufman, et al.              Standards Track                   [Page 31]

RFC 5996                        IKEv2bis                  September 2010

   An IKE implementation can implement its responder cookie generation
   in such a way as to not require any saved state to recognize its
   valid cookie when the second IKE_SA_INIT message arrives.  The exact
   algorithms and syntax used to generate cookies do not affect
   interoperability and hence are not specified here.  The following is
   an example of how an endpoint could use cookies to implement limited
   DoS protection.
     IKEの実装では、2回目のIKE_SA_INITが届いたとき、有効なcookieか識別するため状態を保持する必要ない方法でresponderのcookie生成を実装すること。cookieを生成するためのアルゴリズムは規定しない。以下はCookie生成の例である。

   A good way to do this is to set the responder cookie to be:
        responderはcookieを下記のように計算する。

   Cookie = | Hash(Ni | IPi | SPIi | )

   where is a randomly generated secret known only to the
   responder and periodically changed and | indicates concatenation.
    should be changed whenever is
   regenerated.  The cookie can be recomputed when the IKE_SA_INIT
   arrives the second time and compared to the cookie in the received
   message.  If it matches, the responder knows that the cookie was
   generated since the last change to and that IPi must be the
   same as the source address it saw the first time.  Incorporating SPIi
   into the calculation ensures that if multiple IKE SAs are being set
   up in parallel they will all get different cookies (assuming the
   initiator chooses unique SPIi's).  Incorporating Ni in the hash
   ensures that an attacker who sees only message 2 can't successfully
   forge a message 3.  Also, incorporating SPIi in the hash prevents an
   attacker from fetching one cookie from the other end, and then
   initiating many IKE_SA_INIT exchanges all with different initiator
   SPIs (and perhaps port numbers) so that the responder thinks that
   there are a lot of machines behind one NAT box that are all trying to
   connect.
     のみresponderのみ知っている値でランダムに生成され、変更される。|は連結を意味する。の再生成のたびにを変更すること。cookieは2度目のIKE_SA_INITを受信したときに再計算し、受信したmessage内のcookieと比較する。一致した場合、responderは最後に変更されたとsource IPと同じIPiから生成されたCookieを求める。計算にSPIiを組み込むことにより、複数のIKE SAが異なるCookieになることが保証される(initiatorがユニークなSPIiを選択することを想定している)。Niをハッシュに組み込むことで、攻撃者がmessage2からmessage3を偽装することができなくなる。ハッシュにSPIiを組み込むことは、攻撃者がcookieを解析するのを防ぐ。

   If a new value for is chosen while there are connections in
   the process of being initialized, an IKE_SA_INIT might be returned
   with other than the current .  The responder in
   that case MAY reject the message by sending another response with a
   new cookie or it MAY keep the old value of around for a
   short time and accept cookies computed from either one.  The
   responder should not accept cookies indefinitely after is
   changed, since that would defeat part of the DoS protection.  The
   responder should change the value of frequently, especially
   if under attack.
     接続中に新しいが選択され、異なるでIKE_SA_INITが返される可能性がある。その場合、Responderはmessageを拒否して新しいcookieを持つ応答をするか、短い時間ならば古いを維持し、cookieを受け入れてもよい。DoS攻撃への保護を無効にしてしまうため、responderは変更前のを無期限に許可しないこと。responderは特に攻撃に対する保護のためを頻繁に変更すること。

   When one party receives an IKE_SA_INIT request containing a cookie
   whose contents do not match the value expected, that party MUST
   ignore the cookie and process the message as if no cookie had been
   included; usually this means sending a response containing a new
   cookie.  The initiator should limit the number of cookie exchanges it
   tries before giving up, possibly using exponential back-off.  An
   attacker can forge multiple cookie responses to the initiator's
   IKE_SA_INIT message, and each of those forged cookie replies will
   cause two packets to be sent: one packet from the initiator to the
   responder (which will reject those cookies), and one response from
   responder to initiator that includes the correct cookie.
     期待値でないcookieを含むIKE_SA_INIT requestを受信した場合、cookieを無視し、cookieが含まれていなかったとしてメッセージを処理すること(通常は新しいcookieを含むresponseを送信する)。initiatorはexponential back-offを使用して、cookie exchangeの回数を制限する必要がある。攻撃者はinitiatorのIKE_SA_INITに対して複数のcookie responseを偽装できる。1つはinitioarからrespondeへのパケットでこれは、cookieをリジェクトする。もう一つはresponderからinitiatorへのresponseでこれは正しいcookieを含む。

   A note on terminology: the term "cookies" originates with Karn and
   Simpson [PHOTURIS] in Photuris, an early proposal for key management
   with IPsec, and it has persisted.  The Internet Security Association
   and Key Management Protocol (ISAKMP) [ISAKMP] fixed message header
   includes two eight-octet fields called "cookies", and that syntax is
   used by both IKEv1 and IKEv2, although in IKEv2 they are referred to
   as the "IKE SPI" and there is a new separate field in a Notify
   payload holding the cookie.
     用語について:cookiesはIPsecのkey managementの[PHOTURIS]から続く用語である。ISAKAMPでは8 octet固定のcookieというフィールドがあり、IKEv1/IKEv2でsyntaxは使用されているが、IKEv2ではそれらはIKE SPIと呼ばれ、cookieは新しい別のNotify payloadに設定されている。

 

2.6.1.  Interaction of COOKIE and INVALID_KE_PAYLOAD

   There are two common reasons why the initiator may have to retry the
   IKE_SA_INIT exchange: the responder requests a cookie or wants a
   different Diffie-Hellman group than was included in the KEi payload.
   If the initiator receives a cookie from the responder, the initiator
   needs to decide whether or not to include the cookie in only the next
   retry of the IKE_SA_INIT request, or in all subsequent retries as
   well.
          initiatorがIKE_SA_INIT exchangeをリトライする必要がある理由は2つある。responderがcookieを要求、KEi payloadに含まれるDiffie-Hellman groupと異なるものを要求するから。initiatorはresponderからcookieを受信した場合、initiatorは次のIKE_SA_INIT再送にだけcookieを含めるか、以降の全てのリトライにcookieを含めるかを決める必要がある。

   If the initiator includes the cookie only in the next retry, one
   additional round trip may be needed in some cases.  An additional
   round trip is needed also if the initiator includes the cookie in all
   retries, but the responder does not support this.  For instance, if
   the responder includes the KEi payloads in cookie calculation, it
   will reject the request by sending a new cookie.
     initiatorが次の再送にだけcookieを含める場合、1つのラウドトリップ追加が必要になる場合がある。すべての応答にcookieを含める場合もこのラウンドトリップが必要になるが、responderはこれをサポートしない。responderがKEi payloadをcookieの計算に使用する場合、新しいcookieを送信することでこれを拒否する。

   If both peers support including the cookie in all retries, a slightly
   shorter exchange can happen.
     両方のpeerがすべてのリトライにcookieを含むことをサポートする場合、下記の短いexchangeが必要になる場合がある。

   Initiator                   Responder
   -----------------------------------------------------------
   HDR(A,0), SAi1, KEi, Ni -->
                           <-- HDR(A,0), N(COOKIE)
   HDR(A,0), N(COOKIE), SAi1, KEi, Ni  -->
                           <-- HDR(A,0), N(INVALID_KE_PAYLOAD)
   HDR(A,0), N(COOKIE), SAi1, KEi', Ni -->
                           <-- HDR(A,B), SAr1, KEr, Nr

   Implementations SHOULD support this shorter exchange, but MUST NOT
   fail if other implementations do not support this shorter exchange.
     実装ではこの短いechangeをサポートすること。ただし、他の実装がこの短いexchangeをサポートしていなくてもfailにならないこと。

Kaufman, et al.              Standards Track                   [Page 33]

RFC 5996                        IKEv2bis                  September 2010


2.7.  Cryptographic Algorithm Negotiation

   The payload type known as "SA" indicates a proposal for a set of
   choices of IPsec protocols (IKE, ESP, or AH) for the SA as well as
   cryptographic algorithms associated with each protocol.
          SAのpayload typeはSAのためのIPsec protocol(IKE, ESP, AH)と同様に各プロトコルに関連する暗号化アルゴリズムを示す。

   An SA payload consists of one or more proposals.  Each proposal
   includes one protocol.  Each protocol contains one or more transforms
   -- each specifying a cryptographic algorithm.  Each transform
   contains zero or more attributes (attributes are needed only if the
   Transform ID does not completely specify the cryptographic
   algorithm).
          SA payloadは1つ以上のproposalで構成される。各proposalは1つのprotocolを含む。各protocolは1つ以上のtransform(暗号化アルゴリズムを規定する)で構成される。各transformは0以上のattributeで構成される。attributeはTransform IDが暗号化アルゴリズムを完全に規定できない場合に必要(例:キー長など)。

   This hierarchical structure was designed to efficiently encode
   proposals for cryptographic suites when the number of supported
   suites is large because multiple values are acceptable for multiple
   transforms.  The responder MUST choose a single suite, which may be
   any subset of the SA proposal following the rules below.
     階層構造は複数の値がtransformに許容されるため、サポートするsuiteの数が多い場合に効率的にエンコードできるように設計されている。responderは以下のルールに従って1つのsuiteを選択すること。

   Each proposal contains one protocol.  If a proposal is accepted, the
   SA response MUST contain the same protocol.  The responder MUST
   accept a single proposal or reject them all and return an error.  The
   error is given in a notification of type NO_PROPOSAL_CHOSEN.
     各proposalは1つのprotocolを含む。protocolが許容された場合、SAの応答に同じprotocolを含むこと。Responderは1つのprotocolを許容するか、すべてのprotocolを拒否してエラーを返すこと。エラーはNO_PROPOSAL_CHOSENで通知される。

   Each IPsec protocol proposal contains one or more transforms.  Each
   transform contains a Transform Type.  The accepted cryptographic
   suite MUST contain exactly one transform of each type included in the
   proposal.  For example: if an ESP proposal includes transforms
   ENCR_3DES, ENCR_AES w/keysize 128, ENCR_AES w/keysize 256,
   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
   combinations are acceptable.
          IPsec protocol proposalは1つ以上のtransformを含む。各TransformはTransform typeを含む。許容された暗号化suiteはproposalに含まれる1つのtransformであること。次のようなESPのproposalはTransform(ENCR_3DES. ENCR-AES w/keysize 128, ENCR_AES w/keysize 256, AUTH_HMAC_MD5, AUTH_HMAC_SHA)で許容するsuiteは1つのENCR_ transformと1つのAUTH_ transformを含むこと。そのため6つの組み合わせが許容される。ENCR_が3、AUTH_が2だから。

   If an initiator proposes both normal ciphers with integrity
   protection as well as combined-mode ciphers, then two proposals are
   needed.  One of the proposals includes the normal ciphers with the
   integrity algorithms for them, and the other proposal includes all
   the combined-mode ciphers without the integrity algorithms (because
   combined-mode ciphers are not allowed to have any integrity algorithm
   other than "none").
          initiatorがintegrity protectionだけでなく、combined-modeの暗号を提案してきた場合、2つのproposalが必要になる。1つのproposalには通常のintegrity algorithmが含まれる。もう一方はintegrity algorithmを除くcombined-mode 暗号が含まれる。(combined-mode 暗号は"none"以外のintegrity algorithmを許容しないため)

2.8.  Rekeying

   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
   amount of data.  This limits the lifetime of the entire Security
   Association.  When the lifetime of a Security Association expires,
   the Security Association MUST NOT be used.  If there is demand, new
     Security Associations MAY be established.  Reestablishment of
   Security Associations to take the place of ones that expire is
   referred to as "rekeying".
        IKE、ESP、AHのSecurity Associationは限られた時間とデータ量のもとで使用されること。
   これはSecurity Associationのライフタイムを制限する。Security Associationのライフタイムが期限切れになった場合、そのSecurity Associatoinを使用してはいけない。要求があれば新しいSecurity Associationを確立してもよい。有効期限切れのSecurity Associationの代わりに新しいSecurity Associationを再確立することをrekeyingという。

   To allow for minimal IPsec implementations, the ability to rekey SAs
   without restarting the entire IKE SA is optional.  An implementation
   MAY refuse all CREATE_CHILD_SA requests within an IKE SA.  If an SA
   has expired or is about to expire and rekeying attempts using the
   mechanisms described here fail, an implementation MUST close the IKE
   SA and any associated Child SAs and then MAY start new ones.
   Implementations may wish to support in-place rekeying of SAs, since
   doing so offers better performance and is likely to reduce the number
   of packets lost during the transition.
        最小限のIPsec実装を許容するため、IKE SAをリスタートせずにSAをrekeyする機能はオプションである。実装ではIKE SAのCREATE_CHILD_SA requestを拒否してもよい。SAの有効期限切れになった場合またはrekeyが失敗した場合、実装はIKE SAと関連するChild SAをクローズすること。その後、新しいSAを開始してよい。
   実装は、パフォーマンスアップとパケットロスを減らすためSAのin-place rekeyをサポートしてよい。

   To rekey a Child SA within an existing IKE SA, create a new,
   equivalent SA (see Section 2.17 below), and when the new one is
   established, delete the old one.  Note that, when rekeying, the new
   Child SA SHOULD NOT have different Traffic Selectors and algorithms
   than the old one.
        既存のIKE SA内のChild SAのrekeyでは、同じChild SAが新しく作成され、古いChild SAは削除される。rekeyした新しいChild SAは古いChild SAと異なるTraffic Selectorを持たないこと。

   To rekey an IKE SA, establish a new equivalent IKE SA (see
   Section 2.18 below) with the peer to whom the old IKE SA is shared
   using a CREATE_CHILD_SA within the existing IKE SA.  An IKE SA so
   created inherits all of the original IKE SA's Child SAs, and the new
   IKE SA is used for all control messages needed to maintain those
   Child SAs.  After the new equivalent IKE SA is created, the initiator
   deletes the old IKE SA, and the Delete payload to delete itself MUST
   be the last request sent over the old IKE SA.
        IKE SAのrekeyのために、既存のIKE SAの中のCREATE_CHILD_SAを使用してpeerと共有される新しいIKE SA(Section 2.18)を確立する。作成されたIKE SAはオリジナルのIKE SAのChild SAをすべて継承し、新しいIKE SAはそれらのChild SAを維持に必要な制御メッセージ送信に使用される。新しい同じIKE SAが作成された後、initiatorは古いIKE SAを削除する。自身を削除するDlelete payloadを古いIKE SAで送信される最後の要求である。

   SAs should be rekeyed proactively, i.e., the new SA should be
   established before the old one expires and becomes unusable.  Enough
   time should elapse between the time the new SA is established and the
   old one becomes unusable so that traffic can be switched over to the
   new SA.
        古いSAが期限切れになる前に新しいSAが確立されること。   十分な時間が、新しいSAが確立と、古いSAが使用できなくなりトラフィックが新しいSAに切り替えるまでにあること。

   A difference between IKEv1 and IKEv2 is that in IKEv1 SA lifetimes
   were negotiated.  In IKEv2, each end of the SA is responsible for
   enforcing its own lifetime policy on the SA and rekeying the SA when
   necessary.  If the two ends have different lifetime policies, the end
   with the shorter lifetime will end up always being the one to request
   the rekeying.  If an SA has been inactive for a long time and if an
   endpoint would not initiate the SA in the absence of traffic, the
   endpoint MAY choose to close the SA instead of rekeying it when its
   lifetime expires.  It can also do so if there has been no traffic
   since the last time the SA was rekeyed.
   IKEv1とIKEv2の違いはIKEv1 SA lifetimeはネゴシエーションされることである。   IKEv2では、各endがSAのライフタイムポリシーを持ち、必要に応じてSAをrekeyする。両endが異なるlifetime policyの場合、短いlifetimeのendが常にrekeyのrequestをする。SAが長時間動作しておらず、endpointがSAを作成しない場合、endpointはlifetime満了後のrekeyでSAを閉じることを選択してもよい。SAが前回のrekeyからトラフィックが無い場合にも同様。

Kaufman, et al.              Standards Track                   [Page 35]

RFC 5996                        IKEv2bis                  September 2010

   Note that IKEv2 deliberately allows parallel SAs with the same
   Traffic Selectors between common endpoints.  One of the purposes of
   this is to support traffic quality of service (QoS) differences among
   the SAs (see [DIFFSERVFIELD], [DIFFSERVARCH], and Section 4.1 of
   [DIFFTUNNEL]).  Hence unlike IKEv1, the combination of the endpoints
   and the Traffic Selectors may not uniquely identify an SA between
   those endpoints, so the IKEv1 rekeying heuristic of deleting SAs on
   the basis of duplicate Traffic Selectors SHOULD NOT be used.
        IKEv2は共通のendpoint間のTraffic Selectorで並行にSAを許可していることに注意せよ。この目的の一つはSAのQoSのためである。IKEv1ではendpointとTraffic Selectorの組み合わせが異なる。

 

   There are timing windows -- particularly in the presence of lost
   packets -- where endpoints may not agree on the state of an SA.  The
   responder to a CREATE_CHILD_SA MUST be prepared to accept messages on
   an SA before sending its response to the creation request, so there
   is no ambiguity for the initiator.  The initiator MAY begin sending
   on an SA as soon as it processes the response.  The initiator,
   however, cannot receive on a newly created SA until it receives and
   processes the response to its CREATE_CHILD_SA request.  How, then, is
   the responder to know when it is OK to send on the newly created SA?
     endpoint間でSAの状態が不一致になるtiming windowがある(lost packetが発生した場合)。responderはCREATE_CHILD_SAへの応答送信前にSAに関するメッセージを許容できる準備をすること。そのため、initiatorへのSA状態で問題はない。initiatorはresponse処理の後いつでもそのSAに送信を開始してもよい。InitiatorはCREATE_CHILD_SAの応答を受け取るまで新しいSAで受信することはできない。responderはどのようにして新しいSAで送信してよいことを知るのか。

   From a technical correctness and interoperability perspective, the
   responder MAY begin sending on an SA as soon as it sends its response
   to the CREATE_CHILD_SA request.  In some situations, however, this
   could result in packets unnecessarily being dropped, so an
   implementation MAY defer such sending.
     技術的観点から、responderはCREATE_CHILD_SAを応答したらすぐにSAに送信を開始してよい。しかし、場合によってはパケットのdropになる可能性があり、実装はそのような送信を延長してもよい。

   The responder can be assured that the initiator is prepared to
   receive messages on an SA if either (1) it has received a
   cryptographically valid message on the other half of the SA pair, or
   (2) the new SA rekeys an existing SA and it receives an IKE request
   to close the replaced SA.  When rekeying an SA, the responder
   continues to send traffic on the old SA until one of those events
   occurs.  When establishing a new SA, the responder MAY defer sending
   messages on a new SA until either it receives one or a timeout has
   occurred.  If an initiator receives a message on an SA for which it
   has not received a response to its CREATE_CHILD_SA request, it
   interprets that as a likely packet loss and retransmits the
   CREATE_CHILD_SA request.  An initiator MAY send a dummy ESP message
   on a newly created ESP SA if it has no messages queued in order to
   assure the responder that the initiator is ready to receive messages.
     responderはinitiatorがSAでメッセージを受信できる準備ができていると想定できる、(1)SAで暗号化された正しいメッセージを受信できた場合か(2)新しいSAで既存のSAをrekeyしSAを閉じるIKE requestを受信した場合。SAをrekeyした場合、responderはそれらのイベントが起きるまで古いSAでトラフィック送信を続ける。新しいSAが確立した場合、responderはnew SAでメッセージを受信するか、old SAでタイムアウトが発生するまで新しいSAでの送信を延期してよい。initiatorはCREATE_CHILD_SA requestの応答を受信せずにSAでmessageを受信した場合、パケットlossが発生したと解釈し、CREATE_CHILD_SA requestを再送する。initiaorは、initiatorがメッセージ受信できることをresponderに示すためにメッセージキューに入れられないダミーのESPメッセージを新しいESP SAに送信してもよい。

2.8.1.  Simultaneous Child SA Rekeying

   If the two ends have the same lifetime policies, it is possible that
   both will initiate a rekeying at the same time (which will result in
   redundant SAs).  To reduce the probability of this happening, the
   timing of rekeying requests SHOULD be jittered (delayed by a random
   amount of time after the need for rekeying is noticed).
        両endが同じlifetime policyの場合、同時にrekeyする可能性がある(冗長なSAになる)。この事象の確率を軽減するためにrekey requestのタイミングはジッターされること(Rekeyが必要になった後のランダム時間後に通知する)。

Kaufman, et al.              Standards Track                   [Page 36]

RFC 5996                        IKEv2bis                  September 2010


   This form of rekeying may temporarily result in multiple similar SAs
   between the same pairs of nodes.  When there are two SAs eligible to
   receive packets, a node MUST accept incoming packets through either
   SA.  If redundant SAs are created though such a collision, the SA
   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
   octet-by-octet comparison (instead of, for instance, 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
   you reach the end of one nonce, that nonce is the lower one.  The
   node that initiated the surviving rekeyed SA should delete the
   replaced SA after the new one is established.
     Rekeyingのシステムは、node間で一時的に複数の同じSAになることがある。パケットを受信する条件のSAが2つ存在する場合、nodeはいずれかのSAを介してパケットを受信すること。衝突する冗長なSAが作成された場合、2 exchangeで使用される4つのnonceの"最小"のものをnonceを生成したendpointは作成したAを閉じる。"最小"のオクテット毎の比較を意味する。すなわち最初のオクテットを比較し、等しいならその次のオクテットに移動する。rekeyを開始したnodeは新しいSAが確立された後、SAを削除する必要がある。

   The following is an explanation on the impact this has on
   implementations.  Assume that hosts A and B have an existing Child SA
   pair with SPIs (SPIa1,SPIb1), and both start rekeying it at the same
   time:
        下記は実装影響の説明である。host A、BにSPIa1、SPIb1のChild SAがあり、同じ時間に両方がrekeyを開始すると仮定する。

   Host A                            Host B
   -------------------------------------------------------------------
   send req1: N(REKEY_SA,SPIa1),
       SA(..,SPIa2,..),Ni1,..  -->
                                <--  send req2: N(REKEY_SA,SPIb1),
                                         SA(..,SPIb2,..),Ni2
   recv req2 <--

   At this point, A knows there is a simultaneous rekeying happening.
   However, it cannot yet know which of the exchanges will have the
   lowest nonce, so it will just note the situation and respond as
   usual.
     この時点でAはrekeyの再発行が起こったことを検知する。しかし、exchangeの最小のnonceを知ることができないので、状況に注意し通常通りresponseを返す。

   send resp2: SA(..,SPIa3,..),
        Nr1,..  -->
                                -->  recv req1

   Now B also knows that simultaneous rekeying is going on.  It responds
   as usual.
        Bも同時にrekeyが発生したことを知る。通常通りresponseを返す。

                               <--  send resp1: SA(..,SPIb3,..),
                                        Nr2,..
   recv resp1 <--
                               -->  recv resp2

   At this point, there are three Child SA pairs between A and B (the
   old one and two new ones).  A and B can now compare the nonces.
   Suppose that the lowest nonce was Nr1 in message resp2; in this case,
   B (the sender of req2) deletes the redundant new SA, and A (the node
   that initiated the surviving rekeyed SA), deletes the old one.
        この時点でAとBとの間に3 Child SAがある(古い1、新しい2)。A、Bは新しいnonceを比較する。最小のnonceがメッセージresp2のNr1だった場合、B(req2の送信者)は冗長のSAを削除し、A(残る方のrekey SAの生成node)は古いSAを削除する。

Kaufman, et al.              Standards Track                   [Page 37]

RFC 5996                        IKEv2bis                  September 2010


   send req3: D(SPIa1) -->
                                <--  send req4: D(SPIb2)
                                -->  recv req3
                                <--  send resp3: D(SPIb1)
   recv req4 <--
   send resp4: D(SPIa3) -->

   The rekeying is now finished.

   However, there is a second possible sequence of events that can
   happen if some packets are lost in the network, resulting in
   retransmissions.  The rekeying begins as usual, but A's first packet
   (req1) is lost.
        ネットワークのパケットロス、再送により発生するシーケンスがある。rekeyが始まり、Aの最初のパケット(req1)がlostする。

   Host A                            Host B
   -------------------------------------------------------------------
   send req1: N(REKEY_SA,SPIa1),
       SA(..,SPIa2,..),
       Ni1,..  -->  (lost)
                                <--  send req2: N(REKEY_SA,SPIb1),
                                         SA(..,SPIb2,..),Ni2
   recv req2 <--
   send resp2: SA(..,SPIa3,..),
       Nr1,.. -->
                                -->  recv resp2
                                <--  send req3: D(SPIb1)
   recv req3 <--
   send resp3: D(SPIa1) -->
                                -->  recv resp3

   From B's point of view, the rekeying is now completed, and since it
   has not yet received A's req1, it does not even know that there was
   simultaneous rekeying.  However, A will continue retransmitting the
   message, and eventually it will reach B.
     B観点では、rekeyは完了しているが、Aのreq1を受信していないため同時にrekeyがあったことを知らない。Aはメッセージの再送をするため、最終的にはそれがBに届く。

   resend req1 -->
                                -->  recv req1

   To B, it looks like A is trying to rekey an SA that no longer exists;
   thus, B responds to the request with something non-fatal such as
   CHILD_SA_NOT_FOUND.
        BにはAが存在しないSAのrekeyにみえるため、BはCHILD_SA_NOT_FOUNDで致命的ではない通知として応答する。

                                <--  send resp1: N(CHILD_SA_NOT_FOUND)
   recv resp1 <--

   When A receives this error, it already knows there was simultaneous
   rekeying, so it can ignore the error message.
   Aはこのメッセージの受信時、既に同時にrekeyが発生したことを知っているのでエラーメッセージを無視してよい。

Kaufman, et al.              Standards Track                   [Page 38]

RFC 5996                        IKEv2bis                  September 2010


2.8.2.  Simultaneous IKE SA Rekeying

   Probably the most complex case occurs when both peers try to rekey
   the IKE_SA at the same time.  Basically, the text in Section 2.8
   applies to this case as well; however, it is important to ensure that
   the Child SAs are inherited by the correct IKE_SA.
   両方のpeerがIKE_SAをrekeyすると複雑なケースが発生する。基本的なSection 2.8はこの場合も同様である。Child SAが正しいIKE SAに継承されるのが重要である。
     
   The case where both endpoints notice the simultaneous rekeying works
   the same way as with Child SAs.  After the CREATE_CHILD_SA exchanges,
   three IKE SAs exist between A and B: the old IKE SA and two new IKE
   SAs.  The new IKE SA containing the lowest nonce SHOULD be deleted by
   the node that created it, and the other surviving new IKE SA MUST
   inherit all the Child SAs.
   両endpointが同時にrekeyを検知した場合、Child SAのケースと同じ動作になる。CREATE_CHILD_SA exchangeの後、A、Bには3つのIKE SAがある(新2、古1)。最小のnonceを含むIKE SAは、それを作成したnodeによって削除され、残った新しいIKE SAはすべてのChild SAを継承すること。
     
   In addition to normal simultaneous rekeying cases, there is a special
   case where one peer finishes its rekey before it even notices that
   other peer is doing a rekey.  If only one peer detects a simultaneous
   rekey, redundant SAs are not created.  In this case, when the peer
   that did not notice the simultaneous rekey gets the request to rekey
   the IKE SA that it has already successfully rekeyed, it SHOULD return
   TEMPORARY_FAILURE because it is an IKE SA that it is currently trying
   to close (whether or not it has already sent the delete notification
   for the SA).  If the peer that did notice the simultaneous rekey gets
   the delete request from the other peer for the old IKE SA, it knows
   that the other peer did not detect the simultaneous rekey, and the
   first peer can forget its own rekey attempt.
通常の同時rekeyのケースに加え、peerがrekeyの実行前に片方のpeerがrekeyを終了する特殊なケースがある。peerが同時rekeyを検知した場合、冗長なSAは作成されない。同時rekeyを検知できなかったpeerが既にrekeyされたIKE SAのrekey requestを受信した場合、それはクローズするIKE SAなのでTEMPORARY_FAILUREを送信する(Deleteを送信しているかどうかに関わらない)。delete requestを受信した場合、peerは対向が同時rekeyを検出しなかったことと、自身のrekeyを無視することを知っている。

   Host A                      Host B
   -------------------------------------------------------------------
   send req1:
        SA(..,SPIa1,..),Ni1,.. -->
                             <-- send req2: SA(..,SPIb1,..),Ni2,..
                             --> recv req1
                             <-- send resp1: SA(..,SPIb2,..),Nr2,..
   recv resp1 <--
   send req3: D() -->
                             --> recv req3

   At this point, host B sees a request to close the IKE_SA.  There's
   not much more to do than to reply as usual.  However, at this point
   host B should stop retransmitting req2, since once host A receives
   resp3, it will delete all the state associated with the old IKE_SA
   and will not be able to reply to it.
   この時点でhost BはIKE_SAを閉じるrequestを受信する。Bは通常通り応答する。host Aはresp3を受信するため、host Bはreq2の再送を停止する。Bは古いIKE_SAを削除し、それによりそれで応答することができない。
     
                             <-- send resp3: ()

   The TEMPORARY_FAILURE notification was not included in RFC 4306, and
   support of the TEMPORARY_FAILURE notification is not negotiated.
     Thus, older peers that implement RFC 4306 but not this document may
   receive these notifications.  In that case, they will treat it the
   same as any other unknown error notification, and will stop the
   exchange.  Because the other peer has already rekeyed the exchange,
   doing so does not have any ill effects.
        TEMPORARY_FAILURE notificatonはRFC4306に含まれておらず、TEMPORARY_FAILURE notificationのネゴシエーションはサポートされない。RFC4306より古いpeerもこの通知を受信することができる。その場合、任意の未知のエラーnotificationとして扱い、exchnageを終了する。対向が既にrekeyしているため、影響はない。

2.8.3.  Rekeying the IKE SA versus Reauthentication

   Rekeying the IKE SA and reauthentication are different concepts in
   IKEv2.  Rekeying the IKE SA establishes new keys for the IKE SA and
   resets the Message ID counters, but it does not authenticate the
   parties again (no AUTH or EAP payloads are involved).
        IKE SAのrekeyとreauthenticationはIKEv2では異なるコンセプトである。IKE SAのrekeyでは新しいkeyのIKE SAの確立とMessage IDのリセットをする。ただし、認証はしない(AUTH payload/EAP payloadは関係しない)。

   Although rekeying the IKE SA may be important in some environments,
   reauthentication (the verification that the parties still have access
   to the long-term credentials) is often more important.
        IKE SAのrekeyは重要であるが、reauthenticationもより重要である。

   IKEv2 does not have any special support for reauthentication.
   Reauthentication is done by creating a new IKE SA from scratch (using
   IKE_SA_INIT/IKE_AUTH exchanges, without any REKEY_SA Notify
   payloads), creating new Child SAs within the new IKE SA (without
   REKEY_SA Notify payloads), and finally deleting the old IKE SA (which
   deletes the old Child SAs as well).
        IKEv2ではreauthenticationのための特別なサポートはない。reauthenticationは新しいIKE SAを作成して行われる(IKE_SA_INIT/IKE_AUTH exchange、REKEY_SA Notify payloadを通知しない)。新しいIKE SAで新しいChild SAを作成し、古いIKE SA、古いChild SAを削除する。

   This means that reauthentication also establishes new keys for the
   IKE SA and Child SAs.  Therefore, while rekeying can be performed
   more often than reauthentication, the situation where "authentication
   lifetime" is shorter than "key lifetime" does not make sense.
        これはreauthenticationでもIKE SAとChild SAの新しいkeyが確立することを意味する。rekeyはreauthenticationより頻繁に実行できるが、"authentication lifetime"が"key lifetime"より短くなっていては意味が無い。

   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
   and/or Configuration payloads means in practice that reauthentication
   has to be initiated by the same party as the original IKE SA.  IKEv2
   does not currently allow the responder to request reauthentication in
   this case; however, there are extensions that add this functionality
   such as [REAUTH].
        新しいIKE SAの作成はどちらから(original IKE SAのinitiator or responder)でも開始できるが、EAP and/or Configuration payloadを使用すると、reauthenticationはoriginal IKE SAと同じ側から開始されなければいけない。IKEv2は現在、responderがreatuthenticationを要求することができない。しかし、[REAUTH]の拡張を追加することでこの機能を追加できる。

 

最終更新:2015年05月06日 22:04