draft-ietf-hip-base-01.txt | draft-ietf-hip-base-02.txt | |||
---|---|---|---|---|
Network Working Group R. Moskowitz | Network Working Group R. Moskowitz | |||
Internet-Draft ICSAlabs, a Division of TruSecure | Internet-Draft ICSAlabs, a Division of TruSecure | |||
Expires: April 25, 2005 Corporation | Expires: August 25, 2005 Corporation | |||
P. Nikander | P. Nikander | |||
P. Jokela (editor) | P. Jokela (editor) | |||
Ericsson Research NomadicLab | Ericsson Research NomadicLab | |||
T. Henderson | T. Henderson | |||
The Boeing Company | The Boeing Company | |||
October 25, 2004 | February 21, 2005 | |||
Host Identity Protocol | Host Identity Protocol | |||
draft-ietf-hip-base-01 | draft-ietf-hip-base-02 | |||
Status of this Memo | Status of this Memo | |||
By submitting this Internet-Draft, I certify that any applicable | This document is an Internet-Draft and is subject to all provisions | |||
patent or other IPR claims of which I am aware have been disclosed, | of Section 3 of RFC 3667. By submitting this Internet-Draft, each | |||
and any of which I become aware will be disclosed, in accordance with | author represents that any applicable patent or other IPR claims of | |||
which he or she is aware have been or will be disclosed, and any of | ||||
which he or she become aware will be disclosed, in accordance with | ||||
RFC 3668. | RFC 3668. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF), its areas, and its working groups. Note that other | Task Force (IETF), its areas, and its working groups. Note that | |||
groups may also distribute working documents as Internet-Drafts. | other groups may also distribute working documents as | |||
Internet-Drafts. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
The list of current Internet-Drafts can be accessed at http:// | The list of current Internet-Drafts can be accessed at | |||
www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
This Internet-Draft will expire on April 25, 2005. | This Internet-Draft will expire on August 25, 2005. | |||
Copyright Notice | Copyright Notice | |||
Copyright (C) The Internet Society (2004). All Rights Reserved. | Copyright (C) The Internet Society (2005). | |||
Abstract | Abstract | |||
This memo specifies the details of the Host Identity Protocol (HIP). | This memo specifies the details of the Host Identity Protocol (HIP). | |||
The overall description of protocol and the underlying architectural | The overall description of protocol and the underlying architectural | |||
thinking is available in the separate HIP architecture specification. | thinking is available in the separate HIP architecture specification. | |||
The Host Identity Protocol is used to establish a rapid | The Host Identity Protocol is used to establish a rapid | |||
authentication between two hosts and to provide continuity of | authentication between two hosts and to provide continuity of | |||
communications between those hosts independent of the networking | communications between those hosts independent of the networking | |||
layer. | layer. | |||
The various forms of the Host Identity, Host Identity Tag (HIT) and | The various forms of the Host Identity, Host Identity Tag (HIT) and | |||
Local Scope Identifier (LSI), are covered in detail. It is described | Local Scope Identifier (LSI), are covered in detail. It is described | |||
how they are used to support authentication and the establishment of | how they are used to support authentication and the establishment of | |||
skipping to change at page 2, line 10 | skipping to change at page 2, line 15 | |||
The overall description of protocol and the underlying architectural | The overall description of protocol and the underlying architectural | |||
thinking is available in the separate HIP architecture specification. | thinking is available in the separate HIP architecture specification. | |||
The Host Identity Protocol is used to establish a rapid | The Host Identity Protocol is used to establish a rapid | |||
authentication between two hosts and to provide continuity of | authentication between two hosts and to provide continuity of | |||
communications between those hosts independent of the networking | communications between those hosts independent of the networking | |||
layer. | layer. | |||
The various forms of the Host Identity, Host Identity Tag (HIT) and | The various forms of the Host Identity, Host Identity Tag (HIT) and | |||
Local Scope Identifier (LSI), are covered in detail. It is described | Local Scope Identifier (LSI), are covered in detail. It is described | |||
how they are used to support authentication and the establishment of | how they are used to support authentication and the establishment of | |||
keying material, which is then used by IPsec Encapsulated Security | keying material, which is then used for protecting subsequent HIP | |||
payload (ESP) to establish a two-way secured communication channel | messages, and which can be used for generating session keys for other | |||
between the hosts. The basic state machine for HIP provides a HIP | security protocols, such as IPsec Encapsulaed Security Payload (ESP). | |||
compliant host with the resiliency to avoid many denial-of-service | The basic state machine for HIP provides a HIP compliant host with | |||
(DoS)attacks. The basic HIP exchange for two public hosts shows the | the resiliency to avoid many denial-of-service (DoS) attacks. The | |||
actual packet flow. Other HIP exchanges, including those that work | basic HIP exchange for two public hosts shows the actual packet flow. | |||
across NATs are covered elsewhere. | Other HIP exchanges, including those that work across NATs, are | |||
covered elsewhere. | ||||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1.1 A new name space and identifiers . . . . . . . . . . . . . 5 | 1.1 A new name space and identifiers . . . . . . . . . . . . . 6 | |||
1.2 The HIP protocol . . . . . . . . . . . . . . . . . . . . . 5 | 1.2 The HIP base exchange . . . . . . . . . . . . . . . . . . 6 | |||
2. Conventions used in this document . . . . . . . . . . . . . 7 | 2. Conventions used in this document . . . . . . . . . . . . . 8 | |||
3. Host Identifier (HI) and its representations . . . . . . . . 8 | 3. Host Identifier (HI) and its representations . . . . . . . . 9 | |||
3.1 Host Identity Tag (HIT) . . . . . . . . . . . . . . . . . 8 | 3.1 Host Identity Tag (HIT) . . . . . . . . . . . . . . . . . 9 | |||
3.1.1 Generating a HIT from a HI . . . . . . . . . . . . . . 9 | 3.1.1 Restricting HIT values . . . . . . . . . . . . . . . . 10 | |||
3.2 Local Scope Identifier (LSI) . . . . . . . . . . . . . . . 11 | 3.1.2 Generating a HIT from a HI . . . . . . . . . . . . . . 11 | |||
3.3 Security Parameter Index (SPI) . . . . . . . . . . . . . . 11 | 3.2 Local Scope Identifier (LSI) . . . . . . . . . . . . . . . 12 | |||
4. Host Identity Protocol . . . . . . . . . . . . . . . . . . . 13 | 4. Host Identity Protocol . . . . . . . . . . . . . . . . . . . 14 | |||
4.1 HIP base exchange . . . . . . . . . . . . . . . . . . . . 13 | 4.1 HIP base exchange . . . . . . . . . . . . . . . . . . . . 14 | |||
4.1.1 HIP Cookie Mechanism . . . . . . . . . . . . . . . . . 14 | 4.1.1 HIP Cookie Mechanism . . . . . . . . . . . . . . . . . 15 | |||
4.1.2 Authenticated Diffie-Hellman protocol . . . . . . . . 17 | 4.1.2 Authenticated Diffie-Hellman protocol . . . . . . . . 18 | |||
4.1.3 HIP replay protection . . . . . . . . . . . . . . . . 18 | 4.1.3 HIP replay protection . . . . . . . . . . . . . . . . 19 | |||
4.2 TCP and UDP pseudo-header computation . . . . . . . . . . 19 | 4.2 TCP and UDP pseudo-header computation for user data . . . 20 | |||
4.3 Updating a HIP association . . . . . . . . . . . . . . . . 19 | 4.3 Updating a HIP association . . . . . . . . . . . . . . . . 20 | |||
4.4 Error processing . . . . . . . . . . . . . . . . . . . . . 19 | 4.4 Error processing . . . . . . . . . . . . . . . . . . . . . 20 | |||
4.5 Certificate distribution . . . . . . . . . . . . . . . . . 19 | 4.5 Certificate distribution . . . . . . . . . . . . . . . . . 21 | |||
4.6 Sending data on HIP packets . . . . . . . . . . . . . . . 20 | 4.6 Sending data on HIP packets . . . . . . . . . . . . . . . 21 | |||
5. HIP protocol overview . . . . . . . . . . . . . . . . . . . 21 | 4.7 Transport Formats . . . . . . . . . . . . . . . . . . . . 21 | |||
5.1 HIP Scenarios . . . . . . . . . . . . . . . . . . . . . . 21 | 5. HIP protocol overview . . . . . . . . . . . . . . . . . . . 22 | |||
5.2 Refusing a HIP exchange . . . . . . . . . . . . . . . . . 22 | 5.1 HIP Scenarios . . . . . . . . . . . . . . . . . . . . . . 22 | |||
5.3 Reboot and SA timeout restart of HIP . . . . . . . . . . . 22 | 5.2 Refusing a HIP exchange . . . . . . . . . . . . . . . . . 23 | |||
5.3 Reboot and SA timeout restart of HIP . . . . . . . . . . . 23 | ||||
5.4 HIP State Machine . . . . . . . . . . . . . . . . . . . . 23 | 5.4 HIP State Machine . . . . . . . . . . . . . . . . . . . . 23 | |||
5.4.1 HIP States . . . . . . . . . . . . . . . . . . . . . . 23 | 5.4.1 HIP States . . . . . . . . . . . . . . . . . . . . . . 24 | |||
5.4.2 HIP State Processes . . . . . . . . . . . . . . . . . 23 | 5.4.2 HIP State Processes . . . . . . . . . . . . . . . . . 24 | |||
5.4.3 Simplified HIP State Diagram . . . . . . . . . . . . . 27 | 5.4.3 Simplified HIP State Diagram . . . . . . . . . . . . . 28 | |||
6. Packet formats . . . . . . . . . . . . . . . . . . . . . . . 29 | 6. Packet formats . . . . . . . . . . . . . . . . . . . . . . . 30 | |||
6.1 Payload format . . . . . . . . . . . . . . . . . . . . . . 29 | 6.1 Payload format . . . . . . . . . . . . . . . . . . . . . . 30 | |||
6.1.1 HIP Controls . . . . . . . . . . . . . . . . . . . . . 30 | 6.1.1 HIP Controls . . . . . . . . . . . . . . . . . . . . . 31 | |||
6.1.2 Checksum . . . . . . . . . . . . . . . . . . . . . . . 30 | 6.1.2 Checksum . . . . . . . . . . . . . . . . . . . . . . . 31 | |||
6.2 HIP parameters . . . . . . . . . . . . . . . . . . . . . . 31 | 6.2 HIP parameters . . . . . . . . . . . . . . . . . . . . . . 32 | |||
6.2.1 TLV format . . . . . . . . . . . . . . . . . . . . . . 32 | 6.2.1 TLV format . . . . . . . . . . . . . . . . . . . . . . 33 | |||
6.2.2 Defining new parameters . . . . . . . . . . . . . . . 33 | 6.2.2 Defining new parameters . . . . . . . . . . . . . . . 35 | |||
6.2.3 SPI . . . . . . . . . . . . . . . . . . . . . . . . . 34 | 6.2.3 R1_COUNTER . . . . . . . . . . . . . . . . . . . . . . 36 | |||
6.2.4 R1_COUNTER . . . . . . . . . . . . . . . . . . . . . . 35 | 6.2.4 PUZZLE . . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
6.2.5 PUZZLE . . . . . . . . . . . . . . . . . . . . . . . . 36 | 6.2.5 SOLUTION . . . . . . . . . . . . . . . . . . . . . . . 38 | |||
6.2.6 SOLUTION . . . . . . . . . . . . . . . . . . . . . . . 37 | 6.2.6 DIFFIE_HELLMAN . . . . . . . . . . . . . . . . . . . . 39 | |||
6.2.7 DIFFIE_HELLMAN . . . . . . . . . . . . . . . . . . . . 38 | 6.2.7 HIP_TRANSFORM . . . . . . . . . . . . . . . . . . . . 40 | |||
6.2.8 HIP_TRANSFORM . . . . . . . . . . . . . . . . . . . . 39 | 6.2.8 HOST_ID . . . . . . . . . . . . . . . . . . . . . . . 41 | |||
6.2.9 ESP_TRANSFORM . . . . . . . . . . . . . . . . . . . . 39 | 6.2.9 CERT . . . . . . . . . . . . . . . . . . . . . . . . . 42 | |||
6.2.10 HOST_ID . . . . . . . . . . . . . . . . . . . . . . 40 | 6.2.10 HMAC . . . . . . . . . . . . . . . . . . . . . . . . 43 | |||
6.2.11 CERT . . . . . . . . . . . . . . . . . . . . . . . . 41 | 6.2.11 HMAC_2 . . . . . . . . . . . . . . . . . . . . . . . 43 | |||
6.2.12 HMAC . . . . . . . . . . . . . . . . . . . . . . . . 42 | 6.2.12 HIP_SIGNATURE . . . . . . . . . . . . . . . . . . . 44 | |||
6.2.13 HMAC_2 . . . . . . . . . . . . . . . . . . . . . . . 42 | 6.2.13 HIP_SIGNATURE_2 . . . . . . . . . . . . . . . . . . 44 | |||
6.2.14 HIP_SIGNATURE . . . . . . . . . . . . . . . . . . . 43 | 6.2.14 SEQ . . . . . . . . . . . . . . . . . . . . . . . . 45 | |||
6.2.15 HIP_SIGNATURE_2 . . . . . . . . . . . . . . . . . . 44 | 6.2.15 ACK . . . . . . . . . . . . . . . . . . . . . . . . 45 | |||
6.2.16 NES . . . . . . . . . . . . . . . . . . . . . . . . 44 | 6.2.16 ENCRYPTED . . . . . . . . . . . . . . . . . . . . . 46 | |||
6.2.17 SEQ . . . . . . . . . . . . . . . . . . . . . . . . 45 | 6.2.17 NOTIFY . . . . . . . . . . . . . . . . . . . . . . . 47 | |||
6.2.18 ACK . . . . . . . . . . . . . . . . . . . . . . . . 46 | 6.2.18 ECHO_REQUEST . . . . . . . . . . . . . . . . . . . . 50 | |||
6.2.19 ENCRYPTED . . . . . . . . . . . . . . . . . . . . . 47 | 6.2.19 ECHO_RESPONSE . . . . . . . . . . . . . . . . . . . 51 | |||
6.2.20 NOTIFY . . . . . . . . . . . . . . . . . . . . . . . 48 | 6.3 ICMP messages . . . . . . . . . . . . . . . . . . . . . . 51 | |||
6.2.21 ECHO_REQUEST . . . . . . . . . . . . . . . . . . . . 51 | 6.3.1 Invalid Version . . . . . . . . . . . . . . . . . . . 51 | |||
6.2.22 ECHO_RESPONSE . . . . . . . . . . . . . . . . . . . 52 | ||||
6.3 ICMP messages . . . . . . . . . . . . . . . . . . . . . . 52 | ||||
6.3.1 Invalid Version . . . . . . . . . . . . . . . . . . . 52 | ||||
6.3.2 Other problems with the HIP header and packet | 6.3.2 Other problems with the HIP header and packet | |||
structure . . . . . . . . . . . . . . . . . . . . . . 53 | structure . . . . . . . . . . . . . . . . . . . . . . 51 | |||
6.3.3 Unknown SPI . . . . . . . . . . . . . . . . . . . . . 53 | 6.3.3 Invalid Cookie Solution . . . . . . . . . . . . . . . 52 | |||
6.3.4 Invalid Cookie Solution . . . . . . . . . . . . . . . 53 | 6.3.4 Non-existing HIP association . . . . . . . . . . . . . 52 | |||
6.3.5 Non-existing HIP association . . . . . . . . . . . . . 53 | 7. HIP Packets . . . . . . . . . . . . . . . . . . . . . . . . 53 | |||
7. HIP Packets . . . . . . . . . . . . . . . . . . . . . . . . 54 | 7.1 I1 - the HIP initiator packet . . . . . . . . . . . . . . 53 | |||
7.1 I1 - the HIP initiator packet . . . . . . . . . . . . . . 54 | 7.2 R1 - the HIP responder packet . . . . . . . . . . . . . . 54 | |||
7.2 R1 - the HIP responder packet . . . . . . . . . . . . . . 55 | 7.3 I2 - the second HIP initiator packet . . . . . . . . . . . 55 | |||
7.3 I2 - the second HIP initiator packet . . . . . . . . . . . 56 | 7.4 R2 - the second HIP responder packet . . . . . . . . . . . 56 | |||
7.4 R2 - the second HIP responder packet . . . . . . . . . . . 58 | 7.5 CER - the HIP Certificate Packet . . . . . . . . . . . . . 57 | |||
7.5 CER - the HIP Certificate Packet . . . . . . . . . . . . . 58 | 7.6 UPDATE - the HIP Update Packet . . . . . . . . . . . . . . 57 | |||
7.6 UPDATE - the HIP Update Packet . . . . . . . . . . . . . . 59 | 7.7 NOTIFY - the HIP Notify Packet . . . . . . . . . . . . . . 58 | |||
7.7 NOTIFY - the HIP Notify Packet . . . . . . . . . . . . . . 60 | 7.8 CLOSE - the HIP association closing packet . . . . . . . . 59 | |||
7.8 CLOSE - the HIP association closing packet . . . . . . . . 60 | 7.9 CLOSE_ACK - the HIP closing acknowledgment packet . . . . 59 | |||
7.9 CLOSE_ACK - the HIP closing acknowledgment packet . . . . 61 | 8. Packet processing . . . . . . . . . . . . . . . . . . . . . 61 | |||
8. Packet processing . . . . . . . . . . . . . . . . . . . . . 62 | 8.1 Processing outgoing application data . . . . . . . . . . . 61 | |||
8.1 Processing outgoing application data . . . . . . . . . . . 62 | 8.2 Processing incoming application data . . . . . . . . . . . 62 | |||
8.2 Processing incoming application data . . . . . . . . . . . 63 | 8.3 HMAC and SIGNATURE calculation and verification . . . . . 63 | |||
8.3 HMAC and SIGNATURE calculation and verification . . . . . 64 | 8.3.1 HMAC calculation . . . . . . . . . . . . . . . . . . . 63 | |||
8.3.1 HMAC calculation . . . . . . . . . . . . . . . . . . . 64 | 8.3.2 Signature calculation . . . . . . . . . . . . . . . . 63 | |||
8.3.2 Signature calculation . . . . . . . . . . . . . . . . 64 | 8.4 Initiation of a HIP exchange . . . . . . . . . . . . . . . 64 | |||
8.4 Initiation of a HIP exchange . . . . . . . . . . . . . . . 65 | 8.4.1 Sending multiple I1s in parallel . . . . . . . . . . . 65 | |||
8.4.1 Sending multiple I1s in parallel . . . . . . . . . . . 66 | ||||
8.4.2 Processing incoming ICMP Protocol Unreachable | 8.4.2 Processing incoming ICMP Protocol Unreachable | |||
messages . . . . . . . . . . . . . . . . . . . . . . . 66 | messages . . . . . . . . . . . . . . . . . . . . . . . 65 | |||
8.5 Processing incoming I1 packets . . . . . . . . . . . . . . 67 | 8.5 Processing incoming I1 packets . . . . . . . . . . . . . . 66 | |||
8.5.1 R1 Management . . . . . . . . . . . . . . . . . . . . 67 | 8.5.1 R1 Management . . . . . . . . . . . . . . . . . . . . 66 | |||
8.5.2 Handling malformed messages . . . . . . . . . . . . . 68 | 8.5.2 Handling malformed messages . . . . . . . . . . . . . 67 | |||
8.6 Processing incoming R1 packets . . . . . . . . . . . . . . 68 | 8.6 Processing incoming R1 packets . . . . . . . . . . . . . . 67 | |||
8.6.1 Handling malformed messages . . . . . . . . . . . . . 70 | 8.6.1 Handling malformed messages . . . . . . . . . . . . . 68 | |||
8.7 Processing incoming I2 packets . . . . . . . . . . . . . . 70 | 8.7 Processing incoming I2 packets . . . . . . . . . . . . . . 69 | |||
8.7.1 Handling malformed messages . . . . . . . . . . . . . 71 | 8.7.1 Handling malformed messages . . . . . . . . . . . . . 70 | |||
8.8 Processing incoming R2 packets . . . . . . . . . . . . . . 72 | 8.8 Processing incoming R2 packets . . . . . . . . . . . . . . 70 | |||
8.9 Dropping HIP associations . . . . . . . . . . . . . . . . 72 | 8.9 Sending UPDATE packets . . . . . . . . . . . . . . . . . . 71 | |||
8.10 Initiating rekeying . . . . . . . . . . . . . . . . . . 72 | 8.10 Receiving UPDATE packets . . . . . . . . . . . . . . . . 71 | |||
8.11 Processing UPDATE packets . . . . . . . . . . . . . . . 74 | 8.10.1 Handling a SEQ paramaeter in a received UPDATE | |||
8.11.1 Processing an UPDATE packet in state ESTABLISHED . . 75 | message . . . . . . . . . . . . . . . . . . . . . . 72 | |||
8.11.2 Processing an UPDATE packet in state REKEYING . . . 75 | 8.10.2 Handling an ACK parameter in a received UPDATE | |||
8.11.3 Leaving REKEYING state . . . . . . . . . . . . . . . 76 | packet . . . . . . . . . . . . . . . . . . . . . . . 72 | |||
8.12 Processing CER packets . . . . . . . . . . . . . . . . . 76 | 8.11 Processing CER packets . . . . . . . . . . . . . . . . . 73 | |||
8.13 Processing NOTIFY packets . . . . . . . . . . . . . . . 76 | 8.12 Processing NOTIFY packets . . . . . . . . . . . . . . . 73 | |||
8.14 Processing CLOSE packets . . . . . . . . . . . . . . . . 77 | 8.13 Processing CLOSE packets . . . . . . . . . . . . . . . . 73 | |||
8.15 Processing CLOSE_ACK packets . . . . . . . . . . . . . . 77 | 8.14 Processing CLOSE_ACK packets . . . . . . . . . . . . . . 73 | |||
9. HIP KEYMAT . . . . . . . . . . . . . . . . . . . . . . . . . 78 | 8.15 Dropping HIP associations . . . . . . . . . . . . . . . 73 | |||
10. HIP Fragmentation Support . . . . . . . . . . . . . . . . . 80 | 9. HIP KEYMAT . . . . . . . . . . . . . . . . . . . . . . . . . 75 | |||
11. ESP with HIP . . . . . . . . . . . . . . . . . . . . . . . . 81 | 10. HIP Fragmentation Support . . . . . . . . . . . . . . . . . 77 | |||
11.1 ESP Security Associations . . . . . . . . . . . . . . . 81 | 11. HIP Policies . . . . . . . . . . . . . . . . . . . . . . . . 78 | |||
11.2 Updating ESP SAs during rekeying . . . . . . . . . . . . 81 | 12. Security Considerations . . . . . . . . . . . . . . . . . . 79 | |||
11.3 Security Association Management . . . . . . . . . . . . 82 | 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . 82 | |||
11.4 Security Parameter Index (SPI) . . . . . . . . . . . . . 82 | 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 83 | |||
11.5 Supported Transforms . . . . . . . . . . . . . . . . . . 82 | 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 84 | |||
11.6 Sequence Number . . . . . . . . . . . . . . . . . . . . 83 | 15.1 Normative references . . . . . . . . . . . . . . . . . . 84 | |||
12. HIP Policies . . . . . . . . . . . . . . . . . . . . . . . . 84 | 15.2 Informative references . . . . . . . . . . . . . . . . . 85 | |||
13. Security Considerations . . . . . . . . . . . . . . . . . . 85 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 86 | |||
14. IANA Considerations . . . . . . . . . . . . . . . . . . . . 88 | A. Probabilities of HIT collisions . . . . . . . . . . . . . . 87 | |||
15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 89 | B. Probabilities in the cookie calculation . . . . . . . . . . 88 | |||
16. References . . . . . . . . . . . . . . . . . . . . . . . . . 90 | C. Using responder cookies . . . . . . . . . . . . . . . . . . 89 | |||
16.1 Normative references . . . . . . . . . . . . . . . . . . . 90 | D. Example checksums for HIP packets . . . . . . . . . . . . . 92 | |||
16.2 Informative references . . . . . . . . . . . . . . . . . . 91 | D.1 IPv6 HIP example (I1) . . . . . . . . . . . . . . . . . . 92 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 92 | D.2 IPv4 HIP packet (I1) . . . . . . . . . . . . . . . . . . . 92 | |||
A. API issues . . . . . . . . . . . . . . . . . . . . . . . . . 93 | D.3 TCP segment . . . . . . . . . . . . . . . . . . . . . . . 92 | |||
B. Probabilities of HIT collisions . . . . . . . . . . . . . . 95 | E. 384-bit group . . . . . . . . . . . . . . . . . . . . . . . 94 | |||
C. Probabilities in the cookie calculation . . . . . . . . . . 96 | Intellectual Property and Copyright Statements . . . . . . . 95 | |||
D. Using responder cookies . . . . . . . . . . . . . . . . . . 97 | ||||
E. Running HIP over IPv4 UDP . . . . . . . . . . . . . . . . . 100 | ||||
F. Example checksums for HIP packets . . . . . . . . . . . . . 101 | ||||
F.1 IPv6 HIP example (I1) . . . . . . . . . . . . . . . . . . 101 | ||||
F.2 IPv4 HIP packet (I1) . . . . . . . . . . . . . . . . . . . 101 | ||||
F.3 TCP segment . . . . . . . . . . . . . . . . . . . . . . . 101 | ||||
G. 384-bit group . . . . . . . . . . . . . . . . . . . . . . . 103 | ||||
Intellectual Property and Copyright Statements . . . . . . . 104 | ||||
1. Introduction | 1. Introduction | |||
The Host Identity Protocol (HIP) provides a rapid exchange of Host | The Host Identity Protocol (HIP) provides a rapid exchange of Host | |||
Identities between two hosts. The exchange also establishes a pair | Identities between two hosts. The protocol is designed to be | |||
IPsec Security Associations (SA), to be used with IPsec Encapsulated | ||||
Security Payload (ESP) [19]. The HIP protocol is designed to be | ||||
resistant to Denial-of-Service (DoS) and Man-in-the-middle (MitM) | resistant to Denial-of-Service (DoS) and Man-in-the-middle (MitM) | |||
attacks, and when used to enable ESP, provides DoS and MitM | attacks, and when used together with another suitable security | |||
protection for upper layer protocols, such as TCP and UDP. | protocol, such as Encapsulated Security Payload (ESP) [23], it | |||
provides DoS and MitM protection for upper layer protocols, such as | ||||
TCP and UDP. | ||||
1.1 A new name space and identifiers | 1.1 A new name space and identifiers | |||
The Host Identity Protocol introduces a new namespace, the Host | The Host Identity Protocol introduces a new namespace, the Host | |||
Identity. The effects of this change are explained in the companion | Identity. The effects of this change are explained in the companion | |||
document, the HIP architecture [21] specification. | document, the HIP architecture [21] specification. | |||
There are two main representations of the Host Identity, the full | There are two main representations of the Host Identity, the full | |||
Host Identifier (HI) and the Host Identity Tag (HIT). The HI is a | Host Identifier (HI) and the Host Identity Tag (HIT). The HI is a | |||
public key and directly represents the Identity. Since there are | public key and directly represents the Identity. Since there are | |||
different public key algorithms that can be used with different key | different public key algorithms that can be used with different key | |||
lengths, the HI is not good for using as a packet identifier, or as a | lengths, the HI is not good for use as a packet identifier, or as an | |||
index into the various operational tables needed to support HIP. | index into the various operational tables needed to support HIP. | |||
Consequently, a hash of the HI, the Host Identity Tag (HIT), becomes | Consequently, a hash of the HI, the Host Identity Tag (HIT), becomes | |||
the operational representation. It is 128 bits long and is used in | the operational representation. It is 128 bits long and is used in | |||
the HIP payloads and to index the corresponding state in the end | the HIP payloads and to index the corresponding state in the end | |||
hosts. | hosts. | |||
1.2 The HIP protocol | 1.2 The HIP base exchange | |||
The base HIP exchange consists of four packets. The four-packet | The HIP base exchange is a two-party cryptographic protocol that | |||
design helps to make HIP DoS resilient. The protocol exchanges | consists of four packets. The first party is called the Initiator | |||
Diffie-Hellman keys in the 2nd and 3rd packets, and authenticates the | and the second party the Responder. The four-packet design helps to | |||
parties in the 3rd and 4th packets. Additionally, it starts the | make HIP DoS resilient. The protocol exchanges Diffie-Hellman keys | |||
cookie exchange in the 2nd packet, completing it in the 3rd packet. | in the 2nd and 3rd packets, and authenticates the parties in the 3rd | |||
and 4th packets. Additionally, it starts the cookie exchange in the | ||||
2nd packet, completing it in the 3rd packet. | ||||
The exchange uses the Diffie-Hellman exchange to hide the Host | The exchange uses the Diffie-Hellman exchange to hide the Host | |||
Identity of the Initiator in packet 3. The Responder's Host Identity | Identity of the Initiator in packet 3. The Responder's Host Identity | |||
is not protected. It should be noted, however, that both the | is not protected. It should be noted, however, that both the | |||
Initiator's and the Responder's HITs are transported as such (in | Initiator's and the Responder's HITs are transported as such (in | |||
cleartext) in the packets, allowing an eavesdropper with a priori | cleartext) in the packets, allowing an eavesdropper with a priori | |||
knowledge about the parties to verify their identities. | knowledge about the parties to verify their identities. | |||
Data packets start after the 4th packet. The 3rd and 4th HIP packets | Data packets start after the 4th packet. The 3rd and 4th HIP packets | |||
may carry a data payload in the future. However, the details of this | may carry a data payload in the future. However, the details of this | |||
are to be defined later as more implementation experience is gained. | are to be defined later as more implementation experience is gained. | |||
Finally, HIP is designed as an end-to-end authentication and key | Finally, HIP is designed as an end-to-end authentication and key | |||
establishment protocol. It lacks much of the fine-grained policy | establishment protocol, to be used with Encapsulated Security Payload | |||
control found in Internet Key Exchange IKE RFC2409 [8] that allows | (ESP) [23] and other end-to-end security protocols. The base | |||
IKE to support complex gateway policies. Thus, HIP is not a complete | protocol lacks the details for security association management and | |||
replacement for IKE. | much of the fine-grained policy control found in Internet Key | |||
Exchange IKE RFC2409 [8] that allows IKE to support complex gateway | ||||
policies. Thus, HIP is not a replacement for IKE. | ||||
2. Conventions used in this document | 2. Conventions used in this document | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
document are to be interpreted as described in RFC2119 [5]. | document are to be interpreted as described in RFC2119 [5]. | |||
3. Host Identifier (HI) and its representations | 3. Host Identifier (HI) and its representations | |||
A public key of an asymmetric key pair is used as the Host Identifier | A public key of an asymmetric key pair is used as the Host Identifier | |||
(HI). Correspondingly, the host itself is the entity that holds the | (HI). Correspondingly, the host itself is defined as the entity that | |||
private key from the key pair. See the HIP architecture | holds the private key from the key pair. See the HIP architecture | |||
specification [21] for more details about the difference between an | specification [21] for more details about the difference between an | |||
identity and the corresponding identifier. | identity and the corresponding identifier. | |||
HIP implementations MUST support the Rivest Shamir Adelman (RSA) [14] | HIP implementations MUST support the Rivest Shamir Adelman (RSA) [14] | |||
public key algorithm, and SHOULD support the Digital Signature | public key algorithm, and SHOULD support the Digital Signature | |||
Algorithm (DSA) [13] algorithm; other algorithms MAY be supported. | Algorithm (DSA) [13] algorithm; other algorithms MAY be supported. | |||
A hash of the HI, the Host Identity Tag (HIT), is used in protocols | A hash of the HI, the Host Identity Tag (HIT), is used in protocols | |||
to represent the Host Identity. The HIT is 128 bits long and has the | to represent the Host Identity. The HIT is 128 bits long and has the | |||
following three key properties: i) it is the same length as an IPv6 | following three key properties: i) it is the same length as an IPv6 | |||
skipping to change at page 8, line 32 | skipping to change at page 9, line 32 | |||
computationally hard to find a Host Identity key that matches the | computationally hard to find a Host Identity key that matches the | |||
HIT), and iii) the probability of HIT collision between two hosts is | HIT), and iii) the probability of HIT collision between two hosts is | |||
very low. | very low. | |||
In many environments, 128 bits is still considered large. For | In many environments, 128 bits is still considered large. For | |||
example, currently used IPv4 based applications are constrained with | example, currently used IPv4 based applications are constrained with | |||
32-bit address fields. Another problem is that the cohabitation of | 32-bit address fields. Another problem is that the cohabitation of | |||
IPv6 and HIP might require some applications to differentiate an IPv6 | IPv6 and HIP might require some applications to differentiate an IPv6 | |||
address from a HIT. Thus, a third representation, the Local Scope | address from a HIT. Thus, a third representation, the Local Scope | |||
Identifier (LSI), may be needed. There are two types of such LSIs: | Identifier (LSI), may be needed. There are two types of such LSIs: | |||
32 bits long IPv4-compatible one and 128 bits long IPv6-compatible | 32-bit IPv4-compatible ones and 128-bit IPv6-compatible ones. The | |||
one. The LSI provides a compression of the HIT with only a local | LSI provides a compression of the HIT with only a local scope so that | |||
scope so that it can be carried efficiently in any application level | it can be carried efficiently in any application level packet and | |||
packet and used in API calls. LSIs do not have the same properties | used in API calls. The LSIs do not have the same properties as HITs | |||
as HITs (i.e., they are not self-certifying nor are they as unlikely | (i.e., they are not self-certifying nor are they as unlikely to | |||
to collide -- hence their local scope), and consequently they must be | collide -- hence their local scope), and consequently they must be | |||
used more carefully. | used more carefully. | |||
Finally, HIs, HITs, and LSIs are not carried explicitly in the | Finally, HIs, HITs, and LSIs are not expected to be carried | |||
headers of user data packets. Instead, the IPsec Security Parameter | explicitly in the headers of user data packets. Depending on the | |||
Index (SPI) is used in data packets to index the right host context. | form of further communication, other methods are used to map the data | |||
The SPIs are selected during the HIP exchange. For user data packets, | packet to the these representatives of host identities. For example, | |||
then, the combination of IPsec SPIs and IP addresses are used | if ESP is used to protect data traffic, the Security Parameter Index | |||
indirectly to identify the host context, thereby avoiding an | (SPI) can be used for this purpose. In some cases, this makes it | |||
additional explicit protocol header. | possible to use HIP without an additional explicit protocol header. | |||
3.1 Host Identity Tag (HIT) | 3.1 Host Identity Tag (HIT) | |||
The Host Identity Tag is a 128 bit value -- a hash of the Host | The Host Identity Tag is a 128 bits long value -- a hash of the Host | |||
Identifier. There are two advantages of using a hash over the actual | Identifier. There are two advantages of using a hash over the actual | |||
Identity in protocols. Firstly, its fixed length makes for easier | Identity in protocols. Firstly, its fixed length makes for easier | |||
protocol coding and also better manages the packet size cost of this | protocol coding and also better manages the packet size cost of this | |||
technology. Secondly, it presents a consistent format to the | technology. Secondly, it presents a consistent format to the | |||
protocol whatever underlying identity technology is used. | protocol whatever underlying identity technology is used. | |||
There are two types of HITs. HITs of the first type, called *type 1 | There are two types of HITs. HITs of the first type, called _type 1 | |||
HIT*, consist of 128 bits of the SHA-1 hash of the public key. HITs | HIT_, consist of 128 bits of the SHA-1 hash of the public key. HITs | |||
of the second type consist of a Host Assigning Authority Field (HAA), | of the second type consist of a Host Assigning Authority Field (HAA), | |||
and only the last 64 bits come from a SHA-1 hash of the Host | and only the last 64 bits come from a SHA-1 hash of the Host | |||
Identity. This latter format for HIT is recommended for 'well known' | Identity. This latter format for HIT is recommended for 'well known' | |||
systems. It is possible to support a resolution mechanism for these | systems. It is possible to support a resolution mechanism for these | |||
names in hierarchical directories, like the DNS. Another use of HAA | names in hierarchical directories, like the DNS. Another use of HAA | |||
is in policy controls, see Section 12. | is in policy controls, see Section 11. | |||
As the type of a HIT cannot be determined by inspecting its contents, | As the type of a HIT cannot be determined by inspecting its contents, | |||
the HIT type must be communicated by some external means. | the HIT type must be communicated by some external means. | |||
When comparing HITs for equality, it is RECOMMENDED that conforming | When comparing HITs for equality, it is RECOMMENDED that conforming | |||
implementations ignore the TBD top most bits. This is to allow | implementations ignore the TBD top most bits. This is to allow | |||
better compatibility for legacy IPv6 applications; see Appendix A. | better compatibility for legacy IPv6 applications; see [29]. | |||
However, independent of how many bits are actually used for HIT | However, independent of how many bits are actually used for HIT | |||
comparison, it is also RECOMMENDED that the final equality decision | comparison, it is also RECOMMENDED that the final equality decision | |||
is based on the public key and not the HIT, if possible. See also | is based on the public key and not the HIT, if possible. See also | |||
Section 3.2 for related discussion. | Section 3.2 for related discussion. | |||
This document fully specifies only type 1 HITs. HITs that consists | This document fully specifies only type 1 HITs. HITs that consists | |||
of the HAA field and the hash are specified in [24]. | of the HAA field and the hash are specified in [25]. | |||
Any conforming implementation MUST be able to deal with Type 1 HITs. | Any conforming implementation MUST be able to deal with Type 1 HITs. | |||
When handling other than type 1 HITs, the implementation is | When handling other than type 1 HITs, the implementation is | |||
RECOMMENDED to explicitly learn and record the binding between the | RECOMMENDED to explicitly learn and record the binding between the | |||
Host Identifier and the HIT, as it may not be able to generate such | Host Identifier and the HIT, as it may not be able to generate such | |||
HITs from the Host Identifiers. | HITs from the Host Identifiers. | |||
3.1.1 Generating a HIT from a HI | 3.1.1 Restricting HIT values | |||
To facilitate experimentation and make certain kind of | ||||
implementations easier, the following restrictions are temporarily | ||||
placed on HITs. These restriction are to be lifted at the end of | ||||
2008. That is, after January 1st 2009, any implementation claiming | ||||
conformance to this specification MUST accept any HITs from peers and | ||||
be able to process them normally. | ||||
The restrictions: Before the end of 2008, all implementations SHOULD | ||||
restrict the HITs they generate to ones whose upper-most (left-most) | ||||
two bits are either binary01 or10. That is, when generating new HIs, | ||||
if the resulting HIT has as its first two bits as00 or11, the | ||||
implementation SHOULD generate new HIs until it generates one that | ||||
fulfills this restriction. Additionally, a conforming implementation | ||||
MAY refuse to communicate with a peer that has a HIT with the | ||||
upper-most bits either00 or11. When refusing a HIP connection on | ||||
this bases, the implementation MAY send an R2 with a NOTIFY payload, | ||||
with the NOTIFY code being UNSUPPORTED_HIT_VALUE_RANGE. Any such | ||||
NOTIFYs may be rate-limited | ||||
A rationale: One way to experimentally implement HIP is to use | ||||
unmodified IPv6, TCP and UDP implementations in the stack, using HITs | ||||
in the place of IPv6 addresses. This modification makes it easier to | ||||
use existing IPv6 data structures to hold HITs and to distinguish | ||||
between the two data types. If the IPv6 address space and the HIT | ||||
value space overlap, it becomes hard to define secure IPsec policies | ||||
without explicitly tagging the values either as HITs or IPv6 | ||||
addresses. | ||||
3.1.2 Generating a HIT from a HI | ||||
The 128 or 64 hash bits in a HIT MUST be generated by taking the | The 128 or 64 hash bits in a HIT MUST be generated by taking the | |||
least significant 128 or 64 bits of the SHA-1 [22] hash of the Host | least significant 128 or 64 bits of the SHA-1 [22] hash of the Host | |||
Identifier as it is represented in the Host Identity field in a HIP | Identifier as it is represented in the Host Identity field in a HIP | |||
payload packet. | payload packet. | |||
For Identities that are either RSA or DSA public keys, the HIT is | For Identities that are either RSA or DSA public keys, the HIT is | |||
formed as follows: | formed as follows: | |||
1. The public key is encoded as specified in the corresponding | 1. The public key is encoded as specified in the corresponding | |||
DNSSEC document, taking the algorithm specific portion of the | DNSSEC document, taking the algorithm specific portion of the | |||
skipping to change at page 10, line 4 | skipping to change at page 11, line 33 | |||
Identifier as it is represented in the Host Identity field in a HIP | Identifier as it is represented in the Host Identity field in a HIP | |||
payload packet. | payload packet. | |||
For Identities that are either RSA or DSA public keys, the HIT is | For Identities that are either RSA or DSA public keys, the HIT is | |||
formed as follows: | formed as follows: | |||
1. The public key is encoded as specified in the corresponding | 1. The public key is encoded as specified in the corresponding | |||
DNSSEC document, taking the algorithm specific portion of the | DNSSEC document, taking the algorithm specific portion of the | |||
RDATA part of the KEY RR. There is currently only two defined | RDATA part of the KEY RR. There is currently only two defined | |||
public key algorithms: RSA and DSA. Hence, either of the | public key algorithms: RSA and DSA. Hence, either of the | |||
following applies: | following applies: | |||
The RSA public key is encoded as defined in RFC3110 [14] | The RSA public key is encoded as defined in RFC3110 [14] | |||
Section 2, taking the exponent length (e_len), exponent (e) | Section 2, taking the exponent length (e_len), exponent (e) | |||
and modulus (n) fields concatenated. The length of the | and modulus (n) fields concatenated. The length (n_len) of | |||
modulus (n) can be determined from the total HI length | the modulus (n) can be determined from the total HI length | |||
(hi_len) and the preceding HI fields including the exponent | (hi_len) and the preceding HI fields including the exponent | |||
(e). Thus, the data to be hashed has the same length than the | (e). Thus, the data to be hashed has the same length as the | |||
HI (hi_len). The fields MUST be encoded in network byte order, | HI (hi_len). The fields MUST be encoded in network byte | |||
as defined in RFC3110 [14]. | order, as defined in RFC3110 [14]. | |||
The DSA public key is encoded as defined in RFC2536 [13] | The DSA public key is encoded as defined in RFC2536 [13] | |||
Section 2, taking the fields T, Q, P, G, and Y, concatenated. | Section 2, taking the fields T, Q, P, G, and Y, concatenated. | |||
Thus, the data to be hashed is 1 + 20 + 3 * 64 + 3 * 8 * T | Thus, the data to be hashed is 1 + 20 + 3 * 64 + 3 * 8 * T | |||
octets long, where T is the size parameter as defined in | octets long, where T is the size parameter as defined in | |||
RFC2536 [13]. The size parameter T, affecting the field | RFC2536 [13]. The size parameter T, affecting the field | |||
lengths, MUST be selected as the minimum value that is long | lengths, MUST be selected as the minimum value that is long | |||
enough to accommodate P, G, and Y. The fields MUST be encoded | enough to accommodate P, G, and Y. The fields MUST be encoded | |||
in network byte order, as defined in RFC2536 [13]. | in network byte order, as defined in RFC2536 [13]. | |||
2. A SHA-1 hash [22] is calculated over the encoded key. | 2. A SHA-1 hash [22] is calculated over the encoded key. | |||
3. The least significant 128 or 64 bits of the hash result are used | 3. The least significant 128 or 64 bits of the hash result are used | |||
skipping to change at page 10, line 38 | skipping to change at page 12, line 18 | |||
two parameters, an integer (bignum) and a length in bytes, and | two parameters, an integer (bignum) and a length in bytes, and | |||
returns the integer encoded into a byte string of the given length. | returns the integer encoded into a byte string of the given length. | |||
switch ( HI.algorithm ) | switch ( HI.algorithm ) | |||
{ | { | |||
case RSA: | case RSA: | |||
buffer := encode_in_network_byte_order ( HI.RSA.e_len, | buffer := encode_in_network_byte_order ( HI.RSA.e_len, | |||
( HI.RSA.e_len > 255 ) ? 3 : 1 ) | ( HI.RSA.e_len > 255 ) ? 3 : 1 ) | |||
buffer += encode_in_network_byte_order ( HI.RSA.e, HI.RSA.e_len ) | buffer += encode_in_network_byte_order ( HI.RSA.e, HI.RSA.e_len ) | |||
buffer += encode_in_network_byte_order ( HI.RSA.n, HI.hi_len ) | buffer += encode_in_network_byte_order ( HI.RSA.n, HI.RSA.n_len ) | |||
break; | break; | |||
case DSA: | case DSA: | |||
buffer := encode_in_network_byte_order ( HI.DSA.T , 1 ) | buffer := encode_in_network_byte_order ( HI.DSA.T , 1 ) | |||
buffer += encode_in_network_byte_order ( HI.DSA.Q , 20 ) | buffer += encode_in_network_byte_order ( HI.DSA.Q , 20 ) | |||
buffer += encode_in_network_byte_order ( HI.DSA.P , 64 + 8 * HI.DSA.T ) | buffer += encode_in_network_byte_order ( HI.DSA.P , 64 + 8 * HI.DSA.T ) | |||
buffer += encode_in_network_byte_order ( HI.DSA.G , 64 + 8 * HI.DSA.T ) | buffer += encode_in_network_byte_order ( HI.DSA.G , 64 + 8 * HI.DSA.T ) | |||
buffer += encode_in_network_byte_order ( HI.DSA.Y , 64 + 8 * HI.DSA.T ) | buffer += encode_in_network_byte_order ( HI.DSA.Y , 64 + 8 * HI.DSA.T ) | |||
break; | break; | |||
skipping to change at page 11, line 35 | skipping to change at page 14, line 5 | |||
from the peer's HIT collides with another LSI in use locally (i.e., | from the peer's HIT collides with another LSI in use locally (i.e., | |||
the lower 24 or TBD bits of two different HITs are the same). In | the lower 24 or TBD bits of two different HITs are the same). In | |||
that case, the host MUST handle the LSI collision locally such that | that case, the host MUST handle the LSI collision locally such that | |||
application calls can be disambiguated. One possible means of doing | application calls can be disambiguated. One possible means of doing | |||
so is to perform a Host NAT function to locally convert a peer's LSI | so is to perform a Host NAT function to locally convert a peer's LSI | |||
into a different LSI value. This would require the host to ensure | into a different LSI value. This would require the host to ensure | |||
that LSI bits on the wire (i.e., in the application data stream) are | that LSI bits on the wire (i.e., in the application data stream) are | |||
converted back to match that host's LSI. Other alternatives for | converted back to match that host's LSI. Other alternatives for | |||
resolving LSI collisions may be added in the future. | resolving LSI collisions may be added in the future. | |||
3.3 Security Parameter Index (SPI) | ||||
SPIs are used in ESP to find the right security association for | ||||
received packets. The ESP SPIs have added significance when used | ||||
with HIP; they are a compressed representation of the HITs in every | ||||
packet. Thus, SPIs MAY be used by intermediary systems in providing | ||||
services like address mapping. Note that since the SPI has | ||||
significance at the receiver, only the < DST, SPI >, where DST is a | ||||
destination IP address, uniquely identifies the receiver HIT at every | ||||
given point of time. The same SPI value may be used by several | ||||
hosts. A single < DST, SPI > value may denote different hosts at | ||||
different points of time, depending on which host is currently | ||||
reachable at the DST. | ||||
Each host selects for itself the SPI it wants to see in packets | ||||
received from its peer. This allows it to select different SPIs for | ||||
different peers. The SPI selection SHOULD be random; the rules of | ||||
Section 2.1 of the ESP specification [19] must be followed. A | ||||
different SPI SHOULD be used for each HIP exchange with a particular | ||||
host; this is to avoid a replay attack. Additionally, when a host | ||||
rekeys, the SPI MUST be changed. Furthermore, if a host changes over | ||||
to use a different IP address, it MAY change the SPI. | ||||
One method for SPI creation that meets these criteria would be to | ||||
concatenate the HIT with a 32-bit random or sequential number, hash | ||||
this (using SHA1), and then use the high order 32 bits as the SPI. | ||||
The selected SPI is communicated to the peer in the third (I2) and | ||||
fourth (R2) packets of the base HIP exchange. Changes in SPI are | ||||
signaled with NES parameters. | ||||
4. Host Identity Protocol | 4. Host Identity Protocol | |||
The Host Identity Protocol is IP protocol TBD (number will be | The Host Identity Protocol is IP protocol TBD (number will be | |||
assigned by IANA). The HIP payload could be carried in every | assigned by IANA). The HIP payload (Section 6.1) header could be | |||
datagram. However, since HIP datagrams are relatively large (at | carried in every datagram. However, since HIP datagrams are | |||
least 40 bytes), and ESP already has all of the functionality to | relatively large (at least 40 bytes), it is desirable to 'compress' | |||
maintain and protect state, the HIP payload is 'compressed' into an | the HIP header so that the HIP header only occur in datagrams to | |||
ESP payload after the HIP exchange. Thus in practice, HIP packets | establish or change HIP state. The actual method for header | |||
only occur in datagrams to establish or change HIP state. | 'compression' and matching data packets with existing HIP | |||
associations (if any) is defined in separate extension documents, | ||||
describing transport formats and methods. All HIP implementations | ||||
MUST implement, at minimum, the ESP transport format for HIP [23]. | ||||
For testing purposes, the protocol number 99 is currently used. | For testing purposes, the protocol number 99 is currently used. | |||
4.1 HIP base exchange | 4.1 HIP base exchange | |||
The base HIP exchange serves to manage the establishment of state | The HIP base exchange serves to manage the establishment of state | |||
between an Initiator and a Responder. During the exchange, an IPsec | between an Initiator and a Responder. The last three packets of the | |||
Security Association is created between the hosts. The last three | exchange, R1, I2, and R2, constitute a standard authenticated | |||
packets of the exchange, R1, I2, and R2, constitute a standard | Diffie-Hellman key exchange for session key generation. During the | |||
authenticated Diffie-Hellman key exchange for session key generation. | Diffie-Hellman key exchange, a piece of keying material is generated. | |||
The HIP association keys are drawn from this keying material. If | ||||
other cryptographic keys are needed, e.g., to be used with ESP, they | ||||
are expected to be drawn from the same keying material. | ||||
The Initiator first sends a trigger packet, I1, to the Responder. | The Initiator first sends a trigger packet, I1, to the Responder. | |||
The packet contains only the HIT of the Initiator and possibly the | The packet contains only the HIT of the Initiator and possibly the | |||
HIT of the Responder, if it is known. | HIT of the Responder, if it is known. | |||
The second packet, R1, starts the actual exchange. It contains a | The second packet, R1, starts the actual exchange. It contains a | |||
puzzle, that is, a cryptographic challenge that the Initiator must | puzzle, that is, a cryptographic challenge that the Initiator must | |||
solve before continuing the exchange. In addition, it contains the | solve before continuing the exchange. In addition, it contains the | |||
initial Diffie-Hellman parameters and a signature, covering part of | initial Diffie-Hellman parameters and a signature, covering part of | |||
the message. Some fields are left outside the signature to support | the message. Some fields are left outside the signature to support | |||
pre-created R1s. | pre-created R1s. | |||
In the I2 packet, the Initiator must display the solution to the | In the I2 packet, the Initiator must display the solution to the | |||
received puzzle. Without a correct solution, the I2 message is | received puzzle. Without a correct solution, the I2 message is | |||
discarded. The I2 also contains a Diffie-Hellman parameter that | discarded. The I2 also contains a Diffie-Hellman parameter that | |||
carries needed information for the Responder. The packet is signed | carries needed information for the Responder. The packet is signed | |||
by the sender. | by the sender. | |||
The R2 packet finalizes the 4-way handshake, containing the SPI value | The R2 packet finalizes the base exchange. The packet is signed. | |||
of the Responder. The packet is signed. | ||||
The base exchange is illustrated below. During this D-H procedure, | The base exchange is illustrated below. | |||
the hosts create an IPsec session key. | ||||
Initiator Responder | Initiator Responder | |||
I1: trigger exchange | I1: trigger exchange | |||
--------------------------> | --------------------------> | |||
select pre-computed R1 | select pre-computed R1 | |||
R1: puzzle, D-H, key, sig | R1: puzzle, D-H, key, sig | |||
<------------------------- | <------------------------- | |||
check sig remain stateless | check sig remain stateless | |||
solve puzzle | solve puzzle | |||
skipping to change at page 15, line 7 | skipping to change at page 16, line 7 | |||
The Cookie mechanism has been explicitly designed to give space for | The Cookie mechanism has been explicitly designed to give space for | |||
various implementation options. It allows a responder implementation | various implementation options. It allows a responder implementation | |||
to completely delay session specific state creation until a valid I2 | to completely delay session specific state creation until a valid I2 | |||
is received. In such a case a validly formatted I2 can be rejected | is received. In such a case a validly formatted I2 can be rejected | |||
earliest only once the Responder has checked its validity by | earliest only once the Responder has checked its validity by | |||
computing one hash function. On the other hand, the design also | computing one hash function. On the other hand, the design also | |||
allows a responder implementation to keep state about received I1s, | allows a responder implementation to keep state about received I1s, | |||
and match the received I2s against the state, thereby allowing the | and match the received I2s against the state, thereby allowing the | |||
implementation to avoid the computational cost of the hash function. | implementation to avoid the computational cost of the hash function. | |||
The drawback of this latter approach is the requirement of creating | The drawback of this latter approach is the requirement of creating | |||
state. Finally, it also allows an implementation to use any | state. Finally, it also allows an implementation to use other | |||
combination of the space-saving and computation-saving mechanisms. | combinations of the space-saving and computation-saving mechanisms. | |||
One possible way for a Responder to remain stateless but drop most | One possible way for a Responder to remain stateless but drop most | |||
spoofed I2s is to base the selection of the cookie on some function | spoofed I2s is to base the selection of the cookie on some function | |||
over the Initiator's Host Identity. The idea is that the Responder | over the Initiator's Host Identity. The idea is that the Responder | |||
has a (perhaps varying) number of pre-calculated R1 packets, and it | has a (perhaps varying) number of pre-calculated R1 packets, and it | |||
selects one of these based on the information carried in I1. When | selects one of these based on the information carried in I1. When | |||
the Responder then later receives I2, it checks that the cookie in | the Responder then later receives I2, it checks that the cookie in | |||
the I2 matches with the cookie sent in the R1, thereby making it | the I2 matches with the cookie sent in the R1, thereby making it | |||
impractical for the attacker to first exchange one I1/R1, and then | impractical for the attacker to first exchange one I1/R1, and then | |||
generate a large number of spoofed I2s that seemingly come from | generate a large number of spoofed I2s that seemingly come from | |||
different IP addresses or use different HITs. The method does not | different IP addresses or use different HITs. The method does not | |||
protect from an attacker that uses fixed IP addresses and HITs, | protect from an attacker that uses fixed IP addresses and HITs, | |||
though. Against such an attacker it is probably best to create a | though. Against such an attacker it is probably best to create a | |||
piece of local state, and remember that the puzzle check has | piece of local state, and remember that the puzzle check has | |||
previously failed. See Appendix D for one possible implementation. | previously failed. See Appendix C for one possible implementation. | |||
Note, however, that the implementations MUST NOT use the exact | Note, however, that the implementations MUST NOT use the exact | |||
implementation given in the appendix, and SHOULD include sufficient | implementation given in the appendix, and SHOULD include sufficient | |||
randomness to the algorithm so that algorithm complexity attacks | randomness to the algorithm so that algorithm complexity attacks | |||
become impossible [26]. | become impossible [27]. | |||
The Responder can set the difficulty for Initiator, based on its | The Responder can set the puzzle difficulty for Initiator, based on | |||
concern of trust of the Initiator. The Responder SHOULD use | its concern of trust of the Initiator. The Responder SHOULD use | |||
heuristics to determine when it is under a denial-of-service attack, | heuristics to determine when it is under a denial-of-service attack, | |||
and set the difficulty value K appropriately. | and set the puzzle difficulty value K appropriately; see below. | |||
The Responder starts the cookie exchange when it receives an I1. The | The Responder starts the cookie exchange when it receives an I1. The | |||
Responder supplies a random number I, and requires the Initiator to | Responder supplies a random number I, and requires the Initiator to | |||
find a number J. To select a proper J, the Initiator must create the | find a number J. To select a proper J, the Initiator must create the | |||
concatenation of I, the HITs of the parties, and J, and take a SHA-1 | concatenation of I, the HITs of the parties, and J, and take a SHA-1 | |||
hash over this concatenation. The lowest order K bits of the result | hash over this concatenation. The lowest order K bits of the result | |||
MUST be zeros. | MUST be zeros. The value K sets the difficulty of the puzzle. | |||
To generate a proper number J, the Initiator will have to generate a | To generate a proper number J, the Initiator will have to generate a | |||
number of Js until one produces the hash target of zero. The | number of Js until one produces the hash target of zero. The | |||
Initiator SHOULD give up after exceeding the puzzle lifetime received | Initiator SHOULD give up after exceeding the puzzle lifetime in the | |||
in PUZZLE TLV. The Responder needs to re-create the concatenation of | PUZZLE TLV. The Responder needs to re-create the concatenation of I, | |||
I, the HITs, and the provided J, and compute the hash once to prove | the HITs, and the provided J, and compute the hash once to prove that | |||
that the Initiator did its assigned task. | the Initiator did its assigned task. | |||
To prevent pre-computation attacks, the Responder MUST select the | To prevent pre-computation attacks, the Responder MUST select the | |||
number I in such a way that the Initiator cannot guess it. | number I in such a way that the Initiator cannot guess it. | |||
Furthermore, the construction MUST allow the Responder to verify that | Furthermore, the construction MUST allow the Responder to verify that | |||
the value was indeed selected by it and not by the Initiator. See | the value was indeed selected by it and not by the Initiator. See | |||
Appendix D for an example on how to implement this. | Appendix C for an example on how to implement this. | |||
Using the Opaque data field in the ECHO_REQUEST, the Responder can | Using the Opaque data field in an ECHO_REQUEST parameter, the | |||
include some data in R1 that the Initiator must copy unmodified in | Responder can include some data in R1 that the Initiator must copy | |||
the corresponding I2 packet. The Responder can generate the Opaque | unmodified in the corresponding I2 packet. The Responder can | |||
data e.g. using the sent I, some secret and possibly other related | generate the Opaque data in various ways; e.g. using the sent I, | |||
data. Using this same secret, received I in I2 packet and possible | some secret, and possibly other related data. Using this same | |||
other data, the Receiver can verify that it has itself sent the I to | secret, received I in I2 packet and possible other data, the Receiver | |||
the Initiator. The Responder must change the secret periodically. | can verify that it has itself sent the I to the Initiator. The | |||
Responder MUST change the secret periodically. | ||||
It is RECOMMENDED that the Responder generates a new cookie and a new | It is RECOMMENDED that the Responder generates a new cookie and a new | |||
R1 once every few minutes. Furthermore, it is RECOMMENDED that the | R1 once every few minutes. Furthermore, it is RECOMMENDED that the | |||
Responder remembers an old cookie at least 2*lifetime seconds after | Responder remembers an old cookie at least 2*lifetime seconds after | |||
it has been deprecated. These time values allow a slower Initiator | it has been deprecated. These time values allow a slower Initiator | |||
to solve the cookie puzzle while limiting the usability that an old, | to solve the cookie puzzle while limiting the usability that an old, | |||
solved cookie has to an attacker. | solved cookie has to an attacker. | |||
NOTE: The protocol developers explicitly considered whether R1 should | NOTE: The protocol developers explicitly considered whether R1 should | |||
include a timestamp in order to protect the Initiator from replay | include a timestamp in order to protect the Initiator from replay | |||
attacks. The decision was NOT to include a timestamp. | attacks. The decision was NOT to include a timestamp. | |||
NOTE: The protocol developers explicitly considered whether a memory | ||||
bound function should be used for the puzzle instead of a CPU bound | ||||
function. The decision was not to use memory bound functions. At | ||||
the time of the decision the idea of memory bound functions was | ||||
relatively new and their IPR status were unknown. Once there is more | ||||
experience about memory bound functions and once their IPR status is | ||||
better known, it may be reasonable to reconsider this decision. | ||||
In R1, the values I and K are sent in network byte order. Similarly, | In R1, the values I and K are sent in network byte order. Similarly, | |||
in I2 the values I and J are sent in network byte order. The SHA-1 | in I2 the values I and J are sent in network byte order. The SHA-1 | |||
hash is created by concatenating, in network byte order, the | hash is created by concatenating, in network byte order, the | |||
following data, in the following order: | following data, in the following order: | |||
64-bit random value I, in network byte order, as appearing in R1 | 64-bit random value I, in network byte order, as appearing in R1 | |||
and I2. | and I2. | |||
128-bit initiator HIT, in network byte order, as appearing in the | 128-bit initiator HIT, in network byte order, as appearing in the | |||
HIP Payload in R1 and I2. | HIP Payload in R1 and I2. | |||
128-bit responder HIT, in network byte order, as appearing in the | 128-bit responder HIT, in network byte order, as appearing in the | |||
HIP Payload in R1 and I2. | HIP Payload in R1 and I2. | |||
skipping to change at page 16, line 42 | skipping to change at page 18, line 4 | |||
HIP Payload in R1 and I2. | HIP Payload in R1 and I2. | |||
128-bit responder HIT, in network byte order, as appearing in the | 128-bit responder HIT, in network byte order, as appearing in the | |||
HIP Payload in R1 and I2. | HIP Payload in R1 and I2. | |||
64-bit random value J, in network byte order, as appearing in I2. | 64-bit random value J, in network byte order, as appearing in I2. | |||
In order to be a valid response cookie, the K low-order bits of the | In order to be a valid response cookie, the K low-order bits of the | |||
resulting SHA-1 digest must be zero. | resulting SHA-1 digest must be zero. | |||
Notes: | Notes: | |||
The length of the data to be hashed is 48 bytes. | The length of the data to be hashed is 48 bytes. | |||
All the data in the hash input MUST be in network byte order. | All the data in the hash input MUST be in network byte order. | |||
The order of the initiator and responder HITs are different in the | The order of the initiator and responder HITs are different in the | |||
R1 and I2 packets, see Section 6.1. Care must be taken to copy | R1 and I2 packets, see Section 6.1. Care must be taken to copy | |||
the values in right order to the hash input. | the values in right order to the hash input. | |||
Precomputation by the Responder | Precomputation by the Responder | |||
Sets up the challenge difficulty K. | Sets up the puzzle difficulty K. | |||
Creates a signed R1 and caches it. | Creates a signed R1 and caches it. | |||
Responder | Responder | |||
Selects a suitable cached R1. | Selects a suitable cached R1. | |||
Generates a random number I. | Generates a random number I. | |||
Sends I and K in a HIP Cookie in the R1. | Sends I and K in an R1. | |||
Saves I and K for a Delta time. | Saves I and K for a Delta time. | |||
Initiator | Initiator | |||
Generates repeated attempts to solve the challenge until a | Generates repeated attempts to solve the puzzle until a matching J | |||
matching J is found: | is found: | |||
Ltrunc( SHA-1( I | HIT-I | HIT-R | J ), K ) == 0 | Ltrunc( SHA-1( I | HIT-I | HIT-R | J ), K ) == 0 | |||
Sends I and J in HIP Cookie in a I2. | Sends I and J in an I2. | |||
Responder | Responder | |||
Verifies that the received I is a saved one. | Verifies that the received I is a saved one. | |||
Finds the right K based on I. | Finds the right K based on I. | |||
Computes V := Ltrunc( SHA-1( I | HIT-I | HIT-R | J ), K ) | Computes V := Ltrunc( SHA-1( I | HIT-I | HIT-R | J ), K ) | |||
Rejects if V != 0 | Rejects if V != 0 | |||
Accept if V == 0 | Accept if V == 0 | |||
The Ltrunc (SHA-1(), K) denotes the lowest order K bits of the SHA-1 | The Ltrunc (SHA-1(), K) denotes the lowest order K bits of the SHA-1 | |||
result. | result. | |||
skipping to change at page 17, line 40 | skipping to change at page 18, line 48 | |||
The packets R1, I2, and R2 implement a standard authenticated | The packets R1, I2, and R2 implement a standard authenticated | |||
Diffie-Hellman exchange. The Responder sends its public | Diffie-Hellman exchange. The Responder sends its public | |||
Diffie-Hellman key and its public authentication key, i.e., its host | Diffie-Hellman key and its public authentication key, i.e., its host | |||
identity, in R1. The signature in R1 allows the Initiator to verify | identity, in R1. The signature in R1 allows the Initiator to verify | |||
that the R1 has been once generated by the Responder. However, since | that the R1 has been once generated by the Responder. However, since | |||
it is precomputed and therefore does not cover all of the packet, it | it is precomputed and therefore does not cover all of the packet, it | |||
does not protect from replay attacks. | does not protect from replay attacks. | |||
When the Initiator receives an R1, it computes the Diffie-Hellman | When the Initiator receives an R1, it computes the Diffie-Hellman | |||
session key. It creates a HIP security association using keying | session key. It creates a HIP association using keying material from | |||
material from the session key (see Section 9), and uses the security | the session key (see Section 9), and uses the association to encrypt | |||
association to encrypt its public authentication key, i.e., host | its public authentication key, i.e., host identity. The resulting I2 | |||
identity. The resulting I2 contains the Initiator's Diffie-Hellman | contains the Initiator's Diffie-Hellman key and its encrypted public | |||
key and its the encrypted public authentication key. The signature | authentication key. The signature in I2 covers all of the packet. | |||
in I2 covers all of the packet. | ||||
The Responder extracts the Initiator Diffie-Hellman public key from | The Responder extracts the Initiator Diffie-Hellman public key from | |||
the I2, computes the Diffie-Hellman session key, creates a | the I2, computes the Diffie-Hellman session key, creates a | |||
corresponding HIP security association, and decrypts the Initiator's | corresponding HIP association, and decrypts the Initiator's public | |||
public authentication key. It can then verify the signature using | authentication key. It can then verify the signature using the | |||
the authentication key. | authentication key. | |||
The final message, R2, is needed to protect the Initiator from replay | The final message, R2, is needed to protect the Initiator from replay | |||
attacks. | attacks. | |||
4.1.3 HIP replay protection | 4.1.3 HIP replay protection | |||
The HIP protocol includes the following mechanisms to protect against | The HIP protocol includes the following mechanisms to protect against | |||
malicious replays. Responders are protected against replays of I1 | malicious replays. Responders are protected against replays of I1 | |||
packets by virtue of the stateless response to I1s with presigned R1 | packets by virtue of the stateless response to I1s with presigned R1 | |||
messages. Initiators are protected against R1 replays by a | messages. Initiators are protected against R1 replays by a | |||
skipping to change at page 18, line 25 | skipping to change at page 19, line 31 | |||
Responders are protected against replays or false I2s by the cookie | Responders are protected against replays or false I2s by the cookie | |||
mechanism (Section 4.1.1 above), and optional use of opaque data. | mechanism (Section 4.1.1 above), and optional use of opaque data. | |||
Hosts are protected against replays to R2s and UPDATEs by use of a | Hosts are protected against replays to R2s and UPDATEs by use of a | |||
less expensive HMAC verification preceding HIP signature | less expensive HMAC verification preceding HIP signature | |||
verification. | verification. | |||
The R1 generation counter is a monotonically increasing 64-bit | The R1 generation counter is a monotonically increasing 64-bit | |||
counter that may be initialized to any value. The scope of the | counter that may be initialized to any value. The scope of the | |||
counter MAY be system-wide but SHOULD be per host identity, if there | counter MAY be system-wide but SHOULD be per host identity, if there | |||
is more than one local host identity. The value of this counter | is more than one local host identity. The value of this counter | |||
SHOULD be kept across system reboots and invocations of the HIP | SHOULD be kept across system reboots and invocations of the HIP base | |||
signaling process. This counter indicates the current generation of | exchange. This counter indicates the current generation of cookie | |||
cookie puzzles. Implementations MUST accept puzzles from the current | puzzles. Implementations MUST accept puzzles from the current | |||
generation and MAY accept puzzles from earlier generations. A | generation and MAY accept puzzles from earlier generations. A | |||
system's local counter MUST be incremented at least as often as every | system's local counter MUST be incremented at least as often as every | |||
time old R1s cease to be valid, and SHOULD never be decremented, lest | time old R1s cease to be valid, and SHOULD never be decremented, lest | |||
the host expose its peers to the replay of previously generated, | the host expose its peers to the replay of previously generated, | |||
higher numbered R1s. Also, the R1 generation counter MUST NOT roll | higher numbered R1s. Also, the R1 generation counter MUST NOT roll | |||
over; if the counter is about to become exhausted, the corresponding | over; if the counter is about to become exhausted, the corresponding | |||
HI must be abandoned and replaced with a new one. | HI must be abandoned and replaced with a new one. | |||
A host may receive more than one R1, either due to sending multiple | A host may receive more than one R1, either due to sending multiple | |||
I1s (Section 8.4.1) or due to a replay of an old R1. When sending | I1s (Section 8.4.1) or due to a replay of an old R1. When sending | |||
skipping to change at page 19, line 5 | skipping to change at page 20, line 11 | |||
processing with the fresher R1, as if it were the first R1 to arrive. | processing with the fresher R1, as if it were the first R1 to arrive. | |||
Upon conclusion of an active HIP association with another host, the | Upon conclusion of an active HIP association with another host, the | |||
R1 generation counter associated with the peer host SHOULD be | R1 generation counter associated with the peer host SHOULD be | |||
flushed. A local policy MAY override the default flushing of R1 | flushed. A local policy MAY override the default flushing of R1 | |||
counters on a per-HIT basis. The reason for recommending the | counters on a per-HIT basis. The reason for recommending the | |||
flushing of this counter is that there may be hosts where the R1 | flushing of this counter is that there may be hosts where the R1 | |||
generation counter (occasionally) decreases; e.g., due to hardware | generation counter (occasionally) decreases; e.g., due to hardware | |||
failure. | failure. | |||
4.2 TCP and UDP pseudo-header computation | 4.2 TCP and UDP pseudo-header computation for user data | |||
When computing TCP and UDP checksums on sockets bound to HITs or | When computing TCP and UDP checksums on user data packets that flow | |||
LSIs, the IPv6 pseudo-header format [11] MUST be used. Additionally, | through sockets bound to HITs or LSIs, the IPv6 pseudo-header format | |||
the HITs MUST be used in the place of the IPv6 addresses in the IPv6 | [11] MUST be used. Additionally, the HITs MUST be used in the place | |||
pseudo-header. Note that the pseudo-header for actual HIP payloads | of the IPv6 addresses in the IPv6 pseudo-header. Note that the | |||
is computed differently; see Section 6.1.2. | pseudo-header for actual HIP payloads is computed differently; see | |||
Section 6.1.2. | ||||
4.3 Updating a HIP association | 4.3 Updating a HIP association | |||
A HIP association between two hosts may need to be updated over time. | A HIP association between two hosts may need to be updated over time. | |||
Examples include the need to rekey expiring security associations, | Examples include the need to rekey expiring user data security | |||
add new security associations, or change IP addresses associated with | associations, add new security associations, or change IP addresses | |||
hosts. This document only specifies how UPDATE is used for rekeying; | associated with hosts. The UPDATE packet is used for those and other | |||
other uses are deferred to other drafts. | similar purposes. This document only specifies the UPDATE packet | |||
format and basic processing rules, with mandatory TLVs. The actual | ||||
usage is defined in separate specifications. | ||||
HIP provides a general purpose UPDATE packet, which can carry | HIP provides a general purpose UPDATE packet, which can carry | |||
multiple HIP parameters, for updating the HIP state between two | multiple HIP parameters, for updating the HIP state between two | |||
peers. The UPDATE mechanism has the following properties: | peers. The UPDATE mechanism has the following properties: | |||
UPDATE messages carry a monotonically increasing sequence number | UPDATE messages carry a monotonically increasing sequence number | |||
and are explicitly acknowledged by the peer. Lost UPDATEs or | and are explicitly acknowledged by the peer. Lost UPDATEs or | |||
acknowledgments may be recovered via retransmission. Multiple | acknowledgments may be recovered via retransmission. Multiple | |||
UPDATE messages may be outstanding. | UPDATE messages may be outstanding. | |||
UPDATE is protected by both HMAC and HIP_SIGNATURE parameters, | UPDATE is protected by both HMAC and HIP_SIGNATURE parameters, | |||
since processing UPDATE signatures alone is a potential DoS attack | since processing UPDATE signatures alone is a potential DoS attack | |||
against intermediate systems. | against intermediate systems. | |||
The UPDATE packet is defined in Section 7.6. | The UPDATE packet is defined in Section 7.6. | |||
4.4 Error processing | 4.4 Error processing | |||
HIP error processing behaviour depends on whether there exists an | HIP error processing behaviour depends on whether there exists an | |||
active HIP association or not. In general, if an HIP security | active HIP association or not. In general, if an HIP association | |||
association exists between the sender and receiver of a packet | exists between the sender and receiver of a packet causing an error | |||
causing an error condition, the receiver SHOULD respond with a NOTIFY | condition, the receiver SHOULD respond with a NOTIFY packet. On the | |||
packet. On the other hand, if there are no existing HIP security | other hand, if there are no existing HIP associations between the | |||
associations between the sender and receiver, or the receiver cannot | sender and receiver, or the receiver cannot reasonably determine the | |||
reasonably determine the identity of the sender, the receiver MAY | identity of the sender, the receiver MAY respond with a suitable ICMP | |||
respond with a suitable ICMP message; see Section 6.3 for more | message; see Section 6.3 for more details. | |||
details. | ||||
4.5 Certificate distribution | 4.5 Certificate distribution | |||
HIP does not define how to use certificates. However, it does define | HIP does not define how to use certificates. However, it does define | |||
a simple certificate transport mechanisms that MAY be used to | a simple certificate transport mechanisms that MAY be used to | |||
implement certificate based security policies. The certificate | implement certificate-based security policies. The certificate | |||
payload is defined in Section 6.2.11, and the certificate packet in | payload is defined in Section 6.2.9, and the certificate packet in | |||
Section 7.5. | Section 7.5. | |||
4.6 Sending data on HIP packets | 4.6 Sending data on HIP packets | |||
A future version of this document may define how to include ESP | A future version of this document may define how to include user data | |||
protected data on various HIP packets. However, currently the HIP | on various HIP packets. However, currently the HIP header is a | |||
header is a terminal header, and not followed by any other headers. | terminal header, and not followed by any other headers. | |||
4.7 Transport Formats | ||||
The actual data transmission format, used for user data after the HIP | ||||
base exchange, is not defined in this document. Such transport | ||||
formats and methods are described in separate specifications. All | ||||
HIP implementations MUST implement, at minimum, the ESP transport | ||||
format for HIP [23]. | ||||
When new transport formats are defined, the corresponding parameters | ||||
MUST have smaller type value than the ESP_TRANSFORM parameter. The | ||||
order in which the transport formats are presented in the R1 packet, | ||||
is the preferred order. The last of the transport formats MUST be | ||||
ESP transport format, represented by the ESP_TRANSFORM parameter. | ||||
5. HIP protocol overview | 5. HIP protocol overview | |||
The following material is an overview of the HIP protocol operation. | The following material is an overview of the HIP protocol operation. | |||
Section 8 describes the packet processing steps in more detail. | Section 8 describes the packet processing steps in more detail. | |||
A typical HIP packet flow is shown below, between an Initiator (I) | A typical HIP packet flow is shown below, between an Initiator (I) | |||
and a Responder (R). It illustrates the exchange of four HIP packets | and a Responder (R). It illustrates the exchange of four HIP packets | |||
(I1, R1, I2, and R2). | (I1, R1, I2, and R2). | |||
I --> Directory: lookup R | I --> Directory: lookup R | |||
I <-- Directory: return R's addresses, and HI and/or HIT | I <-- Directory: return R's addresses, and HI and/or HIT | |||
I1 I --> R (Hi. Here is my I1, let's talk HIP) | I1 I --> R (Hi. Here is my I1, let's talk HIP) | |||
R1 I <-- R (OK. Here is my R1, handle this HIP cookie) | R1 I <-- R (OK. Here is my R1, handle this HIP cookie) | |||
I2 I --> R (Compute, compute, here is my counter I2) | I2 I --> R (Compute, compute, here is my counter I2) | |||
R2 I <-- R (OK. Let's finish HIP with my R2) | R2 I <-- R (OK. Let's finish HIP with my R2) | |||
I --> R (ESP protected data) | I --> R (data) | |||
I <-- R (ESP protected data) | I <-- R (data) | |||
By definition, the system initiating a HIP exchange is the Initiator, | By definition, the system initiating a HIP exchange is the Initiator, | |||
and the peer is the Responder. This distinction is forgotten once | and the peer is the Responder. This distinction is forgotten once | |||
the base exchange completes, and either party can become the | the base exchange completes, and either party can become the | |||
initiator in future communications. | initiator in future communications. | |||
5.1 HIP Scenarios | 5.1 HIP Scenarios | |||
The HIP protocol and state machine is designed to recover from one of | The HIP protocol and state machine is designed to recover from one of | |||
the parties crashing and losing its state. The following scenarios | the parties crashing and losing its state. The following scenarios | |||
describe the main use cases covered by the design. | describe the main use cases covered by the design. | |||
No prior state between the two systems. | No prior state between the two systems. | |||
The system with data to send is the Initiator. The process | The system with data to send is the Initiator. The process | |||
follows the standard four packet base exchange, establishing | follows the standard four packet base exchange, establishing | |||
the SAs. | the HIP association. | |||
The system with data to send has no state with the receiver, but | The system with data to send has no state with the receiver, but | |||
the receiver has a residual SA. | the receiver has a residual HIP association. | |||
The system with data to send is the Initiator. The Initiator | The system with data to send is the Initiator. The Initiator | |||
acts as in no prior state, sending I1 and getting R1. When the | acts as in no prior state, sending I1 and getting R1. When the | |||
Responder receives a valid I2, the old SAs are 'discovered' and | Responder receives a valid I2, the old association is | |||
deleted, and the new SAs are established. | 'discovered' and deleted, and the new association is | |||
The system with data to send has an SA, but the receiver does not. | established. | |||
The system sends data on the outbound SA. The receiver | The system with data to send has an HIP association, but the | |||
'detects' the situation when it receives an ESP packet that | receiver does not. | |||
contains an unknown SPI. The receiving host MUST discard this | The system sends data on the outbound user data security | |||
packet, in accordance with IPsec architecture. Optionally, the | association. The receiver 'detects' the situation when it | |||
receiving host MAY send an ICMP packet with the Parameter | receives a user data packet that it cannot match to any HIP | |||
Problem type to inform about invalid SPI (see Section 6.3, and | association. The receiving host MUST discard this packet. | |||
it MAY initiate a new HIP negotiation. However, responding | Optionally, the receiving host MAY send an ICMP packet with the | |||
with these optional mechanisms is implementation or policy | Parameter Problem type to inform about non-existing HIP | |||
dependent. | association (see Section 6.3), and it MAY initiate a new HIP | |||
negotiation. However, responding with these optional | ||||
A system determines that it needs to reset ESP Sequence Number, or | mechanisms is implementation or policy dependent. | |||
rekey. | ||||
The system sends a HIP UPDATE packet. The peer responds with a | ||||
HIP UPDATE response. The UPDATE exchanges can refresh or | ||||
establish new SAs for peers. | ||||
5.2 Refusing a HIP exchange | 5.2 Refusing a HIP exchange | |||
A HIP aware host may choose not to accept a HIP exchange. If the | A HIP aware host may choose not to accept a HIP exchange. If the | |||
host's policy is to only be an Initiator, it should begin its own HIP | host's policy is to only be an Initiator, it should begin its own HIP | |||
exchange. A host MAY choose to have such a policy since only the | exchange. A host MAY choose to have such a policy since only the | |||
Initiator HI is protected in the exchange. There is a risk of a race | Initiator HI is protected in the exchange. There is a risk of a race | |||
condition if each host's policy is to only be an Initiator, at which | condition if each host's policy is to only be an Initiator, at which | |||
point the HIP exchange will fail. | point the HIP exchange will fail. | |||
skipping to change at page 22, line 41 | skipping to change at page 23, line 37 | |||
If a host reboots or times out, it has lost its HIP state. If the | If a host reboots or times out, it has lost its HIP state. If the | |||
system that lost state has a datagram to deliver to its peer, it | system that lost state has a datagram to deliver to its peer, it | |||
simply restarts the HIP exchange. The peer replies with an R1 HIP | simply restarts the HIP exchange. The peer replies with an R1 HIP | |||
packet, but does not reset its state until it receives the I2 HIP | packet, but does not reset its state until it receives the I2 HIP | |||
packet. The I2 packet MUST have a valid solution to the puzzle and, | packet. The I2 packet MUST have a valid solution to the puzzle and, | |||
if inserted in R1, a valid Opaque data as well as a valid signature. | if inserted in R1, a valid Opaque data as well as a valid signature. | |||
Note that either the original Initiator or the Responder could end up | Note that either the original Initiator or the Responder could end up | |||
restarting the exchange, becoming the new Initiator. | restarting the exchange, becoming the new Initiator. | |||
If a system receives an ESP packet for an unknown SPI, it is possible | If a system receives a user data packet that cannot be matched to any | |||
that it has lost the state and its peer has not. It MAY send an ICMP | existing HIP association, it is possible that it has lost the state | |||
packet with the Parameter Problem type, the Pointer pointing to the | and its peer has not. It MAY send an ICMP packet with the Parameter | |||
SPI value within the ESP header. Reacting to ESP traffic with unknown | Problem type, the Pointer pointing to the referred HIP-related | |||
SPI depends on the implementation and the environment where the | association information. Reacting to such traffic depends on the | |||
implementation is used. | implementation and the environment where the implementation is used. | |||
The initiating host cannot know, if the SA indicated by the received | ||||
ESP packet is either a HIP SA or and IKE SA. If the old SA was not a | ||||
HIP SA, the peer may not respond to the I1 packet. | ||||
After sending the I1, the HIP negotiation proceeds as normally and, | After sending the I1, the HIP negotiation proceeds as normally and, | |||
when successful, the SA is created at the initiating end. The peer | when successful, the SA is created at the initiating end. The peer | |||
end removes the OLD SA and replaces it with the new one. | end removes the OLD SA and replaces it with the new one. | |||
5.4 HIP State Machine | 5.4 HIP State Machine | |||
The HIP protocol itself has very little state. In the HIP base | The HIP protocol itself has little state. In the HIP base exchange, | |||
exchange, there is an Initiator and a Responder. Once the SAs are | there is an Initiator and a Responder. Once the SAs are established, | |||
established, this distinction is lost. If the HIP state needs to be | this distinction is lost. If the HIP state needs to be | |||
re-established, the controlling parameters are which peer still has | re-established, the controlling parameters are which peer still has | |||
state and which has a datagram to send to its peer. The following | state and which has a datagram to send to its peer. The following | |||
state machine attempts to capture these processes. | state machine attempts to capture these processes. | |||
The state machine is presented in a single system view, representing | The state machine is presented in a single system view, representing | |||
either an Initiator or a Responder. There is not a complete overlap | either an Initiator or a Responder. There is not a complete overlap | |||
of processing logic here and in the packet definitions. Both are | of processing logic here and in the packet definitions. Both are | |||
needed to completely implement HIP. | needed to completely implement HIP. | |||
Implementors must understand that the state machine, as described | Implementors must understand that the state machine, as described | |||
here, is informational. Specific implementations are free to | here, is informational. Specific implementations are free to | |||
implement the actual functions differently. Section 8 describes the | implement the actual functions differently. Section 8 describes the | |||
packet processing rules in more detail. This state machine focuses | packet processing rules in more detail. This state machine focuses | |||
on the HIP I1, R1, I2, R2, and UPDATE packets only, and specifically, | on the HIP I1, R1, I2, and R2 packets only. Other states may be | |||
the state induced by an UPDATE that triggers a rekeying event. Other | introduced by mechanisms in other drafts (such as mobility and | |||
states may be introduced by mechanisms in other drafts (such as | multihoming). | |||
mobility and multihoming). | ||||
5.4.1 HIP States | 5.4.1 HIP States | |||
UNASSOCIATED State machine start | +---------------------+---------------------------------------------+ | |||
I1-SENT Initiating HIP | | State | Explanation | | |||
I2-SENT Waiting to finish HIP | +---------------------+---------------------------------------------+ | |||
R2-SENT Waiting to finish HIP | | UNASSOCIATED | State machine start | | |||
ESTABLISHED HIP SA established | | | | | |||
REKEYING HIP SA established, but UPDATE is outstanding for rekeying | | I1-SENT | Initiating HIP | | |||
CLOSING HIP SA closing, no data (ESP) can be sent | | | | | |||
CLOSED HIP SA closed, no data (ESP) can be sent | | I2-SENT | Waiting to finish HIP | | |||
E-FAILED HIP exchange failed | | | | | |||
| R2-SENT | Waiting to finish HIP | | ||||
| | | | ||||
| ESTABLISHED | HIP association established | | ||||
| | | | ||||
| CLOSING | HIP association closing, no data can be | | ||||
| | sent | | ||||
| | | | ||||
| CLOSED | HIP association closed, no data can be sent | | ||||
| | | | ||||
| E-FAILED | HIP exchange failed | | ||||
+---------------------+---------------------------------------------+ | ||||
5.4.2 HIP State Processes | 5.4.2 HIP State Processes | |||
+------------+ | +------------+ | |||
|UNASSOCIATED| Start state | |UNASSOCIATED| Start state | |||
+------------+ | +------------+ | |||
User data to send requiring a new HIP association, send I1 and go to I1-SENT | ||||
Datagram to send requiring a new SA, send I1 and go to I1-SENT | ||||
Receive I1, send R1 and stay at UNASSOCIATED | Receive I1, send R1 and stay at UNASSOCIATED | |||
Receive I2, process | Receive I2, process | |||
if successful, send R2 and go to R2-SENT | if successful, send R2 and go to R2-SENT | |||
if fail, stay at UNASSOCIATED | if fail, stay at UNASSOCIATED | |||
Receive ESP for unknown SA, optionally send ICMP as defined | Receive user data for unknown HIP association, optionally send ICMP as | |||
in | defined in | |||
Section 6.3 | Section 6.3 | |||
and stay at UNASSOCIATED | and stay at UNASSOCIATED | |||
Receive CLOSE, optionally send ICMP Parameter Problem and stay | ||||
Receive CLOSE, or UPDATE, optionally send ICMP Parameter | in UNASSOCIATED. | |||
Problem and stay in UNASSOCIATED. | ||||
Receive ANYOTHER, drop and stay at UNASSOCIATED | Receive ANYOTHER, drop and stay at UNASSOCIATED | |||
+---------+ | +---------+ | |||
| I1-SENT | Initiating HIP | | I1-SENT | Initiating HIP | |||
+---------+ | +---------+ | |||
Receive I1, send R1 and stay at I1-SENT | Receive I1, send R1 and stay at I1-SENT | |||
Receive I2, process | Receive I2, process | |||
if successful, send R2 and go to R2-SENT | if successful, send R2 and go to R2-SENT | |||
skipping to change at page 25, line 17 | skipping to change at page 26, line 19 | |||
| R2-SENT | Waiting to finish HIP | | R2-SENT | Waiting to finish HIP | |||
+---------+ | +---------+ | |||
Receive I1, send R1 and stay at R2-SENT | Receive I1, send R1 and stay at R2-SENT | |||
Receive I2, process, | Receive I2, process, | |||
if successful, send R2, and cycle at R2-SENT | if successful, send R2, and cycle at R2-SENT | |||
if failed, stay at R2-SENT | if failed, stay at R2-SENT | |||
Receive R1, drop and stay at R2-SENT | Receive R1, drop and stay at R2-SENT | |||
Receive R2, drop and stay at R2-SENT | Receive R2, drop and stay at R2-SENT | |||
Receive ESP for SA, process and go to ESTABLISHED | ||||
Receive UPDATE, go to ESTABLISHED and process from ESTABLISHED state | ||||
Move to ESTABLISHED after an implementation specific time. | Move to ESTABLISHED after an implementation specific time. | |||
+------------+ | +------------+ | |||
|ESTABLISHED | HIP SA established | |ESTABLISHED | HIP association established | |||
+------------+ | +------------+ | |||
Receive I1, send R1 and stay at ESTABLISHED | Receive I1, send R1 and stay at ESTABLISHED | |||
Receive I2, process with cookie and possible Opaque data verification | Receive I2, process with cookie and possible Opaque data verification | |||
if successful, send R2, drop old SAs, establish new SA, go to | if successful, send R2, drop old HIP association, establish a new | |||
R2-SENT | HIP association, to to R2-SENT | |||
if fail, stay at ESTABLISHED | if fail, stay at ESTABLISHED | |||
Receive R1, drop and stay at ESTABLISHED | Receive R1, drop and stay at ESTABLISHED | |||
Receive R2, drop and stay at ESTABLISHED | Receive R2, drop and stay at ESTABLISHED | |||
Receive ESP for SA, process and stay at ESTABLISHED | Receive user data for HIP association, process and stay at ESTABLISHED | |||
Receive UPDATE, process | No packet sent/received during UAL minutes, send CLOSE and go to CLOSING. | |||
if successful, send UPDATE in reply and go to REKEYING | ||||
if failed, stay at ESTABLISHED | ||||
Need rekey, | ||||
send UPDATE and go to REKEYING | ||||
No packet sent/received during UAL minutes, send CLOSE and go to | ||||
CLOSING. | ||||
Receive CLOSE, process | Receive CLOSE, process | |||
if successful, send CLOSE_ACK and go to CLOSED | if successful, send CLOSE_ACK and go to CLOSED | |||
if failed, stay at ESTABLISHED | if failed, stay at ESTABLISHED | |||
+---------+ | +---------+ | |||
| CLOSING | HIP association has not been used for UAL (Unused | | CLOSING | HIP association has not been used for UAL (Unused | |||
+---------+ Association Lifetime) minutes. | +---------+ Association Lifetime) minutes. | |||
Datagram to send, requires the creation of another incarnation | User data to send, requires the creation of another incarnation | |||
of the HIP association, started by sending an I1, | of the HIP association, started by sending an I1, | |||
and stay at CLOSING | and stay at CLOSING | |||
Receive I1, send R1 and stay at CLOSING | Receive I1, send R1 and stay at CLOSING | |||
Receive I2, process | Receive I2, process | |||
if successful, send R2 and go to R2-SENT | if successful, send R2 and go to R2-SENT | |||
if fail, stay at CLOSING | if fail, stay at CLOSING | |||
Receive R1, process | Receive R1, process | |||
if successful, send I2 and go to I2-SENT | if successful, send I2 and go to I2-SENT | |||
if fail, stay at CLOSING | if fail, stay at CLOSING | |||
Receive CLOSE, process | Receive CLOSE, process | |||
if successful, send CLOSE_ACK, discard state and go to CLOSED | if successful, send CLOSE_ACK, discard state and go to CLOSED | |||
if failed, stay at CLOSING | if failed, stay at CLOSING | |||
Receive CLOSE_ACK, process | Receive CLOSE_ACK, process | |||
if successful, discard state and go to UNASSOCIATED | if successful, discard state and go to UNASSOCIATED | |||
if failed, stay at CLOSING | if failed, stay at CLOSING | |||
skipping to change at page 27, line 4 | skipping to change at page 27, line 43 | |||
if successful, send R2 and go to R2-SENT | if successful, send R2 and go to R2-SENT | |||
if fail, stay at CLOSED | if fail, stay at CLOSED | |||
Receive R1, process | Receive R1, process | |||
if successful, send I2 and go to I2-SENT | if successful, send I2 and go to I2-SENT | |||
if fail, stay at CLOSED | if fail, stay at CLOSED | |||
Receive CLOSE, process | Receive CLOSE, process | |||
if successful, send CLOSE_ACK, stay at CLOSED | if successful, send CLOSE_ACK, stay at CLOSED | |||
if failed, stay at CLOSED | if failed, stay at CLOSED | |||
Receive CLOSE_ACK, process | Receive CLOSE_ACK, process | |||
if successful, discard state and go to UNASSOCIATED | if successful, discard state and go to UNASSOCIATED | |||
if failed, stay at CLOSED | if failed, stay at CLOSED | |||
Receive ANYOTHER, drop and stay at CLOSED | Receive ANYOTHER, drop and stay at CLOSED | |||
Timeout (UAL + 2MSL), discard state and go to UNASSOCIATED | Timeout (UAL + 2MSL), discard state and go to UNASSOCIATED | |||
+----------+ | ||||
| REKEYING | HIP SA established, rekey pending | ||||
+----------+ | ||||
Receive I1, send R1 and stay at REKEYING | ||||
Receive I2, process with cookie and possible Opaque data verification | ||||
if successful, send R2, drop old SA and go to R2-SENT | ||||
if fail, stay at REKEYING | ||||
Receive R1, drop and stay at REKEYING | ||||
Receive R2, drop and stay at REKEYING | ||||
Receive ESP for SA, process and stay at REKEYING | ||||
Receive UPDATE, process | ||||
if successful completion of rekey, go to ESTABLISHED | ||||
if failed, stay at REKEYING | ||||
Timeout, increment timeout counter | ||||
If counter is less than UPDATE_RETRIES_MAX, send UPDATE and stay at | ||||
REKEYING | ||||
If counter is greater than UPDATE_RETRIES_MAX, go to E-FAILED | ||||
+----------+ | +----------+ | |||
| E-FAILED | HIP failed to establish association with peer | | E-FAILED | HIP failed to establish association with peer | |||
+----------+ | +----------+ | |||
Move to UNASSOCIATED after an implementation specific time. Re-negotiation | Move to UNASSOCIATED after an implementation specific time. Re-negotiation | |||
is possible after moving to UNASSOCIATED state. | is possible after moving to UNASSOCIATED state. | |||
5.4.3 Simplified HIP State Diagram | 5.4.3 Simplified HIP State Diagram | |||
The following diagram shows the major state transitions. Transitions | The following diagram shows the major state transitions. Transitions | |||
based on received packets implicitly assume that the packets are | based on received packets implicitly assume that the packets are | |||
successfully authenticated or processed. The diagram assumes that | successfully authenticated or processed. | |||
UPDATE messages are being used for rekeying. | ||||
+-+ +------------------------------+ | +-+ +------------------------------+ | |||
I1 received, send R1 | | | | | I1 received, send R1 | | | | | |||
| v v | | | v v | | |||
Datagram to send +--------------+ I2 received, send R2 | | Datagram to send +--------------+ I2 received, send R2 | | |||
+---------------| UNASSOCIATED |---------------+ | | +---------------| UNASSOCIATED |---------------+ | | |||
| +--------------+ | | | | +--------------+ | | | |||
v | | | v | | | |||
+---------+ I2 received, send R2 | | | +---------+ I2 received, send R2 | | | |||
+---->| I1-SENT |---------------------------------------+ | | | +---->| I1-SENT |---------------------------------------+ | | | |||
skipping to change at page 28, line 21 | skipping to change at page 28, line 37 | |||
| | +------------------------+ | | | | | | +------------------------+ | | | | |||
| | R1 received, | I2 received, send R2 | | | | | | | R1 received, | I2 received, send R2 | | | | | |||
| v send I2 | v v v | | | v send I2 | v v v | | |||
| +---------+ | +---------+ | | | +---------+ | +---------+ | | |||
| +->| I2-SENT |------------+ | R2-SENT |<-----+ | | | +->| I2-SENT |------------+ | R2-SENT |<-----+ | | |||
| | +---------+ +---------+ | | | | | +---------+ +---------+ | | | |||
| | | | | | | | | | | | | | |||
| | | | | | | | | | | | | | |||
| |receive | | | | | | |receive | | | | | |||
| |R1, send | timeout, | receive I2,| | | | |R1, send | timeout, | receive I2,| | | |||
| |I2 |R2 received +--------------+ ESP | send R2| | | | |I2 |R2 received +--------------+ data | send R2| | | |||
| | +----------->| ESTABLISHED |<---------+ | | | | | +----------->| ESTABLISHED |<---------+ | | | |||
| | +--------------+ | | | | | +--------------+ | | | |||
| | Update received/ | ^ | | | | | | | | | | | | | | |||
| | Update triggered | | | | +---------------------------+ | | | | | | +---------------------------+ | | |||
| | +----------------+ | | | | | | | | | | | | | |||
| | | | | | No packet sent/received | | | | | | | No packet sent/received | | | |||
| | v | | | for UAL min, send CLOSE | | | | | | | for UAL min, send CLOSE | | | |||
| | +----------+ | | | | | | | | | | | | | |||
| | | REKEYING |-------------+ | | +---------+<-+ timeout | | | | | | | +---------+<-+ timeout | | | |||
| | +----------+ UPDATE acked | +--->| CLOSING |--+ (UAL+MSL) | | | | | | +--->| CLOSING |--+ (UAL+MSL) | | | |||
| | and NES received | +---------+ retransmit | | | | | | +---------+ retransmit | | | |||
+--+----------------------------+---------+ | | | | CLOSE | | | +--+----------------------------+---------+ | | | | CLOSE | | | |||
| +----------------------------+-----------+ | | +----------------+ | | | +----------------------------+-----------+ | | +----------------+ | | |||
| | | +-----------+ +------------------+--+ | | | | +-----------+ +------------------+--+ | |||
| | | | receive CLOSE, CLOSE_ACK | | | | | | | receive CLOSE, CLOSE_ACK | | | |||
| | | | send CLOSE_ACK received or | | | | | | | send CLOSE_ACK received or | | | |||
| | v v timeout | | | | | v v timeout | | | |||
| | +--------+ (UAL+MSL) | | | | | +--------+ (UAL+MSL) | | | |||
| +---------------------------| CLOSED |---------------------------+ | | | +---------------------------| CLOSED |---------------------------+ | | |||
+------------------------------+--------+------------------------------+ | +------------------------------+--------+------------------------------+ | |||
Datagram to send ^ | timeout (UAL+2MSL), | Datagram to send ^ | timeout (UAL+2MSL), | |||
skipping to change at page 29, line 38 | skipping to change at page 30, line 38 | |||
| | | | | | |||
/ HIP Parameters / | / HIP Parameters / | |||
/ / | / / | |||
| | | | | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
The HIP header is logically an IPv6 extension header. However, this | The HIP header is logically an IPv6 extension header. However, this | |||
document does not describe processing for Next Header values other | document does not describe processing for Next Header values other | |||
than decimal 59, IPPROTO_NONE, the IPV6 no next header value. Future | than decimal 59, IPPROTO_NONE, the IPV6 no next header value. Future | |||
documents MAY do so. However, implementations MUST ignore trailing | documents MAY do so. However, implementations MUST ignore trailing | |||
data if a Next Header value is received that is not implemented. | data if an unimplemented Next Header value is received. | |||
The Header Length field contains the length of the HIP Header and the | The Header Length field contains the length of the HIP Header and HIP | |||
length of HIP parameters in 8 bytes units, excluding the first 8 | parameters in 8 bytes units, excluding the first 8 bytes. Since all | |||
bytes. Since all HIP headers MUST contain the sender's and | HIP headers MUST contain the sender's and receiver's HIT fields, the | |||
receiver's HIT fields, the minimum value for this field is 4, and | minimum value for this field is 4, and conversely, the maximum length | |||
conversely, the maximum length of the HIP Parameters field is | of the HIP Parameters field is (255*8)-32 = 2008 bytes. Note: this | |||
(255*8)-32 = 2008 bytes. Note: this sets an additional limit for | sets an additional limit for sizes of TLVs included in the Parameters | |||
sizes of TLVs included in the Parameters field, independent of the | field, independent of the individual TLV parameter maximum lengths. | |||
individual TLV parameter maximum lengths. | ||||
The Packet Type indicates the HIP packet type. The individual packet | The Packet Type indicates the HIP packet type. The individual packet | |||
types are defined in the relevant sections. If a HIP host receives a | types are defined in the relevant sections. If a HIP host receives a | |||
HIP packet that contains an unknown packet type, it MUST drop the | HIP packet that contains an unknown packet type, it MUST drop the | |||
packet. | packet. | |||
The HIP Version is four bits. The current version is 1. The version | The HIP Version is four bits. The current version is 1. The version | |||
number is expected to be incremented only if there are incompatible | number is expected to be incremented only if there are incompatible | |||
changes to the protocol. Most extensions can be handled by defining | changes to the protocol. Most extensions can be handled by defining | |||
new packet types, new parameter types, or new controls. | new packet types, new parameter types, or new controls. | |||
skipping to change at page 30, line 34 | skipping to change at page 31, line 33 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| SHT | DHT | | | | | | | | |C|A| | | SHT | DHT | | | | | | | | |C|A| | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
C - Certificate One or more certificate packets (CER) follows this | C - Certificate One or more certificate packets (CER) follows this | |||
HIP packet (see Section 7.5). | HIP packet (see Section 7.5). | |||
A - Anonymous If this is set, the sender's HI in this packet is | A - Anonymous If this is set, the sender's HI in this packet is | |||
anonymous, i.e., one not listed in a directory. Anonymous HIs | anonymous, i.e., one not listed in a directory. Anonymous HIs | |||
SHOULD NOT be stored. This control is set in packets R1 and/or | SHOULD NOT be stored. This control is set in packets R1 and/or | |||
I2. The peer receiving an anonymous HI may choose to refuse it by | I2. The peer receiving an anonymous HI may choose to refuse it. | |||
silently dropping the exchange. | ||||
SHT - Sender's HIT Type Currently the following values are specified: | SHT - Sender's HIT Type Currently the following values are specified: | |||
0 RESERVED | 0 RESERVED | |||
1 Type 1 HIT | 1 Type 1 HIT | |||
2 Type 2 HIT | 2 Type 2 HIT | |||
3-6 UNASSIGNED | 3-6 UNASSIGNED | |||
7 RESERVED | 7 RESERVED | |||
DHT - Destination's HIT Type Using the same values as SHT. | DHT - Destination's HIT Type Using the same values as SHT. | |||
The rest of the fields are reserved for future use and MUST be set to | The rest of the fields are reserved for future use and MUST be set to | |||
zero on sent packets and ignored on received packets. | zero on sent packets and ignored on received packets. | |||
6.1.2 Checksum | 6.1.2 Checksum | |||
The checksum field is located at the same location within the header | The checksum field is located at the same location within the header | |||
as the checksum field in UDP packets, enabling hardware assisted | as the checksum field in UDP packets, enabling hardware assisted | |||
checksum generation and verification. Note that since the checksum | checksum generation and verification. Note that since the checksum | |||
covers the source and destination addresses in the IP header, it must | covers the source and destination addresses in the IP header, it must | |||
be recomputed on HIP based NAT boxes. | be recomputed on HIP-aware NAT boxes. | |||
If IPv6 is used to carry the HIP packet, the pseudo-header [11] | If IPv6 is used to carry the HIP packet, the pseudo-header [11] | |||
contains the source and destination IPv6 addresses, HIP packet length | contains the source and destination IPv6 addresses, HIP packet length | |||
in the pseudo-header length field, a zero field, and the HIP protocol | in the pseudo-header length field, a zero field, and the HIP protocol | |||
number (TBD, see Section 4) in the Next Header field. The length | number (TBD, see Section 4) in the Next Header field. The length | |||
field is in bytes and can be calculated from the HIP header length | field is in bytes and can be calculated from the HIP header length | |||
field: (HIP Header Length + 1) * 8. | field: (HIP Header Length + 1) * 8. | |||
In case of using IPv4, the IPv4 UDP pseudo header format [1] is used. | In case of using IPv4, the IPv4 UDP pseudo header format [1] is used. | |||
In the pseudo header, the source and destination addresses are those | In the pseudo header, the source and destination addresses are those | |||
used in the IP header, the zero field is obviously zero, the protocol | used in the IP header, the zero field is obviously zero, the protocol | |||
is the HIP protocol number (TBD, see Section 4), and the length is | is the HIP protocol number (TBD, see Section 4), and the length is | |||
calculated as in the IPv6 case. | calculated as in the IPv6 case. | |||
6.2 HIP parameters | 6.2 HIP parameters | |||
The HIP Parameters are used to carry the public key associated with | The HIP Parameters are used to carry the public key associated with | |||
the sender's HIT, together with other related security information. | the sender's HIT, together with other related security and other | |||
The HIP Parameters consists of ordered parameters, encoded in TLV | information. The HIP Parameters consists of ordered parameters, | |||
format. | encoded in TLV format. | |||
The following parameter types are currently defined. | The following parameter types are currently defined. | |||
TLV Type Length Data | +-----------------+-------+----------+------------------------------+ | |||
| TLV | Type | Length | Data | | ||||
SPI 1 4 Remote's SPI. | +-----------------+-------+----------+------------------------------+ | |||
| R1_COUNTER | 2 | 12 | System Boot Counter | | ||||
R1_COUNTER 2 12 System Boot Counter | | | | | | | |||
| PUZZLE | 5 | 12 | K and Random #I | | ||||
PUZZLE 5 12 K and Random #I | | | | | | | |||
| SOLUTION | 7 | 20 | K, Random #I and puzzle | | ||||
SOLUTION 7 20 K, Random #I and puzzle solution | | | | | solution J | | |||
| | | | | | ||||
NES 9 12 Old SPI, New SPI and other | | SEQ | 11 | 4 | Update packet ID number | | |||
info needed for UPDATE | | | | | | | |||
| ACK | 13 | variable | Update packet ID number | | ||||
SEQ 11 4 Update packet ID number | | | | | | | |||
| DIFFIE_HELLMAN | 15 | variable | public key | | ||||
ACK 13 variable Update packet ID number | | | | | | | |||
| HIP_TRANSFORM | 17 | variable | HIP Encryption and Integrity | | ||||
DIFFIE_HELLMAN 15 variable public key | | | | | Transform | | |||
| | | | | | ||||
HIP_TRANSFORM 17 variable HIP Encryption and Integrity | | ENCRYPTED | 21 | variable | Encrypted part of I2 or CER | | |||
Transform | | | | | packets | | |||
| | | | | | ||||
ESP_TRANSFORM 19 variable ESP Encryption and | | HOST_ID | 35 | variable | Host Identity with Fully | | |||
Authentication Transform | | | | | Qualified Domain Name or NAI | | |||
ENCRYPTED 21 variable Encrypted part of I2 or CER | | | | | | | |||
packets | | CERT | 64 | variable | HI Certificate | | |||
| | | | | | ||||
HOST_ID 35 variable Host Identity with Fully | | NOTIFY | 256 | variable | Informational data | | |||
Qualified Domain Name | | | | | | | |||
| ECHO_REQUEST | 1022 | variable | Opaque data to be echoed | | ||||
CERT 64 variable HI certificate | | | | | back; under signature | | |||
| | | | | | ||||
NOTIFY 256 variable Informational data | | ECHO_RESPONSE | 1024 | variable | Opaque data echoed back; | | |||
| | | | under signature | | ||||
ECHO_REQUEST 1022 variable Opaque data to be echoed back; | | | | | | | |||
under signature | | HMAC | 65245 | 20 | HMAC based message | | |||
| | | | authentication code, with | | ||||
ECHO_RESPONSE 1024 variable Opaque data echoed back; under | | | | | key material from | | |||
signature | | | | | HIP_TRANSFORM | | |||
| | | | | | ||||
HMAC 65245 20 HMAC based message | | HMAC_2 | 65247 | 20 | HMAC based message | | |||
authentication code, with | | | | | authentication code, with | | |||
key material from HIP_TRANSFORM | | | | | key material from | | |||
| | | | HIP_TRANSFORM | | ||||
HMAC_2 65247 20 HMAC based message | | | | | | | |||
authentication code, with | | HIP_SIGNATURE_2 | 65277 | variable | Signature of the R1 packet | | |||
key material from HIP_TRANSFORM | | | | | | | |||
| HIP_SIGNATURE | 65279 | variable | Signature of the packet | | ||||
HIP_SIGNATURE_2 65277 variable Signature of the R1 packet | | | | | | | |||
| ECHO_REQUEST | 65281 | variable | Opaque data to be echoed | | ||||
HIP_SIGNATURE 65279 variable Signature of the packet | | | | | back | | |||
| | | | | | ||||
ECHO_REQUEST 65281 variable Opaque data to be echoed back | | ECHO_RESPONSE | 65283 | variable | Opaque data echoed back; | | |||
| | | | after signature | | ||||
ECHO_RESPONSE 65283 variable Opaque data echoed back; after | +-----------------+-------+----------+------------------------------+ | |||
signature | ||||
6.2.1 TLV format | 6.2.1 TLV format | |||
The TLV encoded parameters are described in the following | The TLV encoded parameters are described in the following | |||
subsections. The type-field value also describes the order of these | subsections. The type-field value also describes the order of these | |||
fields in the packet. The parameters MUST be included into the | fields in the packet, except for type values from 2048 to 4095 which | |||
packet so that the types form an increasing order. If the order does | are reserved for new transport forms. The parameters MUST be | |||
not follow this rule, the packet is considered to be malformed and it | included into the packet so that the types form an increasing order. | |||
MUST be discarded. | If the order does not follow this rule, the packet is considered to | |||
be malformed and it MUST be discarded. | ||||
Parameters using type values from 2048 up to 4095 are transport | ||||
formats. Currently, one transport format is defined: the ESP | ||||
transport format [23]. The order of these parameters does not follow | ||||
the order of their type value, but they are put in the packet in | ||||
order of preference. First one of the transport formats it the most | ||||
preferred, and so on. | ||||
All the TLV parameters have a length (including Type and Length | All the TLV parameters have a length (including Type and Length | |||
fields) which is a multiple of 8 bytes. When needed, padding MUST be | fields) which is a multiple of 8 bytes. When needed, padding MUST be | |||
added to the end of the parameter so that the total length becomes a | added to the end of the parameter so that the total length becomes a | |||
multiple of 8 bytes. This rule ensures proper alignment of data. If | multiple of 8 bytes. This rule ensures proper alignment of data. If | |||
padding is added, the Length field MUST NOT include the padding. Any | padding is added, the Length field MUST NOT include the padding. Any | |||
added padding bytes MUST be set zero by the sender, but their content | added padding bytes MUST be set zero by the sender, but their content | |||
SHOULD NOT be checked on the receiving end. | SHOULD NOT be checked on the receiving end. | |||
Consequently, the Length field indicates the length of the Contents | Consequently, the Length field indicates the length of the Contents | |||
skipping to change at page 33, line 38 | skipping to change at page 34, line 43 | |||
MUST be recognized by the recipient, zero otherwise. | MUST be recognized by the recipient, zero otherwise. | |||
The C bit is considered to be a part of the Type field. | The C bit is considered to be a part of the Type field. | |||
Consequently, critical parameters are always odd | Consequently, critical parameters are always odd | |||
and non-critical ones have an even value. | and non-critical ones have an even value. | |||
Length Length of the Contents, in bytes. | Length Length of the Contents, in bytes. | |||
Contents Parameter specific, defined by Type | Contents Parameter specific, defined by Type | |||
Padding Padding, 0-7 bytes, added if needed | Padding Padding, 0-7 bytes, added if needed | |||
Critical parameters MUST be recognized by the recipient. If a | Critical parameters MUST be recognized by the recipient. If a | |||
recipient encounters a critical parameter that it does not recognize, | recipient encounters a critical parameter that it does not recognize, | |||
it MUST NOT process the packet any further. | it MUST NOT process the packet any further. It MAY send an ICMP or | |||
NOTIFY, as defined in Section 4.4. | ||||
Non-critical parameters MAY be safely ignored. If a recipient | Non-critical parameters MAY be safely ignored. If a recipient | |||
encounters a non-critical parameter that it does not recognize, it | encounters a non-critical parameter that it does not recognize, it | |||
SHOULD proceed as if the parameter was not present in the received | SHOULD proceed as if the parameter was not present in the received | |||
packet. | packet. | |||
6.2.2 Defining new parameters | 6.2.2 Defining new parameters | |||
Future specifications may define new parameters as needed. When | Future specifications may define new parameters as needed. When | |||
defining new parameters, care must be taken to ensure that the | defining new parameters, care must be taken to ensure that the | |||
skipping to change at page 34, line 16 | skipping to change at page 35, line 24 | |||
The following rules must be followed when defining new parameters. | The following rules must be followed when defining new parameters. | |||
1. The low order bit C of the Type code is used to distinguish | 1. The low order bit C of the Type code is used to distinguish | |||
between critical and non-critical parameters. | between critical and non-critical parameters. | |||
2. A new parameter may be critical only if an old recipient ignoring | 2. A new parameter may be critical only if an old recipient ignoring | |||
it would cause security problems. In general, new parameters | it would cause security problems. In general, new parameters | |||
SHOULD be defined as non-critical, and expect a reply from the | SHOULD be defined as non-critical, and expect a reply from the | |||
recipient. | recipient. | |||
3. If a system implements a new critical parameter, it MUST provide | 3. If a system implements a new critical parameter, it MUST provide | |||
the ability to configure the associated feature off, such that | the ability to configure the associated feature off, such that | |||
the critical parameter is not sent at all. The configuration | the critical parameter is not sent at all. The configuration | |||
option must be well documented. By default, sending of such a new | option must be well documented. By default, sending of such a | |||
critical parameter SHOULD be off. In other words, the management | new critical parameter SHOULD be off. In other words, the | |||
interface MUST allow vanilla standards only mode as a default | management interface MUST allow vanilla standards-only mode as a | |||
configuration setting, and MAY allow new critical payloads to be | default configuration setting, and MAY allow new critical | |||
configured on (and off). | payloads to be configured on (and off). | |||
4. The following type codes are reserved for future base protocol | 4. The following type codes are reserved for future base protocol | |||
extensions, and may be assigned only through an appropriate WG or | extensions, and may be assigned only through an appropriate WG or | |||
RFC action. | RFC action. | |||
0 - 511 | 0 - 511 | |||
65024 - 65535 | 65024 - 65535 | |||
5. The following type codes are reserved for experimentation and | 5. The following type codes are reserved for experimentation and | |||
private use. Types SHOULD be selected in a random fashion from | private use. Types SHOULD be selected in a random fashion from | |||
this range, thereby reducing the probability of collisions. A | this range, thereby reducing the probability of collisions. A | |||
method employing genuine randomness (such as flipping a coin) | method employing genuine randomness (such as flipping a coin) | |||
SHOULD be used. | SHOULD be used. | |||
32768 - 49141 | 32768 - 49141 | |||
6. All other parameter type codes MUST be registered by the IANA. | 6. All other parameter type codes MUST be registered by the IANA. | |||
See Section 14. | See Section 13. | |||
6.2.3 SPI | ||||
The SPI parameter contains the SPI that the receiving host must use | ||||
when sending data to the sending host. It may be possible, in future | ||||
extensions of this protocol, for multiple SPIs to exist in a | ||||
host-host communications context. | ||||
0 1 2 3 | ||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Type | Length | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| SPI | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
Type 1 | ||||
Length 4 | ||||
SPI Security Parameter Index | ||||
6.2.4 R1_COUNTER | 6.2.3 R1_COUNTER | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Reserved, 4 bytes | | | Reserved, 4 bytes | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| R1 generation counter, 8 bytes | | | R1 generation counter, 8 bytes | | |||
| | | | | | |||
skipping to change at page 35, line 33 | skipping to change at page 36, line 32 | |||
The R1_COUNTER parameter contains an 64-bit unsigned integer in | The R1_COUNTER parameter contains an 64-bit unsigned integer in | |||
network byte order, indicating the current generation of valid | network byte order, indicating the current generation of valid | |||
puzzles. The sender is supposed to increment this counter | puzzles. The sender is supposed to increment this counter | |||
periodically. It is RECOMMENDED that the counter value is | periodically. It is RECOMMENDED that the counter value is | |||
incremented at least as often as old PUZZLE values are deprecated so | incremented at least as often as old PUZZLE values are deprecated so | |||
that SOLUTIONs to them are no longer accepted. | that SOLUTIONs to them are no longer accepted. | |||
The R1_COUNTER parameter is optional. It SHOULD be included in the | The R1_COUNTER parameter is optional. It SHOULD be included in the | |||
R1 (in which case it is covered by the signature), and if present in | R1 (in which case it is covered by the signature), and if present in | |||
the R1, it MAY be echoed (including the Reserved field) by the | the R1, it MAY be echoed (including the Reserved field in verbatim) | |||
Initiator in the I2. | by the Initiator in the I2. | |||
6.2.5 PUZZLE | 6.2.4 PUZZLE | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| K, 1 byte | Lifetime | Opaque, 2 bytes | | | K, 1 byte | Lifetime | Opaque, 2 bytes | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Random # I, 8 bytes | | | Random # I, 8 bytes | | |||
| | | | | | |||
skipping to change at page 37, line 5 | skipping to change at page 38, line 5 | |||
initiator which it should not exceed while trying to solve the | initiator which it should not exceed while trying to solve the | |||
puzzle. The lifetime is indicated as power of 2 using formula | puzzle. The lifetime is indicated as power of 2 using formula | |||
2^(Lifetime-32) seconds. A puzzle MAY be augmented by including an | 2^(Lifetime-32) seconds. A puzzle MAY be augmented by including an | |||
ECHO_REQUEST parameter to an R1. The contents of the ECHO_REQUEST | ECHO_REQUEST parameter to an R1. The contents of the ECHO_REQUEST | |||
are then echoed back in ECHO_RESPONSE, allowing the Responder to use | are then echoed back in ECHO_RESPONSE, allowing the Responder to use | |||
the included information as a part of puzzle processing. | the included information as a part of puzzle processing. | |||
The Opaque and Random #I field are not covered by the HIP_SIGNATURE_2 | The Opaque and Random #I field are not covered by the HIP_SIGNATURE_2 | |||
parameter. | parameter. | |||
6.2.6 SOLUTION | 6.2.5 SOLUTION | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| K, 1 byte | Reserved | Opaque, 2 bytes | | | K, 1 byte | Reserved | Opaque, 2 bytes | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Random #I, 8 bytes | | | Random #I, 8 bytes | | |||
| | | | | | |||
skipping to change at page 38, line 5 | skipping to change at page 39, line 5 | |||
Puzzle solution | Puzzle solution | |||
#J random number | #J random number | |||
Random #I, and Random #J are represented as 64-bit integers, K as | Random #I, and Random #J are represented as 64-bit integers, K as | |||
8-bit integer, all in network byte order. | 8-bit integer, all in network byte order. | |||
The SOLUTION parameter contains a solution to a puzzle. It also | The SOLUTION parameter contains a solution to a puzzle. It also | |||
echoes back the random difficulty K, the Opaque field, and the puzzle | echoes back the random difficulty K, the Opaque field, and the puzzle | |||
integer #I. | integer #I. | |||
6.2.7 DIFFIE_HELLMAN | 6.2.6 DIFFIE_HELLMAN | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Group ID | Public Value / | | Group ID | Public Value / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
/ | padding | | / | padding | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
skipping to change at page 38, line 41 | skipping to change at page 39, line 41 | |||
8192-bit MODP group 6 | 8192-bit MODP group 6 | |||
The MODP Diffie-Hellman groups are defined in [18]. The OAKLEY group | The MODP Diffie-Hellman groups are defined in [18]. The OAKLEY group | |||
is defined in [9]. The OAKLEY well known group 5 is the same as the | is defined in [9]. The OAKLEY well known group 5 is the same as the | |||
1536-bit MODP group. | 1536-bit MODP group. | |||
A HIP implementation MUST support Group IDs 1 and 3. The 384-bit | A HIP implementation MUST support Group IDs 1 and 3. The 384-bit | |||
group can be used when lower security is enough (e.g. web surfing) | group can be used when lower security is enough (e.g. web surfing) | |||
and when the equipment is not powerful enough (e.g. some PDAs). | and when the equipment is not powerful enough (e.g. some PDAs). | |||
Equipment powerful enough SHOULD implement also group ID 5. The | Equipment powerful enough SHOULD implement also group ID 5. The | |||
384-bit group is defined in Appendix G. | 384-bit group is defined in Appendix E. | |||
To avoid unnecessary failures during the 4-way handshake, the rest of | To avoid unnecessary failures during the base exchange, the rest of | |||
the groups SHOULD be implemented in hosts where resources are | the groups SHOULD be implemented in hosts where resources are | |||
adequate. | adequate. | |||
6.2.8 HIP_TRANSFORM | 6.2.7 HIP_TRANSFORM | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Transform-ID #1 | Transform-ID #2 | | | Transform-ID #1 | Transform-ID #2 | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Transform-ID #n | Padding | | | Transform-ID #n | Padding | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 17 | Type 17 | |||
Length length in octets, excluding Type, Length, and padding | Length length in octets, excluding Type, Length, and padding | |||
Transform-ID Defines the HIP Suite to be used | Transform-ID Defines the HIP Suite to be used | |||
The Suite-IDs are identical to those defined in Section 6.2.9. | The following Suite-IDs are defined ([20],[24]): | |||
There MUST NOT be more than six (6) HIP Suite-IDs in one HIP | ||||
transform TLV. The limited number of transforms sets the maximum | ||||
size of HIP_TRANSFORM TLV. The HIP_TRANSFORM TLV MUST contain at | ||||
least one of the mandatory Suite-IDs. | ||||
Mandatory implementations: ENCR-AES-CBC with HMAC-SHA1 and ENCR-NULL | ||||
with HMAC-SHA1. | ||||
6.2.9 ESP_TRANSFORM | ||||
0 1 2 3 | ||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Type | Length | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Reserved |E| Suite-ID #1 | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Suite-ID #2 | Suite-ID #3 | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Suite-ID #n | Padding | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
Type 19 | ||||
Length length in octets, excluding Type, Length, and padding | ||||
E One if the ESP transform requires 64-bit sequence | ||||
numbers | ||||
(see | ||||
Section 11.6 | ||||
) | ||||
Reserved zero when sent, ignored when received | ||||
Suite-ID defines the ESP Suite to be used | ||||
The following Suite-IDs are defined ([20],[23]): | XXX: Deprecate MD5 in the light of recent development? | |||
Suite-ID Value | Suite-ID Value | |||
RESERVED 0 | RESERVED 0 | |||
ESP-AES-CBC with HMAC-SHA1 1 | AES-CBC with HMAC-SHA1 1 | |||
ESP-3DES-CBC with HMAC-SHA1 2 | 3DES-CBC with HMAC-SHA1 2 | |||
ESP-3DES-CBC with HMAC-MD5 3 | 3DES-CBC with HMAC-MD5 3 | |||
ESP-BLOWFISH-CBC with HMAC-SHA1 4 | BLOWFISH-CBC with HMAC-SHA1 4 | |||
ESP-NULL with HMAC-SHA1 5 | NULL-ENCRYPT with HMAC-SHA1 5 | |||
ESP-NULL with HMAC-MD5 6 | NULL-ENCRYPT with HMAC-MD5 6 | |||
There MUST NOT be more than six (6) ESP Suite-IDs in one | There MUST NOT be more than six (6) HIP Suite-IDs in one HIP | |||
ESP_TRANSFORM TLV. The limited number of Suite-IDs sets the maximum | transform TLV. The limited number of transforms sets the maximum | |||
size of ESP_TRANSFORM TLV. The ESP_TRANSFORM MUST contain at least | size of HIP_TRANSFORM TLV. The HIP_TRANSFORM TLV MUST contain at | |||
one of the mandatory Suite-IDs. | least one of the mandatory Suite-IDs. | |||
Mandatory implementations: ESP-AES-CBC with HMAC-SHA1 and ESP-NULL | Mandatory implementations: AES-CBC with HMAC-SHA1 and NULL-ENCRYPTION | |||
with HMAC-SHA1. | with HMAC-SHA1. | |||
6.2.10 HOST_ID | 6.2.8 HOST_ID | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| HI Length |DI-type| DI Length | | | HI Length |DI-type| DI Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Host Identity / | | Host Identity / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
/ | Domain Identifier / | / | Domain Identifier / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
/ | Padding | | / | Padding | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 35 | Type 35 | |||
Length length in octets, excluding Type, Length, and | Length length in octets, excluding Type, Length, and | |||
Padding | Padding | |||
HI Length Length of the Host Identity in octets | ||||
DI-type type of the following Domain Identifier field | DI-type type of the following Domain Identifier field | |||
DI Length length of the FQDN or NAI in octets | DI Length length of the FQDN or NAI in octets | |||
N if set, the following FQDN/NAI field contains a | ||||
NAI | ||||
Host Identity actual host identity | Host Identity actual host identity | |||
Domain Identifier the identifier of the sender | Domain Identifier the identifier of the sender | |||
The Host Identity is represented in RFC2535 [12] format. The | The Host Identity is represented in RFC2535 [12] format. The | |||
algorithms used in RDATA format are the following: | algorithms used in RDATA format are the following: | |||
Algorithms Values | Algorithms Values | |||
RESERVED 0 | RESERVED 0 | |||
DSA 3 [RFC2536] (RECOMMENDED) | DSA 3 [RFC2536] (RECOMMENDED) | |||
RSA 5 [RFC3110] (REQUIRED) | RSA 5 [RFC3110] (REQUIRED) | |||
The following DI-types have been defined: | The following DI-types have been defined: | |||
skipping to change at page 41, line 29 | skipping to change at page 42, line 10 | |||
FQDN Fully Qualified Domain Name, in binary format. | FQDN Fully Qualified Domain Name, in binary format. | |||
NAI Network Access Identifier, in binary format. The | NAI Network Access Identifier, in binary format. The | |||
format of the NAI is login@FQDN. | format of the NAI is login@FQDN. | |||
The format for the FQDN is defined in RFC1035 [3] Section 3.1. | The format for the FQDN is defined in RFC1035 [3] Section 3.1. | |||
If there is no Domain Identifier, i.e. the DI-type field is zero, | If there is no Domain Identifier, i.e. the DI-type field is zero, | |||
also the DI Length field is set to zero. | also the DI Length field is set to zero. | |||
6.2.11 CERT | 6.2.9 CERT | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Cert count | Cert ID | Cert type | / | | Cert count | Cert ID | Cert type | / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
/ Certificate / | / Certificate / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
skipping to change at page 42, line 16 | skipping to change at page 43, line 5 | |||
certificate chain. The numbering in Cert ID MUST go from 1 to Cert | certificate chain. The numbering in Cert ID MUST go from 1 to Cert | |||
count. | count. | |||
The following certificate types are defined: | The following certificate types are defined: | |||
Cert format Type number | Cert format Type number | |||
X.509 v3 1 | X.509 v3 1 | |||
The encoding format for X.509v3 certificate is defined in [15]. | The encoding format for X.509v3 certificate is defined in [15]. | |||
6.2.12 HMAC | 6.2.10 HMAC | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | | | | |||
| HMAC | | | HMAC | | |||
| | | | | | |||
| | | | | | |||
skipping to change at page 42, line 40 | skipping to change at page 43, line 29 | |||
Type 65245 | Type 65245 | |||
Length 20 | Length 20 | |||
HMAC 160 low order bits of the HMAC computed over the HIP | HMAC 160 low order bits of the HMAC computed over the HIP | |||
packet, excluding the HMAC parameter and any | packet, excluding the HMAC parameter and any | |||
following HIP_SIGNATURE or HIP_SIGNATURE_2 | following HIP_SIGNATURE or HIP_SIGNATURE_2 | |||
parameters. The checksum field MUST be set to zero | parameters. The checksum field MUST be set to zero | |||
and the HIP header length in the HIP common header | and the HIP header length in the HIP common header | |||
MUST be calculated not to cover any excluded | MUST be calculated not to cover any excluded | |||
parameters when the HMAC is calculated. | parameters when the HMAC is calculated. | |||
The HMAC calculation and verification process is presented in Section | The HMAC calculation and verification process is presented in | |||
8.3.1 | Section 8.3.1 | |||
6.2.13 HMAC_2 | 6.2.11 HMAC_2 | |||
The TLV structure is the same as in Section 6.2.12. The fields are: | The TLV structure is the same as in Section 6.2.10. The fields are: | |||
Type 65247 | Type 65247 | |||
Length 20 | Length 20 | |||
HMAC 160 low order bits of the HMAC computed over the HIP | HMAC 160 low order bits of the HMAC computed over the HIP | |||
packet, excluding the HMAC parameter and any | packet, excluding the HMAC parameter and any | |||
following HIP_SIGNATURE or HIP_SIGNATURE_2 | following HIP_SIGNATURE or HIP_SIGNATURE_2 | |||
parameters and including an additional sender's | parameters and including an additional sender's | |||
HOST_ID TLV during the HMAC calculation. The | HOST_ID TLV during the HMAC calculation. The | |||
checksum field MUST be set to zero and the HIP | checksum field MUST be set to zero and the HIP | |||
header length in the HIP common header MUST be | header length in the HIP common header MUST be | |||
calculated not to cover any excluded parameters when | calculated not to cover any excluded parameters when | |||
the HMAC is calculated. | the HMAC is calculated. | |||
The HMAC calculation and verification process is presented in Section | The HMAC calculation and verification process is presented in | |||
8.3.1 | Section 8.3.1 | |||
6.2.14 HIP_SIGNATURE | 6.2.12 HIP_SIGNATURE | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| SIG alg | Signature / | | SIG alg | Signature / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
/ | Padding | | / | Padding | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
skipping to change at page 43, line 43 | skipping to change at page 44, line 28 | |||
Length length in octets, excluding Type, Length, and Padding | Length length in octets, excluding Type, Length, and Padding | |||
SIG alg Signature algorithm | SIG alg Signature algorithm | |||
Signature the signature is calculated over the HIP packet, | Signature the signature is calculated over the HIP packet, | |||
excluding the HIP_SIGNATURE TLV field and any TLVs | excluding the HIP_SIGNATURE TLV field and any TLVs | |||
that follow the HIP_SIGNATURE TLV. The checksum field | that follow the HIP_SIGNATURE TLV. The checksum field | |||
MUST be set to zero, and the HIP header length in the | MUST be set to zero, and the HIP header length in the | |||
HIP common header MUST be calculated only to the | HIP common header MUST be calculated only to the | |||
beginning of the HIP_SIGNATURE TLV when the signature | beginning of the HIP_SIGNATURE TLV when the signature | |||
is calculated. | is calculated. | |||
The signature algorithms are defined in Section 6.2.10. The | The signature algorithms are defined in Section 6.2.8. The signature | |||
signature in the Signature field is encoded using the proper method | in the Signature field is encoded using the proper method depending | |||
depending on the signature algorithm (e.g. according to [14] in case | on the signature algorithm (e.g. according to [14] in case of RSA, | |||
of RSA, or according to [13] in case of DSA). | or according to [13] in case of DSA). | |||
The HIP_SIGNATURE calculation and verification process is presented | The HIP_SIGNATURE calculation and verification process is presented | |||
in Section 8.3.2 | in Section 8.3.2 | |||
6.2.15 HIP_SIGNATURE_2 | 6.2.13 HIP_SIGNATURE_2 | |||
The TLV structure is the same as in Section 6.2.14. The fields are: | The TLV structure is the same as in Section 6.2.12. The fields are: | |||
Type 65277 (2^16-2^8-3) | Type 65277 (2^16-2^8-3) | |||
Length length in octets, excluding Type, Length, and Padding | Length length in octets, excluding Type, Length, and Padding | |||
SIG alg Signature algorithm | SIG alg Signature algorithm | |||
Signature the signature is calculated over the HIP R1 packet, | Signature the signature is calculated over the HIP R1 packet, | |||
excluding the HIP_SIGNATURE_2 TLV field and any | excluding the HIP_SIGNATURE_2 TLV field and any | |||
TLVs that follow the HIP_SIGNATURE_2 TLV. Initiator's | TLVs that follow the HIP_SIGNATURE_2 TLV. Initiator's | |||
HIT, checksum field, and the Opaque and Random #I | HIT, checksum field, and the Opaque and Random #I | |||
fields in the PUZZLE TLV MUST be set to zero while | fields in the PUZZLE TLV MUST be set to zero while | |||
computing the HIP_SIGNATURE_2 signature. Further, the | computing the HIP_SIGNATURE_2 signature. Further, the | |||
HIP packet length in the HIP header MUST be | HIP packet length in the HIP header MUST be | |||
calculated to the beginning of the HIP_SIGNATURE_2 | calculated to the beginning of the HIP_SIGNATURE_2 | |||
TLV when the signature is calculated. | TLV when the signature is calculated. | |||
Zeroing the Initiator's HIT makes it possible to create R1 packets | Zeroing the Initiator's HIT makes it possible to create R1 packets | |||
beforehand to minimize the effects of possible DoS attacks. Zeroing | beforehand to minimize the effects of possible DoS attacks. Zeroing | |||
the I and Opaque fields allows these fields to be populated | the I and Opaque fields allows these fields to be populated | |||
dynamically on precomputed R1s. | dynamically on precomputed R1s. | |||
Signature calculation and verification follows the process in Section | Signature calculation and verification follows the process in | |||
8.3.2. | Section 8.3.2. | |||
6.2.16 NES | ||||
During the life of an SA established by HIP, one of the hosts may | ||||
need to reset the Sequence Number to one (to prevent wrapping) and | ||||
rekey. The reason for rekeying might be an approaching sequence | ||||
number wrap in ESP, or a local policy on use of a key. Rekeying ends | ||||
the current SAs and starts new ones on both peers. | ||||
The NES parameter is carried in the HIP UPDATE packet. It is used to | ||||
reset Security Associations. It introduces a new SPI to be used when | ||||
sending data to the sender of the UPDATE packet. The keys for the | ||||
new Security Association will be drawn from KEYMAT. If the packet | ||||
contains a Diffie-Hellman parameter, the KEYMAT is first recomputed | ||||
before drawing the new keys. | ||||
0 1 2 3 | ||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Type | Length | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Reserved | Keymat Index | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Old SPI | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| New SPI | | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
Type 9 | ||||
Length 12 | ||||
Keymat Index Index, in bytes, where to continue to draw ESP keys | ||||
from KEYMAT. If the packet includes a new | ||||
Diffie-Hellman key, the field MUST be zero. Note | ||||
that the length of this field limits the amount of | ||||
keying material that can be drawn from KEYMAT. If | ||||
that amount is exceeded, the NES packet MUST contain | ||||
a new Diffie-Hellman key. | ||||
Old SPI Old SPI for data sent to the source address of | ||||
this packet | ||||
New SPI New SPI for data sent to the source address of | ||||
this packet | ||||
A host that receives an NES must reply shortly thereafter with an | ||||
NES. Any middleboxes between the communicating hosts will learn the | ||||
mappings from the pair of UPDATE messages. | ||||
6.2.17 SEQ | 6.2.14 SEQ | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Update ID | | | Update ID | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 11 | Type 11 | |||
Length 4 | Length 4 | |||
Update ID 32-bit sequence number | Update ID 32-bit sequence number | |||
The Update ID is an unsigned quantity, initialized by a host to zero | The Update ID is an unsigned quantity, initialized by a host to zero | |||
upon moving to ESTABLISHED state. The Update ID has scope within a | upon moving to ESTABLISHED state. The Update ID has scope within a | |||
single HIP association, and not across multiple associations or | single HIP association, and not across multiple associations or | |||
multiple hosts. The Update ID is incremented by one before each new | multiple hosts. The Update ID is incremented by one before each new | |||
UPDATE that is sent by the host (i.e., the first UPDATE packet | UPDATE that is sent by the host (i.e., the first UPDATE packet | |||
originated by a host has an Update ID of 1). | originated by a host has an Update ID of 1). | |||
6.2.18 ACK | 6.2.15 ACK | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| peer Update ID | | | peer Update ID | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 13 | Type 13 | |||
Length variable (multiple of 4) | Length variable (multiple of 4) | |||
peer Update ID 32-bit sequence number corresponding to the | peer Update ID 32-bit sequence number corresponding to the | |||
Update ID being acked. | Update ID being acked. | |||
The ACK parameter includes one or more Update IDs that have been | The ACK parameter includes one or more Update IDs that have been | |||
received from the peer. The Length field identifies the number of | received from the peer. The Length field identifies the number of | |||
peer Update IDs that are present in the parameter. | peer Update IDs that are present in the parameter. | |||
6.2.19 ENCRYPTED | 6.2.16 ENCRYPTED | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Reserved | | | Reserved | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| IV / | | IV / | |||
/ / | / / | |||
skipping to change at page 48, line 16 | skipping to change at page 47, line 16 | |||
for that suite, but not any additional external padding). Note that | for that suite, but not any additional external padding). Note that | |||
the length of the cipher suite output may be smaller or larger than | the length of the cipher suite output may be smaller or larger than | |||
the length of the data to be encrypted, since the encryption process | the length of the data to be encrypted, since the encryption process | |||
may compress the data or add additional padding to the data. | may compress the data or add additional padding to the data. | |||
The ENCRYPTED payload may contain additional external padding, if the | The ENCRYPTED payload may contain additional external padding, if the | |||
result of encryption, the TLV header and the IV is not a multiple of | result of encryption, the TLV header and the IV is not a multiple of | |||
8 bytes. The contents of this external padding MUST follow the rules | 8 bytes. The contents of this external padding MUST follow the rules | |||
given in Section 6.2.1. | given in Section 6.2.1. | |||
6.2.20 NOTIFY | 6.2.17 NOTIFY | |||
The NOTIFY parameter is used to transmit informational data, such as | The NOTIFY parameter is used to transmit informational data, such as | |||
error conditions and state transitions, to a HIP peer. A NOTIFY | error conditions and state transitions, to a HIP peer. A NOTIFY | |||
parameter may appear in the NOTIFY packet type. The use of the | parameter may appear in the NOTIFY packet type. The use of the | |||
NOTIFY parameter in other packet types is for further study. | NOTIFY parameter in other packet types is for further study. | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
skipping to change at page 50, line 12 | skipping to change at page 49, line 12 | |||
NO_HIP_PROPOSAL_CHOSEN 16 | NO_HIP_PROPOSAL_CHOSEN 16 | |||
None of the proposed HIP Transform crypto suites was | None of the proposed HIP Transform crypto suites was | |||
acceptable. | acceptable. | |||
INVALID_HIP_TRANSFORM_CHOSEN 17 | INVALID_HIP_TRANSFORM_CHOSEN 17 | |||
The HIP Transform crypto suite does not correspond to | The HIP Transform crypto suite does not correspond to | |||
one offered by the responder. | one offered by the responder. | |||
NO_ESP_PROPOSAL_CHOSEN 18 | ||||
None of the proposed ESP Transform crypto suites was | ||||
acceptable. | ||||
INVALID_ESP_TRANSFORM_CHOSEN 19 | ||||
The ESP Transform crypto suite does not correspond to | ||||
one offered by the responder. | ||||
AUTHENTICATION_FAILED 24 | AUTHENTICATION_FAILED 24 | |||
Sent in response to a HIP signature failure. | Sent in response to a HIP signature failure. | |||
CHECKSUM_FAILED 26 | CHECKSUM_FAILED 26 | |||
Sent in response to a HIP checksum failure. | Sent in response to a HIP checksum failure. | |||
HMAC_FAILED 28 | HMAC_FAILED 28 | |||
skipping to change at page 51, line 25 | skipping to change at page 50, line 15 | |||
the I2 for processing. The puzzle was correctly solved | the I2 for processing. The puzzle was correctly solved | |||
and the responder is willing to set up an association | and the responder is willing to set up an association | |||
but has currently a number of I2s in processing queue. | but has currently a number of I2s in processing queue. | |||
R2 will be sent after the I2 has been processed. | R2 will be sent after the I2 has been processed. | |||
NOTIFY MESSAGES - STATUS TYPES Value | NOTIFY MESSAGES - STATUS TYPES Value | |||
------------------------------ ----- | ------------------------------ ----- | |||
(None defined at present) | (None defined at present) | |||
6.2.21 ECHO_REQUEST | 6.2.18 ECHO_REQUEST | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Opaque data (variable length) | | | Opaque data (variable length) | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 65281 or 1022 | Type 65281 or 1022 | |||
skipping to change at page 52, line 5 | skipping to change at page 51, line 5 | |||
The ECHO_REQUEST parameter contains an opaque blob of data that the | The ECHO_REQUEST parameter contains an opaque blob of data that the | |||
sender wants to get echoed back in the corresponding reply packet. | sender wants to get echoed back in the corresponding reply packet. | |||
The ECHO_REQUEST and ECHO_RESPONSE parameters MAY be used for any | The ECHO_REQUEST and ECHO_RESPONSE parameters MAY be used for any | |||
purpose where a node wants to carry some state in a request packet | purpose where a node wants to carry some state in a request packet | |||
and get it back in a response packet. The ECHO_REQUEST MAY be | and get it back in a response packet. The ECHO_REQUEST MAY be | |||
covered by the HMAC and SIGNATURE. This is dictated by the Type | covered by the HMAC and SIGNATURE. This is dictated by the Type | |||
field selected for the parameter; Type 1022 ECHO_REQUEST is covered | field selected for the parameter; Type 1022 ECHO_REQUEST is covered | |||
and Type 65281 is not. | and Type 65281 is not. | |||
6.2.22 ECHO_RESPONSE | 6.2.19 ECHO_RESPONSE | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Type | Length | | | Type | Length | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Opaque data (variable length) | | | Opaque data (variable length) | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Type 65283 or 1024 | Type 65283 or 1024 | |||
skipping to change at page 52, line 27 | skipping to change at page 51, line 27 | |||
Opaque data Opaque data, copied unmodified from the ECHO_REQUEST | Opaque data Opaque data, copied unmodified from the ECHO_REQUEST | |||
parameter that triggered this response. | parameter that triggered this response. | |||
The ECHO_RESPONSE parameter contains an opaque blob of data that the | The ECHO_RESPONSE parameter contains an opaque blob of data that the | |||
sender of the ECHO_REQUEST wants to get echoed back. The opaque data | sender of the ECHO_REQUEST wants to get echoed back. The opaque data | |||
is copied unmodified from the ECHO_REQUEST parameter. | is copied unmodified from the ECHO_REQUEST parameter. | |||
The ECHO_REQUEST and ECHO_RESPONSE parameters MAY be used for any | The ECHO_REQUEST and ECHO_RESPONSE parameters MAY be used for any | |||
purpose where a node wants to carry some state in a request packet | purpose where a node wants to carry some state in a request packet | |||
and get it back in a response packet. The ECHO_RESPONSE MAY be | and get it back in a response packet. The ECHO_RESPONSE MAY be | |||
covered by the HMAC and SIGNATURE. This is dictated by the Type field | covered by the HMAC and SIGNATURE. This is dictated by the Type | |||
selected for the parameter; Type 1024 ECHO_RESPONSE is covered and | field selected for the parameter; Type 1024 ECHO_RESPONSE is covered | |||
Type 65283 is not. | and Type 65283 is not. | |||
6.3 ICMP messages | 6.3 ICMP messages | |||
When a HIP implementation detects a problem with an incoming packet, | When a HIP implementation detects a problem with an incoming packet, | |||
and it either cannot determine the identity of the sender of the | and it either cannot determine the identity of the sender of the | |||
packet or does not have any existing HIP security association with | packet or does not have any existing HIP association with the sender | |||
the sender of the packet, it MAY respond with an ICMP packet. Any | of the packet, it MAY respond with an ICMP packet. Any such replies | |||
such replies MUST be rate limited as described in [4]. In most | MUST be rate limited as described in [4]. In most cases, the ICMP | |||
cases, the ICMP packet will have the Parameter Problem type (12 for | packet will have the Parameter Problem type (12 for ICMPv4, 4 for | |||
ICMPv4, 4 for ICMPv6), with the Pointer field pointing to the field | ICMPv6), with the Pointer field pointing to the field that caused the | |||
that caused the ICMP message to be generated. | ICMP message to be generated. | |||
XXX: Should we say something more about rate limitation here? | ||||
6.3.1 Invalid Version | 6.3.1 Invalid Version | |||
If a HIP implementation receives a HIP packet that has an | If a HIP implementation receives a HIP packet that has an | |||
unrecognized HIP version number, it SHOULD respond, rate limited, | unrecognized HIP version number, it SHOULD respond, rate limited, | |||
with an ICMP packet with type Parameter Problem, the Pointer pointing | with an ICMP packet with type Parameter Problem, the Pointer pointing | |||
to the VER./RES. byte in the HIP header. | to the VER./RES. byte in the HIP header. | |||
6.3.2 Other problems with the HIP header and packet structure | 6.3.2 Other problems with the HIP header and packet structure | |||
If a HIP implementation receives a HIP packet that has other | If a HIP implementation receives a HIP packet that has other | |||
unrecoverable problems in the header or packet format, it MAY | unrecoverable problems in the header or packet format, it MAY | |||
respond, rate limited, with an ICMP packet with type Parameter | respond, rate limited, with an ICMP packet with type Parameter | |||
Problem, the Pointer pointing to the field that failed to pass the | Problem, the Pointer pointing to the field that failed to pass the | |||
format checks. However, an implementation MUST NOT send an ICMP | format checks. However, an implementation MUST NOT send an ICMP | |||
message if the Checksum fails; instead, it MUST silently drop the | message if the Checksum fails; instead, it MUST silently drop the | |||
packet. | packet. | |||
6.3.3 Unknown SPI | 6.3.3 Invalid Cookie Solution | |||
If a HIP implementation receives an ESP packet that has an | ||||
unrecognized SPI number, it MAY responder, rate limited, with an ICMP | ||||
packet with type Parameter Problem, the Pointer pointing to the the | ||||
beginning of SPI field in the ESP header. | ||||
6.3.4 Invalid Cookie Solution | ||||
If a HIP implementation receives an I2 packet that has an invalid | If a HIP implementation receives an I2 packet that has an invalid | |||
cookie solution, the behaviour depends on the underlying version of | cookie solution, the behaviour depends on the underlying version of | |||
IP. If IPv6 is used, the implementation SHOULD respond with an ICMP | IP. If IPv6 is used, the implementation SHOULD respond with an ICMP | |||
packet with type Parameter Problem, the Pointer pointing to the | packet with type Parameter Problem, the Pointer pointing to the | |||
beginning of the Puzzle solution #J field in the SOLUTION payload in | beginning of the Puzzle solution #J field in the SOLUTION payload in | |||
the HIP message. | the HIP message. | |||
If IPv4 is used, the implementation MAY respond with an ICMP packet | If IPv4 is used, the implementation MAY respond with an ICMP packet | |||
with the type Parameter Problem, copying enough of bytes form the I2 | with the type Parameter Problem, copying enough of bytes form the I2 | |||
message so that the SOLUTION parameter fits in to the ICMP message, | message so that the SOLUTION parameter fits in to the ICMP message, | |||
the Pointer pointing to the beginning of the Puzzle solution #J | the Pointer pointing to the beginning of the Puzzle solution #J | |||
field, as in the IPv6 case. Note, however, that the resulting ICMPv4 | field, as in the IPv6 case. Note, however, that the resulting ICMPv4 | |||
message exceeds the typical ICMPv4 message size as defined in [2]. | message exceeds the typical ICMPv4 message size as defined in [2]. | |||
6.3.5 Non-existing HIP association | 6.3.4 Non-existing HIP association | |||
If a HIP implementation receives a CLOSE, or UPDATE packet, or any | If a HIP implementation receives a CLOSE, or UPDATE packet, or any | |||
other packet whose handling requires an existing association, that | other packet whose handling requires an existing association, that | |||
has either a Receiver or Sender HIT that does not match with any | has either a Receiver or Sender HIT that does not match with any | |||
existing HIP association, the implementation MAY respond, rate | existing HIP association, the implementation MAY respond, rate | |||
limited, with an ICMP packet with the type Parameter Problem, the | limited, with an ICMP packet with the type Parameter Problem, the | |||
Pointer pointing to the the beginning of the first HIT that does not | Pointer pointing to the the beginning of the first HIT that does not | |||
match. | match. | |||
A host MUST NOT reply with such an ICMP if it receives any of the | A host MUST NOT reply with such an ICMP if it receives any of the | |||
following messages: I1, R2, I2, R2, CER, and NOTIFY. When | following messages: I1, R2, I2, R2, CER, and NOTIFY. When | |||
introducing new packet types, a specification SHOULD define the | introducing new packet types, a specification SHOULD define the | |||
appropriate rules for sending or not sending this kind of ICMP | appropriate rules for sending or not sending this kind of ICMP | |||
replies. | replies. | |||
7. HIP Packets | 7. HIP Packets | |||
There are nine basic HIP packets. Four are for the base HIP | There are nine basic HIP packets. Four are for the HIP base | |||
exchange, one is for updating, one is a broadcast for use when there | exchange, one is for updating, one is for sending certificates, one | |||
is no IP addressing (e.g., before DHCP exchange), one is used to send | for sending notifications, and two for closing a HIP association. | |||
certificates, one for sending notifications, and one is for sending | ||||
unencrypted data. | ||||
Packets consist of the fixed header as described in Section 6.1, | Packets consist of the fixed header as described in Section 6.1, | |||
followed by the parameters. The parameter part, in turn, consists of | followed by the parameters. The parameter part, in turn, consists of | |||
zero or more TLV coded parameters. | zero or more TLV coded parameters. | |||
In addition to the base packets, other packets types will be defined | In addition to the base packets, other packets types will be defined | |||
later in separate specifications. For example, support for mobility | later in separate specifications. For example, support for mobility | |||
and multi-homing is not included in this specification. | and multi-homing is not included in this specification. | |||
Packet representation uses the following operations: | Packet representation uses the following operations: | |||
skipping to change at page 55, line 29 | skipping to change at page 54, line 27 | |||
Header: | Header: | |||
Packet Type = 2 | Packet Type = 2 | |||
SRC HIT = Responder's HIT | SRC HIT = Responder's HIT | |||
DST HIT = Initiator's HIT | DST HIT = Initiator's HIT | |||
IP ( HIP ( [ R1_COUNTER, ] | IP ( HIP ( [ R1_COUNTER, ] | |||
PUZZLE, | PUZZLE, | |||
DIFFIE_HELLMAN, | DIFFIE_HELLMAN, | |||
HIP_TRANSFORM, | HIP_TRANSFORM, | |||
ESP_TRANSFORM, | ||||
HOST_ID, | HOST_ID, | |||
[ ECHO_REQUEST, ] | [ ECHO_REQUEST, ] | |||
HIP_SIGNATURE_2 ) | HIP_SIGNATURE_2 ) | |||
[, ECHO_REQUEST ]) | [, ECHO_REQUEST ]) | |||
Valid control bits: C, A | Valid control bits: C, A | |||
The R1 packet may be followed by one or more CER packets. In this | The R1 packet may be followed by one or more CER packets. In this | |||
case, the C-bit in the control field MUST be set. | case, the C-bit in the control field MUST be set. | |||
skipping to change at page 56, line 25 | skipping to change at page 55, line 21 | |||
time, for example, 15 minutes. By using a small number of different | time, for example, 15 minutes. By using a small number of different | |||
Cookies for a given Diffie-Hellman value, the R1 packets can be | Cookies for a given Diffie-Hellman value, the R1 packets can be | |||
pre-computed and delivered as quickly as I1 packets arrive. A | pre-computed and delivered as quickly as I1 packets arrive. A | |||
scavenger process should clean up unused DHs and Cookies. | scavenger process should clean up unused DHs and Cookies. | |||
The HIP_TRANSFORM contains the encryption and integrity algorithms | The HIP_TRANSFORM contains the encryption and integrity algorithms | |||
supported by the Responder to protect the HI exchange, in the order | supported by the Responder to protect the HI exchange, in the order | |||
of preference. All implementations MUST support the AES [10] with | of preference. All implementations MUST support the AES [10] with | |||
HMAC-SHA-1-96 [6]. | HMAC-SHA-1-96 [6]. | |||
The ESP_TRANSFORM contains the ESP modes supported by the Responder, | ||||
in the order of preference. All implementations MUST support AES | ||||
[10] with HMAC-SHA-1-96 [6]. | ||||
The ECHO_REQUEST contains data that the sender wants to receive | The ECHO_REQUEST contains data that the sender wants to receive | |||
unmodified in the corresponding response packet in the ECHO_RESPONSE | unmodified in the corresponding response packet in the ECHO_RESPONSE | |||
parameter. The ECHO_REQUEST can be either covered by the signature, | parameter. The ECHO_REQUEST can be either covered by the signature, | |||
or it can be left out from it. In the first case, the ECHO_REQUEST | or it can be left out from it. In the first case, the ECHO_REQUEST | |||
gets Type number 1022 and in the latter case 65281. | gets Type number 1022 and in the latter case 65281. | |||
The signature is calculated over the whole HIP envelope, after | The signature is calculated over the whole HIP envelope, after | |||
setting the initiator HIT, header checksum as well as the Opaque | setting the initiator HIT, header checksum as well as the Opaque | |||
field and the Random #I in the PUZZLE parameter temporarily to zero, | field and the Random #I in the PUZZLE parameter temporarily to zero, | |||
and excluding any TLVs that follow the signature, as described in | and excluding any TLVs that follow the signature, as described in | |||
Section 6.2.15. This allows the Responder to use precomputed R1s. | Section 6.2.13. This allows the Responder to use precomputed R1s. | |||
The Initiator SHOULD validate this signature. It SHOULD check that | The Initiator SHOULD validate this signature. It SHOULD check that | |||
the responder HI received matches with the one expected, if any. | the responder HI received matches with the one expected, if any. | |||
7.3 I2 - the second HIP initiator packet | 7.3 I2 - the second HIP initiator packet | |||
The HIP header values for the I2 packet: | The HIP header values for the I2 packet: | |||
Header: | Header: | |||
Type = 3 | Type = 3 | |||
SRC HIT = Initiator's HIT | SRC HIT = Initiator's HIT | |||
DST HIT = Responder's HIT | DST HIT = Responder's HIT | |||
IP ( HIP ( SPI, | IP ( HIP ( [R1_COUNTER,] | |||
[R1_COUNTER,] | ||||
SOLUTION, | SOLUTION, | |||
DIFFIE_HELLMAN, | DIFFIE_HELLMAN, | |||
HIP_TRANSFORM, | HIP_TRANSFORM, | |||
ESP_TRANSFORM, | ||||
ENCRYPTED { HOST_ID }, | ENCRYPTED { HOST_ID }, | |||
[ ECHO_RESPONSE ,] | [ ECHO_RESPONSE ,] | |||
HMAC, | HMAC, | |||
HIP_SIGNATURE | HIP_SIGNATURE | |||
[, ECHO_RESPONSE] ) ) | [, ECHO_RESPONSE] ) ) | |||
Valid control bits: C, A | Valid control bits: C, A | |||
The HITs used MUST match the ones used previously. | The HITs used MUST match the ones used previously. | |||
skipping to change at page 57, line 45 | skipping to change at page 56, line 29 | |||
process should clean up unused DHs. | process should clean up unused DHs. | |||
The HIP_TRANSFORM contains the encryption and integrity used to | The HIP_TRANSFORM contains the encryption and integrity used to | |||
protect the HI exchange selected by the Initiator. All | protect the HI exchange selected by the Initiator. All | |||
implementations MUST support the AES transform [10]. | implementations MUST support the AES transform [10]. | |||
The Initiator's HI is encrypted using the HIP_TRANSFORM encryption | The Initiator's HI is encrypted using the HIP_TRANSFORM encryption | |||
algorithm. The keying material is derived from the Diffie-Hellman | algorithm. The keying material is derived from the Diffie-Hellman | |||
exchanged as defined in Section 9. | exchanged as defined in Section 9. | |||
The ESP_TRANSFORM contains the ESP mode selected by the Initiator. | ||||
All implementations MUST support AES [10] with HMAC-SHA-1-96 [6]. | ||||
The ECHO_RESPONSE contains the the unmodified Opaque data copied from | The ECHO_RESPONSE contains the the unmodified Opaque data copied from | |||
the corresponding ECHO_REQUEST TLV. The ECHO_RESPONSE can be either | the corresponding ECHO_REQUEST TLV. The ECHO_RESPONSE can be either | |||
covered by the signature, or it can be left out from it. In the | covered by the signature, or it can be left out from it. In the | |||
first case, the ECHO_RESPONSE gets Type number 1024 and in the latter | first case, the ECHO_RESPONSE gets Type number 1024 and in the latter | |||
case 65283. | case 65283. | |||
The HMAC is calculated over whole HIP envelope, excluding any TLVs | The HMAC is calculated over whole HIP envelope, excluding any TLVs | |||
after the HMAC, as described in Section 8.3.1. The Responder MUST | after the HMAC, as described in Section 8.3.1. The Responder MUST | |||
validate the HMAC. | validate the HMAC. | |||
The signature is calculated over whole HIP envelope, excluding any | The signature is calculated over whole HIP envelope, excluding any | |||
TLVs after the HIP_SIGNATURE, as described in Section 6.2.14. The | TLVs after the HIP_SIGNATURE, as described in Section 6.2.12. The | |||
Responder MUST validate this signature. It MAY use either the HI in | Responder MUST validate this signature. It MAY use either the HI in | |||
the packet or the HI acquired by some other means. | the packet or the HI acquired by some other means. | |||
7.4 R2 - the second HIP responder packet | 7.4 R2 - the second HIP responder packet | |||
The HIP header values for the R2 packet: | The HIP header values for the R2 packet: | |||
Header: | Header: | |||
Packet Type = 4 | Packet Type = 4 | |||
SRC HIT = Responder's HIT | SRC HIT = Responder's HIT | |||
DST HIT = Initiator's HIT | DST HIT = Initiator's HIT | |||
IP ( HIP ( HMAC_2, HIP_SIGNATURE ) ) | ||||
IP ( HIP ( SPI, HMAC_2, HIP_SIGNATURE ) ) | ||||
Valid control bits: none | Valid control bits: none | |||
The HMAC_2 is calculated over whole HIP envelope, with Responder's | The HMAC_2 is calculated over whole HIP envelope, with Responder's | |||
HOST_ID TLV concatenated with the HIP envelope. The HOST_ID TLV is | HOST_ID TLV concatenated with the HIP envelope. The HOST_ID TLV is | |||
removed after the HMAC calculation. The procedure is described in | removed after the HMAC calculation. The procedure is described in | |||
8.3.1. | 8.3.1. | |||
The signature is calculated over whole HIP envelope. | The signature is calculated over whole HIP envelope. | |||
skipping to change at page 59, line 23 | skipping to change at page 58, line 10 | |||
Support for the UPDATE packet is MANDATORY. | Support for the UPDATE packet is MANDATORY. | |||
The HIP header values for the UPDATE packet: | The HIP header values for the UPDATE packet: | |||
Header: | Header: | |||
Packet Type = 6 | Packet Type = 6 | |||
SRC HIT = Sender's HIT | SRC HIT = Sender's HIT | |||
DST HIT = Recipient's HIT | DST HIT = Recipient's HIT | |||
IP ( HIP ( [NES, SEQ, ACK, DIFFIE_HELLMAN, ] HMAC, HIP_SIGNATURE ) ) | IP ( HIP ( [SEQ, ACK, ] HMAC, HIP_SIGNATURE ) ) | |||
Valid control bits: None | Valid control bits: None | |||
The UPDATE packet contains mandatory HMAC and HIP_SIGNATURE | The UPDATE packet contains mandatory HMAC and HIP_SIGNATURE | |||
parameters, and other optional parameters. | parameters, and other optional parameters. | |||
The UPDATE packet contains zero or one SEQ parameter. The presence | The UPDATE packet contains zero or one SEQ parameter. The presence | |||
of a SEQ parameter indicates that the receiver MUST ack the UPDATE. | of a SEQ parameter indicates that the receiver MUST ack the UPDATE. | |||
An UPDATE that does not contain a SEQ parameter is simply an ACK of a | An UPDATE that does not contain a SEQ parameter is simply an ACK of a | |||
previous UPDATE and itself MUST not be acked. | previous UPDATE and itself MUST not be acked. | |||
skipping to change at page 60, line 13 | skipping to change at page 58, line 48 | |||
A sender MAY choose to forego reliable transmission of a particular | A sender MAY choose to forego reliable transmission of a particular | |||
UPDATE (e.g., it becomes overcome by events). The semantics are such | UPDATE (e.g., it becomes overcome by events). The semantics are such | |||
that the receiver MUST acknowledge the UPDATE but the sender MAY | that the receiver MUST acknowledge the UPDATE but the sender MAY | |||
choose to not care about receiving the ACK. | choose to not care about receiving the ACK. | |||
UPDATEs MAY be retransmitting without incrementing SEQ. If the same | UPDATEs MAY be retransmitting without incrementing SEQ. If the same | |||
subset of parameters is included in multiple UPDATEs with different | subset of parameters is included in multiple UPDATEs with different | |||
SEQs, the host MUST ensure that receiver processing of the parameters | SEQs, the host MUST ensure that receiver processing of the parameters | |||
multiple times will not result in a protocol error. | multiple times will not result in a protocol error. | |||
In the case of rekeying (Section 8.10), the UPDATE packet MUST carry | ||||
NES and MAY carry DIFFIE_HELLMAN parameter, unless the UPDATE is a | ||||
bare ack. | ||||
Intermediate systems that use the SPI will have to inspect HIP | ||||
packets for a UPDATE packet. The packet is signed for the benefit of | ||||
the intermediate systems. Since intermediate systems may need the | ||||
new SPI values, the contents of this packet cannot be encrypted. | ||||
7.7 NOTIFY - the HIP Notify Packet | 7.7 NOTIFY - the HIP Notify Packet | |||
The NOTIFY packet is OPTIONAL. The NOTIFY packet MAY be used to | The NOTIFY packet is OPTIONAL. The NOTIFY packet MAY be used to | |||
provide information to a peer. Typically, NOTIFY is used to indicate | provide information to a peer. Typically, NOTIFY is used to indicate | |||
some type of protocol error or negotiation failure. | some type of protocol error or negotiation failure. | |||
The HIP header values for the NOTIFY packet: | The HIP header values for the NOTIFY packet: | |||
Header: | Header: | |||
Packet Type = 7 | Packet Type = 7 | |||
skipping to change at page 61, line 4 | skipping to change at page 59, line 28 | |||
7.8 CLOSE - the HIP association closing packet | 7.8 CLOSE - the HIP association closing packet | |||
The HIP header values for the CLOSE packet: | The HIP header values for the CLOSE packet: | |||
Header: | Header: | |||
Packet Type = 8 | Packet Type = 8 | |||
SRC HIT = Sender's HIT | SRC HIT = Sender's HIT | |||
DST HIT = Recipient's HIT | DST HIT = Recipient's HIT | |||
IP ( HIP ( ECHO_REQUEST, HMAC, HIP_SIGNATURE ) ) | IP ( HIP ( ECHO_REQUEST, HMAC, HIP_SIGNATURE ) ) | |||
Valid control bits: none | Valid control bits: none | |||
The sender MUST include an ECHO_REPLY used to validate CLOSE_ACK | The sender MUST include an ECHO_REQUEST used to validate CLOSE_ACK | |||
received in response, and both an HMAC and a signature (calculated | received in response, and both an HMAC and a signature (calculated | |||
over the whole HIP envelope). | over the whole HIP envelope). | |||
The receiver peer MUST validate both the HMAC and the signature if it | The receiver peer MUST validate both the HMAC and the signature if it | |||
has a HIP association state, and MUST reply with a CLOSE_ACK | has a HIP association state, and MUST reply with a CLOSE_ACK | |||
containing an ECHO_REPLY corresponding to the received ECHO_REQUEST. | containing an ECHO_REPLY corresponding to the received ECHO_REQUEST. | |||
7.9 CLOSE_ACK - the HIP closing acknowledgment packet | 7.9 CLOSE_ACK - the HIP closing acknowledgment packet | |||
The HIP header values for the CLOSE_ACK packet: | The HIP header values for the CLOSE_ACK packet: | |||
skipping to change at page 62, line 14 | skipping to change at page 61, line 14 | |||
8. Packet processing | 8. Packet processing | |||
Each host is assumed to have a single HIP protocol implementation | Each host is assumed to have a single HIP protocol implementation | |||
that manages the host's HIP associations and handles requests for new | that manages the host's HIP associations and handles requests for new | |||
ones. Each HIP association is governed by a conceptual state | ones. Each HIP association is governed by a conceptual state | |||
machine, with states defined above in Section 5.4. The HIP | machine, with states defined above in Section 5.4. The HIP | |||
implementation can simultaneously maintain HIP associations with more | implementation can simultaneously maintain HIP associations with more | |||
than one host. Furthermore, the HIP implementation may have more | than one host. Furthermore, the HIP implementation may have more | |||
than one active HIP association with another host; in this case, HIP | than one active HIP association with another host; in this case, HIP | |||
associations are distinguished by their respective HITs and IPsec | associations are distinguished by their respective HITs. It is not | |||
SPIs. It is not possible to have more than one HIP associations | possible to have more than one HIP associations between any given | |||
between any given pair of HITs. Consequently, the only way for two | pair of HITs. Consequently, the only way for two hosts to have more | |||
hosts to have more than one parallel association is to use different | than one parallel association is to use different HITs, at least at | |||
HITs, at least at one end. | one end. | |||
The processing of packets depends on the state of the HIP | The processing of packets depends on the state of the HIP | |||
association(s) with respect to the authenticated or apparent | association(s) with respect to the authenticated or apparent | |||
originator of the packet. A HIP implementation determines whether it | originator of the packet. A HIP implementation determines whether it | |||
has an active association with the originator of the packet based on | has an active association with the originator of the packet based on | |||
the HITs or the SPI of the packet. | the HITs. In the case of user data carried in a specific transport | |||
format, the transport format document specifies how the incoming | ||||
packets are matched with the active associations. | ||||
8.1 Processing outgoing application data | 8.1 Processing outgoing application data | |||
In a HIP host, an application can send application level data using | In a HIP host, an application can send application level data using | |||
HITs or LSIs as source and destination identifiers. The HITs and | HITs or LSIs as source and destination identifiers. The HITs and | |||
LSIs may be specified via a backwards compatible API (see Appendix A) | LSIs may be specified via a backwards compatible API (see [29]) or a | |||
or a completely new API. However, whenever there is such outgoing | completely new API. The exact format and method for transferring the | |||
data, the stack has to protect the data with ESP, and send the | data from the source HIP host to the destination HIP host is defined | |||
resulting datagram using appropriate source and destination IP | in the corresponding transport format document. The actual data is | |||
addresses. Here, we specify the processing rules only for the base | transmitted in the network using the appropriate source and | |||
case where both hosts have only single usable IP addresses; the | destination IP addresses. Here, we specify the processing rules only | |||
multi-address multi-homing case will be specified separately. | for the base case where both hosts have only single usable IP | |||
addresses; the multi-address multi-homing case will be specified | ||||
separately. | ||||
If the IPv4 or IPv6 backward compatible APIs and therefore LSIs are | If the IPv4 or IPv6 backward compatible APIs and therefore LSIs are | |||
supported, it is assumed that the LSIs will be converted into proper | supported, it is assumed that the LSIs will be converted into proper | |||
HITs somewhere in the stack. The exact location of the conversion is | HITs somewhere in the stack. The exact location of the conversion is | |||
an implementation specific issue and not discussed here. The | an implementation specific issue and not discussed here. The | |||
following conceptual algorithm discusses only HITs, with the | following conceptual algorithm discusses only HITs, with the | |||
assumption that the LSI-to-HIT conversion takes place somewhere. | assumption that the LSI-to-HIT conversion takes place somewhere. | |||
The following steps define the conceptual processing rules for | The following steps define the conceptual processing rules for | |||
outgoing datagrams destined to a HIT. | outgoing datagrams destined to a HIT. | |||
1. If the datagram has a specified source address, it MUST be a HIT. | 1. If the datagram has a specified source address, it MUST be a HIT. | |||
If it is not, the implementation MAY replace the source address | If it is not, the implementation MAY replace the source address | |||
with a HIT. Otherwise it MUST drop the packet. | with a HIT. Otherwise it MUST drop the packet. | |||
2. If the datagram has an unspecified source address, the | 2. If the datagram has an unspecified source address, the | |||
implementation must choose a suitable source HIT for the | implementation must choose a suitable source HIT for the | |||
datagram. In selecting a proper local HIT, the implementation | datagram. In selecting a proper local HIT, the implementation | |||
SHOULD consult the table of currently active HIP sessions, and | SHOULD consult the table of currently active HIP sessions, and | |||
preferably select a HIT that already has an active session with | preferably select a HIT that already has an active session with | |||
the target HIT. | the target HIT. | |||
3. If there no active HIP session with the given < source, | 3. If there is no active HIP session with the given < source, | |||
destination > HIT pair, one must be created by running the base | destination > HIT pair, one must be created by running the base | |||
exchange. The implementation SHOULD queue at least one packet | exchange. The implementation SHOULD queue at least one packet | |||
per HIP session to be formed, and it MAY queue more than one. | per HIP session to be formed, and it MAY queue more than one. | |||
4. Once there is an active HIP session for the given < source, | 4. Once there is an active HIP session for the given < source, | |||
destination > HIT pair, the outgoing datagram is protected using | destination > HIT pair, the outgoing datagram is passed to | |||
the associated ESP security association. In a typical | transport handling. The possible transport formats are defined | |||
implementation, this will result in an transport mode ESP | in separate documents, of which the ESP transport format for HIP | |||
datagram that still has HITs in the place of IP addresses. | is mandatory for all HIP implementations. | |||
5. The HITs in the datagram are replaced with suitable IP addresses. | 5. The HITs in the datagram are replaced with suitable IP addresses. | |||
For IPv6, the rules defined in [16] SHOULD be followed. Note | For IPv6, the rules defined in [16] SHOULD be followed. Note | |||
that this HIT-to-IP-address conversion step MAY also be performed | that this HIT-to-IP-address conversion step MAY also be performed | |||
at some other point in the stack, e.g., before ESP processing. | at some other point in the stack, e.g., before wrapping the | |||
However, care must be taken to make sure that the right ESP SA is | packet into the output format. | |||
employed. | ||||
8.2 Processing incoming application data | 8.2 Processing incoming application data | |||
Incoming HIP datagrams arrive as ESP protected packets. In the usual | The transport format and method (defined in separate specifications) | |||
case the receiving host has a corresponding ESP security association, | determines the format in which incoming HIP packets arrive to the | |||
identified by the SPI and destination IP address in the packet. | host. The following steps define the conceptual processing rules for | |||
However, if the host has crashed or otherwise lost its HIP state, it | incoming datagrams. The specific transport format and method | |||
may not have such an SA. | specifications define in more detail the packet processing, related | |||
to the method. | ||||
The following steps define the conceptual processing rules for | 1. The incoming datagram is mapped to an existing HIP association, | |||
incoming ESP protected datagrams targeted to an ESP security | typically using some information from the packet. For example, | |||
association created with HIP. | such mapping may be based on IPsec Security Parameter Index (SPI) | |||
1. Detect the proper IPsec SA using the SPI. If the resulting SA is | or a protocol port number. | |||
a non-HIP ESP SA, process the packet according to standard IPsec | 2. The specific transport format is unwrapped, in a way depending on | |||
rules. If there are no SAs identified with the SPI, the host MAY | the transport format, yielding a packet that looks like a | |||
send an ICMP packet as defined in Section 6.3.3. How to handle | standard (unencrypted) IP packet. If possible, this step SHOULD | |||
lost state is an implementation issue. | also verify that the packet was indeed (once) sent by the remote | |||
2. If a proper HIP ESP SA is found, the packet is processed normally | HIP host, as identified by the HIP association. | |||
by ESP, as if the packet were a transport mode packet. The | ||||
packet may be dropped by ESP, as usual. In a typical | ||||
implementation, the result of successful ESP decryption and | ||||
verification is a datagram with the original IP addresses as | ||||
source and destination. | ||||
3. The IP addresses in the datagram are replaced with the HITs | 3. The IP addresses in the datagram are replaced with the HITs | |||
associated with the ESP SA. Note that this IP-address-to-HIT | associated with the HIP association. Note that this | |||
conversion step MAY also be performed at some other point in the | IP-address-to-HIT conversion step MAY also be performed at some | |||
stack, e.g., before ESP processing. | other point in the stack. | |||
4. The datagram is delivered to the upper layer. Demultiplexing the | 4. The datagram is delivered to the upper layer. Demultiplexing the | |||
datagram the right upper layer socket is based on the HITs (or | datagram the right upper layer socket is based on the HITs (or | |||
LSIs). | LSIs). | |||
8.3 HMAC and SIGNATURE calculation and verification | 8.3 HMAC and SIGNATURE calculation and verification | |||
The following subsections define the actions for processing HMAC, | The following subsections define the actions for processing HMAC, | |||
HIP_SIGNATURE and HIP_SIGNATURE_2 TLVs. | HIP_SIGNATURE and HIP_SIGNATURE_2 TLVs. | |||
8.3.1 HMAC calculation | 8.3.1 HMAC calculation | |||
The following process applies both to the HMAC and HMAC_2 TLVs. When | The following process applies both to the HMAC and HMAC_2 TLVs. When | |||
processing HMAC_2, the difference is that the HMAC calculation | processing HMAC_2, the difference is that the HMAC calculation | |||
includes pseudo HOST_ID field containing the Responder's information | includes pseudo HOST_ID field containing the Responder's information | |||
as sent in the R1 packet earlier. | as sent in the R1 packet earlier. | |||
The HMAC TLV is defined in Section 6.2.12 and HMAC_2 TLV in Section | The HMAC TLV is defined in Section 6.2.10 and HMAC_2 TLV in | |||
6.2.13. HMAC calculation and verification process: | Section 6.2.11. HMAC calculation and verification process: | |||
Packet sender: | Packet sender: | |||
1. Create the HIP packet, without the HMAC or any possible | 1. Create the HIP packet, without the HMAC or any possible | |||
HIP_SIGNATURE or HIP_SIGNATURE_2 TLVs. | HIP_SIGNATURE or HIP_SIGNATURE_2 TLVs. | |||
2. In case of HMAC_2 calculation, add a HOST_ID (Responder) TLV to | 2. In case of HMAC_2 calculation, add a HOST_ID (Responder) TLV to | |||
the packet. | the packet. | |||
3. Calculate the Length field in the HIP header. | 3. Calculate the Length field in the HIP header. | |||
4. Compute the HMAC. | 4. Compute the HMAC. | |||
5. In case of HMAC_2, remove the HOST_ID TLV from the packet. | 5. In case of HMAC_2, remove the HOST_ID TLV from the packet. | |||
6. Add the HMAC TLV to the packet and any HIP_SIGNATURE or | 6. Add the HMAC TLV to the packet and any HIP_SIGNATURE or | |||
skipping to change at page 64, line 52 | skipping to change at page 63, line 52 | |||
6. In case of HMAC_2, remove the HOST_ID TLV from the packet before | 6. In case of HMAC_2, remove the HOST_ID TLV from the packet before | |||
further processing. | further processing. | |||
8.3.2 Signature calculation | 8.3.2 Signature calculation | |||
The following process applies both to the HIP_SIGNATURE and | The following process applies both to the HIP_SIGNATURE and | |||
HIP_SIGNATURE_2 TLVs. When processing HIP_SIGNATURE_2, the only | HIP_SIGNATURE_2 TLVs. When processing HIP_SIGNATURE_2, the only | |||
difference is that instead of HIP_SIGNATURE TLV, the HIP_SIGNATURE_2 | difference is that instead of HIP_SIGNATURE TLV, the HIP_SIGNATURE_2 | |||
TLV is used, and the Initiator's HIT and PUZZLE Opaque and Random #I | TLV is used, and the Initiator's HIT and PUZZLE Opaque and Random #I | |||
fields are cleared (set to all zeros) before computing the signature. | fields are cleared (set to all zeros) before computing the signature. | |||
The HIP_SIGNATURE TLV is defined in Section 6.2.14 and the | The HIP_SIGNATURE TLV is defined in Section 6.2.12 and the | |||
HIP_SIGNATURE_2 TLV in Section 6.2.15. | HIP_SIGNATURE_2 TLV in Section 6.2.13. | |||
Signature calculation and verification process: | Signature calculation and verification process: | |||
Packet sender: | Packet sender: | |||
1. Create the HIP packet without the HIP_SIGNATURE TLV or any TLVs | 1. Create the HIP packet without the HIP_SIGNATURE TLV or any TLVs | |||
that follow the HIP_SIGNATURE TLV. | that follow the HIP_SIGNATURE TLV. | |||
2. Calculate the Length field in the HIP header. | 2. Calculate the Length field in the HIP header. | |||
3. Compute the signature. | 3. Compute the signature. | |||
4. Add the HIP_SIGNATURE TLV to the packet. | 4. Add the HIP_SIGNATURE TLV to the packet. | |||
5. Add any TLVs that follow the HIP_SIGNATURE TLV. | 5. Add any TLVs that follow the HIP_SIGNATURE TLV. | |||
skipping to change at page 65, line 50 | skipping to change at page 64, line 50 | |||
address that corresponds to the peer host. The IP address of the | address that corresponds to the peer host. The IP address of the | |||
peer host may be obtained via conventional mechanisms, such as DNS | peer host may be obtained via conventional mechanisms, such as DNS | |||
lookup. The I1 contents are specified in Section 7.1. The selection | lookup. The I1 contents are specified in Section 7.1. The selection | |||
of which host identity to use, if a host has more than one to choose | of which host identity to use, if a host has more than one to choose | |||
from, is typically a policy decision. | from, is typically a policy decision. | |||
The following steps define the conceptual processing rules for | The following steps define the conceptual processing rules for | |||
initiating a HIP exchange: | initiating a HIP exchange: | |||
1. The Initiator gets the Responder's HIT and one or more addresses | 1. The Initiator gets the Responder's HIT and one or more addresses | |||
either from a DNS lookup of the responder's FQDN, from some other | either from a DNS lookup of the responder's FQDN, from some other | |||
repository, or from a local table. If the initiator does not know | repository, or from a local table. If the initiator does not | |||
the responder's HIT, it may attempt opportunistic mode by using | know the responder's HIT, it may attempt opportunistic mode by | |||
NULL (all zeros) as the responder's HIT. | using NULL (all zeros) as the responder's HIT. | |||
2. The Initiator sends an I1 to one of the Responder's addresses. | 2. The Initiator sends an I1 to one of the Responder's addresses. | |||
The selection of which address to use is a local policy decision. | The selection of which address to use is a local policy decision. | |||
3. Upon sending an I1, the sender shall transition to state I1-SENT, | 3. Upon sending an I1, the sender shall transition to state I1-SENT, | |||
start a timer whose timeout value should be larger than the | start a timer whose timeout value should be larger than the | |||
worst-case anticipated RTT, and shall increment a timeout counter | worst-case anticipated RTT, and shall increment a timeout counter | |||
associated with the I1. | associated with the I1. | |||
4. Upon timeout, the sender SHOULD retransmit the I1 and restart the | 4. Upon timeout, the sender SHOULD retransmit the I1 and restart the | |||
timer, up to a maximum of I1_RETRIES_MAX tries. | timer, up to a maximum of I1_RETRIES_MAX tries. | |||
8.4.1 Sending multiple I1s in parallel | 8.4.1 Sending multiple I1s in parallel | |||
skipping to change at page 68, line 45 | skipping to change at page 67, line 45 | |||
the HITs in the R1). If so, it should process the R1 as | the HITs in the R1). If so, it should process the R1 as | |||
described below. | described below. | |||
2. Otherwise, if the system is in any other state than I1-SENT or | 2. Otherwise, if the system is in any other state than I1-SENT or | |||
I2-SENT with respect to the HITs included in the R1, it SHOULD | I2-SENT with respect to the HITs included in the R1, it SHOULD | |||
silently drop the R1 and remain in the current state. | silently drop the R1 and remain in the current state. | |||
3. If the HIP association state is I1-SENT or I2-SENT, the received | 3. If the HIP association state is I1-SENT or I2-SENT, the received | |||
Initiator's HIT MUST correspond to the HIT used in the original, | Initiator's HIT MUST correspond to the HIT used in the original, | |||
I1 and the Responder's HIT MUST correspond to the one used, | I1 and the Responder's HIT MUST correspond to the one used, | |||
unless the I1 contained a NULL HIT. | unless the I1 contained a NULL HIT. | |||
4. The system SHOULD validate the R1 signature before applying | 4. The system SHOULD validate the R1 signature before applying | |||
further packet processing, according to Section 6.2.15. | further packet processing, according to Section 6.2.13. | |||
5. If the HIP association state is I1-SENT, and multiple valid R1s | 5. If the HIP association state is I1-SENT, and multiple valid R1s | |||
are present, the system SHOULD select from among the R1s with | are present, the system SHOULD select from among the R1s with | |||
the largest R1 generation counter. | the largest R1 generation counter. | |||
6. If the HIP association state is I2-SENT, the system MAY reenter | 6. If the HIP association state is I2-SENT, the system MAY reenter | |||
state I1-SENT and process the received R1 if it has a larger R1 | state I1-SENT and process the received R1 if it has a larger R1 | |||
generation counter than the R1 responded to previously. | generation counter than the R1 responded to previously. | |||
7. The R1 packet may have the C bit set -- in this case, the system | 7. The R1 packet may have the C bit set -- in this case, the system | |||
should anticipate the receipt of HIP CER packets that contain | should anticipate the receipt of HIP CER packets that contain | |||
the host identity corresponding to the responder's HIT. | the host identity corresponding to the responder's HIT. | |||
skipping to change at page 69, line 29 | skipping to change at page 68, line 29 | |||
lifetime of the puzzle. If the cookie puzzle is not | lifetime of the puzzle. If the cookie puzzle is not | |||
successfully solved, the implementation may either resend I1 | successfully solved, the implementation may either resend I1 | |||
within the retry bounds or abandon the HIP exchange. | within the retry bounds or abandon the HIP exchange. | |||
12. The system computes standard Diffie-Hellman keying material | 12. The system computes standard Diffie-Hellman keying material | |||
according to the public value and Group ID provided in the | according to the public value and Group ID provided in the | |||
DIFFIE_HELLMAN parameter. The Diffie-Hellman keying material | DIFFIE_HELLMAN parameter. The Diffie-Hellman keying material | |||
Kij is used for key extraction as specified in Section 9. If | Kij is used for key extraction as specified in Section 9. If | |||
the received Diffie-Hellman Group ID is not supported, the | the received Diffie-Hellman Group ID is not supported, the | |||
implementation may either resend I1 within the retry bounds or | implementation may either resend I1 within the retry bounds or | |||
abandon the HIP exchange. | abandon the HIP exchange. | |||
13. The system selects the HIP transform and ESP transform from the | 13. The system selects the HIP transform from the choices presented | |||
choices presented in the R1 packet and uses the selected values | in the R1 packet and uses the selected values subsequently when | |||
subsequently when generating and using encryption keys, and when | generating and using encryption keys, and when sending the I2. | |||
sending the I2. If the proposed alternatives are not acceptable | If the proposed alternatives are not acceptable to the system, | |||
to the system, it may either resend I1 within the retry bounds | it may either resend I1 within the retry bounds or abandon the | |||
or abandon the HIP exchange. | HIP exchange. | |||
14. The system prepares and creates an incoming IPsec ESP security | 14. The system initialized the remaining variables in the associated | |||
association. It may also prepare a security association for | ||||
outgoing traffic, but since it does not have the correct SPI | ||||
value yet, it cannot activate it. | ||||
15. The system initialized the remaining variables in the associated | ||||
state, including Update ID counters. | state, including Update ID counters. | |||
16. The system prepares and sends an I2, as described in Section | 15. The system prepares and sends an I2, as described in | |||
7.3. | Section 7.3. | |||
17. The system SHOULD start a timer whose timeout value should be | 16. The system SHOULD start a timer whose timeout value should be | |||
larger than the worst-case anticipated RTT, and MUST increment a | larger than the worst-case anticipated RTT, and MUST increment a | |||
timeout counter associated with the I2. The sender SHOULD | timeout counter associated with the I2. The sender SHOULD | |||
retransmit the I2 upon a timeout and restart the timer, up to a | retransmit the I2 upon a timeout and restart the timer, up to a | |||
maximum of I2_RETRIES_MAX tries. | maximum of I2_RETRIES_MAX tries. | |||
18. If the system is in state I1-SENT, it shall transition to state | 17. If the system is in state I1-SENT, it shall transition to state | |||
I2-SENT. If the system is in any other state, it remains in the | I2-SENT. If the system is in any other state, it remains in the | |||
current state. | current state. | |||
8.6.1 Handling malformed messages | 8.6.1 Handling malformed messages | |||
If an implementation receives a malformed R1 message, it MUST | If an implementation receives a malformed R1 message, it MUST | |||
silently drop the packet. Sending a NOTIFY or ICMP would not help, | silently drop the packet. Sending a NOTIFY or ICMP would not help, | |||
as the sender of the R1 typically doesn't have any state. An | as the sender of the R1 typically doesn't have any state. An | |||
implementation SHOULD wait for some more time for a possible good R1, | implementation SHOULD wait for some more time for a possible good R1, | |||
after which it MAY try again by sending a new I1 packet. | after which it MAY try again by sending a new I1 packet. | |||
skipping to change at page 70, line 32 | skipping to change at page 69, line 26 | |||
Otherwise, the HIP implementation SHOULD process the I2. This | Otherwise, the HIP implementation SHOULD process the I2. This | |||
includes validation of the cookie puzzle solution, generating the | includes validation of the cookie puzzle solution, generating the | |||
Diffie-Hellman key, decrypting the Initiator's Host Identity, | Diffie-Hellman key, decrypting the Initiator's Host Identity, | |||
verifying the signature, creating state, and finally sending an R2. | verifying the signature, creating state, and finally sending an R2. | |||
The following steps define the conceptual processing rules for | The following steps define the conceptual processing rules for | |||
responding to an I2 packet: | responding to an I2 packet: | |||
1. The system MAY perform checks to verify that the I2 corresponds | 1. The system MAY perform checks to verify that the I2 corresponds | |||
to a recently sent R1. Such checks are implementation | to a recently sent R1. Such checks are implementation | |||
dependent. See Appendix D for a description of an example | dependent. See Appendix C for a description of an example | |||
implementation. | implementation. | |||
2. The system MUST check that the Responder's HIT corresponds to | 2. The system MUST check that the Responder's HIT corresponds to one | |||
one of its own HITs. | of its own HITs. | |||
3. If the system is in the R2-SENT state, it MAY check if the newly | 3. If the system is in the R2-SENT state, it MAY check if the newly | |||
received I2 is similar to the one that triggered moving to | received I2 is similar to the one that triggered moving to | |||
R2-SENT. If so, it MAY retransmit a previously sent R2, reset | R2-SENT. If so, it MAY retransmit a previously sent R2, reset | |||
the R2-SENT timer, and stay in R2-SENT. | the R2-SENT timer, and stay in R2-SENT. | |||
4. If the system is in any other state, it SHOULD check that the | 4. If the system is in any other state, it SHOULD check that the | |||
echoed R1 generation counter in I2 is within the acceptable | echoed R1 generation counter in I2 is within the acceptable | |||
range. Implementations MUST accept puzzles from the current | range. Implementations MUST accept puzzles from the current | |||
generation and MAY accept puzzles from earlier generations. If | generation and MAY accept puzzles from earlier generations. If | |||
the newly received I2 is outside the accepted range, the I2 is | the newly received I2 is outside the accepted range, the I2 is | |||
stale (perhaps replayed) and SHOULD be dropped. | stale (perhaps replayed) and SHOULD be dropped. | |||
5. The system MUST validate the solution to the cookie puzzle by | 5. The system MUST validate the solution to the cookie puzzle by | |||
computing the SHA-1 hash described in Section 7.3. | computing the SHA-1 hash described in Section 7.3. | |||
6. The I2 MUST have a single value in each of the HIP_TRANSFORM and | 6. The I2 MUST have a single value in the HIP_TRANSFORM parameter, | |||
ESP_TRANSFORM parameters, which MUST each match one of the | which MUST match one of the values offered to the Initiator in | |||
values offered to the Initiator in the R1 packet. | the R1 packet. | |||
7. The system must derive Diffie-Hellman keying material Kij based | 7. The system must derive Diffie-Hellman keying material Kij based | |||
on the public value and Group ID in the DIFFIE_HELLMAN | on the public value and Group ID in the DIFFIE_HELLMAN | |||
parameter. This key is used to derive the HIP and ESP | parameter. This key is used to derive the HIP association keys, | |||
association keys, as described in Section 9. If the | as described in Section 9. If the Diffie-Hellman Group ID is | |||
Diffie-Hellman Group ID is unsupported, the I2 packet is | unsupported, the I2 packet is silently dropped. | |||
silently dropped. | ||||
8. The encrypted HOST_ID decrypted by the Initiator encryption key | 8. The encrypted HOST_ID decrypted by the Initiator encryption key | |||
defined in Section 9. If the decrypted data is not an HOST_ID | defined in Section 9. If the decrypted data is not an HOST_ID | |||
parameter, the I2 packet is silently dropped. | parameter, the I2 packet is silently dropped. | |||
9. The implementation SHOULD also verify that the Initiator's HIT | 9. The implementation SHOULD also verify that the Initiator's HIT in | |||
in the I2 corresponds to the Host Identity sent in the I2. | the I2 corresponds to the Host Identity sent in the I2. | |||
10. The system MUST verify the HMAC according to the procedures in | 10. The system MUST verify the HMAC according to the procedures in | |||
Section 6.2.12. | Section 6.2.10. | |||
11. The system MUST verify the HIP_SIGNATURE according to Section | 11. The system MUST verify the HIP_SIGNATURE according to | |||
6.2.14 and Section 7.3. | Section 6.2.12 and Section 7.3. | |||
12. If the checks above are valid, then the system proceeds with | 12. If the checks above are valid, then the system proceeds with | |||
further I2 processing; otherwise, it discards the I2 and remains | further I2 processing; otherwise, it discards the I2 and remains | |||
in the same state. | in the same state. | |||
13. The I2 packet may have the C bit set -- in this case, the system | 13. The I2 packet may have the C bit set -- in this case, the system | |||
should anticipate the receipt of HIP CER packets that contain | should anticipate the receipt of HIP CER packets that contain | |||
the host identity corresponding to the responder's HIT. | the host identity corresponding to the responder's HIT. | |||
14. The I2 packet may have the A bit set -- in this case, the system | 14. The I2 packet may have the A bit set -- in this case, the system | |||
MAY choose to refuse it by dropping the I2 and returning to | MAY choose to refuse it by dropping the I2 and returning to | |||
state UNASSOCIATED. If the A bit is set, the Initiator's HIT is | state UNASSOCIATED. If the A bit is set, the Initiator's HIT is | |||
anonymous and should not be stored. | anonymous and should not be stored. | |||
15. The SPI field is parsed to obtain the SPI that will be used for | 15. The system initialized the remaining variables in the associated | |||
the Security Association outbound from the Responder and inbound | ||||
to the Initiator. | ||||
16. The system prepares and creates both incoming and outgoing ESP | ||||
security associations. | ||||
17. The system initialized the remaining variables in the associated | ||||
state, including Update ID counters. | state, including Update ID counters. | |||
18. Upon successful processing of an I2 in states UNASSOCIATED, | 16. Upon successful processing of an I2 in states UNASSOCIATED, | |||
I1-SENT, I2-SENT, and R2-SENT, an R2 is sent and the state | I1-SENT, I2-SENT, and R2-SENT, an R2 is sent and the state | |||
machine transitions to state ESTABLISHED. | machine transitions to state ESTABLISHED. | |||
19. Upon successful processing of an I2 in state ESTABLISHED/ | 17. Upon successful processing of an I2 in state ESTABLISHED, the | |||
REKEYING, the old Security Association is dropped and a new one | old HIP association is dropped and a new one is installed, an R2 | |||
is installed, an R2 is sent, and the state machine transitions | is sent, and the state machine transitions to R2-SENT. | |||
to R2-SENT, dropping any possibly ongoing rekeying attempt. | 18. Upon transitioning to R2-SENT, start a timer. Leave R2-SENT if | |||
20. Upon transitioning to R2-SENT, start a timer. Leave R2-SENT if | ||||
either the timer expires (allowing for maximal retransmission of | either the timer expires (allowing for maximal retransmission of | |||
I2s), some data has been received on the incoming SA, or an | I2s), some data has been received on the incoming HIP | |||
UPDATE packet has been received (or some other packet that | association, or an UPDATE packet has been received (or some | |||
indicates that the peer has moved to ESTABLISHED). | other packet that indicates that the peer has moved to | |||
ESTABLISHED). | ||||
8.7.1 Handling malformed messages | 8.7.1 Handling malformed messages | |||
If an implementation receives a malformed I2 message, the behaviour | If an implementation receives a malformed I2 message, the behaviour | |||
SHOULD depend on how much checks the message has already passed. If | SHOULD depend on how much checks the message has already passed. If | |||
the puzzle solution in the message has already been checked, the | the puzzle solution in the message has already been checked, the | |||
implementation SHOULD report the error by responding with a NOTIFY | implementation SHOULD report the error by responding with a NOTIFY | |||
packet. Otherwise the implementation MAY respond with an ICMP | packet. Otherwise the implementation MAY respond with an ICMP | |||
message as defined in Section 6.3. | message as defined in Section 6.3. | |||
skipping to change at page 72, line 20 | skipping to change at page 71, line 10 | |||
An R2 received in states UNASSOCIATED, I1-SENT, ESTABLISHED, or | An R2 received in states UNASSOCIATED, I1-SENT, ESTABLISHED, or | |||
REKEYING results in the R2 being dropped and the state machine | REKEYING results in the R2 being dropped and the state machine | |||
staying in the same state. If an R2 is received in state I2-SENT, it | staying in the same state. If an R2 is received in state I2-SENT, it | |||
SHOULD be processed. | SHOULD be processed. | |||
The following steps define the conceptual processing rules for | The following steps define the conceptual processing rules for | |||
incoming R2 packet: | incoming R2 packet: | |||
1. The system MUST verify that the HITs in use correspond to the | 1. The system MUST verify that the HITs in use correspond to the | |||
HITs that were received in R1. | HITs that were received in R1. | |||
2. The system MUST verify the HMAC_2 according to the procedures in | 2. The system MUST verify the HMAC_2 according to the procedures in | |||
Section 6.2.13. | Section 6.2.11. | |||
3. The system MUST verify the HIP signature according to the | 3. The system MUST verify the HIP signature according to the | |||
procedures in Section 6.2.14. | procedures in Section 6.2.12. | |||
4. If any of the checks above fail, there is a high probability of | 4. If any of the checks above fail, there is a high probability of | |||
an ongoing man-in-the-middle or other security attack. The | an ongoing man-in-the-middle or other security attack. The | |||
system SHOULD act accordingly, based on its local policy. | system SHOULD act accordingly, based on its local policy. | |||
5. If the system is in any other state than I2-SENT, the R2 is | 5. If the system is in any other state than I2-SENT, the R2 is | |||
silently dropped. | silently dropped. | |||
6. The SPI field is parsed to obtain the SPI that will be used for | 6. Upon successful processing of the R2, the state machine moves to | |||
the ESP Security Association inbound to the Responder. The | ||||
system uses this SPI to create or activate the outgoing ESP | ||||
security association used to send packets to the peer. | ||||
7. Upon successful processing of the R2, the state machine moves to | ||||
state ESTABLISHED. | state ESTABLISHED. | |||
8.9 Dropping HIP associations | 8.9 Sending UPDATE packets | |||
A HIP implementation is free to drop a HIP association at any time, | ||||
based on its own policy. If a HIP host decides to drop an HIP | ||||
association, it deletes the IPsec SAs related to that association and | ||||
the corresponding HIP state, including the keying material. The | ||||
implementation MUST also drop the peer's R1 generation counter value, | ||||
unless a local policy explicitly defines that the value of that | ||||
particular host is stored. An implementation MUST NOT store R1 | ||||
generation counters by default, but storing R1 generation counter | ||||
values, if done, MUST be configured by explicit HITs. | ||||
8.10 Initiating rekeying | ||||
A system may initiate the rekey procedure at any time. It MUST | ||||
initiate a rekey if its incoming ESP sequence counter is about to | ||||
overflow. The system MUST NOT replace its keying material until the | ||||
rekeying packet exchange successfully completes. Optionally, | ||||
depending on policy, a system may include a new Diffie-Hellman key | ||||
for use in new KEYMAT generation. New KEYMAT generation occurs prior | ||||
to drawing the new keys. | ||||
In the conceptual state machine, a system rekeys when it sends a NES | ||||
parameter to the peer and receives both an ACK of the relevant UPDATE | ||||
message and its peer's NES parameter. To leave REKEYING state, both | ||||
parameters must be received. It may be that the ACK and the NES | ||||
arrive in different UPDATE messages. This is always true if a system | ||||
does not initiate rekeying but responds to a rekeying request from | ||||
the peer, but may also occur if two systems initiate a rekey nearly | ||||
simultaneously. In such a case, if the system is in state REKEYING, | ||||
it saves the one parameter and waits for the other before leaving | ||||
state REKEYING. This implies that the REKEYING state may have | ||||
conceptual substates. | ||||
The following steps define the processing rules for initiating a | ||||
rekey: | ||||
1. The system decides whether to continue to use the existing KEYMAT | ||||
or to generate new KEYMAT. In the latter case, the system MUST | ||||
generate a new Diffie-Hellman public key. | ||||
2. The system increments its outgoing Update ID by one. | ||||
3. The system creates a UPDATE packet, which contains an SEQ | ||||
parameter (with the current value of Update ID), NES parameter | ||||
and an optional DIFFIE_HELLMAN parameter. If the UPDATE packet | ||||
contains the DIFFIE_HELLMAN parameter, the Keymat Index in the | ||||
NES parameter MUST be zero. If the UPDATE does not contain | ||||
DIFFIE_HELLMAN, the NES Keymat Index MUST be larger or equal to | ||||
the index of the next byte to be drawn from the current KEYMAT. | ||||
4. The system sends the UPDATE packet and transitions to state | ||||
REKEYING. | ||||
5. The system SHOULD start a timer whose timeout value should be | ||||
larger than the worst-case anticipated RTT, and MUST increment a | ||||
timeout counter associated with UPDATE. The sender SHOULD | ||||
retransmit the UPDATE upon a timeout and restart the timer, up to | ||||
a maximum of UPDATE_RETRIES_MAX tries. | ||||
6. The system MUST NOT delete its existing SAs, but continue using | ||||
them if its policy still allows. The UPDATE procedure SHOULD be | ||||
initiated early enough to make sure that the SA replay counters | ||||
do not overflow. | ||||
7. In case a protocol error occurs and the peer system acknowledges | ||||
the UPDATE but does not itself send a NES, the system may hang in | ||||
state REKEYING. To guard against this, a system MAY re-initiate | ||||
the rekeying procedure after some time waiting for the peer to | ||||
respond, or it MAY decide to abort the HIP association after | ||||
waiting for an implementation-dependent time. The system MUST | ||||
NOT hang in state REKEYING for an indefinite time. | ||||
To simplify the state machine, a host MUST NOT generate new UPDATEs | A host sends an UPDATE packet when it wants to update some | |||
(with higher Update IDs) while in state REKEYING, unless it is | information related to a HIP association. There are a number of | |||
restarting the rekeying process. | likely situations, e.g. mobility management and rekeying of an | |||
existing ESP Security Association. The following paragraphs define | ||||
the conceptual rules for sending an UPDATE packet to the peer. | ||||
Additional steps can be defined in other documents where the UPDATE | ||||
packet is used. | ||||
1. The system increments its own Update ID value by one. | ||||
2. The system creates an UPDATE packet that contains a SEQ parameter | ||||
with the current value of Update ID. The UPDATE packet may also | ||||
include an ACK of the Update ID found in the received UPDATE SEQ | ||||
parameter, if any. | ||||
3. The system sends the created UPDATE packet and starts an UPDATE | ||||
timer. The default value for the timer is 2 * RTT estimate. | ||||
4. If the UPDATE timer expires, the UPDATE is resent. The UPDATE | ||||
can be resent UPDATE_RETRY_MAX times. The UPDATE timer SHOULD be | ||||
exponentially backed off for subsequent retransmissions. | ||||
8.11 Processing UPDATE packets | 8.10 Receiving UPDATE packets | |||
When a system receives an UPDATE packet, its processing depends on | When a system receives an UPDATE packet, its processing depends on | |||
the state of the HIP association and the presence of and values of | the state of the HIP association and the presence of and values of | |||
the SEQ and ACK parameters. An UPDATE MUST be processed if the | the SEQ and ACK parameters. Typically, an UPDATE message also | |||
following conditions hold (note: UPDATEs may also be processed when | carries optional parameters whose handling is defined in separate | |||
additional conditions hold, as specified in other drafts): | documents. | |||
1. If there is no corresponding HIP association, the implementation | 1. If there is no corresponding HIP association, the implementation | |||
MAY reply with an ICMP Parameter Problem, as specified in Section | MAY reply with an ICMP Parameter Problem, as specified in | |||
6.3.5. | Section 6.3.4. | |||
2. The state of the HIP association is ESTABLISHED or REKEYING, and | ||||
both the SEQ and NES parameters are present in the UPDATE. This | ||||
is the case for which the peer host is in the process of | ||||
rekeying. | ||||
3. The state of the HIP association is REKEYING and an ACK (of | ||||
outstanding Update ID) is in the UPDATE. This case usually | ||||
corresponds to the peer completing the rekeying process first. | ||||
If the above conditions hold, the following steps define the | 2. If the association is in the ESTABLISHED state and the SEQ | |||
conceptual processing rules for handling a received UPDATE packet: | parameter is present, the UPDATE is processed and replied as | |||
1. If the SEQ parameter is present, and the Update ID in the | described in Section 8.10.1. | |||
received SEQ is smaller than the stored Update ID for the host, | 3. Additionally (or alternatively), if the association is in the | |||
the packet MUST BE dropped. | ESTABLISHED state and there is an ACK (of outstanding Update ID) | |||
2. If the SEQ parameter is present, and the Update ID in the | in the UPDATE, the UPDATE is processed as described in | |||
received SEQ is equal to the stored Update ID for the host, the | Section 8.10.2. | |||
packet is treated as a retransmission. However, the HMAC | ||||
verification (next step) MUST NOT be skipped. (A byte-by-byte | 8.10.1 Handling a SEQ paramaeter in a received UPDATE message | |||
comparison of the received and a store packet would be OK, | ||||
though.) It is recommended that a host cache the last packet | 1. If the Update ID in the received SEQ is smaller than the stored | |||
that was acked to avoid the cost of generating a new ACK packet | Update ID for the peer host, the packet MUST BE dropped as a | |||
to respond to a replayed UPDATE. Systems MUST again acknowledge | duplicate. | |||
such apparent UPDATE message retransmissions but SHOULD also | 2. If the Update ID in the received SEQ is equal to the stored | |||
consider rate-limiting such retransmission responses to guard | Update ID for the host, the packet is treated as a | |||
against replay attacks. | retransmission. The HMAC verification (next step) MUST NOT be | |||
skipped. (A byte-by-byte comparison of the received and a store | ||||
packet would be OK, though.) It is recommended that a host cache | ||||
the last packet that was acked to avoid the cost of generating a | ||||
new ACK packet to respond to a replayed UPDATE. The system MUST | ||||
acknowledge, again, such (apparent) UPDATE message | ||||
retransmissions but SHOULD also consider rate-limiting such | ||||
retransmission responses to guard against replay attacks. | ||||
3. The system MUST verify the HMAC in the UPDATE packet. If the | 3. The system MUST verify the HMAC in the UPDATE packet. If the | |||
verification fails, the packet MUST be dropped. | verification fails, the packet MUST be dropped. | |||
4. If the received UPDATE contains a DIFFIE_HELLMAN parameter, the | 4. The system MAY verify the SIGNATURE in the UPDATE packet. If the | |||
received Keymat Index MUST be zero. If this test fails, the | ||||
packet SHOULD be dropped and the system SHOULD log an error | ||||
message. | ||||
5. The system MAY verify the SIGNATURE in the UPDATE packet. If the | ||||
verification fails, the packet SHOULD be dropped and an error | verification fails, the packet SHOULD be dropped and an error | |||
message logged. | message logged. | |||
5. If a new SEQ parameter is being processed, the system MUST record | ||||
6. If a new SEQ parameter is being processed, the system MUST record | ||||
the Update ID in the received SEQ parameter, for replay | the Update ID in the received SEQ parameter, for replay | |||
protection. | protection. | |||
7. If the system is in state ESTABLISHED, and the UPDATE has the NES | 6. An UPDATE acknowledgement packet with ACK parameter is prepared | |||
and SEQ parameters, the packet processing continues as specified | and send to the peer. | |||
in Section 8.11.1. | ||||
8. If the system is in state REKEYING, the packet processing | ||||
continues as specified in Section 8.11.2. | ||||
8.11.1 Processing an UPDATE packet in state ESTABLISHED | ||||
The following steps define the conceptual processing rules responding | ||||
handling a received initial UPDATE packet: | ||||
1. The system consults its policy to see if it needs to generate a | ||||
new Diffie-Hellman key, and generates a new key if needed. The | ||||
system records any newly generated or received Diffie-Hellman | ||||
keys, for use in KEYMAT generation upon leaving the REKEYING | ||||
state. | ||||
2. If the system generated new Diffie-Hellman key in the previous | ||||
step, or it received a DIFFIE_HELLMAN parameter, it sets NES | ||||
Keymat Index to zero. Otherwise, the NES Keymat Index MUST be | ||||
larger or equal to the index of the next byte to be drawn from | ||||
the current KEYMAT. In this case, it is RECOMMENDED that the | ||||
host use the Keymat Index requested by the peer in the received | ||||
NES. | ||||
3. The system increments its outgoing Update ID by one. | ||||
4. The system creates a UPDATE packet, which contains an SEQ | ||||
parameter (with the current value of Update ID), NES parameter | ||||
and the optional DIFFIE_HELLMAN parameter. The UPDATE packet also | ||||
includes the ACK of the Update ID found in the received UPDATE | ||||
SEQ parameter. | ||||
5. The system sends the UPDATE packet and transitions to state | ||||
REKEYING. The system stores any received NES and DIFFIE_HELLMAN | ||||
parameters. At this point, it only needs to receive an ACK of | ||||
its current Update ID to finish rekeying. | ||||
8.11.2 Processing an UPDATE packet in state REKEYING | ||||
The following steps define the conceptual processing rules responding | ||||
handling a received reply UPDATE packet: | ||||
1. If the packet contains a SEQ and NES parameters, then the system | ||||
sends a new UPDATE packet with an ACK of the peer's Update ID as | ||||
received in the SEQ parameter. Additionally, if the UPDATE packet | ||||
contained an ACK of the outstanding Update ID, or if the ACK of | ||||
the UPDATE packet that contained the NES has already been | ||||
received, the system stores the received NES and (optional) | ||||
DIFFIE_HELLMAN parameters and finishes the rekeying procedure as | ||||
described in Section 8.11.3. If the ACK of the outstanding Update | ||||
ID has not been received, stay in state REKEYING after storing | ||||
the received NES and (optional) DIFFIE_HELLMAN. | ||||
2. If the packet contains an ACK parameter that ACKs the outstanding | ||||
Update ID, and the system has previously received a NES from the | ||||
peer, the system finishes the rekeying procedure as described in | ||||
Section 8.11.3. If the system is still waiting for the peer's | ||||
NES parameter (to arrive in subsequent UPDATE message), the | ||||
system stays in state REKEYING. | ||||
8.11.3 Leaving REKEYING state | 8.10.2 Handling an ACK parameter in a received UPDATE packet | |||
A system leaves REKEYING state when it has received both a NES from | 1. The UPDATE packet with ACK must match to an earlier sent UPDATE | |||
its peer and the ACK of the Update ID that was sent in its own NES to | packet. If no match is found, the packet MUST be dropped. | |||
the peer. The following steps are taken: | 2. The system MUST verify the HMAC in the UPDATE packet. If the | |||
1. If either the received UPDATE contains a new Diffie-Hellman key, | verification fails, the packet MUST be dropped. | |||
the system has a new Diffie-Hellman key from initiating rekey, or | 3. The system MAY verify the SIGNATURE in the UPDATE packet. If the | |||
both, the system generates new KEYMAT. If there is only one new | verification fails, the packet SHOULD be dropped and an error | |||
Diffie-Hellman key, the old key is used as the other key. | message logged. | |||
2. If the system generated new KEYMAT in the previous step, it sets | 4. The corresponding UPDATE timer is stopped (see Section 8.9) so | |||
Keymat Index to zero, independent on whether the received UPDATE | that the now acknowledged UPDATE is no longer retransmitted. | |||
included a Diffie-Hellman key or not. If the system did not | ||||
generate new KEYMAT, it uses the lowest Keymat Index of the two | ||||
NES parameters. | ||||
3. The system draws keys for new incoming and outgoing ESP SAs, | ||||
starting from the Keymat Index, and prepares new incoming and | ||||
outgoing ESP SAs. The SPI for the outgoing SA is the new SPI | ||||
value from the UPDATE. The SPI for the incoming SA was generated | ||||
when NES was sent. The order of the keys retrieved from the | ||||
KEYMAT during rekeying process is similar to that described in | ||||
Section 9. Note, that only IPsec ESP keys are retrieved during | ||||
rekeying process, not the HIP keys. | ||||
4. The system cancels any timers protecting the UPDATE and | ||||
transitions to ESTABLISHED. | ||||
5. The system starts to send to the new outgoing SA and prepares to | ||||
start receiving data on the new incoming SA. | ||||
8.12 Processing CER packets | 8.11 Processing CER packets | |||
Processing CER packets is OPTIONAL, and currently undefined. | Processing CER packets is OPTIONAL, and currently undefined. | |||
8.13 Processing NOTIFY packets | 8.12 Processing NOTIFY packets | |||
Processing NOTIFY packets is OPTIONAL. If processed, any errors | Processing NOTIFY packets is OPTIONAL. If processed, any errors | |||
noted by the NOTIFY parameter SHOULD be taken into account by the HIP | noted by the NOTIFY parameter SHOULD be taken into account by the HIP | |||
state machine (e.g., by terminating a HIP handshake), and the error | state machine (e.g., by terminating a HIP handshake), and the error | |||
SHOULD be logged. | SHOULD be logged. | |||
8.14 Processing CLOSE packets | 8.13 Processing CLOSE packets | |||
When the host receives a CLOSE message it responds with a CLOSE_ACK | When the host receives a CLOSE message it responds with a CLOSE_ACK | |||
message and moves to CLOSED state. (The authenticity of the CLOSE | message and moves to CLOSED state. (The authenticity of the CLOSE | |||
message is verified using both HMAC and SIGNATURE). This processing | message is verified using both HMAC and SIGNATURE). This processing | |||
applies whether or not the HIP association state is CLOSING in order | applies whether or not the HIP association state is CLOSING in order | |||
to handle CLOSE messages from both ends crossing in flight. | to handle CLOSE messages from both ends crossing in flight. | |||
The HIP association is not discarded before the host moves from the | The HIP association is not discarded before the host moves from the | |||
UNASSOCIATED state. | UNASSOCIATED state. | |||
Once the closing process has started, any need to send data packets | Once the closing process has started, any need to send data packets | |||
will trigger creating and establishing of a new HIP association, | will trigger creating and establishing of a new HIP association, | |||
starting with sending an I1. | starting with sending an I1. | |||
If there is no corresponding HIP association, the implementation MAY | If there is no corresponding HIP association, the implementation MAY | |||
reply to a CLOSE with an ICMP Parameter Problem, as specified in | reply to a CLOSE with an ICMP Parameter Problem, as specified in | |||
Section 6.3.5. | Section 6.3.4. | |||
8.15 Processing CLOSE_ACK packets | 8.14 Processing CLOSE_ACK packets | |||
When a host receives a CLOSE_ACK message it verifies that it is in | When a host receives a CLOSE_ACK message it verifies that it is in | |||
CLOSING or CLOSED state and that the CLOSE_ACK was in response to the | CLOSING or CLOSED state and that the CLOSE_ACK was in response to the | |||
CLOSE (using the included ECHO_REPLY in response to the sent | CLOSE (using the included ECHO_REPLY in response to the sent | |||
ECHO_REQUEST). | ECHO_REQUEST). | |||
The CLOSE_ACK uses HMAC and SIGNATURE for verification. The state is | The CLOSE_ACK uses HMAC and SIGNATURE for verification. The state is | |||
discarded when the state changes to UNASSOCIATED and, after that, | discarded when the state changes to UNASSOCIATED and, after that, | |||
NOTIFY is sent as a response to a CLOSE message. | NOTIFY is sent as a response to a CLOSE message. | |||
8.15 Dropping HIP associations | ||||
A HIP implementation is free to drop a HIP association at any time, | ||||
based on its own policy. If a HIP host decides to drop a HIP | ||||
association, it deletes the corresponding HIP state, including the | ||||
keying material. The implementation MUST also drop the peer's R1 | ||||
generation counter value, unless a local policy explicitly defines | ||||
that the value of that particular host is stored. An implementation | ||||
MUST NOT store R1 generation counters by default, but storing R1 | ||||
generation counter values, if done, MUST be configured by explicit | ||||
HITs. | ||||
9. HIP KEYMAT | 9. HIP KEYMAT | |||
HIP keying material is derived from the Diffie-Hellman Kij produced | HIP keying material is derived from the Diffie-Hellman Kij produced | |||
during the base HIP exchange. The Initiator has Kij during the | during the HIP base exchange. The Initiator has Kij during the | |||
creation of the I2 packet, and the Responder has Kij once it receives | creation of the I2 packet, and the Responder has Kij once it receives | |||
the I2 packet. This is why I2 can already contain encrypted | the I2 packet. This is why I2 can already contain encrypted | |||
information. | information. | |||
The KEYMAT is derived by feeding Kij and the HITs into the following | The KEYMAT is derived by feeding Kij and the HITs into the following | |||
operation; the | operation denotes concatenation. | operation; the | operation denotes concatenation. | |||
KEYMAT = K1 | K2 | K3 | ... | KEYMAT = K1 | K2 | K3 | ... | |||
where | where | |||
skipping to change at page 78, line 45 | skipping to change at page 75, line 45 | |||
method described in the previous paragraph. HOST_g denotes the host | method described in the previous paragraph. HOST_g denotes the host | |||
with the greater HIT value, and HOST_l the host with the lower HIT | with the greater HIT value, and HOST_l the host with the lower HIT | |||
value. | value. | |||
The drawing order for initial keys: | The drawing order for initial keys: | |||
HIP-gl encryption key for HOST_g's outgoing HIP packets | HIP-gl encryption key for HOST_g's outgoing HIP packets | |||
HIP-gl integrity (HMAC) key for HOST_g's outgoing HIP packets | HIP-gl integrity (HMAC) key for HOST_g's outgoing HIP packets | |||
HIP-lg encryption key (currently unused) for HOST_l's outgoing HIP | HIP-lg encryption key (currently unused) for HOST_l's outgoing HIP | |||
packets | packets | |||
HIP-lg integrity (HMAC) key for HOST_l's outgoing HIP packets | HIP-lg integrity (HMAC) key for HOST_l's outgoing HIP packets | |||
SA-gl ESP encryption key for HOST_g's outgoing traffic | ||||
SA-gl ESP authentication key for HOST_g's outgoing traffic | ||||
SA-lg ESP encryption key for HOST_l's outgoing traffic | ||||
SA-lg ESP authentication key for HOST_l's outgoing traffic | ||||
The number of bits drawn for a given algorithm is the "natural" size | The number of bits drawn for a given algorithm is the "natural" size | |||
of the keys. For the mandatory algorithms, the following sizes | of the keys. For the mandatory algorithms, the following sizes | |||
apply: | apply: | |||
AES 128 bits | AES 128 bits | |||
SHA-1 160 bits | SHA-1 160 bits | |||
NULL 0 bits | NULL 0 bits | |||
The four HIP keys are only drawn from KEYMAT during a HIP I1->R2 | ||||
exchange. Subsequent rekeys using UPDATE will only draw the four ESP | ||||
keys from KEYMAT. Section 8.11 describes the rules for reusing or | ||||
regenerating KEYMAT based on the UPDATE exchange. | ||||
10. HIP Fragmentation Support | 10. HIP Fragmentation Support | |||
A HIP implementation must support IP fragmentation / reassembly. | A HIP implementation must support IP fragmentation / reassembly. | |||
Fragment reassembly MUST be implemented in both IPv4 and IPv6, but | Fragment reassembly MUST be implemented in both IPv4 and IPv6, but | |||
fragment generation MUST be implemented only in IPv4 (IPv4 stacks and | fragment generation MUST be implemented only in IPv4 (IPv4 stacks and | |||
networks will usually do this by default) and SHOULD be implemented | networks will usually do this by default) and SHOULD be implemented | |||
in IPv6. In the IPv6 world, the minimum MTU is larger, 1280 bytes, | in IPv6. In the IPv6 world, the minimum MTU is larger, 1280 bytes, | |||
than in the IPv4 world. The larger MTU size is usually sufficient | than in the IPv4 world. The larger MTU size is usually sufficient | |||
for most HIP packets, and therefore fragment generation may not be | for most HIP packets, and therefore fragment generation may not be | |||
needed. If a host expects to send HIP packets that are larger than | needed. If a host expects to send HIP packets that are larger than | |||
the minimum IPv6 MTU, it MUST implement fragment generation even for | the minimum IPv6 MTU, it MUST implement fragment generation even for | |||
IPv6. | IPv6. | |||
In the IPv4 world, HIP packets may encounter low MTUs along their | In the IPv4 world, HIP packets may encounter low MTUs along their | |||
routed path. Since HIP does not provide a mechanism to use multiple | routed path. Since HIP does not provide a mechanism to use multiple | |||
IP datagrams for a single HIP packet, support of path MTU discovery | IP datagrams for a single HIP packet, support of path MTU discovery | |||
does not bring any value to HIP in the IPv4 world. HIP aware NAT | does not bring any value to HIP in the IPv4 world. HIP-aware NAT | |||
systems MUST perform any IPv4 reassembly/fragmentation. | systems MUST perform any IPv4 reassembly/fragmentation. | |||
All HIP implementations MUST employ a reassembly algorithm that is | All HIP implementations MUST employ a reassembly algorithm that is | |||
sufficiently resistant against DoS attacks. | sufficiently resistant against DoS attacks. | |||
11. ESP with HIP | 11. HIP Policies | |||
HIP is designed to be used in end-to-end fashion. The IPsec mode | ||||
used with HIP is the BEET mode (A Bound End-to-End mode for ESP) | ||||
[27]. The BEET mode provides some features from both IPsec tunnel | ||||
and transport modes. The HIP uses HITs and LSIs as the "inner" | ||||
addresses and IP addresses as "outer" addresses like IP addresses are | ||||
used in the tunnel mode. Instead of tunneling packets between hosts, | ||||
a conversion between inner and outer addresses is made at end-hosts | ||||
and the inner address is never sent in the wire after the initial HIP | ||||
negotiation. BEET provides IPsec transport mode syntax (no inner | ||||
headers) with limited tunnel mode semantics (fixed logical inner | ||||
addresses - the HITs - and changeable outer IP addresses). | ||||
Since HIP does not negotiate any lifetimes, all lifetimes are local | ||||
policy. The only lifetimes a HIP implementation MUST support are | ||||
sequence number rollover (for replay protection), and SA timeout. An | ||||
SA times out if no packets are received using that SA. The default | ||||
timeout value is 15 minutes. Implementations MAY support lifetimes | ||||
for the various ESP transforms. | ||||
11.1 ESP Security Associations | ||||
Each HIP association is linked with two ESP SAs, one incoming and one | ||||
outgoing. The Initiator's incoming SA corresponds with the | ||||
Responder's outgoing one. The initiator defines the SPI for this | ||||
association, as defined in Section 3.3. This SA is called SA-RI, and | ||||
the corresponding SPI is called SPI-RI. Respectively, the | ||||
Responder's incoming SA corresponds with the Initiator's outgoing SA | ||||
and is called SA-IR, with the SPI-IR. | ||||
The Initiator creates SA-RI as a part of R1 processing, before | ||||
sending out the I2, as explained in Section 8.6. The keys are | ||||
derived from KEYMAT, as defined in Section 9. The Responder creates | ||||
SA-RI as a part of I2 processing, see Section 8.7. | ||||
The Responder creates SA-IR as a part of I2 processing, before | ||||
sending out R2, see Step 17 in Section 8.7. The Initiator creates | ||||
SA-IR when processing R2, see Step 7 in Section 8.8. | ||||
11.2 Updating ESP SAs during rekeying | ||||
After the initial 4-way handshake and SA establishment, both hosts | ||||
are in state ESTABLISHED. There are no longer Initiator and | ||||
Responder roles and the association is symmetric. In this | ||||
subsection, the initiating party of the rekey procedure is denoted | ||||
with I' and the peer with R'. | ||||
The I' initiates the rekeying process when needed (see Section 8.10). | ||||
It creates an UPDATE packet with required information and sends it to | ||||
the peer node. The old SAs are still in use. | ||||
The R', after receiving and processing the UPDATE (see Section 8.11), | ||||
generates new SAs: SA-I'R' and SA-R'I'. It does not take the new | ||||
outgoing SA into use, but uses still the old one, so there exists two | ||||
SA pairs towards the same peer host. For the new outgoing SA, the | ||||
SPI-R'I' value is picked from the received UPDATE packet. The R' | ||||
generates the new SPI value for the incoming SA, SPI-I'R', and | ||||
includes it in the response UPDATE packet. | ||||
When the I' receives a response UPDATE from the R', it generates new | ||||
SAs, as described in Section 8.11: SA-I'R' and SA-R'I'. It starts | ||||
using the new outgoing SA immediately. | ||||
The R' starts using the new outgoing SA when it receives traffic from | ||||
the new incoming SA. After this, the R' can remove old SAs. | ||||
Similarly, when the I' receives traffic from the new incoming SA, it | ||||
can safely remove old SAs. | ||||
11.3 Security Association Management | ||||
An SA pair is indexed by the 2 SPIs and 2 HITs (both HITs since a | ||||
system can have more than one HIT). An inactivity timer is | ||||
recommended for all SAs. If the state dictates the deletion of an | ||||
SA, a timer is set to allow for any late arriving packets. | ||||
11.4 Security Parameter Index (SPI) | ||||
The SPIs in ESP provide a simple compression of the HIP data from all | ||||
packets after the HIP exchange. This does require a per HIT- pair | ||||
Security Association (and SPI), and a decrease of policy granularity | ||||
over other Key Management Protocols like IKE. | ||||
When a host rekeys, it gets a new SPI from its partner. | ||||
11.5 Supported Transforms | ||||
All HIP implementations MUST support AES [10] and HMAC-SHA-1-96 [6]. | ||||
If the Initiator does not support any of the transforms offered by | ||||
the Responder in the R1 HIP packet, it MUST use AES and HMAC-SHA-1-96 | ||||
and state so in the I2 HIP packet. | ||||
In addition to AES, all implementations MUST implement the ESP NULL | ||||
encryption and authentication algorithms. These algorithms are | ||||
provided mainly for debugging purposes, and SHOULD NOT be used in | ||||
production environments. The default configuration in | ||||
implementations MUST be to reject NULL encryption or authentication. | ||||
11.6 Sequence Number | ||||
The Sequence Number field is MANDATORY in ESP. Anti-replay | ||||
protection MUST be used in an ESP SA established with HIP. | ||||
This means that each host MUST rekey before its sequence number | ||||
reaches 2^32, or if extended sequence numbers are used, 2^64. Note | ||||
that in HIP rekeying, unlike IKE rekeying, only one Diffie-Hellman | ||||
key can be changed, that of the rekeying host. However, if one host | ||||
rekeys, the other host SHOULD rekey as well. | ||||
In some instances, a 32-bit sequence number is inadequate. In the | ||||
ESP_TRANSFORM parameter, a peer MAY require that a 64 bit sequence | ||||
number be used. In this case the higher 32 bits are NOT included in | ||||
the ESP header, but are simply kept local to both peers. 64 bit | ||||
sequence numbers must only be used for ciphers that will not be open | ||||
to cryptanalysis as a result. AES is one such cipher. | ||||
12. HIP Policies | ||||
There are a number of variables that will influence the HIP exchanges | There are a number of variables that will influence the HIP exchanges | |||
that each host must support. All HIP implementations MUST support | that each host must support. All HIP implementations MUST support | |||
more than one simultaneous HIs, at least one of which SHOULD be | more than one simultaneous HIs, at least one of which SHOULD be | |||
reserved for anonymous usage. Although anonymous HIs will be rarely | reserved for anonymous usage. Although anonymous HIs will be rarely | |||
used as responder HIs, they will be common for Initiators. Support | used as responder HIs, they will be common for Initiators. Support | |||
for more than two HIs is RECOMMENDED. | for more than two HIs is RECOMMENDED. | |||
Many Initiators would want to use a different HI for different | Many Initiators would want to use a different HI for different | |||
Responders. The implementations SHOULD provide for an ACL of | Responders. The implementations SHOULD provide for an ACL of | |||
skipping to change at page 85, line 5 | skipping to change at page 79, line 5 | |||
selection would be from most specific to most general. | selection would be from most specific to most general. | |||
The value of K used in the HIP R1 packet can also vary by policy. K | The value of K used in the HIP R1 packet can also vary by policy. K | |||
should never be greater than 20, but for trusted partners it could be | should never be greater than 20, but for trusted partners it could be | |||
as low as 0. | as low as 0. | |||
Responders would need a similar ACL, representing which hosts they | Responders would need a similar ACL, representing which hosts they | |||
accept HIP exchanges, and the preferred transform and local | accept HIP exchanges, and the preferred transform and local | |||
lifetimes. Wildcarding SHOULD be supported for this ACL also. | lifetimes. Wildcarding SHOULD be supported for this ACL also. | |||
13. Security Considerations | 12. Security Considerations | |||
HIP is designed to provide secure authentication of hosts and to | ||||
provide a fast key exchange for IPsec ESP. HIP also attempts to | ||||
limit the exposure of the host to various denial-of-service and man- | ||||
in-the-middle attacks. In so doing, HIP itself is subject to its own | ||||
DoS and MitM attacks that potentially could be more damaging to a | ||||
host's ability to conduct business as usual. | ||||
HIP enabled ESP is IP address independent. This might seem to make | HIP is designed to provide secure authentication of hosts. HIP also | |||
it easier for an attacker, but ESP with replay protection is already | attempts to limit the exposure of the host to various | |||
as well protected as possible, and the removal of the IP address as a | denial-of-service and man-in-the-middle (MitM) attacks. In so doing, | |||
check should not increase the exposure of ESP to DoS attacks. | HIP itself is subject to its own DoS and MitM attacks that | |||
Furthermore, this is in line with the forthcoming revision of ESP. | potentially could be more damaging to a host's ability to conduct | |||
business as usual. | ||||
Denial-of-service attacks take advantage of the cost of start of | Denial-of-service attacks take advantage of the cost of start of | |||
state for a protocol on the Responder compared to the 'cheapness' on | state for a protocol on the Responder compared to the 'cheapness' on | |||
the Initiator. HIP makes no attempt to increase the cost of the | the Initiator. HIP makes no attempt to increase the cost of the | |||
start of state on the Initiator, but makes an effort to reduce the | start of state on the Initiator, but makes an effort to reduce the | |||
cost to the Responder. This is done by having the Responder start | cost to the Responder. This is done by having the Responder start | |||
the 3-way exchange instead of the Initiator, making the HIP protocol | the 3-way exchange instead of the Initiator, making the HIP protocol | |||
4 packets long. In doing this, packet 2 becomes a 'stock' packet | 4 packets long. In doing this, packet 2 becomes a 'stock' packet | |||
that the Responder MAY use many times. The duration of use is a | that the Responder MAY use many times. The duration of use is a | |||
paranoia versus throughput concern. Using the same Diffie- Hellman | paranoia versus throughput concern. Using the same Diffie- Hellman | |||
values and random puzzle I has some risk. This risk needs to be | values and random puzzle #I has some risk. This risk needs to be | |||
balanced against a potential storm of HIP I1 packets. | balanced against a potential storm of HIP I1 packets. | |||
This shifting of the start of state cost to the Initiator in creating | This shifting of the start of state cost to the Initiator in creating | |||
the I2 HIP packet, presents another DoS attack. The attacker spoofs | the I2 HIP packet, presents another DoS attack. The attacker spoofs | |||
the I1 HIP packet and the Responder sends out the R1 HIP packet. | the I1 HIP packet and the Responder sends out the R1 HIP packet. | |||
This could conceivably tie up the 'initiator' with evaluating the R1 | This could conceivably tie up the 'initiator' with evaluating the R1 | |||
HIP packet, and creating the I2 HIP packet. The defense against this | HIP packet, and creating the I2 HIP packet. The defense against this | |||
attack is to simply ignore any R1 packet where a corresponding I1 or | attack is to simply ignore any R1 packet where a corresponding I1 was | |||
ESP data was not sent. | not sent. | |||
A second form of DoS attack arrives in the I2 HIP packet. Once the | A second form of DoS attack arrives in the I2 HIP packet. Once the | |||
attacking Initiator has solved the cookie challenge, it can send | attacking Initiator has solved the puzzle, it can send packets with | |||
packets with spoofed IP source addresses with either invalid | spoofed IP source addresses with either invalid encrypted HIP payload | |||
encrypted HIP payload component or a bad HIP signature. This would | component or a bad HIP signature. This would take resources in the | |||
take resources in the Responder's part to reach the point to discover | Responder's part to reach the point to discover that the I2 packet | |||
that the I2 packet cannot be completely processed. The defense | cannot be completely processed. The defense against this attack is | |||
against this attack is after N bad I2 packets, the Responder would | after N bad I2 packets, the Responder would discard any I2s that | |||
discard any I2s that contain the given Initiator HIT. Thus will shut | contain the given Initiator HIT. Thus will shut down the attack. | |||
down the attack. The attacker would have to request another R1 and | The attacker would have to request another R1 and use that to launch | |||
use that to launch a new attack. The Responder could up the value of | a new attack. The Responder could up the value of K while under | |||
K while under attack. On the downside, valid I2s might get dropped | attack. On the downside, valid I2s might get dropped too. | |||
too. | ||||
A third form of DoS attack is emulating the restart of state after a | A third form of DoS attack is emulating the restart of state after a | |||
reboot of one of the partners. A host restarting would send an I1 to | reboot of one of the partners. A host restarting would send an I1 to | |||
a peer, which would respond with an R1 even if it were in state | a peer, which would respond with an R1 even if it were in the | |||
ESTABLISHED. If the I1 were spoofed, the resulting R1 would be | ESTABLISHED state. If the I1 were spoofed, the resulting R1 would be | |||
received unexpectedly by the spoofed host and would be dropped, as in | received unexpectedly by the spoofed host and would be dropped, as in | |||
the first case above. | the first case above. | |||
A fourth form of DoS attack is emulating the end of state. HIP | A fourth form of DoS attack is emulating the end of state. HIP | |||
relies on timers plus a CLOSE/CLOSE_ACK handshake to explicitly | relies on timers plus a CLOSE/CLOSE_ACK handshake to explicitly | |||
signals the end of a state. Because both CLOSE and CLOSE_ACK | signals the end of a state. Because both CLOSE and CLOSE_ACK | |||
messages contain an HMAC, an outsider cannot close a connection. The | messages contain an HMAC, an outsider cannot close a connection. The | |||
presence of an additional SIGNATURE allows middle-boxes to inspect | presence of an additional SIGNATURE allows middle-boxes to inspect | |||
these messages and discard the associated state (for e.g., | these messages and discard the associated state (for e.g., | |||
firewalling, SPI-based NATing, etc.). However, the optional behavior | firewalling, SPI-based NATing, etc.). However, the optional behavior | |||
of replying to CLOSE with an ICMP Parameter Problem packet (as | of replying to CLOSE with an ICMP Parameter Problem packet (as | |||
described in Section 6.3.5), might allow an IP spoofer sending CLOSE | described in Section 6.3.4) might allow an IP spoofer sending CLOSE | |||
messages to launch reflection attacks. | messages to launch reflection attacks. | |||
A fifth form of DoS attack is replaying R1s to cause the initiator to | A fifth form of DoS attack is replaying R1s to cause the initiator to | |||
solve stale puzzles and become out of synchronization with the | solve stale puzzles and become out of synchronization with the | |||
responder. The R1 generation counter is a monotonically increasing | responder. The R1 generation counter is a monotonically increasing | |||
counter designed to protect against this attack, as described in | counter designed to protect against this attack, as described in | |||
section Section 4.1.3. | section Section 4.1.3. | |||
Man-in-the-middle attacks are difficult to defend against, without | Man-in-the-middle attacks are difficult to defend against, without | |||
third-party authentication. A skillful MitM could easily handle all | third-party authentication. A skillful MitM could easily handle all | |||
skipping to change at page 88, line 5 | skipping to change at page 82, line 5 | |||
similar attack against the Responder is more involved. First an ICMP | similar attack against the Responder is more involved. First an ICMP | |||
message is expected if the I1 was a DoS attack and the real owner of | message is expected if the I1 was a DoS attack and the real owner of | |||
the spoofed IP address does not support HIP. The Responder SHOULD | the spoofed IP address does not support HIP. The Responder SHOULD | |||
NOT act on this ICMP message to remove the minimal state from the R1 | NOT act on this ICMP message to remove the minimal state from the R1 | |||
HIP packet (if it has one), but wait for either a valid I2 HIP packet | HIP packet (if it has one), but wait for either a valid I2 HIP packet | |||
or the natural timeout of the R1 HIP packet. This is to allow for a | or the natural timeout of the R1 HIP packet. This is to allow for a | |||
sophisticated attacker that is trying to break up the HIP exchange. | sophisticated attacker that is trying to break up the HIP exchange. | |||
Likewise, the Initiator should ignore any ICMP message while waiting | Likewise, the Initiator should ignore any ICMP message while waiting | |||
for an R2 HIP packet, deleting state only after a natural timeout. | for an R2 HIP packet, deleting state only after a natural timeout. | |||
14. IANA Considerations | 13. IANA Considerations | |||
IANA has assigned IP Protocol number TBD to HIP. | IANA has assigned IP Protocol number TBD to HIP. | |||
15. Acknowledgments | IANA needs to create registries for: | |||
1. HIP packet types | ||||
2. HIP parameter types | ||||
14. Acknowledgments | ||||
The drive to create HIP came to being after attending the MALLOC | The drive to create HIP came to being after attending the MALLOC | |||
meeting at IETF 43. Baiju Patel and Hilarie Orman really gave the | meeting at the 43rd IETF meeting. Baiju Patel and Hilarie Orman | |||
original author, Bob Moskowitz, the assist to get HIP beyond 5 | really gave the original author, Bob Moskowitz, the assist to get HIP | |||
paragraphs of ideas. It has matured considerably since the early | beyond 5 paragraphs of ideas. It has matured considerably since the | |||
drafts thanks to extensive input from IETFers. Most importantly, its | early drafts thanks to extensive input from IETFers. Most | |||
design goals are articulated and are different from other efforts in | importantly, its design goals are articulated and are different from | |||
this direction. Particular mention goes to the members of the | other efforts in this direction. Particular mention goes to the | |||
NameSpace Research Group of the IRTF. Noel Chiappa provided the | members of the NameSpace Research Group of the IRTF. Noel Chiappa | |||
framework for LSIs and Keith Moore the impetus to provide | provided the framework for LSIs and Keith Moore the impetus to | |||
resolvability. Steve Deering provided encouragement to keep working, | provide resolvability. Steve Deering provided encouragement to keep | |||
as a solid proposal can act as a proof of ideas for a research group. | working, as a solid proposal can act as a proof of ideas for a | |||
research group. | ||||
Many others contributed; extensive security tips were provided by | Many others contributed; extensive security tips were provided by | |||
Steve Bellovin. Rob Austein kept the DNS parts on track. Paul Kocher | Steve Bellovin. Rob Austein kept the DNS parts on track. Paul | |||
taught Bob Moskowitz how to make the cookie exchange expensive for | Kocher taught Bob Moskowitz how to make the cookie exchange expensive | |||
the Initiator to respond, but easy for the Responder to validate. | for the Initiator to respond, but easy for the Responder to validate. | |||
Bill Sommerfeld supplied the Birthday concept to simplify reboot | Bill Sommerfeld supplied the Birthday concept, which later evolved | |||
management. Rodney Thayer and Hugh Daniels provide extensive | into the R1 generation counter, to simplify reboot management. | |||
feedback. In the early times of this draft, John Gilmore kept Bob | Rodney Thayer and Hugh Daniels provide extensive feedback. In the | |||
Moskowitz challenged to provide something of value. | early times of this draft, John Gilmore kept Bob Moskowitz challenged | |||
to provide something of value. | ||||
During the later stages of this document, when the editing baton was | During the later stages of this document, when the editing baton was | |||
transfered to Pekka Nikander, the input from the early implementors | transfered to Pekka Nikander, the input from the early implementors | |||
were invaluable. Without having actual implementations, this | were invaluable. Without having actual implementations, this | |||
document would not be on the level it is now. | document would not be on the level it is now. | |||
In the usual IETF fashion, a large number of people have contributed | In the usual IETF fashion, a large number of people have contributed | |||
to the actual text or ideas. The list of these people include Jeff | to the actual text or ideas. The list of these people include Jeff | |||
Ahrenholz, Francis Dupont, Derek Fawcus, George Gross, Andrew | Ahrenholz, Francis Dupont, Derek Fawcus, George Gross, Andrew | |||
McGregor, Julien Laganier, Miika Komu, Mika Kousa, Jan Melen, Henrik | McGregor, Julien Laganier, Miika Komu, Mika Kousa, Jan Melen, Henrik | |||
Petander, Michael Richardson, Tim Shepard, Jorma Wall, and Jukka | Petander, Michael Richardson, Tim Shepard, Jorma Wall, and Jukka | |||
Ylitalo. Our apologies to anyone who's name is missing. | Ylitalo. Our apologies to anyone whose name is missing. | |||
16. References | Once the HIP Working Group was founded in early 2004, a number of | |||
changes were introduced through the working group process. Most | ||||
notably, the original draft was split in two, one containing the base | ||||
exchange and the other one defining how to use ESP. | ||||
16.1 Normative references | 15. References | |||
15.1 Normative references | ||||
[1] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August | [1] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August | |||
1980. | 1980. | |||
[2] Postel, J., "Internet Control Message Protocol", STD 5, RFC | [2] Postel, J., "Internet Control Message Protocol", STD 5, | |||
792, September 1981. | RFC 792, September 1981. | |||
[3] Mockapetris, P., "Domain names - implementation and | [3] Mockapetris, P., "Domain names - implementation and | |||
specification", STD 13, RFC 1035, November 1987. | specification", STD 13, RFC 1035, November 1987. | |||
[4] Conta, A. and S. Deering, "Internet Control Message Protocol | [4] Conta, A. and S. Deering, "Internet Control Message Protocol | |||
(ICMPv6) for the Internet Protocol Version 6 (IPv6)", RFC 1885, | (ICMPv6) for the Internet Protocol Version 6 (IPv6)", RFC 1885, | |||
December 1995. | December 1995. | |||
[5] Bradner, S., "Key words for use in RFCs to Indicate Requirement | [5] Bradner, S., "Key words for use in RFCs to Indicate Requirement | |||
Levels", BCP 14, RFC 2119, March 1997. | Levels", BCP 14, RFC 2119, March 1997. | |||
skipping to change at page 90, line 44 | skipping to change at page 84, line 44 | |||
[9] Orman, H., "The OAKLEY Key Determination Protocol", RFC 2412, | [9] Orman, H., "The OAKLEY Key Determination Protocol", RFC 2412, | |||
November 1998. | November 1998. | |||
[10] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher Algorithms", | [10] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher Algorithms", | |||
RFC 2451, November 1998. | RFC 2451, November 1998. | |||
[11] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) | [11] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) | |||
Specification", RFC 2460, December 1998. | Specification", RFC 2460, December 1998. | |||
[12] Eastlake, D., "Domain Name System Security Extensions", RFC | [12] Eastlake, D., "Domain Name System Security Extensions", | |||
2535, March 1999. | RFC 2535, March 1999. | |||
[13] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System | [13] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System | |||
(DNS)", RFC 2536, March 1999. | (DNS)", RFC 2536, March 1999. | |||
[14] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name | [14] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name | |||
System (DNS)", RFC 3110, May 2001. | System (DNS)", RFC 3110, May 2001. | |||
[15] Housley, R., Polk, W., Ford, W. and D. Solo, "Internet X.509 | [15] Housley, R., Polk, W., Ford, W. and D. Solo, "Internet X.509 | |||
Public Key Infrastructure Certificate and Certificate | Public Key Infrastructure Certificate and Certificate | |||
Revocation List (CRL) Profile", RFC 3280, April 2002. | Revocation List (CRL) Profile", RFC 3280, April 2002. | |||
[16] Draves, R., "Default Address Selection for Internet Protocol | [16] Draves, R., "Default Address Selection for Internet Protocol | |||
version 6 (IPv6)", RFC 3484, February 2003. | version 6 (IPv6)", RFC 3484, February 2003. | |||
[17] Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6) | [17] Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6) | |||
Addressing Architecture", RFC 3513, April 2003. | Addressing Architecture", RFC 3513, April 2003. | |||
[18] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) | [18] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) | |||
Diffie-Hellman groups for Internet Key Exchange (IKE)", RFC | Diffie-Hellman groups for Internet Key Exchange (IKE)", | |||
3526, May 2003. | RFC 3526, May 2003. | |||
[19] Kent, S., "IP Encapsulating Security Payload (ESP)", | [19] Kent, S., "IP Encapsulating Security Payload (ESP)", | |||
draft-ietf-ipsec-esp-v3-05 (work in progress), April 2003. | Internet-Draft draft-ietf-ipsec-esp-v3-05, April 2003. | |||
[20] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", | [20] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", | |||
draft-ietf-ipsec-ikev2-07 (work in progress), April 2003. | Internet-Draft draft-ietf-ipsec-ikev2-07, April 2003. | |||
[21] Moskowitz, R., "Host Identity Protocol Architecture", | [21] Moskowitz, R., "Host Identity Protocol Architecture", | |||
draft-moskowitz-hip-arch-03 (work in progress), May 2003. | Internet-Draft draft-moskowitz-hip-arch-03, May 2003. | |||
[22] NIST, "FIPS PUB 180-1: Secure Hash Standard", April 1995. | [22] NIST, "FIPS PUB 180-1: Secure Hash Standard", April 1995. | |||
16.2 Informative references | [23] Jokela, P., Moskowitz, R. and P. Nikander, "Using ESP transport | |||
format with HIP", Internet-Draft draft-jokela-hip-esp-00, | ||||
January 2005. | ||||
[23] Bellovin, S. and W. Aiello, "Just Fast Keying (JFK)", | 15.2 Informative references | |||
draft-ietf-ipsec-jfk-04 (work in progress), July 2002. | ||||
[24] Moskowitz, R. and P. Nikander, "Using Domain Name System (DNS) | [24] Bellovin, S. and W. Aiello, "Just Fast Keying (JFK)", | |||
with Host Identity Protocol (HIP)", draft-nikander-hip-dns-00 | Internet-Draft draft-ietf-ipsec-jfk-04, July 2002. | |||
(to be issued) (work in progress), June 2003. | ||||
[25] Nikander, P., "SPI assisted NAT traversal (SPINAT) with Host | [25] Moskowitz, R. and P. Nikander, "Using Domain Name System (DNS) | |||
Identity Protocol (HIP)", draft-nikander-hip-nat-00 (to be | with Host Identity Protocol (HIP)", | |||
issued) (work in progress), June 2003. | Internet-Draft draft-nikander-hip-dns-00 (to be issued), June | |||
2003. | ||||
[26] Crosby, SA. and DS. Wallach, "Denial of Service via Algorithmic | [26] Nikander, P., "SPI assisted NAT traversal (SPINAT) with Host | |||
Identity Protocol (HIP)", | ||||
Internet-Draft draft-nikander-hip-nat-00 (to be issued), June | ||||
2003. | ||||
[27] Crosby, SA. and DS. Wallach, "Denial of Service via Algorithmic | ||||
Complexity Attacks", in Proceedings of Usenix Security | Complexity Attacks", in Proceedings of Usenix Security | |||
Symposium 2003, Washington, DC., August 2003. | Symposium 2003, Washington, DC., August 2003. | |||
[27] Nikander, P., "A Bound End-to-End Tunnel (BEET) mode for ESP", | [28] Nikander, P., "A Bound End-to-End Tunnel (BEET) mode for ESP", | |||
draft-nikander-esp-beet-mode-00 (expired) (work in progress), | Internet-Draft draft-nikander-esp-beet-mode-00 (expired), Oct | |||
Oct 2003. | 2003. | |||
[29] Henderson, T., "Using HIP with Legacy Applications", | ||||
Internet-Draft draft-henderson-hip-applications-00.txt, Feb | ||||
2005. | ||||
Authors' Addresses | Authors' Addresses | |||
Robert Moskowitz | Robert Moskowitz | |||
ICSAlabs, a Division of TruSecure Corporation | ICSAlabs, a Division of TruSecure Corporation | |||
1000 Bent Creek Blvd, Suite 200 | 1000 Bent Creek Blvd, Suite 200 | |||
Mechanicsburg, PA | Mechanicsburg, PA | |||
USA | USA | |||
EMail: rgm@icsalabs.com | Email: rgm@icsalabs.com | |||
Pekka Nikander | Pekka Nikander | |||
Ericsson Research NomadicLab | Ericsson Research NomadicLab | |||
JORVAS FIN-02420 | JORVAS FIN-02420 | |||
FINLAND | FINLAND | |||
Phone: +358 9 299 1 | Phone: +358 9 299 1 | |||
EMail: pekka.nikander@nomadiclab.com | Email: pekka.nikander@nomadiclab.com | |||
Petri Jokela | Petri Jokela | |||
Ericsson Research NomadicLab | Ericsson Research NomadicLab | |||
JORVAS FIN-02420 | JORVAS FIN-02420 | |||
FINLAND | FINLAND | |||
Phone: +358 9 299 1 | Phone: +358 9 299 1 | |||
EMail: petri.jokela@nomadiclab.com | Email: petri.jokela@nomadiclab.com | |||
Thomas R. Henderson | Thomas R. Henderson | |||
The Boeing Company | The Boeing Company | |||
P.O. Box 3707 | P.O. Box 3707 | |||
Seattle, WA | Seattle, WA | |||
USA | USA | |||
EMail: thomas.r.henderson@boeing.com | Email: thomas.r.henderson@boeing.com | |||
Appendix A. API issues | ||||
The following text is informational and may be expanded upon or | ||||
revised in a separate Informational document. | ||||
HIP may be used to support application data transfers in one of three | ||||
ways: | ||||
the application may be HIP-aware and may explicitly use a | ||||
HIP-based API and/or resolver library; | ||||
the application may not be HIP-aware but may be provided with HITs | ||||
or LSIs in place of IP addresses as part of the address resolution | ||||
process; and | ||||
the application may or may not be HIP-aware and may present IP | ||||
addresses to the system, but the system may decide to | ||||
opportunistically invoke HIP or use a pre-existing HIP-based SA on | ||||
its behalf. | ||||
The first case is the most straightforward. The HIP-based API is | ||||
outside the scope of this document. | ||||
The second case is one way to provide HIP support to non-HIP-aware | ||||
applications. HITs may be stored in the DNS or some other | ||||
infrastructure, and the resolver library may choose to supply a | ||||
querying application with a HIT or LSI in place of an IP address. | ||||
Note that if the application truly needs IP addresses for a domain | ||||
name for some reason (e.g., a diagnostic application, or for use in a | ||||
referral scenario to a non-HIP-based host), blindly providing HITs or | ||||
LSIs in place of actual IP addresses may cause some applications to | ||||
break. | ||||
In both of the first two cases, the means whereby a system can | ||||
resolve an LSI or HIT to an IP address, when such a mapping is not | ||||
locally cached in the system, is outside the scope of this document. | ||||
In the third case, the system is explicitly invoking HIP to a | ||||
particular destination IP address on the basis of a local policy | ||||
decision. This approach resembles the way that opportunistic IPsec | ||||
works. Effectively, this approach is implicitly associating IP | ||||
addresses with host identities, and is prone to certain failures or | ||||
ambiguity in an environment where IP addresses are dynamic (e.g., an | ||||
application connects to an IP address, the peer host moves at some | ||||
later time, then another host acquires the old IP address, and the | ||||
system again receives a request to connect to that IP address, in | ||||
which case it is ambiguous whether the application wants to connect | ||||
to the host previously at that IP address or the new host at that | ||||
address). | ||||
If HIP is used to support an application, the application data stream | ||||
may contain either IP addresses or LSIs or HITs in place of the IP | ||||
addresses. | ||||
Historically, the first two bits of a HIT were used to differentiate | ||||
between Type 1, Type 2, and IPv6 address formats. This was changed | ||||
in October 2004, when the Working Group decided that all (currently | ||||
defined) HITs are 128-bit long. Hence, a Type 1 HIT consists of 128 | ||||
bits of the SHA-1 hash of the public key, and a Type 2 HIT consists | ||||
of a 64-bits long HAA field, followed by a 64-bits of the SHA-1 hash. | ||||
[The format of the HAA field is left undefined in this document.] | ||||
In this document, we additionally define an internal IPv6-compatible | ||||
LSI representation format, to be used within the legacy | ||||
IPv6-compatible API (e.g., socket over AF_INET6). The format of | ||||
these IPv6-compatible LSIs is designed to avoid the most commonly | ||||
occurring IPv6 addresses in RFC3596 [9]. An IPv6-compatible LSI | ||||
representation of a HIT can be easily computed by replacing the first | ||||
TBDth bits of the HIT by the TBD bits long prefix "0xTBD". | ||||
Accordingly, this specification also RECOMMENDS that conforming | ||||
implementations ignore the TBD prefix bits when comparing HITs for | ||||
equality; see Section 3.1. | ||||
Appendix B. Probabilities of HIT collisions | Appendix A. Probabilities of HIT collisions | |||
The birthday paradox sets a bound for the expectation of collisions. | The birthday paradox sets a bound for the expectation of collisions. | |||
It is based on the square root of the number of values. A 64-bit | It is based on the square root of the number of values. A 64-bit | |||
hash, then, would put the chances of a collision at 50-50 with 2^32 | hash, then, would put the chances of a collision at 50-50 with 2^32 | |||
hosts (4 billion). A 1% chance of collision would occur in a | hosts (4 billion). A 1% chance of collision would occur in a | |||
population of 640M and a .001% collision chance in a 20M population. | population of 640M and a .001% collision chance in a 20M population. | |||
A 128 bit hash will have the same .001% collision chance in a 9x10^16 | A 128 bit hash will have the same .001% collision chance in a 9x10^16 | |||
population. | population. | |||
Appendix C. Probabilities in the cookie calculation | Appendix B. Probabilities in the cookie calculation | |||
A question: Is it guaranteed that the Initiator is able to solve the | A question: Is it guaranteed that the Initiator is able to solve the | |||
puzzle in this way when the K value is large? | puzzle in this way when the K value is large? | |||
Answer: No, it is not guaranteed. But it is not guaranteed even in | Answer: No, it is not guaranteed. But it is not guaranteed even in | |||
the old mechanism, since the Initiator may start far away from J and | the old mechanism, since the Initiator may start far away from J and | |||
arrive to J after far too many steps. If we wanted to make sure that | arrive to J after far too many steps. If we wanted to make sure that | |||
the Initiator finds a value, we would need to give some hint of a | the Initiator finds a value, we would need to give some hint of a | |||
suitable J, and I don't think we want to do that. | suitable J, and I don't think we want to do that. | |||
In general, if we model the hash function with a random function, the | In general, if we model the hash function with a random function, the | |||
probability that one iteration gives are result with K zero bits is | probability that one iteration gives are result with K zero bits is | |||
2^-K. Thus, the probability that one iteration does *not* give K | 2^-K. Thus, the probability that one iteration does _not_ give K | |||
zero bits is (1 - 2^-K). Consequently, the probability that 2^K | zero bits is (1 - 2^-K). Consequently, the probability that 2^K | |||
iterations does not give K zero bits is (1 - 2^-K)^(2^K). | iterations does not give K zero bits is (1 - 2^-K)^(2^K). | |||
Since my calculus starts to be rusty, I made a small experiment and | Since my calculus starts to be rusty, I made a small experiment and | |||
found out that | found out that | |||
lim (1 - 2^-k)^(2^k) = 0.36788 | lim (1 - 2^-k)^(2^k) = 0.36788 | |||
k->inf | k->inf | |||
lim (1 - 2^-k)^(2^(k+1)) = 0.13534 | lim (1 - 2^-k)^(2^(k+1)) = 0.13534 | |||
skipping to change at page 97, line 5 | skipping to change at page 89, line 5 | |||
lim (1 - 2^-k)^(2^(k+3)) = 0.000335 | lim (1 - 2^-k)^(2^(k+3)) = 0.000335 | |||
k->inf | k->inf | |||
Thus, if hash functions were random functions, we would need about | Thus, if hash functions were random functions, we would need about | |||
2^(K+3) iterations to make sure that the probability of a failure is | 2^(K+3) iterations to make sure that the probability of a failure is | |||
less than 1% (actually less than 0.04%). Now, since my perhaps | less than 1% (actually less than 0.04%). Now, since my perhaps | |||
flawed understanding of hash functions is that they are "flatter" | flawed understanding of hash functions is that they are "flatter" | |||
than random functions, 2^(K+3) is probably an overkill. OTOH, the | than random functions, 2^(K+3) is probably an overkill. OTOH, the | |||
currently suggested 2^K is clearly too little. | currently suggested 2^K is clearly too little. | |||
Appendix D. Using responder cookies | Appendix C. Using responder cookies | |||
As mentioned in Section 4.1.1, the Responder may delay state creation | As mentioned in Section 4.1.1, the Responder may delay state creation | |||
and still reject most spoofed I2s by using a number of pre-calculated | and still reject most spoofed I2s by using a number of pre-calculated | |||
R1s and a local selection function. This appendix defines one | R1s and a local selection function. This appendix defines one | |||
possible implementation in detail. The purpose of this appendix is | possible implementation in detail. The purpose of this appendix is | |||
to give the implementors an idea on how to implement the mechanism. | to give the implementors an idea on how to implement the mechanism. | |||
The method described in this appendix SHOULD NOT be used in any real | The method described in this appendix SHOULD NOT be used in any real | |||
implementation. If the implementation is based on this appendix, it | implementation. If the implementation is based on this appendix, it | |||
SHOULD contain some local modification that makes an attacker's task | SHOULD contain some local modification that makes an attacker's task | |||
harder. | harder. | |||
skipping to change at page 100, line 5 | skipping to change at page 92, line 5 | |||
changes in the HITs. Checking the HITs is not that essential, | changes in the HITs. Checking the HITs is not that essential, | |||
though, since HITs are included in the cookie computation, too. | though, since HITs are included in the cookie computation, too. | |||
The effectivity of the method can be varied by varying the size of | The effectivity of the method can be varied by varying the size of | |||
the array containing pre-computed R1s. If the array is large, the | the array containing pre-computed R1s. If the array is large, the | |||
probability that an I2 with a spoofed IP address or HIT happens to | probability that an I2 with a spoofed IP address or HIT happens to | |||
map to the same slot is fairly slow. However, a large array means | map to the same slot is fairly slow. However, a large array means | |||
that each R1 has a fairly long life time, thereby allowing an | that each R1 has a fairly long life time, thereby allowing an | |||
attacker to utilize one solved puzzle for a longer time. | attacker to utilize one solved puzzle for a longer time. | |||
Appendix E. Running HIP over IPv4 UDP | Appendix D. Example checksums for HIP packets | |||
In the IPv4 world, with the deployed NAT devices, it may make sense | ||||
to run HIP over UDP. When running HIP over UDP, the following packet | ||||
structure is used. The structure is followed by the HITs, as usual. | ||||
Both the Source and Destination port MUST be 272. | ||||
0 1 2 3 | ||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\ | ||||
| Source port | Destination port | \ | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >UDP | ||||
| Length | Checksum | / | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+< | ||||
| HIP Controls | HIP pkt Type | Ver. | Res. | >HIP | ||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ | ||||
It is currently undefined how the actual data transfer, using ESP, is | ||||
handled. Plain ESP may not go through all NAT devices. | ||||
It is currently FORBIDDEN to use this packet format with IPv6. | ||||
Appendix F. Example checksums for HIP packets | ||||
The HIP checksum for HIP packets is specified in Section 6.1.2. | The HIP checksum for HIP packets is specified in Section 6.1.2. | |||
Checksums for TCP and UDP packets running over HIP-enabled security | Checksums for TCP and UDP packets running over HIP-enabled security | |||
associations are specified in Section 3.5. The examples below use IP | associations are specified in Section 3.5. The examples below use IP | |||
addresses of 192.168.0.1 and 192.168.0.2 (and their respective | addresses of 192.168.0.1 and 192.168.0.2 (and their respective | |||
IPv4-compatible IPv6 formats), and type 1 HITs with the first two | IPv4-compatible IPv6 formats), and type 1 HITs with the first two | |||
bits "01" followed by 124 zeroes followed by a decimal 1 or 2, | bits "01" followed by 124 zeroes followed by a decimal 1 or 2, | |||
respectively. | respectively. | |||
F.1 IPv6 HIP example (I1) | D.1 IPv6 HIP example (I1) | |||
Source Address: ::c0a8:0001 | Source Address: ::c0a8:0001 | |||
Destination Address: ::c0a8:0002 | Destination Address: ::c0a8:0002 | |||
Upper-Layer Packet Length: 40 0x28 | Upper-Layer Packet Length: 40 0x28 | |||
Next Header: 99 0x63 | Next Header: 99 0x63 | |||
Payload Protocol: 59 0x3b | Payload Protocol: 59 0x3b | |||
Header Length: 4 0x04 | Header Length: 4 0x04 | |||
Packet Type: 1 0x01 | Packet Type: 1 0x01 | |||
Version: 1 0x1 | Version: 1 0x1 | |||
Reserved: 0 0x0 | Reserved: 0 0x0 | |||
Control: 0 0x0000 | Control: 0 0x0000 | |||
Checksum: 49672 0xc208 | Checksum: 49672 0xc208 | |||
Sender's HIT: 4000::0001 | Sender's HIT: 4000::0001 | |||
Receiver's HIT: 4000::0002 | Receiver's HIT: 4000::0002 | |||
F.2 IPv4 HIP packet (I1) | D.2 IPv4 HIP packet (I1) | |||
The IPv4 checksum value for the same example I1 packet is the same as | The IPv4 checksum value for the same example I1 packet is the same as | |||
the IPv6 checksum (since the checksums due to the IPv4 and IPv6 | the IPv6 checksum (since the checksums due to the IPv4 and IPv6 | |||
pseudo-header components are the same). | pseudo-header components are the same). | |||
F.3 TCP segment | D.3 TCP segment | |||
Regardless of whether IPv6 or IPv4 is used, the TCP and UDP sockets | Regardless of whether IPv6 or IPv4 is used, the TCP and UDP sockets | |||
use the IPv6 pseudo-header format [8], with the HITs used in place of | use the IPv6 pseudo-header format [8], with the HITs used in place of | |||
the IPv6 addresses. | the IPv6 addresses. | |||
Sender's HIT: 4000::0001 | Sender's HIT: 4000::0001 | |||
Receiver's HIT: 4000::0002 | Receiver's HIT: 4000::0002 | |||
Upper-Layer Packet Length: 20 0x14 | Upper-Layer Packet Length: 20 0x14 | |||
Next Header: 6 0x06 | Next Header: 6 0x06 | |||
Source port: 32769 0x8001 | Source port: 32769 0x8001 | |||
Destination port: 22 0x0016 | Destination port: 22 0x0016 | |||
Sequence number: 1 0x00000001 | Sequence number: 1 0x00000001 | |||
Acknowledgment number: 0 0x00000000 | Acknowledgment number: 0 0x00000000 | |||
Header length: 20 0x14 | Header length: 20 0x14 | |||
Flags: SYN 0x02 | Flags: SYN 0x02 | |||
Window size: 5840 0x16d0 | Window size: 5840 0x16d0 | |||
Checksum: 54519 0xd4f7 | Checksum: 54519 0xd4f7 | |||
Urgent pointer: 0 0x0000 | Urgent pointer: 0 0x0000 | |||
Appendix G. 384-bit group | Appendix E. 384-bit group | |||
This 384-bit group is defined only to be used with HIP. NOTE: The | This 384-bit group is defined only to be used with HIP. NOTE: The | |||
security level of this group is very low! The encryption may be | security level of this group is very low! The encryption may be | |||
broken in a very short time, even real-time. It should be used only | broken in a very short time, even real-time. It should be used only | |||
when the host is not powerful enough (e.g. some PDAs) and when | when the host is not powerful enough (e.g. some PDAs) and when | |||
security requirements are low (e.g. during normal web surfing). | security requirements are low (e.g. during normal web surfing). | |||
This prime is: 2^384 - 2^320 - 1 + 2^64 * { [ 2^254 pi] + 5857 } | This prime is: 2^384 - 2^320 - 1 + 2^64 * { [ 2^254 pi] + 5857 } | |||
Its hexadecimal value is: | Its hexadecimal value is: | |||
skipping to change at page 104, line 13 | skipping to change at page 95, line 13 | |||
The generator is: 2. | The generator is: 2. | |||
Intellectual Property Statement | Intellectual Property Statement | |||
The IETF takes no position regarding the validity or scope of any | The IETF takes no position regarding the validity or scope of any | |||
Intellectual Property Rights or other rights that might be claimed to | Intellectual Property Rights or other rights that might be claimed to | |||
pertain to the implementation or use of the technology described in | pertain to the implementation or use of the technology described in | |||
this document or the extent to which any license under such rights | this document or the extent to which any license under such rights | |||
might or might not be available; nor does it represent that it has | might or might not be available; nor does it represent that it has | |||
made any independent effort to identify any such rights. Information | made any independent effort to identify any such rights. Information | |||
on the IETF's procedures with respect to rights in IETF Documents can | on the procedures with respect to rights in RFC documents can be | |||
be found in BCP 78 and BCP 79. | found in BCP 78 and BCP 79. | |||
Copies of IPR disclosures made to the IETF Secretariat and any | Copies of IPR disclosures made to the IETF Secretariat and any | |||
assurances of licenses to be made available, or the result of an | assurances of licenses to be made available, or the result of an | |||
attempt made to obtain a general license or permission for the use of | attempt made to obtain a general license or permission for the use of | |||
such proprietary rights by implementers or users of this | such proprietary rights by implementers or users of this | |||
specification can be obtained from the IETF on-line IPR repository at | specification can be obtained from the IETF on-line IPR repository at | |||
http://www.ietf.org/ipr. | http://www.ietf.org/ipr. | |||
The IETF invites any interested party to bring to its attention any | The IETF invites any interested party to bring to its attention any | |||
copyrights, patents or patent applications, or other proprietary | copyrights, patents or patent applications, or other proprietary | |||
skipping to change at page 104, line 41 | skipping to change at page 95, line 41 | |||
This document and the information contained herein are provided on an | This document and the information contained herein are provided on an | |||
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS | |||
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET | OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET | |||
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, | ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, | |||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE | INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE | |||
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED | INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED | |||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | |||
Copyright Statement | Copyright Statement | |||
Copyright (C) The Internet Society (2004). This document is subject | Copyright (C) The Internet Society (2005). This document is subject | |||
to the rights, licenses and restrictions contained in BCP 78, and | to the rights, licenses and restrictions contained in BCP 78, and | |||
except as set forth therein, the authors retain all their rights. | except as set forth therein, the authors retain all their rights. | |||
Acknowledgment | Acknowledgment | |||
Funding for the RFC Editor function is currently provided by the | Funding for the RFC Editor function is currently provided by the | |||
Internet Society. | Internet Society. | |||
End of changes. | ||||
This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/ |