Subject: [Hipsec] Pre-1 version of draft-moskowitz-hip-09

From: [email-masked] (Henderson, Thomas R)
Date: Tue Dec 30 20:45:01 2003

Petri,
Please see below a proposed Appendix F.  Other implementors
may want to check these results, since getting checksums to
agree has been a sore point in interoperability testing.

Tom

Internet-Draft           Host Identity Protocol            December 2003
   
Appendix F. Example checksums for HIP packets
   
   The HIP checksum for HIP packets is specified in Section 6.1.2.  
   Checksums for TCP and UDP packets running over HIP-enabled security 
   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-
   compatible IPv6 formats), and type 1 HITs with the first two bits "01" 
   followed by 124 zeroes followed by a decimal 1 or 2, respectively.  
   
F.1. IPv6 HIP example (I1) 
   
   Source Address:                 ::c0a8:0001
   Destination Address:            ::c0a8:0002
   Upper-Layer Packet Length:      40              0x28
   Next Header:                    99              0x63
   Payload Protocol:               59              0x3b
   Header Length:                  4               0x04
   Packet Type:                    1               0x01
   Version:                        1               0x1
   Reserved:                       0               0x0
   Control:                        0               0x0000
   Checksum:                       49672           0xc208       
   Sender's HIT:                   4000::0001
   Receiver's HIT:                 4000::0002
   
F.2. IPv4 HIP packet (I1)
   
   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 
   pseudo-header components are the same).
   
F.3. TCP segment 
   
   Regardless of whether IPv6 or IPv4 is used, the TCP and UDP sockets 
   use the IPv6 pseudo-header format [8], with the HITs used in place of 
   the IPv6 addresses.
   
   Sender's HIT:                   4000::0001
   Receiver's HIT:                 4000::0002
   Upper-Layer Packet Length:      20              0x14
   Next Header:                    6               0x06
   Source port:                    32769           0x8001
   Destination port:               22              0x0016
   Sequence number:                1               0x00000001
   Acknowledgment number:          0               0x00000000
   Header length:                  20              0x14
   Flags:                          SYN             0x02
   Window size:                    5840            0x16d0
   Checksum:                       54519           0xd4f7
   Urgent pointer:                 0               0x0000