draft-ietf-hip-base-06.txt   draft-ietf-hip-base-07.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: December 17, 2006 Corporation Intended status: Informational Corporation
P. Nikander Expires: August 5, 2007 P. Nikander
P. Jokela (editor) P. Jokela (editor)
Ericsson Research NomadicLab Ericsson Research NomadicLab
T. Henderson T. Henderson
The Boeing Company The Boeing Company
June 15, 2006 February 1, 2007
Host Identity Protocol Host Identity Protocol
draft-ietf-hip-base-06 draft-ietf-hip-base-07
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware 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 becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
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 Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 39 skipping to change at page 1, line 39
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 The list of current Internet-Drafts can be accessed at
http://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 December 17, 2006. This Internet-Draft will expire on August 5, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The Internet Society (2007).
Abstract Abstract
This memo specifies the details of the Host Identity Protocol (HIP). This memo specifies the details of the Host Identity Protocol (HIP).
HIP allows consenting hosts to securely establish and maintain shared HIP allows consenting hosts to securely establish and maintain shared
IP-layer state, allowing separation of the identifier and locator IP-layer state, allowing separation of the identifier and locator
roles of IP addresses, thereby enabling continuity of communications roles of IP addresses, thereby enabling continuity of communications
across IP address changes. HIP is based on a Sigma-compliant Diffie- across IP address changes. HIP is based on a Sigma-compliant Diffie-
Hellman key exchange, using public-key identifiers from a new Host Hellman key exchange, using public-key identifiers from a new Host
Identity name space for mutual peer authentication. The protocol is Identity name space for mutual peer authentication. The protocol is
designed to be resistant to Denial-of-Service (DoS) and Man-in-the- designed to be resistant to Denial-of-Service (DoS) and Man-in-the-
middle (MitM) attacks, and when used together with another suitable middle (MitM) attacks, and when used together with another suitable
security protocol, such as Encapsulated Security Payload (ESP), it security protocol, such as Encapsulated Security Payload (ESP), it
provides integrity protection and optional encryption for upper layer provides integrity protection and optional encryption for upper layer
protocols, suchs as TCP and UDP. Discussion related to this document protocols, suchs as TCP and UDP.
is going on at the IETF HIP Working Group mailing list.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1. A New Name Space and Identifiers . . . . . . . . . . . . 5 1.1. A New Name Space and Identifiers . . . . . . . . . . . . 5
1.2. The HIP Base Exchange . . . . . . . . . . . . . . . . . . 6 1.2. The HIP Base Exchange . . . . . . . . . . . . . . . . . . 6
1.3. Memo structure . . . . . . . . . . . . . . . . . . . . . 6 1.3. Memo structure . . . . . . . . . . . . . . . . . . . . . 7
2. Terms and Definitions . . . . . . . . . . . . . . . . . . . . 8 2. Terms and Definitions . . . . . . . . . . . . . . . . . . . . 8
2.1. Requirements Terminology . . . . . . . . . . . . . . . . 8 2.1. Requirements Terminology . . . . . . . . . . . . . . . . 8
2.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3. Definitions . . . . . . . . . . . . . . . . . . . . . . . 8 2.3. Definitions . . . . . . . . . . . . . . . . . . . . . . . 8
3. Host Identifier (HI) and its Representations . . . . . . . . 10 3. Host Identifier (HI) and its Representations . . . . . . . . 10
3.1. Host Identity Tag (HIT) . . . . . . . . . . . . . . . . . 10 3.1. Host Identity Tag (HIT) . . . . . . . . . . . . . . . . . 10
3.2. Generating a HIT from a HI . . . . . . . . . . . . . . . 11 3.2. Generating a HIT from a HI . . . . . . . . . . . . . . . 11
4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 12 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 12
4.1. Creating a HIP Association . . . . . . . . . . . . . . . 12 4.1. Creating a HIP Association . . . . . . . . . . . . . . . 12
4.1.1. HIP Puzzle Mechanism . . . . . . . . . . . . . . . . 13 4.1.1. HIP Puzzle Mechanism . . . . . . . . . . . . . . . . 13
skipping to change at page 3, line 6 skipping to change at page 3, line 10
4.5.1. TCP and UDP Pseudo-header Computation for User Data . 30 4.5.1. TCP and UDP Pseudo-header Computation for User Data . 30
4.5.2. Sending Data on HIP Packets . . . . . . . . . . . . . 30 4.5.2. Sending Data on HIP Packets . . . . . . . . . . . . . 30
4.5.3. Transport Formats . . . . . . . . . . . . . . . . . . 30 4.5.3. Transport Formats . . . . . . . . . . . . . . . . . . 30
4.5.4. Reboot and SA Timeout Restart of HIP . . . . . . . . 30 4.5.4. Reboot and SA Timeout Restart of HIP . . . . . . . . 30
4.6. Certificate Distribution . . . . . . . . . . . . . . . . 31 4.6. Certificate Distribution . . . . . . . . . . . . . . . . 31
5. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 32 5. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 32
5.1. Payload Format . . . . . . . . . . . . . . . . . . . . . 32 5.1. Payload Format . . . . . . . . . . . . . . . . . . . . . 32
5.1.1. Checksum . . . . . . . . . . . . . . . . . . . . . . 33 5.1.1. Checksum . . . . . . . . . . . . . . . . . . . . . . 33
5.1.2. HIP Controls . . . . . . . . . . . . . . . . . . . . 33 5.1.2. HIP Controls . . . . . . . . . . . . . . . . . . . . 33
5.1.3. HIP Fragmentation Support . . . . . . . . . . . . . . 34 5.1.3. HIP Fragmentation Support . . . . . . . . . . . . . . 34
5.2. HIP Parameters . . . . . . . . . . . . . . . . . . . . . 34 5.2. HIP Parameters . . . . . . . . . . . . . . . . . . . . . 35
5.2.1. TLV Format . . . . . . . . . . . . . . . . . . . . . 36 5.2.1. TLV Format . . . . . . . . . . . . . . . . . . . . . 37
5.2.2. Defining New Parameters . . . . . . . . . . . . . . . 37 5.2.2. Defining New Parameters . . . . . . . . . . . . . . . 39
5.2.3. R1_COUNTER . . . . . . . . . . . . . . . . . . . . . 38 5.2.3. R1_COUNTER . . . . . . . . . . . . . . . . . . . . . 40
5.2.4. PUZZLE . . . . . . . . . . . . . . . . . . . . . . . 39 5.2.4. PUZZLE . . . . . . . . . . . . . . . . . . . . . . . 41
5.2.5. SOLUTION . . . . . . . . . . . . . . . . . . . . . . 40 5.2.5. SOLUTION . . . . . . . . . . . . . . . . . . . . . . 42
5.2.6. DIFFIE_HELLMAN . . . . . . . . . . . . . . . . . . . 41 5.2.6. DIFFIE_HELLMAN . . . . . . . . . . . . . . . . . . . 43
5.2.7. HIP_TRANSFORM . . . . . . . . . . . . . . . . . . . . 42 5.2.7. HIP_TRANSFORM . . . . . . . . . . . . . . . . . . . . 44
5.2.8. HOST_ID . . . . . . . . . . . . . . . . . . . . . . . 43 5.2.8. HOST_ID . . . . . . . . . . . . . . . . . . . . . . . 45
5.2.9. HMAC . . . . . . . . . . . . . . . . . . . . . . . . 44 5.2.9. HMAC . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2.10. HMAC_2 . . . . . . . . . . . . . . . . . . . . . . . 45 5.2.10. HMAC_2 . . . . . . . . . . . . . . . . . . . . . . . 47
5.2.11. HIP_SIGNATURE . . . . . . . . . . . . . . . . . . . . 45 5.2.11. HIP_SIGNATURE . . . . . . . . . . . . . . . . . . . . 47
5.2.12. HIP_SIGNATURE_2 . . . . . . . . . . . . . . . . . . . 46 5.2.12. HIP_SIGNATURE_2 . . . . . . . . . . . . . . . . . . . 48
5.2.13. SEQ . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.2.13. SEQ . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2.14. ACK . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.2.14. ACK . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2.15. ENCRYPTED . . . . . . . . . . . . . . . . . . . . . . 48 5.2.15. ENCRYPTED . . . . . . . . . . . . . . . . . . . . . . 50
5.2.16. NOTIFY . . . . . . . . . . . . . . . . . . . . . . . 49 5.2.16. NOTIFICATION . . . . . . . . . . . . . . . . . . . . 51
5.2.17. ECHO_REQUEST . . . . . . . . . . . . . . . . . . . . 52 5.2.17. ECHO_REQUEST_SIGNED . . . . . . . . . . . . . . . . . 54
5.2.18. ECHO_RESPONSE . . . . . . . . . . . . . . . . . . . . 53 5.2.18. ECHO_REQUEST_UNSIGNED . . . . . . . . . . . . . . . . 55
5.3. HIP Packets . . . . . . . . . . . . . . . . . . . . . . . 53 5.2.19. ECHO_RESPONSE_SIGNED . . . . . . . . . . . . . . . . 55
5.3.1. I1 - the HIP Initiator Packet . . . . . . . . . . . . 54 5.2.20. ECHO_RESPONSE_UNSIGNED . . . . . . . . . . . . . . . 56
5.3.2. R1 - the HIP Responder Packet . . . . . . . . . . . . 55 5.3. HIP Packets . . . . . . . . . . . . . . . . . . . . . . . 56
5.3.3. I2 - the Second HIP Initiator Packet . . . . . . . . 56 5.3.1. I1 - the HIP Initiator Packet . . . . . . . . . . . . 57
5.3.4. R2 - the Second HIP Responder Packet . . . . . . . . 58 5.3.2. R1 - the HIP Responder Packet . . . . . . . . . . . . 58
5.3.5. UPDATE - the HIP Update Packet . . . . . . . . . . . 58 5.3.3. I2 - the Second HIP Initiator Packet . . . . . . . . 60
5.3.6. NOTIFY - the HIP Notify Packet . . . . . . . . . . . 59 5.3.4. R2 - the Second HIP Responder Packet . . . . . . . . 61
5.3.7. CLOSE - the HIP Association Closing Packet . . . . . 60 5.3.5. UPDATE - the HIP Update Packet . . . . . . . . . . . 62
5.3.8. CLOSE_ACK - the HIP Closing Acknowledgment Packet . . 60 5.3.6. NOTIFY - the HIP Notify Packet . . . . . . . . . . . 63
5.4. ICMP Messages . . . . . . . . . . . . . . . . . . . . . . 60 5.3.7. CLOSE - the HIP Association Closing Packet . . . . . 63
5.4.1. Invalid Version . . . . . . . . . . . . . . . . . . . 61 5.3.8. CLOSE_ACK - the HIP Closing Acknowledgment Packet . . 64
5.4. ICMP Messages . . . . . . . . . . . . . . . . . . . . . . 64
5.4.1. Invalid Version . . . . . . . . . . . . . . . . . . . 65
5.4.2. Other Problems with the HIP Header and Packet 5.4.2. Other Problems with the HIP Header and Packet
Structure . . . . . . . . . . . . . . . . . . . . . . 61 Structure . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3. Invalid Puzzle Solution . . . . . . . . . . . . . . . 61 5.4.3. Invalid Puzzle Solution . . . . . . . . . . . . . . . 65
5.4.4. Non-existing HIP Association . . . . . . . . . . . . 61 5.4.4. Non-existing HIP Association . . . . . . . . . . . . 65
6. Packet Processing . . . . . . . . . . . . . . . . . . . . . . 63 6. Packet Processing . . . . . . . . . . . . . . . . . . . . . . 66
6.1. Processing Outgoing Application Data . . . . . . . . . . 63 6.1. Processing Outgoing Application Data . . . . . . . . . . 66
6.2. Processing Incoming Application Data . . . . . . . . . . 64 6.2. Processing Incoming Application Data . . . . . . . . . . 67
6.3. Solving the Puzzle . . . . . . . . . . . . . . . . . . . 65 6.3. Solving the Puzzle . . . . . . . . . . . . . . . . . . . 68
6.4. HMAC and SIGNATURE Calculation and Verification . . . . . 66 6.4. HMAC and SIGNATURE Calculation and Verification . . . . . 69
6.4.1. HMAC Calculation . . . . . . . . . . . . . . . . . . 66 6.4.1. HMAC Calculation . . . . . . . . . . . . . . . . . . 69
6.4.2. Signature Calculation . . . . . . . . . . . . . . . . 67 6.4.2. Signature Calculation . . . . . . . . . . . . . . . . 70
6.5. HIP KEYMAT Generation . . . . . . . . . . . . . . . . . . 68 6.5. HIP KEYMAT Generation . . . . . . . . . . . . . . . . . . 71
6.6. Initiation of a HIP Exchange . . . . . . . . . . . . . . 69 6.6. Initiation of a HIP Exchange . . . . . . . . . . . . . . 72
6.6.1. Sending Multiple I1s in Parallel . . . . . . . . . . 70 6.6.1. Sending Multiple I1s in Parallel . . . . . . . . . . 73
6.6.2. Processing Incoming ICMP Protocol Unreachable 6.6.2. Processing Incoming ICMP Protocol Unreachable
Messages . . . . . . . . . . . . . . . . . . . . . . 71 Messages . . . . . . . . . . . . . . . . . . . . . . 74
6.7. Processing Incoming I1 Packets . . . . . . . . . . . . . 71 6.7. Processing Incoming I1 Packets . . . . . . . . . . . . . 74
6.7.1. R1 Management . . . . . . . . . . . . . . . . . . . . 72 6.7.1. R1 Management . . . . . . . . . . . . . . . . . . . . 75
6.7.2. Handling Malformed Messages . . . . . . . . . . . . . 72 6.7.2. Handling Malformed Messages . . . . . . . . . . . . . 75
6.8. Processing Incoming R1 Packets . . . . . . . . . . . . . 72 6.8. Processing Incoming R1 Packets . . . . . . . . . . . . . 76
6.8.1. Handling Malformed Messages . . . . . . . . . . . . . 75 6.8.1. Handling Malformed Messages . . . . . . . . . . . . . 78
6.9. Processing Incoming I2 Packets . . . . . . . . . . . . . 75 6.9. Processing Incoming I2 Packets . . . . . . . . . . . . . 78
6.9.1. Handling Malformed Messages . . . . . . . . . . . . . 77 6.9.1. Handling Malformed Messages . . . . . . . . . . . . . 80
6.10. Processing Incoming R2 Packets . . . . . . . . . . . . . 77 6.10. Processing Incoming R2 Packets . . . . . . . . . . . . . 80
6.11. Sending UPDATE Packets . . . . . . . . . . . . . . . . . 78 6.11. Sending UPDATE Packets . . . . . . . . . . . . . . . . . 81
6.12. Receiving UPDATE Packets . . . . . . . . . . . . . . . . 79 6.12. Receiving UPDATE Packets . . . . . . . . . . . . . . . . 82
6.12.1. Handling a SEQ parameter in a received UPDATE 6.12.1. Handling a SEQ parameter in a received UPDATE
message . . . . . . . . . . . . . . . . . . . . . . . 80 message . . . . . . . . . . . . . . . . . . . . . . . 83
6.12.2. Handling an ACK Parameter in a Received UPDATE 6.12.2. Handling an ACK Parameter in a Received UPDATE
Packet . . . . . . . . . . . . . . . . . . . . . . . 80 Packet . . . . . . . . . . . . . . . . . . . . . . . 83
6.13. Processing NOTIFY Packets . . . . . . . . . . . . . . . . 81 6.13. Processing NOTIFY Packets . . . . . . . . . . . . . . . . 84
6.14. Processing CLOSE Packets . . . . . . . . . . . . . . . . 81 6.14. Processing CLOSE Packets . . . . . . . . . . . . . . . . 84
6.15. Processing CLOSE_ACK Packets . . . . . . . . . . . . . . 81 6.15. Processing CLOSE_ACK Packets . . . . . . . . . . . . . . 84
6.16. Dropping HIP Associations . . . . . . . . . . . . . . . . 81 6.16. Dropping HIP Associations . . . . . . . . . . . . . . . . 85
7. HIP Policies . . . . . . . . . . . . . . . . . . . . . . . . 83 7. HIP Policies . . . . . . . . . . . . . . . . . . . . . . . . 86
8. Security Considerations . . . . . . . . . . . . . . . . . . . 84 8. Security Considerations . . . . . . . . . . . . . . . . . . . 87
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 87 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 90
10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 92 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 92
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 93 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 93
11.1. Normative References . . . . . . . . . . . . . . . . . . 93 11.1. Normative References . . . . . . . . . . . . . . . . . . 93
11.2. Informative References . . . . . . . . . . . . . . . . . 94 11.2. Informative References . . . . . . . . . . . . . . . . . 94
Appendix A. Using Responder Puzzles . . . . . . . . . . . . . . 96 Appendix A. Using Responder Puzzles . . . . . . . . . . . . . . 96
Appendix B. Generating a Public Key Encoding from a HI . . . . . 97 Appendix B. Generating a Public Key Encoding from a HI . . . . . 98
Appendix C. Example Checksums for HIP Packets . . . . . . . . . 98 Appendix C. Example Checksums for HIP Packets . . . . . . . . . 99
C.1. IPv6 HIP Example (I1) . . . . . . . . . . . . . . . . . . 98 C.1. IPv6 HIP Example (I1) . . . . . . . . . . . . . . . . . . 99
C.2. IPv4 HIP Packet (I1) . . . . . . . . . . . . . . . . . . 98 C.2. IPv4 HIP Packet (I1) . . . . . . . . . . . . . . . . . . 99
C.3. TCP Segment . . . . . . . . . . . . . . . . . . . . . . . 98 C.3. TCP Segment . . . . . . . . . . . . . . . . . . . . . . . 99
Appendix D. 384-bit Group . . . . . . . . . . . . . . . . . . . 100 Appendix D. 384-bit Group . . . . . . . . . . . . . . . . . . . 101
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 101 Appendix E. OAKLEY Well-known group 1 . . . . . . . . . . . . . 102
Intellectual Property and Copyright Statements . . . . . . . . . 102 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 103
Intellectual Property and Copyright Statements . . . . . . . . . 104
1. Introduction 1. Introduction
This memo specifies the details of the Host Identity Protocol (HIP). This memo specifies the details of the Host Identity Protocol (HIP).
A high-level description of the protocol and the underlying A high-level description of the protocol and the underlying
architectural thinking is available in the separate HIP architecture architectural thinking is available in the separate HIP architecture
description [26]. Briefly, the HIP architecture proposes an description [I-D.ietf-hip-arch]. Briefly, the HIP architecture
alternative to the dual use of IP addresses as "locators" (routing proposes an alternative to the dual use of IP addresses as "locators"
labels) and "identifiers" (endpoint, or host, identifiers). In HIP, (routing labels) and "identifiers" (endpoint, or host, identifiers).
public cryptographic keys, of a public/private key pair, are used as In HIP, public cryptographic keys, of a public/private key pair, are
Host Identifiers, to which higher layer protocols are bound instead used as Host Identifiers, to which higher layer protocols are bound
of an IP address. By using public keys (and their representations) instead of an IP address. By using public keys (and their
as host identifiers, dynamic changes to IP address sets can be representations) as host identifiers, dynamic changes to IP address
directly authenticated between hosts and if desired, strong sets can be directly authenticated between hosts and if desired,
authentication between hosts at the TCP/IP stack level can be strong authentication between hosts at the TCP/IP stack level can be
obtained. obtained.
This memo specifies the base HIP protocol ("base exchange") used This memo specifies the base HIP protocol ("base exchange") used
between hosts to establish an IP-layer communications context, called between hosts to establish an IP-layer communications context, called
HIP association, prior to communications. It also defines a packet HIP association, prior to communications. It also defines a packet
format and procedures for updating an active HIP association. Other format and procedures for updating an active HIP association. Other
elements of the HIP architecture are specified in other documents, elements of the HIP architecture are specified in other documents,
including how HIP can be combined with a variant of the Encapsulating such as.
Security Payload (ESP) for integrity protection and optional
encryption, mobility and multi-homing extensions to HIP, extensions o "Using ESP transport format with HIP" [I-D.ietf-hip-esp]: how to
to the Domain Name System (DNS) for storing Host Identities there, use Encapsulating Security Payload (ESP) for integrity protection
proposals on added HIP-related infrastructure into the networks, and and optional encryption
techniques for NAT traversal.
o "End-Host Mobility and Multihoming with the Host Identity
Protocol" [I-D.ietf-hip-mm]: how to support mobility and
multihoming in HIP
o "Host Identity Protocol (HIP) Domain Name System (DNS) Extensions"
[I-D.ietf-hip-dns]: how to extend DNS to contain Host Identity
information
o "Host Identity Protocol (HIP) Rendezvous Extension"
[I-D.ietf-hip-rvs]: using a rendezvous mechanism to contact mobile
HIP hosts
1.1. A New Name Space and Identifiers 1.1. A New Name Space and Identifiers
The Host Identity Protocol introduces a new name space, the Host The Host Identity Protocol introduces a new name space, the Host
Identity name space. Some ramifications of this new namespace are Identity name space. Some ramifications of this new namespace are
explained in the HIP architecture description [26]. explained in the HIP architecture description [I-D.ietf-hip-arch].
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 use as a packet identifier, or as an 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. The HIT has an important security property in that it is hosts. The HIT has an important security property in that it is
self-certifying (see Section 3). self-certifying (see Section 3).
1.2. The HIP Base Exchange 1.2. The HIP Base Exchange
The HIP base exchange is a two-party cryptographic protocol used to The HIP base exchange is a two-party cryptographic protocol used to
establish communications context between hosts. The base exchange is establish communications context between hosts. The base exchange is
a Sigma-compliant [30] four packet exchange. The first party is a Sigma-compliant [KRA03] four packet exchange. The first party is
called the Initiator and the second party the Responder. The four- called the Initiator and the second party the Responder. The four-
packet design helps to make HIP DoS resilient. The protocol packet design helps to make HIP DoS resilient. The protocol
exchanges Diffie-Hellman keys in the 2nd and 3rd packets, and exchanges Diffie-Hellman keys in the 2nd and 3rd packets, and
authenticates the parties in the 3rd and 4th packets. Additionally, authenticates the parties in the 3rd and 4th packets. Additionally,
the Responder starts a puzzle exchange in the 2nd packet, with the the Responder starts a puzzle exchange in the 2nd packet, with the
Initiator completing it in the 3rd packet before the Responder stores Initiator completing it in the 3rd packet before the Responder stores
any state from the exchange. any state from the exchange.
The exchange can use the Diffie-Hellman output to encrypt the Host The exchange can use the Diffie-Hellman output to encrypt the Host
Identity of the Initiator in packet 3 (although Aura et al. [29] Identity of the Initiator in packet 3 (although Aura et al. [AUR03]
notes that such operation may interfere with packet-inspecting notes that such operation may interfere with packet-inspecting
middleboxes), or the Host Identity may instead be sent unencrypted. middleboxes), or the Host Identity may instead be sent unencrypted.
The Responder's Host Identity is not protected. It should be noted, The Responder's Host Identity is not protected. It should be noted,
however, that both the Initiator's and the Responder's HITs are however, that both the Initiator's and the Responder's HITs are
transported as such (in cleartext) in the packets, allowing an transported as such (in cleartext) in the packets, allowing an
eavesdropper with a priori knowledge about the parties to verify eavesdropper with a priori knowledge about the parties to verify
their identities. their identities.
Data packets start to flow after the 4th packet. The 3rd and 4th HIP Data packets start to flow after the 4th packet. The 3rd and 4th HIP
packets may carry a data payload in the future. However, the details packets may carry a data payload in the future. However, the details
of this are to be defined later as more implementation experience is of this are to be defined later as more implementation experience is
gained. gained.
An existing HIP association can be updated using the update mechanism An existing HIP association can be updated using the update mechanism
defined in this document, and when the association is no longer defined in this document, and when the association is no longer
needed, it can be closed using the defined closing mechanism. needed, it can be closed using the defined closing mechanism.
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, to be used with Encapsulated Security Payload establishment protocol, to be used with Encapsulated Security Payload
(ESP) [24] and other end-to-end security protocols. The base (ESP) [I-D.ietf-hip-esp] and other end-to-end security protocols.
protocol lacks the details for security association management and The base protocol does not cover all the fine-grained policy control
much of the fine-grained policy control found in Internet Key found in Internet Key Exchange IKE RFC2409 [RFC2409] that allows IKE
Exchange IKE RFC2409 [7] that allows IKE to support complex gateway to support complex gateway policies. Thus, HIP is not a replacement
policies. Thus, HIP is not a replacement for IKE. for IKE.
1.3. Memo structure 1.3. Memo structure
The rest of this memo is structured as follows. Section 2 defines The rest of this memo is structured as follows. Section 2 defines
the central keywords, notation, and terms used throughout the rest of the central keywords, notation, and terms used throughout the rest of
the document. Section 3 defines the structure of the Host Identity the document. Section 3 defines the structure of the Host Identity
and its various representations. Section 4 gives an overview of the and its various representations. Section 4 gives an overview of the
HIP base exchange protocol. Section 5 and Section 6 define the HIP base exchange protocol. Section 5 and Section 6 define the
detail packet formats and rules for packet processing. Finally, detail packet formats and rules for packet processing. Finally,
Section 7, Section 8, and Section 9 discuss policy, security, and Section 7, Section 8, and Section 9 discuss policy, security, and
IANA considerations, respectively. IANA considerations, respectively.
2. Terms and Definitions 2. Terms and Definitions
2.1. Requirements Terminology 2.1. Requirements Terminology
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 [RFC2119].
2.2. Notation 2.2. Notation
[x] indicates that x is optional. [x] indicates that x is optional.
{x} indicates that x is encrypted. {x} indicates that x is encrypted.
X(y) indicates that y is a parameter of X. X(y) indicates that y is a parameter of X.
<x>i indicates that x exists i times. <x>i indicates that x exists i times.
skipping to change at page 8, line 44 skipping to change at page 8, line 44
Unused Association Lifetime (UAL): Implementation-specific time for Unused Association Lifetime (UAL): Implementation-specific time for
which, if no packet is sent or received for this time interval, a which, if no packet is sent or received for this time interval, a
host MAY begin to tear down an active association. host MAY begin to tear down an active association.
Maximum Segment Lifetime (MSL): Maximum time that a TCP segment is Maximum Segment Lifetime (MSL): Maximum time that a TCP segment is
expected to spend in the network. expected to spend in the network.
Exchange Complete (EC): Time that the host spends at the R2-SENT Exchange Complete (EC): Time that the host spends at the R2-SENT
before it moves to ESTABLISHED state. The time is n * I2 before it moves to ESTABLISHED state. The time is n * I2
retransmission timeout, where n ~ I2_RETRIES_MAX. retransmission timeout, where n is about I2_RETRIES_MAX.
HIT Hash Algorithm: hash algorithm used to generate a Host Identity HIT Hash Algorithm: hash algorithm used to generate a Host Identity
Tag (HIT) from the Host Identity public key. Currently SHA-1 [25] Tag (HIT) from the Host Identity public key. Currently SHA-1
is used. [FIPS95] is used.
Responder's HIT Hash Algorithm (RHASH): hash algorithm used for Responder's HIT Hash Algorithm (RHASH): hash algorithm used for
various hash calculations in this document. The algorithm is the various hash calculations in this document. The algorithm is the
same as is used to generate the Responder's HIT. RHASH can be same as is used to generate the Responder's HIT. RHASH can be
determined by inspecting the Prefix of the ORCHID (HIT). The determined by inspecting the Prefix of the ORCHID (HIT). The
Prefix value has a one-to-one mapping to a hash function. Prefix value has a one-to-one mapping to a hash function.
Opportunistic mode: HIP base exchange where the Responder's HIT is Opportunistic mode: HIP base exchange where the Responder's HIT is
not a priori known to the Initiator. not a priori known to the Initiator.
3. Host Identifier (HI) and its Representations 3. Host Identifier (HI) and its Representations
In this section, the properties of the Host Identifier and Host In this section, the properties of the Host Identifier and Host
Identifier Tag are discussed, and the exact format for them is Identifier Tag are discussed, and the exact format for them is
defined. In HIP, public key of an asymmetric key pair is used as the defined. In HIP, public key of an asymmetric key pair is used as the
Host Identifier (HI). Correspondingly, the host itself is defined as Host Identifier (HI). Correspondingly, the host itself is defined as
the entity that holds the private key from the key pair. See the HIP the entity that holds the private key from the key pair. See the HIP
architecture specification [26] for more details about the difference architecture specification [I-D.ietf-hip-arch] for more details about
between an identity and the corresponding identifier. the difference between an identity and the corresponding identifier.
HIP implementations MUST support the Rivest Shamir Adelman (RSA) [15] HIP implementations MUST support the Rivest Shamir Adelman (RSA/SHA1)
public key algorithm, and SHOULD support the Digital Signature [RFC3110] public key algorithm, and SHOULD support the Digital
Algorithm (DSA) [13] algorithm; other algorithms MAY be supported. Signature Algorithm (DSA) [RFC2536] algorithm; other algorithms MAY
be supported.
A hashed encoding of the HI, the Host Identity Tag (HIT), is used in A hashed encoding of the HI, the Host Identity Tag (HIT), is used in
protocols to represent the Host Identity. The HIT is 128 bits long protocols to represent the Host Identity. The HIT is 128 bits long
and has the following three key properties: i) it is the same length and has the following three key properties: i) it is the same length
as an IPv6 address and can be used in address-sized fields in APIs as an IPv6 address and can be used in address-sized fields in APIs
and protocols, ii) it is self-certifying (i.e., given a HIT, it is and protocols, ii) it is self-certifying (i.e., given a HIT, it is
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.
Carrying HIs and HITs in the header of user data packets would Carrying HIs and HITs in the header of user data packets would
increase the overhead of packets. Thus, it is not expected that they increase the overhead of packets. Thus, it is not expected that they
are carried in every packet, but other methods are used to map the are carried in every packet, but other methods are used to map the
data packets to the corresponding HIs. In some cases, this makes it data packets to the corresponding HIs. In some cases, this makes it
possible to use HIP without any additional headers in the user data possible to use HIP without any additional headers in the user data
packets. For example, if ESP is used to protect data traffic, the packets. For example, if ESP is used to protect data traffic, the
Security Parameter Index (SPI) carried in the ESP header, can be used Security Parameter Index (SPI) carried in the ESP header can be used
to map the encrypted data packet to the correct HIP association. to map the encrypted data packet to the correct HIP association.
3.1. Host Identity Tag (HIT) 3.1. Host Identity Tag (HIT)
The Host Identity Tag is a 128 bits long value -- a hashed encoding The Host Identity Tag is a 128 bits long value -- a hashed encoding
of the Host Identifier. There are two advantages of using a hashed of the Host Identifier. There are two advantages of using a hashed
encoding over the actual Host Identity public key in protocols. encoding over the actual Host Identity public key in protocols.
Firstly, its fixed length makes for easier protocol coding and also Firstly, its fixed length makes for easier protocol coding and also
better manages the packet size cost of this technology. Secondly, it better manages the packet size cost of this technology. Secondly, it
presents a consistent format to the protocol whatever underlying presents a consistent format to the protocol whatever underlying
identity technology is used. identity technology is used.
"An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers "An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers
(ORCHID)" [22] has been specified to store 128-bit hash based (ORCHID)" [I-D.laganier-ipv6-khi] has been specified to store 128-bit
identifier called Overlay Routable Cryptographic Hash Identifiers hash based identifier called Overlay Routable Cryptographic Hash
(ORCHID) under an 28-bit prefix, proposed to be allocated from the Identifiers (ORCHID) under a prefix, proposed to be allocated from
IPv6 address block as defined in [22]. The Host Identity Tag is a the IPv6 address block as defined in [I-D.laganier-ipv6-khi]. The
type of ORCHID, based on a SHA1 hash of the host identity (Section 2 Host Identity Tag is a type of ORCHID, based on a SHA-1 hash of the
of [22]. host identity (Section 2 of [I-D.laganier-ipv6-khi]).
3.2. Generating a HIT from a HI 3.2. Generating a HIT from a HI
The HIT MUST be generated according to the ORCHID generation method The HIT MUST be generated according to the ORCHID generation method
described in [22] using a context ID value of 0xF0EF F02F BFF4 3D0F described in [I-D.laganier-ipv6-khi] using a context ID value of
E793 0C3C 6E61 74EA (this tag value has been generated randomly by 0xF0EF F02F BFF4 3D0F E793 0C3C 6E61 74EA (this tag value has been
the editor of this specification), and an input encoding the Host generated randomly by the editor of this specification), and an input
Identity field (see Section 5.2.8) present in a HIP payload packet. encoding the Host Identity field (see Section 5.2.8) present in a HIP
payload packet. The hash algorithm SHA-1 has to be used when
generating HITs with this context ID. If a new ORCHID hash algorithm
is needed in the future for HIT generation, a new version of HIP has
to be specified with a new ORCHID context ID associated with the new
hash algorithm.
For Identities that are either RSA or DSA public keys, this input For Identities that are either RSA or DSA public keys, this input
consists of the public key encoding as specified in the corresponding consists of the public key encoding as specified in the corresponding
DNSSEC document, taking the algorithm specific portion of the RDATA DNSSEC document, taking the algorithm specific portion of the RDATA
part of the KEY RR. There is currently only two defined public key part of the KEY RR. There is currently only two defined public key
algorithms: RSA and DSA. Hence, either of the following applies: algorithms: RSA/SHA1 and DSA. Hence, either of the following
applies:
The RSA public key is encoded as defined in RFC3110 [15] Section The RSA public key is encoded as defined in RFC3110 [RFC3110]
2, taking the exponent length (e_len), exponent (e) and modulus Section 2, taking the exponent length (e_len), exponent (e) and
(n) fields concatenated. The length (n_len) of the modulus (n) modulus (n) fields concatenated. The length (n_len) of the
can be determined from the total HI Length and the preceding HI modulus (n) can be determined from the total HI Length and the
fields including the exponent (e). Thus, the data to be hashed preceding HI fields including the exponent (e). Thus, the data to
has the same length as the HI. The fields MUST be encoded in be hashed has the same length as the HI. The fields MUST be
network byte order, as defined in RFC3110 [15]. encoded in network byte order, as defined in RFC3110 [RFC3110].
The DSA public key is encoded as defined in RFC2536 [13] Section The DSA public key is encoded as defined in RFC2536 [RFC2536]
2, taking the fields T, Q, P, G, and Y, concatenated. Thus, the Section 2, taking the fields T, Q, P, G, and Y, concatenated.
data to be hashed is 1 + 20 + 3 * 64 + 3 * 8 * T octets long, Thus, the data to be hashed is 1 + 20 + 3 * 64 + 3 * 8 * T octets
where T is the size parameter as defined in RFC2536 [13]. The long, where T is the size parameter as defined in RFC2536
size parameter T, affecting the field lengths, MUST be selected as [RFC2536]. The size parameter T, affecting the field lengths,
the minimum value that is long enough to accommodate P, G, and Y. MUST be selected as the minimum value that is long enough to
The fields MUST be encoded in network byte order, as defined in accommodate P, G, and Y. The fields MUST be encoded in network
RFC2536 [13]. byte order, as defined in RFC2536 [RFC2536].
In Appendix B the public key encoding generation process is In Appendix B the public key encoding generation process is
illustrated using pseudo-code. illustrated using pseudo-code.
4. Protocol Overview 4. Protocol Overview
The following material is an overview of the HIP protocol operation, The following material is an overview of the HIP protocol operation,
and does not contain all details of the packet formats or the packet and does not contain all details of the packet formats or the packet
processing steps. Section 5 and Section 6 describe in more detail processing steps. Section 5 and Section 6 describe in more detail
the packet formats and packet processing steps, respectively, and are the packet formats and packet processing steps, respectively, and are
normative in case of any conflicts with this section. normative in case of any conflicts with this section.
The protocol number for Host Identity Protocol will be assigned by The protocol number for Host Identity Protocol will be assigned by
IANA. For testing purposes, the protocol number 253 is currently IANA. For testing purposes, the protocol number 253 is currently
used. This number has been reserved by IANA for experimental use used. This number has been reserved by IANA for experimental use
(see [19]). (see [RFC3692]).
The HIP payload (Section 5.1) header could be carried in every IP The HIP payload (Section 5.1) header could be carried in every IP
datagram. However, since HIP headers are relatively large (40 datagram. However, since HIP headers are relatively large (40
bytes), it is desirable to 'compress' the HIP header so that the HIP bytes), it is desirable to 'compress' the HIP header so that the HIP
header only occurs in control packets used to establish or change HIP header only occurs in control packets used to establish or change HIP
association state. The actual method for header 'compression' and association state. The actual method for header 'compression' and
for matching data packets with existing HIP associations (if any) is for matching data packets with existing HIP associations (if any) is
defined in separate documents, describing transport formats and defined in separate documents, describing transport formats and
methods. All HIP implementations MUST implement, at minimum, the ESP methods. All HIP implementations MUST implement, at minimum, the ESP
transport format for HIP [24]. transport format for HIP [I-D.ietf-hip-esp].
4.1. Creating a HIP Association 4.1. Creating a HIP Association
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.
The HIP base 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. The first packet, I1, between an Initiator and a Responder. The first packet, I1,
initiates the exchange, and the last three packets, R1, I2, and R2, initiates the exchange, and the last three packets, R1, I2, and R2,
constitute a standard authenticated Diffie-Hellman key exchange for constitute an authenticated Diffie-Hellman [DIF76] key exchange for
session key generation. During the Diffie-Hellman key exchange, a session key generation. During the Diffie-Hellman key exchange, a
piece of keying material is generated. The HIP association keys are piece of keying material is generated. The HIP association keys are
drawn from this keying material. If other cryptographic 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 needed, e.g., to be used with ESP, they are expected to be drawn from
the same keying material. 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. Note that in some cases it may HIT of the Responder, if it is known. Note that in some cases it may
be possible to replace this trigger packet by some other form of a be possible to replace this trigger packet by some other form of a
skipping to change at page 14, line 33 skipping to change at page 14, line 33
the Responder then later receives I2, it checks that the puzzle in the Responder then later receives I2, it checks that the puzzle in
the I2 matches with the puzzle sent in the R1, thereby making it the I2 matches with the puzzle 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 a viable approach may be to create though. Against such an attacker a viable approach may be to create
a piece of local state, and remember that the puzzle check has a piece of local state, and remember that the puzzle check has
previously failed. See Appendix A for one possible implementation. previously failed. See Appendix A for one possible implementation.
Implementations SHOULD include sufficient randomness to the algorithm Implementations SHOULD include sufficient randomness to the algorithm
so that algorithm complexity attacks become impossible [31]. so that algorithmic complexity attacks become impossible [CRO03].
The Responder can set the puzzle difficulty for Initiator, based on The Responder can set the puzzle difficulty for Initiator, based on
its level of trust of the Initiator. The Responder SHOULD use its level of trust of the Initiator. Because the puzzle is not
heuristics to determine when it is under a denial-of-service attack, included in the signature calculation, the Responder can use pre-
and set the puzzle difficulty value K appropriately; see below. calculated R1 packets and include the puzzle just before sending the
R1 to the Initiator. The Responder SHOULD use heuristics to
determine when it is under a denial-of-service attack, and set the
puzzle difficulty value K appropriately; see below.
4.1.2. Puzzle exchange 4.1.2. Puzzle exchange
The Responder starts the puzzle exchange when it receives an I1. The The Responder starts the puzzle 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 hash concatenation of I, the HITs of the parties, and J, and take a hash
over this concatenation using RHASH algorithm. The lowest order K over this concatenation using RHASH algorithm. The lowest order K
bits of the result MUST be zeros. The value K sets the difficulty of bits of the result MUST be zeros. The value K sets the difficulty of
the puzzle. the puzzle.
skipping to change at page 15, line 14 skipping to change at page 15, line 18
PUZZLE parameter (Section 5.2.4). The Responder needs to re-create PUZZLE parameter (Section 5.2.4). The Responder needs to re-create
the concatenation of I, the HITs, and the provided J, and compute the the concatenation of I, the HITs, and the provided J, and compute the
hash once to prove that the Initiator did its assigned task. hash once to prove that 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 A for an example on how to implement this. Appendix A for an example on how to implement this.
Using the Opaque data field in an ECHO_REQUEST parameter Using the Opaque data field in an ECHO_REQUEST_SIGNED
(Section 5.2.17), the Responder can include some data in R1 that the (Section 5.2.17) or in an ECHO_REQUEST_UNSIGNED parameters
(Section 5.2.18), the Responder can include some data in R1 that the
Initiator must copy unmodified in the corresponding I2 packet. The Initiator must copy unmodified in the corresponding I2 packet. The
Responder can generate the Opaque data in various ways; e.g. using Responder can generate the Opaque data in various ways; e.g. using
the sent I, some secret, and possibly other related data. Using this the sent I, some secret, and possibly other related data. Using this
same secret, received I in I2 packet and possible other data, the same secret, received I in I2 packet and possible other data, the
Receiver can verify that it has itself sent the I to the Initiator. Receiver can verify that it has itself sent the I to the Initiator.
The Responder MUST change such a secret periodically. The Responder MUST change such a secret periodically.
It is RECOMMENDED that the Responder generates a new puzzle and a new It is RECOMMENDED that the Responder generates a new puzzle 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 puzzle at least 2*lifetime seconds after Responder remembers an old puzzle 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 puzzle while limiting the usability that an old, solved to solve the puzzle while limiting the usability that an old, solved
puzzle has to an attacker. puzzle 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 to NOT include a timestamp. attacks. The decision was to NOT include a timestamp.
NOTE: The protocol developers explicitly considered whether a memory NOTE: The protocol developers explicitly considered whether a memory
bound function should be used for the puzzle instead of a CPU bound bound function should be used for the puzzle instead of a CPU bound
skipping to change at page 16, line 7 skipping to change at page 16, line 10
The packets R1, I2, and R2 implement a standard authenticated Diffie- The packets R1, I2, and R2 implement a standard authenticated Diffie-
Hellman exchange. The Responder sends one or two public Diffie- Hellman exchange. The Responder sends one or two public Diffie-
Hellman keys and its public authentication key, i.e., its host Hellman keys 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 gets one or two public Diffie- When the Initiator receives an R1, it gets one or two public Diffie-
Hellman values from the Responder. If there are two values, it Hellman values from the Responder. If there are two values, it
selects the value corresponding to the strongest supported Group ID. selects the value corresponding to the strongest supported Group ID
and computes the Diffie-Hellman session key. It creates a HIP and computes the Diffie-Hellman session key (Kij). It creates a HIP
association using keying material from the session key (see association using keying material from the session key (see
Section 6.5), and may use the association to encrypt its public Section 6.5), and may use the association to encrypt its public
authentication key, i.e., host identity. The resulting I2 contains authentication key, i.e., host identity. The resulting I2 contains
the Initiator's Diffie-Hellman key and its (optionally encrypted) the Initiator's Diffie-Hellman key and its (optionally encrypted)
public authentication key. The signature in I2 covers all of the public authentication key. The signature in I2 covers all of the
packet. 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 association, and decrypts the Initiator's public corresponding HIP association, and decrypts the Initiator's public
skipping to change at page 16, line 49 skipping to change at page 17, line 4
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 base SHOULD be kept across system reboots and invocations of the HIP base
exchange. This counter indicates the current generation of puzzles. exchange. This counter indicates the current generation of puzzles.
Implementations MUST accept puzzles from the current generation and Implementations MUST accept puzzles from the current generation and
MAY accept puzzles from earlier generations. A system's local MAY accept puzzles from earlier generations. A system's local
counter MUST be incremented at least as often as every time old R1s counter MUST be incremented at least as often as every time old R1s
cease to be valid, and SHOULD never be decremented, lest the host cease to be valid, and SHOULD never be decremented, lest the host
expose its peers to the replay of previously generated, higher expose its peers to the replay of previously generated, higher
numbered R1s. Also, the R1 generation counter MUST NOT roll over; if numbered R1s. The R1 counter SHOULD NOT roll over.
the counter is about to become exhausted, the corresponding 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 6.6.1) or due to a replay of an old R1. When sending I1s (Section 6.6.1) or due to a replay of an old R1. When sending
multiple I1s, an initiator SHOULD wait for a small amount of time multiple I1s, an initiator SHOULD wait for a small amount of time (a
after the first R1 reception to allow possibly multiple R1s to reasonable time may be 2 * expected RTT) after the first R1 reception
arrive, and it SHOULD respond to an R1 among the set with the largest to allow possibly multiple R1s to arrive, and it SHOULD respond to an
R1 generation counter. If an Initiator is processing an R1 or has R1 among the set with the largest R1 generation counter. If an
already sent an I2 (still waiting for R2) and it receives another R1 Initiator is processing an R1 or has already sent an I2 (still
with a larger R1 generation counter, it MAY elect to restart R1 waiting for R2) and it receives another R1 with a larger R1
processing with the fresher R1, as if it were the first R1 to arrive. generation counter, it MAY elect to restart R1 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.1.5. Refusing a HIP Exchange 4.1.5. Refusing a HIP Exchange
skipping to change at page 22, line 21 skipping to change at page 22, line 21
| | | | | |
| | If the local HIT is greater than the peer | | | If the local HIT is greater than the peer |
| | HIT, send R1 and stay at I1_SENT | | | HIT, send R1 and stay at I1_SENT |
| | | | | |
| Receive I2, process | If successful, send R2 and go to R2-SENT | | Receive I2, process | If successful, send R2 and go to R2-SENT |
| | | | | |
| | If fail, stay at I1-SENT | | | If fail, stay at I1-SENT |
| | | | | |
| Receive R1, process | If successful, send I2 and go to I2-SENT | | Receive R1, process | If successful, send I2 and go to I2-SENT |
| | | | | |
| | If fail, go to E-FAILED | | | If fail, stay at I1-SENT |
| | | | | |
| Receive ANYOTHER | Drop and stay at I1-SENT | | Receive ANYOTHER | Drop and stay at I1-SENT |
| | | | | |
| Timeout, increment | If counter is less than I1_RETRIES_MAX, | | Timeout, increment | If counter is less than I1_RETRIES_MAX, |
| timeout counter | send I1 and stay at I1-SENT | | timeout counter | send I1 and stay at I1-SENT |
| | | | | |
| | If counter is greater than I1_RETRIES_MAX, | | | If counter is greater than I1_RETRIES_MAX, |
| | go to E-FAILED | | | go to E-FAILED |
+---------------------+---------------------------------------------+ +---------------------+---------------------------------------------+
skipping to change at page 23, line 25 skipping to change at page 23, line 25
| Receive I2, process | If successful and local HIT is smaller than | | Receive I2, process | If successful and local HIT is smaller than |
| | the peer HIT, drop I2 and stay at I2-SENT | | | the peer HIT, drop I2 and stay at I2-SENT |
| | | | | |
| | If succesful and local HIT is greater than | | | If succesful and local HIT is greater than |
| | the peer HIT, send R2 and go to R2-SENT | | | the peer HIT, send R2 and go to R2-SENT |
| | | | | |
| | If fail, stay at I2-SENT | | | If fail, stay at I2-SENT |
| | | | | |
| Receive R2, process | If successful, go to ESTABLISHED | | Receive R2, process | If successful, go to ESTABLISHED |
| | | | | |
| | If fail, go to E-FAILED | | | If fail, stay at I2-SENT |
| | | | | |
| Receive ANYOTHER | Drop and stay at I2-SENT | | Receive ANYOTHER | Drop and stay at I2-SENT |
| | | | | |
| Timeout, increment | If counter is less than I2_RETRIES_MAX, | | Timeout, increment | If counter is less than I2_RETRIES_MAX, |
| timeout counter | send I2 and stay at I2-SENT | | timeout counter | send I2 and stay at I2-SENT |
| | | | | |
| | If counter is greater than I2_RETRIES_MAX, | | | If counter is greater than I2_RETRIES_MAX, |
| | go to E-FAILED | | | go to E-FAILED |
+---------------------+---------------------------------------------+ +---------------------+---------------------------------------------+
skipping to change at page 29, line 10 skipping to change at page 29, line 10
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. successfully authenticated or processed.
+-+ +---------------------------+ +-+ +---------------------------+
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 |---------------+ |
| +--------------+ | | Send I1 | +--------------+ | |
v | | v | |
+---------+ I2 received, send R2 | | +---------+ I2 received, send R2 | |
+---->| I1-SENT |---------------------------------------+ | | +---->| I1-SENT |---------------------------------------+ | |
| +---------+ | | | | +---------+ | | |
| | +------------------------+ | | | | | +------------------------+ | | |
| | 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 |<----+ |
| | +---------+ +---------+ | | | | +---------+ +---------+ | |
| | | | | | | | | | | |
| | | data| | | | | | data| | |
| |receive | or| | | | |receive | or| | |
| |R1, send | EC timeout| receive I2,| | | |R1, send | EC timeout| receive I2,| |
| |I2 |R2 received +--------------+ | send R2| | | |I2 |R2 received +--------------+ | send R2| |
| | +----------->| ESTABLISHED |<-------+| | | | | +----------->| ESTABLISHED |<-------+| | |
| | +--------------+ | | | | +--------------+ | |
| | | | | | | | | | | | receive I2, send R2 | |
| | +------------+ | +------------------------+ | | | recv+------------+ | +------------------------+ |
| | recv| | | | | | CLOSE,| | | |
| | CLOSE,| No packet sent| | | | | send| No packet sent| | |
| | send| /received for | | | | | CLOSE_ACK| /received for | timeout | |
| | CLOSE_ACK| UAL min, send | | | | | | UAL min, send | +---------+<-+ (UAL+MSL) | |
| | | CLOSE | +---------+<-+ timeout | | | | | CLOSE +--->| CLOSING |--+ retransmit | |
| | | +--->| CLOSING |--+ (UAL+MSL) | | | | | +---------+ CLOSE | |
| | | +---------+ retransmit | | +--|------------|----------------------+ | | | | | |
+--|------------|----------------------+ | | | | CLOSE | |
| +------------|------------------------+ | | +----------------+ | | +------------|------------------------+ | | +----------------+ |
| | | +-----------+ +------------------|--+ | | | +-----------+ +------------------|--+
| | +------------+ | receive CLOSE, CLOSE_ACK | | | | +------------+ | receive CLOSE, CLOSE_ACK | |
| | | | send CLOSE_ACK received or | | | | | | send CLOSE_ACK received or | |
| | v v timeout | | | | | | timeout | |
| | +--------+ (UAL+MSL) | | | | | | (UAL+MSL) | |
| | v v | |
| | +--------+ receive I2, send R2 | |
| +------------------------| CLOSED |---------------------------+ | | +------------------------| CLOSED |---------------------------+ |
+---------------------------+--------+------------------------------+ +---------------------------+--------+ /----------------------+
Datagram to send ^ | timeout (UAL+2MSL), Datagram to send, send I1 ^ | \-------/ timeout (UAL+2MSL),
+-+ move to UNASSOCIATED +-+ move to UNASSOCIATED
CLOSE received, CLOSE received, send CLOSE_ACK
send CLOSE_ACK
4.5. User Data Considerations 4.5. User Data Considerations
4.5.1. TCP and UDP Pseudo-header Computation for User Data 4.5.1. TCP and UDP Pseudo-header Computation for User Data
When computing TCP and UDP checksums on user data packets that flow When computing TCP and UDP checksums on user data packets that flow
through sockets bound to HITs, the IPv6 pseudo-header format [11] through sockets bound to HITs, the IPv6 pseudo-header format
MUST be used, even if the actual addresses on the packet are IPv4 [RFC2460] MUST be used, even if the actual addresses on the packet
addresses. Additionally, the HITs MUST be used in the place of the are IPv4 addresses. Additionally, the HITs MUST be used in the place
IPv6 addresses in the IPv6 pseudo-header. Note that the pseudo- of the IPv6 addresses in the IPv6 pseudo-header. Note that the
header for actual HIP payloads is computed differently; see pseudo-header for actual HIP payloads is computed differently; see
Section 5.1.1. Section 5.1.1.
4.5.2. Sending Data on HIP Packets 4.5.2. Sending Data on HIP Packets
A future version of this document may define how to include user data A future version of this document may define how to include user data
on various HIP packets. However, currently the HIP header is a on various HIP packets. However, currently the HIP header is a
terminal header, and not followed by any other headers. terminal header, and not followed by any other headers.
4.5.3. Transport Formats 4.5.3. Transport Formats
The actual data transmission format, used for user data after the HIP The actual data transmission format, used for user data after the HIP
base exchange, is not defined in this document. Such transport base exchange, is not defined in this document. Such transport
formats and methods are described in separate specifications. All formats and methods are described in separate specifications. All
HIP implementations MUST implement, at minimum, the ESP transport HIP implementations MUST implement, at minimum, the ESP transport
format for HIP [24]. format for HIP [I-D.ietf-hip-esp].
When new transport formats are defined, they get the type value from When new transport formats are defined, they get the type value from
the HIP Transform type value space 2048 - 4095. The order in which the HIP Transform type value space 2048 - 4095. The order in which
the transport formats are presented in the R1 packet, is the the transport formats are presented in the R1 packet, is the
preferred order. The last of the transport formats MUST be ESP preferred order. The last of the transport formats MUST be ESP
transport format, represented by the ESP_TRANSFORM parameter. transport format, represented by the ESP_TRANSFORM parameter.
4.5.4. Reboot and SA Timeout Restart of HIP 4.5.4. Reboot and SA Timeout Restart of HIP
Simulating a loss of state is a potential DoS attack. The following Simulating a loss of state is a potential DoS attack. The following
skipping to change at page 33, line 17 skipping to change at page 33, line 17
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.
The following three bits are reserved for future use. They MUST be The following three bits are reserved for future use. They MUST be
zero when sent, and they SHOULD be ignored when handling a received zero when sent, and they SHOULD be ignored when handling a received
packet. packet.
The two fixed bits in the header are reserved for potential SHIM6 The two fixed bits in the header are reserved for potential SHIM6
compatibility [27]. For implementations adhering (only) to this compatibility [I-D.ietf-shim6-proto]. For implementations adhering
specification, they MUST be set as shown when sending and MUST be (only) to this specification, they MUST be set as shown when sending
ignored when receiving. This is to ensure optimal forward and MUST be ignored when receiving. This is to ensure optimal
compatibility. Note that implementations that implement other forward compatibility. Note that implementations that implement
compatible specifications in addition to this specification, the other compatible specifications in addition to this specification,
corresponding rules may well be different. For example, in the case the corresponding rules may well be different. For example, in the
that the forthcoming SHIM6 protocol happens to be compatible with case that the forthcoming SHIM6 protocol happens to be compatible
this specification, an implementation that implements both this with this specification, an implementation that implements both this
specification and the SHIM6 protocol may need to check these bits in specification and the SHIM6 protocol may need to check these bits in
order to determine how to handle the packet. order to determine how to handle the packet.
The HIT fields are always 128 bits (16 bytes) long. The HIT fields are always 128 bits (16 bytes) long.
5.1.1. Checksum 5.1.1. Checksum
Since the checksum covers the source and destination addresses in the Since the checksum covers the source and destination addresses in the
IP header, it must be recomputed on HIP-aware NAT devies. IP header, it must be recomputed on HIP-aware NAT devies.
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 [RFC2460]
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 (see Section 4) in the Next Header field. The length field is number (see Section 4) in the Next Header field. The length field is
in bytes and can be calculated from the HIP header length field: (HIP in bytes and can be calculated from the HIP header length field: (HIP
Header Length + 1) * 8. 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 [RFC0768] is
In the pseudo header, the source and destination addresses are those used. In the pseudo header, the source and destination addresses are
used in the IP header, the zero field is obviously zero, the protocol those used in the IP header, the zero field is obviously zero, the
is the HIP protocol number (see Section 4), and the length is protocol is the HIP protocol number (see Section 4), and the length
calculated as in the IPv6 case. is calculated as in the IPv6 case.
5.1.2. HIP Controls 5.1.2. HIP Controls
The HIP Controls section conveys information about the structure of The HIP Controls section conveys information about the structure of
the packet and capabilities of the host. the packet and capabilities of the host.
The following fields have been defined: The following fields have been defined:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | |A| | | | | | | | | | | | | | | | |A|
skipping to change at page 34, line 42 skipping to change at page 34, line 42
In IPv4 networks, HIP packets may encounter low MTUs along their In IPv4 networks, 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 for path MTU discovery IP datagrams for a single HIP packet, support for path MTU discovery
does not bring any value to HIP in IPv4 networks. HIP-aware NAT does not bring any value to HIP in IPv4 networks. HIP-aware NAT
devices MUST perform any IPv4 reassembly/fragmentation. devices MUST perform any IPv4 reassembly/fragmentation.
All HIP implementations have to be careful while employing a All HIP implementations have to be careful while employing a
reassembly algorithm so that the algorithm is sufficiently resistant reassembly algorithm so that the algorithm is sufficiently resistant
to DoS attacks. to DoS attacks.
Because certificate chains can cause the packet to be fragmented and
fragmentation can open implementation to denial of service attacks
[KAU03], it is strongly recommended that the separate document
specifying the certificate usage in HIP Base Exchange defines the
usage of "Hash and URL" formats rather than including certificates in
exchanges. With this, most problems related to DoS attacks with
fragmentation can be avoided.
5.2. HIP Parameters 5.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 related security and other the sender's HIT, together with related security and other
information. They consist of ordered parameters, encoded in TLV information. They consist of ordered parameters, encoded in TLV
format. format.
The following parameter types are currently defined. The following parameter types are currently defined.
+------------------+-------+----------+-----------------------------+ +------------------------+-------+----------+-----------------------+
| TLV | Type | Length | Data | | TLV | Type | Length | Data |
+------------------+-------+----------+-----------------------------+ +------------------------+-------+----------+-----------------------+
| R1_COUNTER | 128 | 12 | System Boot Counter | | R1_COUNTER | 128 | 12 | System Boot Counter |
| | | | | | | | | |
| PUZZLE | 257 | 12 | K and Random #I | | PUZZLE | 257 | 12 | K and Random #I |
| | | | | | | | | |
| SOLUTION | 321 | 20 | K, Random #I and puzzle | | SOLUTION | 321 | 20 | K, Random #I and |
| | | | solution J | | | | | puzzle solution J |
| | | | | | | | | |
| SEQ | 385 | 4 | Update packet ID number | | SEQ | 385 | 4 | Update packet ID |
| | | | number |
| | | | | | | | | |
| ACK | 449 | variable | Update packet ID number | | ACK | 449 | variable | Update packet ID |
| | | | number |
| | | | | | | | | |
| DIFFIE_HELLMAN | 513 | variable | public key | | DIFFIE_HELLMAN | 513 | variable | public key |
| | | | | | | | | |
| HIP_TRANSFORM | 577 | variable | HIP Encryption and | | HIP_TRANSFORM | 577 | variable | HIP Encryption and |
| | | | Integrity Transform | | | | | Integrity Transform |
| | | | | | | | | |
| ENCRYPTED | 641 | variable | Encrypted part of I2 packet | | ENCRYPTED | 641 | variable | Encrypted part of I2 |
| | | | packet |
| | | | | | | | | |
| HOST_ID | 705 | variable | Host Identity with Fully | | HOST_ID | 705 | variable | Host Identity with |
| | | | Qualified Domain Name or | | | | | Fully Qualified |
| | | | NAI | | | | | Domain Name or NAI |
| | | | | | | | | |
| CERT | 768 | variable | HI Certificate; used to | | CERT | 768 | variable | HI Certificate; used |
| | | | transfer certificates. | | | | | to transfer |
| | | | Usage defined in a separate | | | | | certificates. Usage |
| | | | defined in a separate |
| | | | document. | | | | | document. |
| | | | | | | | | |
| NOTIFY | 832 | variable | Informational data | | NOTIFICATION | 832 | variable | Informational data |
| | | | | | | | | |
| ECHO_REQUEST | 897 | variable | Opaque data to be echoed | | ECHO_REQUEST_SIGNED | 897 | variable | Opaque data to be |
| | | | back; under signature | | | | | echoed back; under |
| | | | signature |
| | | | | | | | | |
| ECHO_RESPONSE | 961 | variable | Opaque data echoed back; | | ECHO_RESPONSE_SIGNED | 961 | variable | Opaque data echoed |
| | | | under signature | | | | | back; under signature |
| | | | | | | | | |
| HMAC | 61505 | variable | HMAC based message | | HMAC | 61505 | variable | HMAC based message |
| | | | authentication code, with | | | | | authentication code, |
| | | | key material from | | | | | with key material |
| | | | HIP_TRANSFORM | | | | | from HIP_TRANSFORM |
| | | | | | | | | |
| HMAC_2 | 61569 | variable | HMAC based message | | HMAC_2 | 61569 | variable | HMAC based message |
| | | | authentication code, with | | | | | authentication code, |
| | | | key material from | | | | | with key material |
| | | | HIP_TRANSFORM | | | | | from HIP_TRANSFORM. |
| | | | Compared to HMAC, the |
| | | | HOST_ID parameter is |
| | | | included in HMAC_2 |
| | | | calculation. |
| | | | | | | | | |
| HIP_SIGNATURE_2 | 61633 | variable | Signature of the R1 packet | | HIP_SIGNATURE_2 | 61633 | variable | Signature of the R1 |
| | | | packet |
| | | | | | | | | |
| HIP_SIGNATURE | 61697 | variable | Signature of the packet | | HIP_SIGNATURE | 61697 | variable | Signature of the |
| | | | packet |
| | | | | | | | | |
| ECHO_REQUEST | 63661 | variable | Opaque data to be echoed | | ECHO_REQUEST_UNSIGNED | 63661 | variable | Opaque data to be |
| | | | back; after signature | | | | | echoed back; after |
| | | | signature |
| | | | | | | | | |
| ECHO_RESPONSE | 63425 | variable | Opaque data echoed back; | | ECHO_RESPONSE_UNSIGNED | 63425 | variable | Opaque data echoed |
| | | | after signature | | | | | back; after signature |
+------------------+-------+----------+-----------------------------+ +------------------------+-------+----------+-----------------------+
Because the ordering (from lowest to highest) of HIP parameters is Because the ordering (from lowest to highest) of HIP parameters is
strictly enforced (see Section 5.2.1), the parameter type values for strictly enforced (see Section 5.2.1), the parameter type values for
existing parameters have been spaced to allow for future protocol existing parameters have been spaced to allow for future protocol
extensions. Parameters numbered between 0-1023 are used in HIP extensions. Parameters numbered between 0-1023 are used in HIP
handshake and update procedures and are covered by signatures. handshake and update procedures and are covered by signatures.
Parameters numbered between 1024-2047 are reserved. Parameters Parameters numbered between 1024-2047 are reserved. Parameters
numbered between 2048-4095 are used for parameters related to HIP numbered between 2048-4095 are used for parameters related to HIP
transform types. Parameters numbered between 4096 and (2^16 - 2^12) transform types. Parameters numbered between 4096 and (2^16 - 2^12)
61439 are reserved. Parameters numbered between 61440-62463 are used 61439 are reserved. Parameters numbered between 61440-62463 are used
skipping to change at page 36, line 37 skipping to change at page 37, line 49
rendezvous and other relaying services. Parameters numbered between rendezvous and other relaying services. Parameters numbered between
64512-65535 are reserved. 64512-65535 are reserved.
5.2.1. TLV Format 5.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, except for type values from 2048 to 4095 which fields in the packet, except for type values from 2048 to 4095 which
are reserved for new transport forms. The parameters MUST be are reserved for new transport forms. The parameters MUST be
included in the packet such that their types form an increasing included in the packet such that their types form an increasing
order. If the order does not follow this rule, the packet is order. If the parameter can exist multiple times in the packet, the
considered to be malformed and it MUST be discarded. type value may be the same in consecutive parameters. 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 Parameters using type values from 2048 up to 4095 are transport
formats. Currently, one transport format is defined: the ESP formats. Currently, one transport format is defined: the ESP
transport format [24]. The order of these parameters does not follow transport format [I-D.ietf-hip-esp]. The order of these parameters
the order of their type value, but they are put in the packet in does not follow the order of their type value, but they are put in
order of preference. The first of the transport formats it the most the packet in order of preference. The first of the transport
preferred, and so on. formats it the most preferred, and so on.
All of the TLV parameters have a length (including Type and Length All of 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.
padding is added, the Length field MUST NOT include the padding. Any Any added padding bytes MUST be zeroed by the sender, and their
added padding bytes MUST be zeroed by the sender, and their values values SHOULD NOT be checked by the receiver.
SHOULD NOT be checked by the receiver.
Consequently, the Length field indicates the length of the Contents Consequently, the Length field indicates the length of the Contents
field (in bytes). The total length of the TLV parameter (including field (in bytes). The total length of the TLV parameter (including
Type, Length, Contents, and Padding) is related to the Length field Type, Length, Contents, and Padding) is related to the Length field
according to the following formula: according to the following formula:
Total Length = 11 + Length - (Length + 3) % 8; Total Length = 11 + Length - (Length + 3) % 8;
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
skipping to change at page 38, line 20 skipping to change at page 39, line 33
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 option must be well documented. Implementations operating in a
new critical parameter SHOULD be off. In other words, the mode adhering to this specification MUST disable the sending of
management interface MUST allow vanilla standards-only mode as a new critical parameters. In other words, the management
default configuration setting, and MAY allow new critical interface MUST allow vanilla standards-only mode as a default
payloads to be configured on (and off). configuration setting, and MAY allow new critical payloads to be
configured on (and off).
4. See section Section 9 for allocation rules regarding type codes. 4. See section Section 9 for allocation rules regarding type codes.
5.2.3. R1_COUNTER 5.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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 39, line 40 skipping to change at page 41, line 34
Random #I is represented as 64-bit integer, K and Lifetime as 8-bit Random #I is represented as 64-bit integer, K and Lifetime as 8-bit
integer, all in network byte order. integer, all in network byte order.
The PUZZLE parameter contains the puzzle difficulty K and a 64-bit The PUZZLE parameter contains the puzzle difficulty K and a 64-bit
puzzle random integer #I. The Puzzle Lifetime indicates the time puzzle random integer #I. The Puzzle Lifetime indicates the time
during which the puzzle solution is valid, and sets a time limit during which the puzzle solution is valid, and sets a time limit
which should not be exceeded by the Initiator while it attempts to which should not be exceeded by the Initiator while it attempts to
solve the puzzle. The lifetime is indicated as a power of 2 using solve the puzzle. The lifetime is indicated as a power of 2 using
the formula 2^(Lifetime-32) seconds. A puzzle MAY be augmented with the formula 2^(Lifetime-32) seconds. A puzzle MAY be augmented with
an ECHO_REQUEST parameter included in the R1; the contents of the an ECHO_REQUEST_SIGNED or an ECHO_REQUEST_UNSIGNED parameter included
ECHO_REQUEST are then echoed back in the ECHO_RESPONSE, allowing the in the R1; the contents of the echo request are then echoed back in
Responder to use the included information as a part of its puzzle the ECHO_RESPONSE_SIGNED or in the ECHO_RESPONSE_UNSIGNED, allowing
the Responder to use the included information as a part of its puzzle
processing. 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.
5.2.5. SOLUTION 5.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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 41, line 40 skipping to change at page 43, line 40
Group Value Group Value
Reserved 0 Reserved 0
384-bit group 1 384-bit group 1
OAKLEY well known group 1 2 OAKLEY well known group 1 2
1536-bit MODP group 3 1536-bit MODP group 3
3072-bit MODP group 4 3072-bit MODP group 4
6144-bit MODP group 5 6144-bit MODP group 5
8192-bit MODP group 6 8192-bit MODP group 6
The MODP Diffie-Hellman groups are defined in [17]. The OAKLEY group The MODP Diffie-Hellman groups are defined in [RFC3526]. The OAKLEY
is defined in [8]. well known group 1 is defined in Appendix E.
The sender can include at most two different Diffie-Hellman public The sender can include at most two different Diffie-Hellman public
values in the DIFFIE_HELLMAN parameter. This gives the possibility values in the DIFFIE_HELLMAN parameter. This gives the possibility
e.g. for a server to provide a weaker encryption possibility for a e.g. for a server to provide a weaker encryption possibility for a
PDA host that is not powerful enough. It is RECOMMENDED that the PDA host that is not powerful enough. It is RECOMMENDED that the
Initiator, receiving more than one public values selects the stronger Initiator, receiving more than one public values selects the stronger
one, if it supports it. one, if it supports it.
A HIP implementation MUST support Group IDs 1 and 3. The 384-bit A HIP implementation MUST implement 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). It
is REQUIRED that the default configuration allows Group ID 1 usage,
Equipment powerful enough SHOULD implement also group ID 5. The 384- but it is RECOMMENDED that applications that need stronger security
bit group is defined in Appendix D. turn Group ID 1 support off. Equipment powerful enough SHOULD
implement also group ID 5. The 384-bit group is defined in
Appendix D.
To avoid unnecessary failures during the base exchange, 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.
5.2.7. HIP_TRANSFORM 5.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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 42, line 29 skipping to change at page 44, line 31
| Suite-ID #1 | Suite-ID #2 | | Suite-ID #1 | Suite-ID #2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Suite-ID #n | Padding | | Suite-ID #n | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 577 Type 577
Length length in octets, excluding Type, Length, and Length length in octets, excluding Type, Length, and
padding padding
Suite-ID Defines the HIP Suite to be used Suite-ID Defines the HIP Suite to be used
The following Suite-IDs are defined ([21],[10]): The following Suite-IDs are defined ([RFC4307],[RFC2451]):
Suite-ID Value Suite-ID Value
RESERVED 0 RESERVED 0
AES-CBC with HMAC-SHA1 1 AES-CBC with HMAC-SHA1 1
3DES-CBC with HMAC-SHA1 2 3DES-CBC with HMAC-SHA1 2
3DES-CBC with HMAC-MD5 3 3DES-CBC with HMAC-MD5 3
BLOWFISH-CBC with HMAC-SHA1 4 BLOWFISH-CBC with HMAC-SHA1 4
NULL-ENCRYPT with HMAC-SHA1 5 NULL-ENCRYPT with HMAC-SHA1 5
NULL-ENCRYPT with HMAC-MD5 6 NULL-ENCRYPT with HMAC-MD5 6
The sender of a HIP transform parameter MUST make sure that there are The sender of a HIP transform parameter MUST make sure that there are
no more than six (6) HIP Suite-IDs in one HIP transform parameter. no more than six (6) HIP Suite-IDs in one HIP transform parameter.
Conversely, a recipient MUST be prepared to handle received transport Conversely, a recipient MUST be prepared to handle received transport
parameters that contain more than six Suite-IDs. The limited number parameters that contain more than six Suite-IDs by accepting the
of transforms sets the maximum size of HIP_TRANSFORM parameter. As first six Suite-IDs and dropping the rest. The limited number of
the default configuration, the HIP_TRANSFORM parameter MUST contain transforms sets the maximum size of HIP_TRANSFORM parameter. As the
at least one of the mandatory Suite-IDs. There MAY be a default configuration, the HIP_TRANSFORM parameter MUST contain at
configuration option that allows the administrator to override this least one of the mandatory Suite-IDs. There MAY be a configuration
default. option that allows the administrator to override this default.
The Responder lists supported and desired Suite-IDs in order of The Responder lists supported and desired Suite-IDs in order of
preference in the R1, up to the maximum of six Suite-IDs. The preference in the R1, up to the maximum of six Suite-IDs. The
Initiator MUST choose only one of the corresponding Suite-IDs. That Initiator MUST choose only one of the corresponding Suite-IDs. That
Suite-ID will be used for generating the I2. Suite-ID will be used for generating the I2.
Mandatory implementations: AES-CBC with HMAC-SHA1 and NULL-ENCRYPTION Mandatory implementations: AES-CBC with HMAC-SHA1 and NULL-ENCRYPTION
with HMAC-SHA1. with HMAC-SHA1.
5.2.8. HOST_ID 5.2.8. HOST_ID
skipping to change at page 43, line 35 skipping to change at page 45, line 38
Type 705 Type 705
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 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
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 [RFC2535] 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/SHA1 5 [RFC3110] (REQUIRED)
The following DI-types have been defined: The following DI-types have been defined:
Type Value Type Value
none included 0 none included 0
FQDN 1 FQDN 1
NAI 2 NAI 2
FQDN Fully Qualified Domain Name, in binary format. FQDN Fully Qualified Domain Name, in binary format.
NAI Network Access Identifier NAI Network Access Identifier
The format for the FQDN is defined in RFC1035 [3] Section 3.1. The The format for the FQDN is defined in RFC1035 [RFC1035] Section 3.1.
format for Network Access Identifier is defined in [23] The format for Network Access Identifier is defined in
[I-D.ietf-radext-rfc2486bis]
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.
5.2.9. HMAC 5.2.9. 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 |
skipping to change at page 44, line 38 skipping to change at page 46, line 39
/ / / /
/ +-------------------------------+ / +-------------------------------+
| | Padding | | | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 61505 Type 61505
Length length in octets, excluding Type, Length, and Length length in octets, excluding Type, Length, and
Padding Padding
HMAC HMAC computed over the HIP packet, excluding the HMAC HMAC computed over the HIP packet, excluding the
HMAC parameter and any following parameters, such HMAC parameter and any following parameters, such
as HIP_SIGNATURE, HIP_SIGNATURE_2, ECHO_REQUEST, as HIP_SIGNATURE, HIP_SIGNATURE_2,
or ECHO_RESPONSE. The checksum field MUST be set ECHO_REQUEST_UNSIGNED, or ECHO_RESPONSE_UNSIGNED.
to zero and the HIP header length in the HIP common The checksum field MUST be set to zero and the HIP
header MUST be calculated not to cover any excluded header length in the HIP common header MUST be
parameters when the HMAC is calculated. The size calculated not to cover any excluded parameters
of the HMAC is the natural size of the hash when the HMAC is calculated. The size of the
computation output depending on the used hash HMAC is the natural size of the hash computation
function. output depending on the used hash function.
The HMAC calculation and verification process is presented in The HMAC calculation and verification process is presented in
Section 6.4.1 Section 6.4.1
5.2.10. HMAC_2 5.2.10. HMAC_2
The parameter structure is the same as in Section 5.2.9. The fields The parameter structure is the same as in Section 5.2.9. The fields
are: are:
Type 61569 Type 61569
Length length in octets, excluding Type, Length, and Length length in octets, excluding Type, Length, and
Padding Padding
HMAC HMAC computed over the HIP packet, excluding the HMAC HMAC computed over the HIP packet, excluding the
HMAC parameter and any following parameters such HMAC parameter and any following parameters such
as HIP_SIGNATURE, HIP_SIGNATURE_2, ECHO_REQUEST, as HIP_SIGNATURE, HIP_SIGNATURE_2,
or ECHO_RESPONSE, and including an additional ECHO_REQUEST_UNSIGNED, or ECHO_RESPONSE_UNSIGNED,
sender's HOST_ID parameter during the HMAC and including an additional sender's HOST_ID
calculation. The checksum field MUST be set to parameter during the HMAC calculation. The
zero and the HIP header length in the HIP common checksum field MUST be set to zero and the HIP
header MUST be calculated not to cover any header length in the HIP common header MUST be
excluded parameters when the HMAC is calculated. calculated not to cover any excluded parameters
The size of the HMAC is the natural size of the when the HMAC is calculated. The size of the
hash computation output depending on the used hash HMAC is the natural size of the hash computation
function. output depending on the used hash function.
The HMAC calculation and verification process is presented in The HMAC calculation and verification process is presented in
Section 6.4.1 Section 6.4.1
5.2.11. HIP_SIGNATURE 5.2.11. 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 |
skipping to change at page 46, line 7 skipping to change at page 48, line 7
excluding the HIP_SIGNATURE parameter and any excluding the HIP_SIGNATURE parameter and any
parameters that follow the HIP_SIGNATURE parameter. parameters that follow the HIP_SIGNATURE parameter.
The checksum field MUST be set to zero, and the HIP The 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 only to the beginning of the calculated only to the beginning of the
HIP_SIGNATURE parameter when the signature is HIP_SIGNATURE parameter when the signature is
calculated. calculated.
The signature algorithms are defined in Section 5.2.8. The signature The signature algorithms are defined in Section 5.2.8. The signature
in the Signature field is encoded using the proper method depending in the Signature field is encoded using the proper method depending
on the signature algorithm (e.g. according to [15] in case of RSA, or on the signature algorithm (e.g. according to [RFC3110] in case of
according to [13] in case of DSA). RSA/SHA1, or according to [RFC2536] in case of DSA).
The HIP_SIGNATURE calculation and verification process is presented The HIP_SIGNATURE calculation and verification process is presented
in Section 6.4.2 in Section 6.4.2
5.2.12. HIP_SIGNATURE_2 5.2.12. HIP_SIGNATURE_2
The parameter structure is the same as in Section 5.2.11. The fields The parameter structure is the same as in Section 5.2.11. The fields
are: are:
Type 61633 Type 61633
skipping to change at page 49, line 7 skipping to change at page 51, line 7
The inner padding follows exactly the rules of Section 5.2.1. The The inner padding follows exactly the rules of Section 5.2.1. The
outer padding also follows the same rules but with an exception. outer padding also follows the same rules but with an exception.
Namely, some algorithms require that the data to be encrypted must be Namely, some algorithms require that the data to be encrypted must be
a multiple of the cipher algorithm block size. In this case, the a multiple of the cipher algorithm block size. In this case, the
outer padding MUST include extra padding, as specified by the outer padding MUST include extra padding, as specified by the
encryption algorithm. The size of the extra padding is selected so encryption algorithm. The size of the extra padding is selected so
that the length of the ENCRYPTED is the minimum value that is both that the length of the ENCRYPTED is the minimum value that is both
multiple of eight and the cipher block size. The encryption multiple of eight and the cipher block size. The encryption
algorithm may specify padding bytes other than zero; for example, AES algorithm may specify padding bytes other than zero; for example, AES
[32] uses the PKCS5 padding scheme [14] (see section 6.1.1) where the [FIPS01] uses the PKCS5 padding scheme [RFC2898] (see section 6.1.1)
remaining n bytes to fill the block each have the value n. where the remaining n bytes to fill the block each have the value n.
Note that the length of the cipher suite output may be smaller or Note that the length of the cipher suite output may be smaller or
larger than the length of the data to be encrypted, since the larger than the length of the data to be encrypted, since the
encryption process may compress the data or add additional padding to encryption process may compress the data or add additional padding to
the data. the data.
5.2.16. NOTIFY 5.2.16. NOTIFICATION
The NOTIFY parameter is used to transmit informational data, such as The NOTIFICATION parameter is used to transmit informational data,
error conditions and state transitions, to a HIP peer. A NOTIFY such as error conditions and state transitions, to a HIP peer. A
parameter may appear in the NOTIFY packet type. The use of the NOTIFICATION parameter may appear in the NOTIFY packet type. The use
NOTIFY parameter in other packet types is for further study. of the NOTIFICATION 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Notify Message Type | | Reserved | Notify Message Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| / | /
/ Notification data / / Notification data /
skipping to change at page 50, line 6 skipping to change at page 52, line 7
Padding Any Padding, if necessary, to make the parameter a Padding Any Padding, if necessary, to make the parameter a
multiple of 8 bytes. multiple of 8 bytes.
Notification information can be error messages specifying why an SA Notification information can be error messages specifying why an SA
could not be established. It can also be status data that a process could not be established. It can also be status data that a process
managing an SA database wishes to communicate with a peer process. managing an SA database wishes to communicate with a peer process.
The table below lists the Notification messages and their The table below lists the Notification messages and their
corresponding values. corresponding values.
To avoid certain types of attacks, a Responder SHOULD avoid sending a To avoid certain types of attacks, a Responder SHOULD avoid sending a
NOTIFY to any host with which it has not successfully verified a NOTIFICATION to any host with which it has not successfully verified
puzzle solution. a puzzle solution.
Types in the range 0 - 16383 are intended for reporting errors. An Types in the range 0 - 16383 are intended for reporting errors and in
implementation that receives a NOTIFY error parameter in response to the range 16384 - 65535 for other status information. An
a request packet (e.g., I1, I2, UPDATE), SHOULD assume that the implementation that receives a NOTIFY packet with an NOTIFICATION
corresponding request has failed entirely. Unrecognized error types error parameter in response to a request packet (e.g., I1, I2,
MUST be ignored except that they SHOULD be logged. UPDATE), SHOULD assume that the corresponding request has failed
entirely. Unrecognized error types MUST be ignored except that they
SHOULD be logged.
Notify payloads with status types MUST be ignored if not recognized. Notify payloads with status types MUST be ignored if not recognized.
NOTIFY PARAMETER - ERROR TYPES Value NOTIFICATION PARAMETER - ERROR TYPES Value
------------------------------ ----- ------------------------------------ -----
UNSUPPORTED_CRITICAL_PARAMETER_TYPE 1 UNSUPPORTED_CRITICAL_PARAMETER_TYPE 1
Sent if the parameter type has the "critical" bit set and the Sent if the parameter type has the "critical" bit set and the
parameter type is not recognized. Notification Data contains parameter type is not recognized. Notification Data contains
the two octet parameter type. the two octet parameter type.
INVALID_SYNTAX 7 INVALID_SYNTAX 7
Indicates that the HIP message received was invalid because Indicates that the HIP message received was invalid because
skipping to change at page 51, line 49 skipping to change at page 53, line 51
SERVER_BUSY_PLEASE_RETRY 44 SERVER_BUSY_PLEASE_RETRY 44
The Responder is unwilling to set up an association The Responder is unwilling to set up an association
as it is suffering under some kind of overload and as it is suffering under some kind of overload and
has chosen to shed load by rejecting your request. has chosen to shed load by rejecting your request.
You may retry if you wish, however you MUST find You may retry if you wish, however you MUST find
another (different) puzzle solution for any such another (different) puzzle solution for any such
retries. Note that you may need to obtain a new retries. Note that you may need to obtain a new
puzzle with a new I1/R1 exchange. puzzle with a new I1/R1 exchange.
I2_ACKNOWLEDGEMENT 46 NOTIFY MESSAGES - STATUS TYPES Value
------------------------------ -----
I2_ACKNOWLEDGEMENT 16384
The Responder has received your I2 but had to queue The Responder has received your I2 but had to queue
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 5.2.17. ECHO_REQUEST_SIGNED
------------------------------ -----
(None defined at present) 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque data (variable length) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5.2.17. ECHO_REQUEST Type 897
Length variable
Opaque data Opaque data, supposed to be meaningful only to the
node that sends ECHO_REQUEST_SIGNED and receives a
corresponding ECHO_RESPONSE_SIGNED or
ECHO_RESPONSE_UNSINGED.
The ECHO_REQUEST_SIGNED parameter contains an opaque blob of data
that the sender wants to get echoed back in the corresponding reply
packet.
The ECHO_REQUEST_SIGNED and corresponding echo response parameters
MAY be used for any purpose where a node wants to carry some state in
a request packet and get it back in a response packet. The
ECHO_REQUEST_SIGNED is covered by the HMAC and SIGNATURE. A HIP
packet can contain only one ECHO_REQUEST_SIGNED or
ECHO_REQUEST_UNSIGNED parameter. The ECHO_REQUEST_SIGNED parameter
MUST be responded with a corresponding echo response.
ECHO_RESPONSE_SIGNED SHOULD be used, but if it is not possible, e.g.
due to a middle-box provided response, it MAY be responded with an
ECHO_RESPONSE_UNSIGNED.
5.2.18. ECHO_REQUEST_UNSIGNED
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 63661 or 897 Type 63661
Length variable Length variable
Opaque data Opaque data, supposed to be meaningful only to the Opaque data Opaque data, supposed to be meaningful only to the
node that sends ECHO_REQUEST and receives a node that sends ECHO_REQUEST_UNSIGNED and receives a
corresponding ECHO_RESPONSE. corresponding ECHO_RESPONSE_SIGNED or
ECHO_RESPONSE_UNSIGNED.
The ECHO_REQUEST parameter contains an opaque blob of data that the The ECHO_REQUEST_UNSIGNED parameter contains an opaque blob of data
sender wants to get echoed back in the corresponding reply packet. that the 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_UNSIGNED and corresponding echo response parameters
purpose where a node wants to carry some state in a request packet MAY be used for any purpose where a node wants to carry some state in
and get it back in a response packet. The ECHO_REQUEST MAY be a request packet and get it back in a response packet. The
covered by the HMAC and SIGNATURE. This is dictated by the Type ECHO_REQUEST_UNSIGNED is not covered by the HMAC and SIGNATURE. A
field selected for the parameter; Type 897 ECHO_REQUEST is covered HIP packet can contain only one ECHO_REQUEST_SIGNED or
and Type 63661 is not covered. A HIP packet can contain only one ECHO_REQUEST_UNSIGNED parameter. The ECHO_REQUEST_UNSIGNED parameter
ECHO_REQUEST parameter. MUST be responded with an ECHO_RESPONSE_UNSIGNED parameter.
5.2.18. ECHO_RESPONSE 5.2.19. ECHO_RESPONSE_SIGNED
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 63425 or 961 Type 961
Length variable Length variable
Opaque data Opaque data, copied unmodified from the ECHO_REQUEST Opaque data Opaque data, copied unmodified from the
ECHO_REQUEST_SIGNED or ECHO_REQUEST_UNSIGNED
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_SIGNED parameter contains an opaque blob of data
sender of the ECHO_REQUEST wants to get echoed back. The opaque data that the sender of the ECHO_REQUEST_SIGNED wants to get echoed back.
is copied unmodified from the ECHO_REQUEST parameter. The opaque data is copied unmodified from the ECHO_REQUEST_SIGNED
parameter.
The ECHO_REQUEST and ECHO_RESPONSE parameters MAY be used for any The ECHO_REQUEST_SIGNED and ECHO_RESPONSE_SIGNED parameters MAY be
purpose where a node wants to carry some state in a request packet used for any purpose where a node wants to carry some state in a
and get it back in a response packet. The ECHO_RESPONSE MAY be request packet and get it back in a response packet. The
covered by the HMAC and SIGNATURE. This is dictated by the Type ECHO_RESPONSE_SIGNED is covered by the HMAC and SIGNATURE.
field selected for the parameter; Type 961 ECHO_RESPONSE is covered
and Type 63425 is not. 5.2.20. ECHO_RESPONSE_UNSIGNED
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque data (variable length) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 63425
Length variable
Opaque data Opaque data, copied unmodified from the
ECHO_REQUEST_SIGNED or ECHO_REQUEST_UNSIGNED
parameter that triggered this response.
The ECHO_RESPONSE_UNSIGNED parameter contains an opaque blob of data
that the sender of the ECHO_REQUEST_SIGNED or ECHO_REQUEST_UNSIGNED
wants to get echoed back. The opaque data is copied unmodified from
the corresponding echo request parameter.
The echo request and ECHO_RESPONSE_UNSIGNED parameters MAY be used
for any purpose where a node wants to carry some state in a request
packet and get it back in a response packet. The
ECHO_RESPONSE_UNSIGNED is not covered by the HMAC and SIGNATURE.
5.3. HIP Packets 5.3. HIP Packets
There are eight basic HIP packets (see Table 11). Four are for the There are eight basic HIP packets (see Table 11). Four are for the
HIP base exchange, one is for updating, one is for sending HIP base exchange, one is for updating, one is for sending
notifications, and two for closing a HIP association. notifications, and two for closing a HIP association.
+------------------+------------------------------------------------+ +------------------+------------------------------------------------+
| Packet type | Packet name | | Packet type | Packet name |
+------------------+------------------------------------------------+ +------------------+------------------------------------------------+
skipping to change at page 55, line 37 skipping to change at page 58, line 37
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,
HOST_ID, HOST_ID,
[ ECHO_REQUEST, ] [ ECHO_REQUEST_SIGNED, ]
HIP_SIGNATURE_2 ) HIP_SIGNATURE_2 )
[, ECHO_REQUEST ]) [, ECHO_REQUEST_UNSIGNED ])
Valid control bits: A Valid control bits: A
If the Responder HI is an anonymous one, the A control MUST be set. If the Responder HI is an anonymous one, the A control MUST be set.
The Initiator HIT MUST match the one received in I1. If the The Initiator HIT MUST match the one received in I1. If the
Responder has multiple HIs, the Responder HIT used MUST match Responder has multiple HIs, the Responder HIT used MUST match
Initiator's request. If the Initiator used opportunistic mode, the Initiator's request. If the Initiator used opportunistic mode, the
Responder may select freely among its HIs. See also "HIP Responder may select freely among its HIs. See also "HIP
Opportunistic Mode" (Section 4.1.6)). Opportunistic Mode" (Section 4.1.6)).
skipping to change at page 56, line 21 skipping to change at page 59, line 21
zeroed during the signature calculation, allowing the sender to zeroed during the signature calculation, allowing the sender to
select and set the #I into a pre-computed R1 just prior sending it to select and set the #I into a pre-computed R1 just prior sending it to
the peer. the peer.
The Diffie-Hellman value is ephemeral, and one value SHOULD be used The Diffie-Hellman value is ephemeral, and one value SHOULD be used
only for one connection. Once the Responder has received a valid only for one connection. Once the Responder has received a valid
response to an R1 packet, that Diffie-Hellman value SHOULD be response to an R1 packet, that Diffie-Hellman value SHOULD be
deprecated. Because it is possible that the Responder has sent the deprecated. Because it is possible that the Responder has sent the
same Diffie-Hellman value to different hosts simultaneously in same Diffie-Hellman value to different hosts simultaneously in
corresponding R1 packets also those responses should be accepted. corresponding R1 packets also those responses should be accepted.
However, as a defense against I1 storms, an implementation MAY use However, as a defense against I1 storms, an implementation MAY
the same Diffie-Hellman value for a period of time, for example, 15 propose, and re-use if not avoidable, the same Diffie-Hellman value
minutes. By using a small number of different puzzles for a given for a period of time, for example, 15 minutes. By using a small
Diffie-Hellman value, the R1 packets can be pre- computed and number of different puzzles for a given Diffie-Hellman value, the R1
delivered as quickly as I1 packets arrive. A scavenger process packets can be pre-computed and delivered as quickly as I1 packets
should clean up unused DHs and puzzles. arrive. A scavenger process should clean up unused DHs and puzzles.
Re-using Diffie-Hellman public keys opens up the potential security
risks of more than one Initiators ending up with the same keying
material (due to faulty random number generators), and more than one
Initiators using the same Responder public key half, thereby leading
to potentially easier cryptographic attacks and the risk of not
having perfect forward security.
However, these risks involved in re-using the same key are
statistical; that is, authors are not aware of any mechanism that
would allow manipulation of the protocol so that the risk of the re-
use of a any given Responder Diffie-Hellman public key would differ
from the base probability. Consequently, it is RECOMMENDED that
implementations avoid re-using the same D-H key with multiple
Initiators, but because the risk is considered statistical and not
known to be manipulatable, the implementations MAY re-use a key in
order to ease resource constraint implementations and to increase the
probability of successful communication with legitimate clients even
under an I1 storm. In particular, when it is too expensive to
generate enough of pre-computed R1 packets to supply each potential
Initiator with a different Diffie-Hellman key, the Responder MAY send
the same Diffie-Hellman key to several Initiators, thereby creating
the possibility of multiple legitimate Initiators ending up using the
same Responder-side public key. However, as soon as the Responder
knows that it will use a particular Diffie-Hellman key, it SHOULD
stop offering it. This design is aimed to allow resource-constrained
Responders to offer services under I1 storms and to simultaneously
make the probability of Diffie-Hellman key re-use both statistical
and as low as possible.
If a future version of this protocol is considered, we strongly
recommend that these issues shall be studied again. Especially, the
current design allows hosts to become potentially more vulnerable to
a statistical, low-probability problem during I1 storm attacks than
what they are if no attack is taking place; whether this is
acceptable or not should be reconsidered in the light of any new
experience gained.
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 [18] with of preference. All implementations MUST support the AES [RFC3602]
HMAC-SHA-1-96 [6]. with HMAC-SHA-1-96 [RFC2404].
The ECHO_REQUEST contains data that the sender wants to receive The ECHO_REQUEST_SIGNED and ECHO_REQUEST_UNSIGNED contains data that
unmodified in the corresponding response packet in the ECHO_RESPONSE the sender wants to receive unmodified in the corresponding response
parameter. The ECHO_REQUEST can be either covered by the signature, packet in the ECHO_RESPONSE_SIGNED or ECHO_RESPONSE_UNSIGNED
or it can be left out from it. In the first case, the ECHO_REQUEST parameter.
gets Type number 897 and in the latter case 63661.
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 parameters that follow the signature, as described and excluding any parameters that follow the signature, as described
in Section 5.2.12. This allows the Responder to use precomputed R1s. in Section 5.2.12. 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.
5.3.3. I2 - the Second HIP Initiator Packet 5.3.3. I2 - the Second HIP Initiator Packet
skipping to change at page 57, line 15 skipping to change at page 60, line 49
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 ( [R1_COUNTER,] IP ( HIP ( [R1_COUNTER,]
SOLUTION, SOLUTION,
DIFFIE_HELLMAN, DIFFIE_HELLMAN,
HIP_TRANSFORM, HIP_TRANSFORM,
ENCRYPTED { HOST_ID } or HOST_ID, ENCRYPTED { HOST_ID } or HOST_ID,
[ ECHO_RESPONSE ,] [ ECHO_RESPONSE_SIGNED ,]
HMAC, HMAC,
HIP_SIGNATURE HIP_SIGNATURE
[, ECHO_RESPONSE] ) ) [, ECHO_RESPONSE_UNSIGNED] ) )
Valid control bits: A Valid control bits: A
The HITs used MUST match the ones used previously. The HITs used MUST match the ones used previously.
If the Initiator HI is an anonymous one, the A control MUST be set. If the Initiator HI is an anonymous one, the A control MUST be set.
The Initiator MAY include an unmodified copy of the R1_COUNTER The Initiator MAY include an unmodified copy of the R1_COUNTER
parameter received in the corresponding R1 packet into the I2 packet. parameter received in the corresponding R1 packet into the I2 packet.
The Solution contains the random # I from R1 and the computed # J. The Solution contains the random # I from R1 and the computed # J.
The low order K bits of the RHASH(I | ... | J) MUST be zero. The low order K bits of the RHASH(I | ... | J) MUST be zero.
The Diffie-Hellman value is ephemeral. If precomputed, a scavenger The Diffie-Hellman value is ephemeral. If precomputed, a scavenger
process should clean up unused DHs. process should clean up unused DHs. The Responder may re-use Diffie-
Hellman values under some conditions as specified in Section 5.3.2.
The HIP_TRANSFORM contains the single encryption and integrity The HIP_TRANSFORM contains the single encryption and integrity
transform selected by the Initiator, that will be used to protect the transform selected by the Initiator, that will be used to protect the
HI exchange. The chosen transform MUST correspond to one offered by HI exchange. The chosen transform MUST correspond to one offered by
the Responder in the R1. All implementations MUST support the AES the Responder in the R1. All implementations MUST support the AES
transform [18]. transform [RFC3602].
The Initiator's HI MAY be encrypted using the HIP_TRANSFORM The Initiator's HI MAY be encrypted using the HIP_TRANSFORM
encryption algorithm. The keying material is derived from the encryption algorithm. The keying material is derived from the
Diffie-Hellman exchanged as defined in Section 6.5. Diffie-Hellman exchanged as defined in Section 6.5.
The ECHO_RESPONSE contains the unmodified Opaque data copied from the The ECHO_RESPONSE_SIGNED and ECHO_RESPONSE_UNSIGNED contains the
corresponding ECHO_REQUEST parameter. The ECHO_RESPONSE can be unmodified Opaque data copied from the corresponding echo request
either covered by the HMAC and SIGNATURE or not covered. In the parameter.
former case, the ECHO_RESPONSE gets Type number 961, in the latter it
is 63425.
The HMAC is calculated over whole HIP envelope, excluding any The HMAC is calculated over whole HIP envelope, excluding any
parameters after the HMAC, as described in Section 6.4.1. The parameters after the HMAC, as described in Section 6.4.1. The
Responder MUST validate the HMAC. Responder MUST validate the HMAC.
The signature is calculated over whole HIP envelope, excluding any The signature is calculated over whole HIP envelope, excluding any
parameters after the HIP_SIGNATURE, as described in Section 5.2.11. parameters after the HIP_SIGNATURE, as described in Section 5.2.11.
The Responder MUST validate this signature. It MAY use either the HI The Responder MUST validate this signature. It MAY use either the HI
in the packet or the HI acquired by some other means. in the packet or the HI acquired by some other means.
skipping to change at page 59, line 8 skipping to change at page 62, line 44
IP ( HIP ( [SEQ, ACK, ] 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.
An UPDATE packet contains zero or one ACK parameters. The ACK An UPDATE packet contains zero or one ACK parameters. The ACK
parameter echoes the SEQ sequence number of the UPDATE packet being parameter echoes the SEQ sequence number of the UPDATE packet being
acked. A host MAY choose to ack more than one UPDATE packet at a acked. A host MAY choose to ack more than one UPDATE packet at a
time; e.g., the ACK may contain the last two SEQ values received, for time; e.g., the ACK may contain the last two SEQ values received, for
robustness to ack loss. ACK values are not cumulative; each received robustness to ack loss. ACK values are not cumulative; each received
unique SEQ value requires at least one corresponding ACK value in unique SEQ value requires at least one corresponding ACK value in
reply. Received ACKs that are redundant are ignored. reply. Received ACKs that are redundant are ignored.
The UPDATE packet may contain both a SEQ and an ACK parameter. In The UPDATE packet may contain both a SEQ and an ACK parameter. In
skipping to change at page 59, line 42 skipping to change at page 63, line 30
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.
5.3.6. NOTIFY - the HIP Notify Packet 5.3.6. 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. NOTIFY packets some type of protocol error or negotiation failure. NOTIFY packets
are unacknowledged. The receiver can handle the packet only as are unacknowledged. The receiver can handle the packet only as
informational, and SHOULD NOT make any state information changes informational, and SHOULD NOT change its HIP state (Section 4.4.1)
based purely on a received NOTIFY packet. based purely on a received NOTIFY packet.
The HIP header values for the NOTIFY packet: The HIP header values for the NOTIFY packet:
Header: Header:
Packet Type = 17 Packet Type = 17
SRC HIT = Sender's HIT SRC HIT = Sender's HIT
DST HIT = Recipient's HIT, or zero if unknown DST HIT = Recipient's HIT, or zero if unknown
IP ( HIP (<NOTIFY>i, [HOST_ID, ] HIP_SIGNATURE) ) IP ( HIP (<NOTIFICATION>i, [HOST_ID, ] HIP_SIGNATURE) )
Valid control bits: None Valid control bits: None
The NOTIFY packet is used to carry one or more NOTIFY parameters. The NOTIFY packet is used to carry one or more NOTIFICATION
parameters.
5.3.7. CLOSE - the HIP Association Closing Packet 5.3.7. 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 = 18 Packet Type = 18
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_SIGNED, HMAC, HIP_SIGNATURE ) )
Valid control bits: none Valid control bits: none
The sender MUST include an ECHO_REQUEST used to validate CLOSE_ACK The sender MUST include an ECHO_REQUEST_SIGNED used to validate
received in response, and both an HMAC and a signature (calculated CLOSE_ACK received in response, and both an HMAC and a signature
over the whole HIP envelope). (calculated 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_SIGNED corresponding to the received
ECHO_REQUEST_SIGNED.
5.3.8. CLOSE_ACK - the HIP Closing Acknowledgment Packet 5.3.8. 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:
Header: Header:
Packet Type = 19 Packet Type = 19
SRC HIT = Sender's HIT SRC HIT = Sender's HIT
DST HIT = Recipient's HIT DST HIT = Recipient's HIT
IP ( HIP ( ECHO_REPLY, HMAC, HIP_SIGNATURE ) ) IP ( HIP ( ECHO_REPLY_SIGNED, HMAC, HIP_SIGNATURE ) )
Valid control bits: none Valid control bits: none
The sender MUST include both an HMAC and signature (calculated over The sender MUST include both an HMAC and signature (calculated over
the whole HIP envelope). the whole HIP envelope).
The receiver peer MUST validate both the HMAC and the signature. The receiver peer MUST validate both the HMAC and the signature.
5.4. ICMP Messages 5.4. 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 association with the sender packet or does not have any existing HIP association with the sender
of the packet, it MAY respond with an ICMP packet. Any such replies of the packet, it MAY respond with an ICMP packet. Any such replies
MUST be rate limited as described in [4]. In most cases, the ICMP MUST be rate limited as described in [RFC1885]. In most cases, the
packet will have the Parameter Problem type (12 for ICMPv4, 4 for ICMP packet will have the Parameter Problem type (12 for ICMPv4, 4
ICMPv6), with the Pointer field pointing to the field that caused the for ICMPv6), with the Pointer field pointing to the field that caused
ICMP message to be generated. the ICMP message to be generated.
5.4.1. Invalid Version 5.4.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.
5.4.2. Other Problems with the HIP Header and Packet Structure 5.4.2. Other Problems with the HIP Header and Packet Structure
skipping to change at page 61, line 42 skipping to change at page 65, line 36
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 from the I2 with the type Parameter Problem, copying enough of bytes from the I2
message so that the SOLUTION parameter fits into the ICMP message, message so that the SOLUTION parameter fits into 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
[RFC0792].
5.4.4. Non-existing HIP Association 5.4.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 beginning of the first HIT that does not Pointer pointing to the beginning of the first HIT that does not
match. match.
skipping to change at page 63, line 32 skipping to change at page 66, line 32
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. In the case of user data carried in a specific transport the HITs. In the case of user data carried in a specific transport
format, the transport format document specifies how the incoming format, the transport format document specifies how the incoming
packets are matched with the active associations. packets are matched with the active associations.
6.1. Processing Outgoing Application Data 6.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
an identifier specified via the underlying API. The API can be a an identifier specified via the underlying API. The API can be a
backwards compatible API (see [28]), using identifiers that look backwards compatible API (see [I-D.henderson-hip-applications]),
similar to IP addresses, or a completely new API, providing enhanced using identifiers that look similar to IP addresses, or a completely
services related to Host Identities. Depending on the HIP new API, providing enhanced services related to Host Identities.
implementation, the identifier provided to the application may be Depending on the HIP implementation, the identifier provided to the
different; it can be e.g. a HIT or an IP address. application may be different; it can be e.g. a HIT or an IP address.
The exact format and method for transferring the data from the source The exact format and method for transferring the data from the source
HIP host to the destination HIP host is defined in the corresponding HIP host to the destination HIP host is defined in the corresponding
transport format document. The actual data is transferred in the transport format document. The actual data is transferred in the
network using the appropriate source and destination IP addresses. network using the appropriate source and destination IP addresses.
In this document, conceptual processing rules are defined only for In this document, conceptual processing rules are defined only for
the base case where both hosts have only single usable IP addresses; the base case where both hosts have only single usable IP addresses;
the multi-address multi-homing case will be specified separately. the multi-address multi-homing case will be specified separately.
skipping to change at page 64, line 22 skipping to change at page 67, line 22
implementation SHOULD queue at least one packet per HIP implementation SHOULD queue at least one packet per HIP
association to be formed, and it MAY queue more than one. association to be formed, and it MAY queue more than one.
4. Once there is an active HIP association for the given < source, 4. Once there is an active HIP association for the given < source,
destination > HIT pair, the outgoing datagram is passed to destination > HIT pair, the outgoing datagram is passed to
transport handling. The possible transport formats are defined transport handling. The possible transport formats are defined
in separate documents, of which the ESP transport format for HIP in separate documents, of which the ESP transport format for HIP
is mandatory for all HIP implementations. is mandatory for all HIP implementations.
5. Before sending the packet, the HITs in the datagram are replaced 5. Before sending the packet, the HITs in the datagram are replaced
with suitable IP addresses. For IPv6, the rules defined in [16] with suitable IP addresses. For IPv6, the rules defined in
SHOULD be followed. Note that this HIT-to-IP-address conversion [RFC3484] SHOULD be followed. Note that this HIT-to-IP-address
step MAY also be performed at some other point in the stack, conversion step MAY also be performed at some other point in the
e.g., before wrapping the packet into the output format. stack, e.g., before wrapping the packet into the output format.
6.2. Processing Incoming Application Data 6.2. Processing Incoming Application Data
The following conceptual algorithm describes the incoming datagram The following conceptual algorithm describes the incoming datagram
handling when HITs are used at the receiving host as application handling when HITs are used at the receiving host as application
level identifiers. More detailed steps for processing packets are level identifiers. More detailed steps for processing packets are
defined in corresponding transport format documents. defined in corresponding transport format documents.
1. The incoming datagram is mapped to an existing HIP association, 1. The incoming datagram is mapped to an existing HIP association,
typically using some information from the packet. For example, typically using some information from the packet. For example,
skipping to change at page 68, line 34 skipping to change at page 71, line 34
4. Compute the signature and verify it against the received 4. Compute the signature and verify it against the received
signature. signature.
The verification can use either the HI received from a HIP packet, The verification can use either the HI received from a HIP packet,
the HI from a DNS query, if the FQDN has been received in the HOST_ID the HI from a DNS query, if the FQDN has been received in the HOST_ID
packet, or one received by some other means. packet, or one received by some other means.
6.5. HIP KEYMAT Generation 6.5. HIP KEYMAT Generation
HIP keying material is derived from the Diffie-Hellman Kij produced HIP keying material is derived from the Diffie-Hellman session key,
during the HIP base exchange. The Initiator has Kij during the Kij, produced during the HIP base exchange (Section 4.1.3). The
creation of the I2 packet, and the Responder has Kij once it receives Initiator has Kij during the creation of the I2 packet, and the
the I2 packet. This is why I2 can already contain encrypted Responder has Kij once it receives the I2 packet. This is why I2 can
information. already contain encrypted 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
K1 = RHASH( Kij | sort(HIT-I | HIT-R) | I | J | 0x01 ) K1 = RHASH( Kij | sort(HIT-I | HIT-R) | I | J | 0x01 )
K2 = RHASH( Kij | K1 | 0x02 ) K2 = RHASH( Kij | K1 | 0x02 )
K3 = RHASH( Kij | K2 | 0x03 ) K3 = RHASH( Kij | K2 | 0x03 )
skipping to change at page 70, line 44 skipping to change at page 73, line 44
6.6.1. Sending Multiple I1s in Parallel 6.6.1. Sending Multiple I1s in Parallel
For the sake of minimizing the session establishment latency, an For the sake of minimizing the session establishment latency, an
implementation MAY send the same I1 to more than one of the implementation MAY send the same I1 to more than one of the
Responder's addresses. However, it MUST NOT send to more than three Responder's addresses. However, it MUST NOT send to more than three
(3) addresses in parallel. Furthermore, upon timeout, the (3) addresses in parallel. Furthermore, upon timeout, the
implementation MUST refrain from sending the same I1 packet to implementation MUST refrain from sending the same I1 packet to
multiple addresses. These limitations are placed order to avoid multiple addresses. These limitations are placed order to avoid
congestion of the network, and potential DoS attacks that might congestion of the network, and potential DoS attacks that might
happen, e.g., because someone claims to have hundreds or thousands of happen, e.g., because someone claims to have hundreds or thousands of
addresses. addresses which possibly could generate a huge number of I1 messages
from the Initiator.
As the Responder is not guaranteed to distinguish the duplicate I1's As the Responder is not guaranteed to distinguish the duplicate I1's
it receives at several of its addresses (because it avoids to store it receives at several of its addresses (because it avoids to store
states when it answers back an R1), the Initiator may receive several states when it answers back an R1), the Initiator may receive several
duplicate R1's. duplicate R1's.
The Initiator SHOULD then select the initial preferred destination The Initiator SHOULD then select the initial preferred destination
address using the source address of the selected received R1, and use address using the source address of the selected received R1, and use
the preferred address as a source address for the I2. Processing the preferred address as a source address for the I2. Processing
rules for received R1s are discussed in Section 6.8. rules for received R1s are discussed in Section 6.8.
skipping to change at page 72, line 36 skipping to change at page 75, line 36
6. The Responder sends the R1 to the source IP address of the I1 6. The Responder sends the R1 to the source IP address of the I1
packet. packet.
6.7.1. R1 Management 6.7.1. R1 Management
All compliant implementations MUST produce R1 packets. An R1 packet All compliant implementations MUST produce R1 packets. An R1 packet
MAY be precomputed. An R1 packet MAY be reused for time Delta T, MAY be precomputed. An R1 packet MAY be reused for time Delta T,
which is implementation dependent, and SHOULD be deprecated and not which is implementation dependent, and SHOULD be deprecated and not
used once a valid response I2 packet has been received from an used once a valid response I2 packet has been received from an
Initiator. During I1 message storm, an R1 packet may be re-used Initiator. During I1 message storm, an R1 packet may be re-used
beyond this limit. R1 information MUST not be discarded until Delta beyond this limit. R1 information MUST NOT be discarded until Delta
S after T. Time S is the delay needed for the last I2 to arrive back S after T. Time S is the delay needed for the last I2 to arrive back
to the Responder. to the Responder.
An implementation MAY keep state about received I1s and match the An implementation MAY keep state about received I1s and match the
received I2s against the state, as discussed in Section 4.1.1. received I2s against the state, as discussed in Section 4.1.1.
6.7.2. Handling Malformed Messages 6.7.2. Handling Malformed Messages
If an implementation receives a malformed I1 message, it SHOULD NOT If an implementation receives a malformed I1 message, it SHOULD NOT
respond with a NOTIFY message, as such practice could open up a respond with a NOTIFY message, as such practice could open up a
skipping to change at page 77, line 26 skipping to change at page 80, line 27
18. Upon successful processing of an I2 in state ESTABLISHED, the 18. Upon successful processing of an I2 in state ESTABLISHED, the
old HIP association is dropped and a new one is installed, an R2 old HIP association is dropped and a new one is installed, an R2
is sent, and the state machine transitions to R2-SENT. is sent, and the state machine transitions to R2-SENT.
19. Upon transitioning to R2-SENT, start a timer. Move to 19. Upon transitioning to R2-SENT, start a timer. Move to
ESTABLISHED if some data has been received on the incoming HIP ESTABLISHED if some data has been received on the incoming HIP
association, or an UPDATE packet has been received (or some association, or an UPDATE packet has been received (or some
other packet that indicates that the peer has moved to other packet that indicates that the peer has moved to
ESTABLISHED). If the timer expires (allowing for maximal ESTABLISHED). If the timer expires (allowing for maximal
retransmissions of I2s), move to UNASSOCIATED. retransmissions of I2s), move to ESTABLISHED.
6.9.1. Handling Malformed Messages 6.9.1. Handling Malformed Messages
If an implementation receives a malformed I2 message, the behavior If an implementation receives a malformed I2 message, the behavior
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 5.4. message as defined in Section 5.4.
skipping to change at page 81, line 14 skipping to change at page 84, line 17
message logged. message logged.
4. The corresponding UPDATE timer is stopped (see Section 6.11) so 4. The corresponding UPDATE timer is stopped (see Section 6.11) so
that the now acknowledged UPDATE is no longer retransmitted. If that the now acknowledged UPDATE is no longer retransmitted. If
multiple UPDATEs are newly acknowledged, multiple timers are multiple UPDATEs are newly acknowledged, multiple timers are
stopped. stopped.
6.13. Processing NOTIFY Packets 6.13. Processing NOTIFY Packets
Processing NOTIFY packets is OPTIONAL. If processed, any errors in a Processing NOTIFY packets is OPTIONAL. If processed, any errors in a
received NOTIFY parameter SHOULD be logged. Received errors MUST be received NOTIFICATION parameter SHOULD be logged. Received errors
considered only as informational and the receiver SHOULD NOT change MUST be considered only as informational and the receiver SHOULD NOT
state information purely based on the received NOTIFY message. change its HIP state Section 4.4.1 purely based on the received
NOTIFY message.
6.14. Processing CLOSE Packets 6.14. 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
skipping to change at page 81, line 40 skipping to change at page 84, line 44
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 CLOSE packet is If there is no corresponding HIP association, the CLOSE packet is
dropped. dropped.
6.15. Processing CLOSE_ACK Packets 6.15. 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_SIGNED in response to the sent
ECHO_REQUEST). ECHO_REQUEST_SIGNED).
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, the discarded when the state changes to UNASSOCIATED and, after that, the
host MAY respond with an ICMP Parameter Problem to an incoming CLOSE host MAY respond with an ICMP Parameter Problem to an incoming CLOSE
message (See Section 5.4.4). message (See Section 5.4.4).
6.16. Dropping HIP Associations 6.16. Dropping HIP Associations
A HIP implementation is free to drop a HIP association at any time, 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 based on its own policy. If a HIP host decides to drop a HIP
skipping to change at page 84, line 14 skipping to change at page 87, line 14
8. Security Considerations 8. Security Considerations
HIP is designed to provide secure authentication of hosts. HIP also HIP is designed to provide secure authentication of hosts. HIP also
attempts to limit the exposure of the host to various denial-of- attempts to limit the exposure of the host to various denial-of-
service and man-in-the-middle (MitM) attacks. In so doing, HIP service and man-in-the-middle (MitM) attacks. In so doing, HIP
itself is subject to its own DoS and MitM attacks that potentially 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 could be more damaging to a host's ability to conduct business as
usual. usual.
Denial-of-service attacks take advantage of the cost of start of The 384-bit Diffie-Hellman Group is targetted to be used in hosts
state for a protocol on the Responder compared to the 'cheapness' on that either do not require or that are not powerful enough for
the Initiator. HIP makes no attempt to increase the cost of the handling strong cryptography. Although there is a risk that with
suitable equipment the encryption can be broken in real time, the
384-bit group can provide some protection for end-hosts that are not
able to handle any stronger cryptography. When the security provided
by the 384-bit group is not enough for applications on a host, the
support for this group should be turned off in the configuration.
Denial-of-service attacks often take advantage of the cost of start
of state for a protocol on the Responder compared to the 'cheapness'
on 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, until some Initiator has that the Responder MAY use many times, until some Initiator has
provided a valid response to such and R1 packet. During an I1 storm provided a valid response to such and R1 packet. During an I1 storm
the host may re-use the same D-H value also beyond that point. Using the host may re-use the same D-H value also beyond that point. Using
the same Diffie-Hellman values and random puzzle #I value has some the same Diffie-Hellman values and random puzzle #I value has some
risks. This risk needs to be balanced against a potential storm of risks. This risk needs to be balanced against a potential storm of
HIP I1 packets. HIP I1 packets.
skipping to change at page 87, line 7 skipping to change at page 90, line 7
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.
9. IANA Considerations 9. IANA Considerations
This document specifies the IP protocol number 253 to be used with IANA has reserved protocol number 253 to be used for experimental
Host Identity Protocol during the experimental phase. This number purposes (see [RFC3692]). In HIP, this value is used until a
has been reserved by IANA for experimental use (see [19]. permanent protocol number has been assigned by IANA.
This document defines a new 128-bit value under the CGA Message Type This document defines a new 128-bit value under the CGA Message Type
namespace [20], 0xF0EF F02F BFF4 3D0F E793 0C3C 6E61 74EA. namespace [RFC3972], 0xF0EF F02F BFF4 3D0F E793 0C3C 6E61 74EA, to be
used for HIT generation as specified in ORCHID
[I-D.laganier-ipv6-khi].
This document also creates a set of new name spaces. These are This document also creates a set of new name spaces. These are
described below. described below.
Packet Type Packet Type
The 7-bit Packet Type field in a HIP protocol packet describes the The 7-bit Packet Type field in a HIP protocol packet describes the
type of a HIP protocol message. It is defined in Section 5.1. type of a HIP protocol message. It is defined in Section 5.1.
The current values are defined in Section 5.3.1 through The current values are defined in Section 5.3.1 through
Section 5.3.8 and are listed below: Section 5.3.8.
* I1 is 1.
* R1 is 2.
* I2 is 3.
* R2 is 4.
* UPDATE is 16.
* NOTIFY is 17.
* CLOSE is 18.
* CLOSE_ACK is 19.
New values are assigned through IETF Consensus [9]. New values are assigned through IETF Consensus [RFC2434].
HIP Version HIP Version
The four bit Version field in a HIP protocol packet describes the The four bit Version field in a HIP protocol packet describes the
version of the HIP protocol. It is defined in Section 5.1. The version of the HIP protocol. It is defined in Section 5.1. The
only currently defined value is 1. New values are assigned only currently defined value is 1. New values are assigned
through IETF Consensus. through IETF Consensus.
Parameter Type Parameter Type
The 16 bit Type field in a HIP parameters describes the type of The 16 bit Type field in a HIP parameter describes the type of the
the parameter. It is defined in Section 5.2.1. The current parameter. It is defined in Section 5.2.1. The current values
values are defined in Section 5.2.3 through Section 5.2.18 and are are defined in Section 5.2.3 through Section 5.2.20.
listed below:
* R1_COUNTER is 128.
* PUZZLE is 257.
* SOLUTION is 321.
* SEQ is 385.
* ACK is 449.
* DIFFIE_HELLMAN is 513.
* HIP_TRANSFORM is 577.
* ENCRYPTED is 641.
* HOST_ID is 705.
* CERT is 768.
* NOTIFY is 832.
* ECHO_REQUEST is 897.
* ECHO_RESPONSE is 961.
* HMAC is 61505.
* HMAC_2 is 61569.
* HIP_SIGNATURE_2 is 61633.
* HIP_SIGNATURE is 61697.
* ECHO_REQUEST is 63661.
* ECHO_RESPONSE is 63425.
The type codes 0 through 1023 and 61440 through 65535 are reserved With the exception of the assigned type codes, the type codes 0
for future base protocol extensions, and are assigned through IETF through 1023 and 61440 through 65535 are reserved for future base
Consensus. protocol extensions, and are assigned through IETF Consensus.
The type codes 32768 through 49141 are reserved for The type codes 32768 through 49141 are reserved for
experimentation and private use. Types SHOULD be selected in a experimentation and private use. Types SHOULD be selected in a
random fashion from this range, thereby reducing the probability random fashion from this range, thereby reducing the probability
of collisions. A method employing genuine randomness (such as of collisions. A method employing genuine randomness (such as
flipping a coin) SHOULD be used. flipping a coin) SHOULD be used.
All other type codes are assigned through First Come First Served, All other type codes are assigned through First Come First Served,
with Specification Required [9]. with Specification Required [RFC2434].
Group ID Group ID
The eight bit Group ID values appear in the DIFFIE_HELLMAN The eight bit Group ID values appear in the DIFFIE_HELLMAN
parameter, defined in Section 5.2.6. The currently defined values parameter and are defined in Section 5.2.6. New values either
are listed below: from the reserved or unassigned space are assigned through IETF
Consensus.
* 384-bit group is 1.
* OAKLEY well known group 1 is 2.
* 1536-bit MODP group is 3.
* 3072-bit MODP group is 4.
* 6144-bit MODP group is 5.
* 8192-bit MODP group is 6.
* Value 0 is reserved.
New values either from the reserved or unassigned space are
assigned through IETF Consensus.
Suite ID Suite ID
The 16 bit Suite ID values in a HIP_TRANSFORM parameter are The 16 bit Suite ID values in a HIP_TRANSFORM parameter are
defined in Section 5.2.7. The currently defined values are listed defined in Section 5.2.7. New values either from the reserved or
below: unassigned space are assigned through IETF Consensus.
* AES-CBC with HMAC-SHA1 is 1.
* 3DES-CBC with HMAC-SHA1 is 2.
* 3DES-CBC with HMAC-MD5 is 3.
* BLOWFISH-CBC with HMAC-SHA1 is 4.
* NULL-ENCRYPT with HMAC-SHA1 is 5.
* NULL-ENCRYPT with HMAC-MD5 is 6.
* Value 0 is reserved.
New values either from the reserved or unassigned space are
assigned through IETF Consensus.
DI-Type DI-Type
The four bit DI-Type values in a HOST_ID parameter are defined in The four bit DI-Type values in a HOST_ID parameter are defined in
Section 5.2.8. The currently defined values are listed below: Section 5.2.8. New values are assigned through IETF Consensus.
* None included is 0.
* FQDN is 1.
* NAI is 2.
New values are assigned through IETF Consensus.
Notify Message Type Notify Message Type
The 16 bit Notify Message Type field in a NOTIFY parameter is The 16 bit Notify Message Type values in a NOTIFICATION parameter
defined in Section 5.2.16. The currently defined values are are defined in Section 5.2.16. New values are assigned through
listed below: First Come First Served, with Specification Required.
* UNSUPPORTED_CRITICAL_PARAMETER_TYPE is 1.
* INVALID_SYNTAX is 7.
* NO_DH_PROPOSAL_CHOSEN is 14.
* INVALID_DH_CHOSEN is 15.
* NO_HIP_PROPOSAL_CHOSEN is 16.
* INVALID_HIP_TRANSFORM_CHOSEN is 17.
* AUTHENTICATION_FAILED is 24.
* CHECKSUM_FAILED is 26.
* HMAC_FAILED is 28.
* ENCRYPTION_FAILED is 32.
* INVALID_HIT is 40.
* BLOCKED_BY_POLICY is 42.
* SERVER_BUSY_PLEASE_RETRY is 44.
New values are assigned through First Come First Served, with Notify Message Type values 1 through 10 are used for informing
Specification Required. about errors in packet structures, values 11 through 20 for
informing about problems in parameters containing cryptographic
related material, values 21 through 30 for informing about
problems in authentication or packet integrity verification.
Parameter numbers above 30 can be used for informing about other
types of errors or events. Values 51 - 8191 are error types
reserved to be allocated by IANA. Values 8192 - 16383 are error
types for private use. Values 16385 - 40959 are status types to
be allocated by IANA and values 40960 - 65535 are status types for
private use.
10. Acknowledgments 10. 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 the 43rd IETF meeting. Baiju Patel and Hilarie Orman meeting at the 43rd IETF meeting. Baiju Patel and Hilarie Orman
really gave the original author, Bob Moskowitz, the assist to get HIP really gave the original author, Bob Moskowitz, the assist to get HIP
beyond 5 paragraphs of ideas. It has matured considerably since the beyond 5 paragraphs of ideas. It has matured considerably since the
early drafts thanks to extensive input from IETFers. Most early drafts thanks to extensive input from IETFers. Most
importantly, its design goals are articulated and are different from importantly, its design goals are articulated and are different from
other efforts in this direction. Particular mention goes to the other efforts in this direction. Particular mention goes to the
skipping to change at page 92, line 28 skipping to change at page 92, line 28
research group. 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 Steve Bellovin. Rob Austein kept the DNS parts on track. Paul
Kocher taught Bob Moskowitz how to make the puzzle exchange expensive Kocher taught Bob Moskowitz how to make the puzzle exchange expensive
for 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, which later evolved Bill Sommerfeld supplied the Birthday concept, which later evolved
into the R1 generation counter, to simplify reboot management. Erik into the R1 generation counter, to simplify reboot management. Erik
Nordmark supplied CLOSE-mechanism for closing connections. Rodney Nordmark supplied CLOSE-mechanism for closing connections. Rodney
Thayer and Hugh Daniels provide extensive feedback. In the early Thayer and Hugh Daniels provide extensive feedback. In the early
times of this draft, John Gilmore kept Bob Moskowitz challenged to times of this document, John Gilmore kept Bob Moskowitz challenged to
provide something of value. 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 whose name is missing. Ylitalo. Our apologies to anyone whose name is missing.
Once the HIP Working Group was founded in early 2004, a number of Once the HIP Working Group was founded in early 2004, a number of
changes were introduced through the working group process. Most changes were introduced through the working group process. Most
notably, the original draft was split in two, one containing the base notably, the original draft was split in two, one containing the base
exchange and the other one defining how to use ESP. Some exchange and the other one defining how to use ESP. Some
modifications to the protocol proposed by Aura et al. [29] were added modifications to the protocol proposed by Aura et al. [AUR03] were
at a later stage. added at a later stage.
11. References 11. References
11.1. Normative References 11.1. Normative References
[1] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
August 1980. August 1980.
[2] Postel, J., "Internet Control Message Protocol", STD 5, [RFC1035] Mockapetris, P., "Domain names - implementation and
RFC 792, September 1981.
[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 [RFC1885] Conta, A. and S. Deering, "Internet Control Message
(ICMPv6) for the Internet Protocol Version 6 (IPv6)", RFC 1885, Protocol (ICMPv6) for the Internet Protocol Version 6
December 1995. (IPv6)", RFC 1885, December 1995.
[5] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[6] Madson, C. and R. Glenn, "The Use of HMAC-SHA-1-96 within ESP
and AH", RFC 2404, November 1998.
[7] Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)",
RFC 2409, November 1998.
[8] Orman, H., "The OAKLEY Key Determination Protocol", RFC 2412, [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
November 1998. Requirement Levels", BCP 14, RFC 2119, March 1997.
[9] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA [RFC2404] Madson, C. and R. Glenn, "The Use of HMAC-SHA-1-96 within
Considerations Section in RFCs", BCP 26, RFC 2434, ESP and AH", RFC 2404, November 1998.
October 1998.
[10] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher Algorithms", [RFC2451] Pereira, R. and R. Adams, "The ESP CBC-Mode Cipher
RFC 2451, November 1998. Algorithms", RFC 2451, November 1998.
[11] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
Specification", RFC 2460, December 1998. (IPv6) Specification", RFC 2460, December 1998.
[12] Eastlake, D., "Domain Name System Security Extensions", [RFC2535] Eastlake, D., "Domain Name System Security Extensions",
RFC 2535, March 1999. RFC 2535, March 1999.
[13] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System [RFC2536] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System
(DNS)", RFC 2536, March 1999. (DNS)", RFC 2536, March 1999.
[14] Kaliski, B., "PKCS #5: Password-Based Cryptography [RFC2898] Kaliski, B., "PKCS #5: Password-Based Cryptography
Specification Version 2.0", RFC 2898, September 2000. Specification Version 2.0", RFC 2898, September 2000.
[15] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name [RFC3110] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain
System (DNS)", RFC 3110, May 2001. Name System (DNS)", RFC 3110, May 2001.
[16] Draves, R., "Default Address Selection for Internet Protocol [RFC3484] Draves, R., "Default Address Selection for Internet
version 6 (IPv6)", RFC 3484, February 2003. Protocol version 6 (IPv6)", RFC 3484, February 2003.
[17] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) [RFC3526] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
Diffie-Hellman groups for Internet Key Exchange (IKE)", Diffie-Hellman groups for Internet Key Exchange (IKE)",
RFC 3526, May 2003. RFC 3526, May 2003.
[18] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher
Algorithm and Its Use with IPsec", RFC 3602, September 2003. Algorithm and Its Use with IPsec", RFC 3602,
September 2003.
[19] Narten, T., "Assigning Experimental and Testing Numbers
Considered Useful", BCP 82, RFC 3692, January 2004.
[20] Aura, T., "Cryptographically Generated Addresses (CGA)", [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)",
RFC 3972, March 2005. RFC 3972, March 2005.
[21] Schiller, J., "Cryptographic Algorithms for Use in the Internet [RFC4307] Schiller, J., "Cryptographic Algorithms for Use in the
Key Exchange Version 2 (IKEv2)", RFC 4307, December 2005. Internet Key Exchange Version 2 (IKEv2)", RFC 4307,
December 2005.
[22] Nikander, P., "An IPv6 Prefix for Overlay Routable [I-D.laganier-ipv6-khi]
Nikander, P., "An IPv6 Prefix for Overlay Routable
Cryptographic Hash Identifiers (ORCHID)", Cryptographic Hash Identifiers (ORCHID)",
draft-laganier-ipv6-khi-01 (work in progress), March 2006. draft-laganier-ipv6-khi-05 (work in progress),
September 2006.
[23] Aboba, B., "The Network Access Identifier", [I-D.ietf-radext-rfc2486bis]
draft-ietf-radext-rfc2486bis-06 (work in progress), July 2005. Aboba, B., "The Network Access Identifier",
draft-ietf-radext-rfc2486bis-06 (work in progress),
July 2005.
[24] Jokela, P., "Using ESP transport format with HIP", [I-D.ietf-hip-esp]
draft-ietf-hip-esp-02 (work in progress), March 2006. Jokela, P., "Using ESP transport format with HIP",
draft-ietf-hip-esp-04 (work in progress), October 2006.
[25] NIST, "FIPS PUB 180-1: Secure Hash Standard", April 1995. [FIPS95] NIST, "FIPS PUB 180-1: Secure Hash Standard", April 1995.
11.2. Informative References 11.2. Informative References
[26] Moskowitz, R. and P. Nikander, "Host Identity Protocol [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5,
RFC 792, September 1981.
[RFC2409] Harkins, D. and D. Carrel, "The Internet Key Exchange
(IKE)", RFC 2409, November 1998.
[RFC2412] Orman, H., "The OAKLEY Key Determination Protocol",
RFC 2412, November 1998.
[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 2434,
October 1998.
[RFC3692] Narten, T., "Assigning Experimental and Testing Numbers
Considered Useful", BCP 82, RFC 3692, January 2004.
[I-D.ietf-hip-arch]
Moskowitz, R. and P. Nikander, "Host Identity Protocol
Architecture", draft-ietf-hip-arch-03 (work in progress), Architecture", draft-ietf-hip-arch-03 (work in progress),
August 2005. August 2005.
[27] Bagnulo, M. and E. Nordmark, "Level 3 multihoming shim [I-D.ietf-shim6-proto]
protocol", draft-ietf-shim6-proto-05 (work in progress), Bagnulo, M. and E. Nordmark, "Level 3 multihoming shim
May 2006. protocol", draft-ietf-shim6-proto-07 (work in progress),
December 2006.
[28] Henderson, T. and P. Nikander, "Using HIP with Legacy [I-D.henderson-hip-applications]
Applications", draft-henderson-hip-applications-03 (work in Henderson, T. and P. Nikander, "Using HIP with Legacy
progress), May 2006. Applications", draft-henderson-hip-applications-03 (work
in progress), May 2006.
[29] Aura, T., Nagarajan, A., and A. Gurtov, "Analysis of the HIP [I-D.ietf-hip-mm]
Base Exchange Protocol", in Proceedings of 10th Australasian Nikander, P., "End-Host Mobility and Multihoming with the
Conference on Information Security and Privacy, July 2003. Host Identity Protocol", draft-ietf-hip-mm-04 (work in
progress), June 2006.
[30] Krawczyk, H., "SIGMA: The 'SIGn-and-MAc' Approach to [I-D.ietf-hip-dns]
Authenticated Diffie-Hellman and Its Use in the IKE-Protocols", Nikander, P. and J. Laganier, "Host Identity Protocol
in Proceedings of CRYPTO 2003, pages 400-425, August 2003. (HIP) Domain Name System (DNS) Extensions",
draft-ietf-hip-dns-08 (work in progress), October 2006.
[31] Crosby, SA. and DS. Wallach, "Denial of Service via Algorithmic [I-D.ietf-hip-rvs]
Complexity Attacks", in Proceedings of Usenix Security Laganier, J. and L. Eggert, "Host Identity Protocol (HIP)
Symposium 2003, Washington, DC., August 2003. Rendezvous Extension", draft-ietf-hip-rvs-05 (work in
progress), June 2006.
[32] NIST, "FIPS PUB 197: Advanced Encryption Standard", Nov 2001. [AUR03] Aura, T., Nagarajan, A., and A. Gurtov, "Analysis of the
HIP Base Exchange Protocol", in Proceedings of 10th
Australasian Conference on Information Security and
Privacy, July 2003.
[KRA03] Krawczyk, H., "SIGMA: The 'SIGn-and-MAc' Approach to
Authenticated Diffie-Hellman and Its Use in the IKE-
Protocols", in Proceedings of CRYPTO 2003, pages 400-425,
August 2003.
[CRO03] Crosby, SA. and DS. Wallach, "Denial of Service via
Algorithmic Complexity Attacks", in Proceedings of Usenix
Security Symposium 2003, Washington, DC., August 2003.
[FIPS01] NIST, "FIPS PUB 197: Advanced Encryption Standard",
Nov 2001.
[DIF76] Diffie, W. and M. Hellman, "New Directions in
Cryptography", IEEE Transactions on Information
Theory vol. IT-22, number 6, pages 644-654, Nov 1976.
[KAU03] Kaufman, C., Perlman, R., and B. Sommerfeld, "DoS
protection for UDP-based protocols", ACM Conference on
Computer and Communications Security , Oct 2003.
Appendix A. Using Responder Puzzles Appendix A. Using Responder Puzzles
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.
If the implementation is based on this appendix, it MAY contain some If the implementation is based on this appendix, it MAY contain some
local modification that makes an attacker's task harder. local modification that makes an attacker's task harder.
skipping to change at page 96, line 52 skipping to change at page 96, line 52
match, the I2 is dropped. match, the I2 is dropped.
puzzle_check: puzzle_check:
V := Ltrunc( RHASH( I2.I | I2.hit_i | I2.hit_r | I2.J ), K ) V := Ltrunc( RHASH( I2.I | I2.hit_i | I2.hit_r | I2.J ), K )
if V != 0, drop the packet if V != 0, drop the packet
If the puzzle solution is correct, the I and J values are stored for If the puzzle solution is correct, the I and J values are stored for
later use. They are used as input material when keying material is later use. They are used as input material when keying material is
generated. generated.
The Responder SHOULD NOT keep state about failed puzzle solutions. Keeping state about failed puzzle solutions depends on the
implementation. Although it is possible that the Responder doesn't
keep any state information, it still may do so to protect itself
against certain attacks (see Section 4.1.1).
Appendix B. Generating a Public Key Encoding from a HI Appendix B. Generating a Public Key Encoding from a HI
The following pseudo-codes illustrate the process to generate a The following pseudo-codes illustrate the process to generate a
public key encoding from a HI for both RSA and DSA. public key encoding from a HI for both RSA and DSA.
The symbol := denotes assignment; the symbol += denotes appending. The symbol := denotes assignment; the symbol += denotes appending.
The pseudo-function encode_in_network_byte_order takes two The pseudo-function encode_in_network_byte_order takes two
parameters, an integer (bignum) and a length in bytes, and returns parameters, an integer (bignum) and a length in bytes, and returns
the integer encoded into a byte string of the given length. the integer encoded into a byte string of the given length.
skipping to change at page 98, line 7 skipping to change at page 99, line 7
buffer += encode_in_network_byte_order ( HI.DSA.G , 64 + buffer += encode_in_network_byte_order ( HI.DSA.G , 64 +
8 * HI.DSA.T ) 8 * HI.DSA.T )
buffer += encode_in_network_byte_order ( HI.DSA.Y , 64 + buffer += encode_in_network_byte_order ( HI.DSA.Y , 64 +
8 * HI.DSA.T ) 8 * HI.DSA.T )
break; break;
} }
Appendix C. Example Checksums for HIP Packets Appendix C. 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 5.1.1.
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 IPv4- addresses of 192.168.0.1 and 192.168.0.2 (and their respective IPv4-
compatible IPv6 formats), and HITs with the first two bits "01" compatible IPv6 formats), and HITs with the first two bits "01"
followed by 124 zeroes followed by a decimal 1 or 2, respectively. followed by 124 zeroes followed by a decimal 1 or 2, respectively.
The following example is defined only for testing a checksum
calculation. The address format for IPv4-compatible IPv6 address is
not a valid one, but using these IPv6 addresses when testing an IPv6
implementation gives the same checksum output as an IPv4
implementation with the corresponding IPv4 addresses.
C.1. IPv6 HIP Example (I1) C.1. IPv6 HIP Example (I1)
Source Address: ::192.168.0.1 Source Address: ::192.168.0.1
Destination Address: ::192.168.0.2 Destination Address: ::192.168.0.2
Upper-Layer Packet Length: 40 0x28 Upper-Layer Packet Length: 40 0x28
Next Header: 253 0xfd Next Header: 253 0xfd
Payload Protocol: 59 0x3b Payload Protocol: 59 0x3b
Header Length: 4 0x4 Header Length: 4 0x4
Packet Type: 1 0x1 Packet Type: 1 0x1
Version: 1 0x1 Version: 1 0x1
skipping to change at page 98, line 39 skipping to change at page 99, line 45
C.2. IPv4 HIP Packet (I1) C.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).
C.3. TCP Segment C.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 [11], with the HITs used in place use the IPv6 pseudo-header format [RFC2460], with the HITs used in
of the IPv6 addresses. place of the IPv6 addresses.
Sender's HIT: 1100::0001 Sender's HIT: 1100::0001
Receiver's HIT: 1100::0002 Receiver's HIT: 1100::0002
Upper-Layer Packet Length: 20 0x14 Upper-Layer Packet Length: 20 0x14
Next Header: 6 0x06 Next Header: 6 0x06
Source port: 65500 0xffdc Source port: 65500 0xffdc
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
skipping to change at page 101, line 5 skipping to change at page 102, line 5
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:
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B13B202 FFFFFFFF FFFFFFFF 29024E08 8A67CC74 020BBEA6 3B13B202 FFFFFFFF FFFFFFFF
The generator is: 2. The generator is: 2.
Appendix E. OAKLEY Well-known group 1
See also [RFC2412] for definition of OAKLEY Well-known group 1.
OAKLEY Well-Known Group 1: A 768 bit prime
The prime is 2^768 - 2^704 - 1 + 2^64 * { [2^638 pi] + 149686 }.
The hexadecimal value is:
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF
This has been rigorously verified as a prime.
The generator is: 22 (decimal)
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
skipping to change at page 102, line 5 skipping to change at page 104, line 5
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
Intellectual Property Statement Full Copyright Statement
Copyright (C) The Internet Society (2007).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
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 procedures with respect to rights in RFC documents can be on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
skipping to change at page 102, line 29 skipping to change at page 104, line 45
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
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at this standard. Please address the information to the IETF at
ietf-ipr@ietf.org. ietf-ipr@ietf.org.
Disclaimer of Validity
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright Statement
Copyright (C) The Internet Society (2006). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is provided by the IETF
Internet Society. Administrative Support Activity (IASA).
 End of changes. 185 change blocks. 
633 lines changed or deleted 746 lines changed or added

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