Title

  Test IKEv2.EN.I.1.2.1.1: Sending CREATE_CHILD_SA request
  Part A: IKE Header Format (BASIC)
  Part B: Encrypted Payload Format (BASIC)
  Part C: Notify Payload (REKEY_SA) Format (BASIC)
  Part D: Notify Payload (USE_TRANSPORT_MODE) Format (BASIC)
  Part E: SA Payload Format (BASIC)
  Part F: Nonce Payload Format (BASIC)
  Part G: TSi Payload Format (BASIC)
  Part H: TSr Payload Format (BASIC)


Purpose

  To verify an IKEv2 device transmits CREATE_CHILD_SA request using properly Header
  and Payloads format.


References

  * [RFC 4306] - Sections 1.1.2,1.2 and 3.3.2
  * [RFC 4307] - Sections 3


Test Setup

  * Network Topology
      Connect the devices according to the Common Topology.
  * Configuration
      In each part, configure the devices according to the Common Configuration.
      In addition, set IKE_SA Lifetime to 300 seconds and set CHILD_SA Lifetime to 30
      seconds.
  * Pre-Sequence and Cleanup Sequence
      IKEv2 on the NUT is disabled after each part.


Procedure

   NUT                  TN1
(End-Node)           (End-Node)
    |                    |
    |------------------->| IKE_SA_INIT request (HDR, SAi1, KEi, Ni)
    |                    | (Judgement #1)
    |<-------------------| IKE_SA_INIT Response (HDR, SAr1, KEr, Nr)
    |                    | (Packet #1)
    |                    |
    |------------------->| IKE_AUTH request (HDR, SK {IDi, AUTH, N+, SAi2, TSi, TSr})
    |                    | (Judgement #2)
    |<-------------------| IKE_AUTH Response (HDR, SK {IDr, AUTH, N+, SAr2, TSi, TSr})
    |                    | (Packet #2)
    |                    |
   ---                  ---
    |                    |                        ---
    |<-------------------| IPSec {Echo Request}    |
    |                    | (Packet #3)             |
    |------------------->| IPSec {Echo Reply}      | repeat Echo exchange until lifetime of SA is expired
    |                    | (Judgement #3)          |
    |                    |                        ---
   ---                  ---
    |                    |
    |------------------->| CREATE_CHILD_SA request (HDR, SK {N, N+, SA, Ni, KEi, TSi, TSr})
    |                    | (Judgement #4)
    |                    |
    V                    V

 N: REKEY_SA
 N+: USE_TRANSPORT_MODE
Packet #1 See Common Packet #2
Packet #2 See Common Packet #4
Packet #3 See Common Packet #19
  Part A: IKE Header Format (BASIC)
       1. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
       2. Observe the messages transmitted on Link A.
       3. TN1 responds with an IKE_SA_INIT response to the NUT.
       4. Observe the messages transmitted on Link A.
       5. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
       6. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
       7. Observe the messages transmitted on Link A.
       8. Repeat Steps 6 and 7 until lifetime of SA is expired for 30 seconds.
       9. Observe the messages transmitted on Link A.
  Part B: Encrypted Payload Format (BASIC)
      10. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      11. Observe the messages transmitted on Link A.
      12. TN1 responds with an IKE_SA_INIT response to the NUT.
      13. Observe the messages transmitted on Link A.
      14. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      15. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      16. Observe the messages transmitted on Link A.
      17. Repeat Steps 15 and 16 until lifetime of SA is expired for 30 seconds.
      18. Observe the messages transmitted on Link A.
  Part C: Notify Payload (REKEY_SA) Format (BASIC)
      19. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      20. Observe the messages transmitted on Link A.
      21. TN1 responds with an IKE_SA_INIT response to the NUT.
      22. Observe the messages transmitted on Link A.
      23. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      24. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      25. Observe the messages transmitted on Link A.
      26. Repeat Steps 24 and 25 until lifetime of SA is expired for 30 seconds.
      27. Observe the messages transmitted on Link A.
  Part D: Notify Payload (USE_TRANSPORT_MODE) Format (BASIC)
      28. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      29. Observe the messages transmitted on Link A.
      30. TN1 responds with an IKE_SA_INIT response to the NUT.
      31. Observe the messages transmitted on Link A.
      32. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      33. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      34. Observe the messages transmitted on Link A.
      35. Repeat Steps 33 and 34 until lifetime of SA is expired for 30 seconds.
      36. Observe the messages transmitted on Link A.
  Part E: SA Payload Format (BASIC)
      37. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      38. Observe the messages transmitted on Link A.
      39. TN1 responds with an IKE_SA_INIT response to the NUT.
      40. Observe the messages transmitted on Link A.
      41. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      42. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      43. Observe the messages transmitted on Link A.
      44. Repeat Steps 42 and 43 until lifetime of SA is expired for 30 seconds.
      45. Observe the messages transmitted on Link A.
  Part F: Nonce Payload Format (BASIC)
      46. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      47. Observe the messages transmitted on Link A.
      48. TN1 responds with an IKE_SA_INIT response to the NUT.
      49. Observe the messages transmitted on Link A.
      50. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      51. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      52. Observe the messages transmitted on Link A.
      53. Repeat Steps 51 and 52 until lifetime of SA is expired for 30 seconds.
      54. Observe the messages transmitted on Link A.
  Part G: TSi Payload Format (BASIC)
      55. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      56. Observe the messages transmitted on Link A.
      57. TN1 responds with an IKE_SA_INIT response to the NUT.
      58. Observe the messages transmitted on Link A.
      59. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      60. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      61. Observe the messages transmitted on Link A.
      62. Repeat Steps 60 and 61 until lifetime of SA is expired for 30 seconds.
      63. Observe the messages transmitted on Link A.
  Part H: TSr Payload Format (BASIC)
      64. NUT starts to negotiate with TN1 by sending IKE_SA_INIT request.
      65. Observe the messages transmitted on Link A.
      66. TN1 responds with an IKE_SA_INIT response to the NUT.
      67. Observe the messages transmitted on Link A.
      68. After reception of IKE_AUTH request from the NUT, TN1 responds with an IKE_AUTH
          response to the NUT
      69. TN1 transmits an Echo Request with IPsec ESP using corresponding algorithms to NUT.
      70. Observe the messages transmitted on Link A.
      71. Repeat Steps 69 and 70 until lifetime of SA is expired for 30 seconds.
      72. Observe the messages transmitted on Link A.


Observable Result

  Part A
    Step 2: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 4: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed
      algorithms.
  
    Step 7: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using ENCR_3DES an
      AUTH_HMAC_SHA1_96.
   
    Step 9: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted IKE
      Header containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE_SA Initiator's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! IKE_SA Responder's SPI ! ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload ! MjVer ! MnVer ! Exchange Type ! Flags ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Message ID ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 22 Header format
    * An IKE_SA Initiator's SPI field is set to same as the IKE_SA_INIT request's IKE_SA
      Initiator's SPI field value.
    * An IKE_SA Responder's SPI field is set to same as the IKE_SA_INIT response's
      IKE_SA Responder's SPI field value.
    * A Next Payload field is set to Encrypted Payload (46).
    * A Major Version field is set to 2.
    * A Minor Version field is set to zero.
    * An Exchange Type field is set to CREATE_CHILD_SA (36).
    * A Flags field is set to (00010000)2 = (16)10.
    * A Message ID field is set to the value incremented the previous IKE message's
      Message ID by one.
    * A Length field is set to the length of the message (header + payloads) in octets.
  
  
  Part B
    Step 11: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 13: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed algorithms.
  
    Step 16: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
  
    Step 18: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted Encrypted
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Initialization Vector ! ! (length is block size for encryption algorithm) ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Encrypted IKE Payloads ~ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! Padding (0-255 octets) ! +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ ! ! Pad Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Integrity Checksum Data ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 23 Encrypted payload
    * A Next Payload field is set to N Payload (41).
    * A Critical field is set to zero.
    * A RESERVED field is set to zero.
    * A Payload Length field is set to length in octets of the header, IV, Encrypted
      IKE Payloads, Padding, Pad Length, and Integrity Check sum Data.
    * An Initialization Vector field is set to a randomly chosen value whose length is
      equal to the block length of the underlying encryption algorithm. It is 64 bits
      length in ENCR_3DES case.
    * An Encrypted IKE Payloads field is set to subsequent payloads encrypted by
      ENCR_3DES.
    * A Padding field is set to any value which to be a multiple of the encryption
      block size. It is 64 bits length in ENCR_3DES case.
    * A Pad Length field is set to the length of the Padding field.
    * An Integrity Checksum Data set to the cryptographic checksum of the entire
      message. It is 96 bits length in AUTH_HMAC_SHA1_96 case. The checksum
      must be valid by calculation according to the manner described in RFC.
  
  
  Part C
    Step 20: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 22: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed algorithms.
  
    Step 25: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
  
    Step 27: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted Notify
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Protocol ID ! SPI Size ! Notify Message Type ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Security Parameter Index (SPI) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Notification Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 24 Notify Payload format
    * A Next Payload field is set to N Payload (41).
    * A Critical field is set to zero.
    * A RESERVED field is set to zero.
    * A Payload Length field is set to length of the current payload. It is 12 bytes for
      this REKEY_SA.
    * A Protocol ID field is set to ESP (3).
    * A SPI Size field is set to the size of CHILD_SA Inbound SPI value to be
      rekeyed. It is 4 bytes for ESP.
    * A Notify Message Type field is set to REKEY_SA (16393).
    * A Security Parameter Index field is set to SPI value to be rekeyed.
    * A Notification Data field is empty.
  
  
  
  Part D
    Step 29: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 31: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed
      algorithms.
   
    Step 34: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
   
    Step 36: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted Notify
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Protocol ID ! SPI Size ! Notify Message Type ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Security Parameter Index (SPI) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Notification Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 25 Notify Payload format
      * A Next Payload field is set to SA Payload (33).
      * A Critical field is set to zero.
      * A RESERVED field is set to zero.
      * A Payload Length field is set to length of the current payload. It is 8 bytes for
        USE_TRANSPORT_MODE.
      * A Protocol ID field is set to undefined (0).
      * A SPI Size field is set to zero.
      * A Notify Message Type field is set to USE_TRANSPORT_MODE (16391)
  
  
  Part E
    Step 38: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 40: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed algorithms.
  
    Step 43: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
   
    Step 45: Judgment #4

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------- ! Next 44 !0! 0 ! Length 40 ! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--- | ! 0 ! 0 ! Length 36 ! | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ! Number 1 ! Prot ID 3 ! SPI Size 4 ! Trans Cnt 3 ! | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ! SPI value ! | | --- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ! 3 ! 0 ! Length 8 ! | | Transform | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |SA Payload | ! Type 1 (EN) ! 0 ! Transform ID 3 (3DES) ! | Proposal | --- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ! 3 ! 0 ! Length 8 ! | | Transform | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ! Type 3 (IN) ! 0 ! Transform ID 2 (SHA1) ! | | --- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ! 0 ! 0 ! Length 8 ! | | Transform | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ! Type 5 (DH) ! 0 ! Transform ID 0 (No) ! | | --- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---------------
Figure 26 SA Payload contents
The NUT transmits a CREATE_CHILD_SA request including properly formatted SA
Payload containing following values (refer following figures):

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ <Proposals> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 27 SA Payload format * A Next Payload field is set to Ni Payload (40). * A Critical field is set to zero. * A RESERVED field is set to zero. * A Payload Length field is set to length of the current payload.
The following proposal must be included in Proposals field.

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 (last) or 2 ! RESERVED ! Proposal Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Proposal # ! Protocol ID ! SPI Size !# of Transforms! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ SPI (variable) ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ <Transforms> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 28 Proposal sub-structure format Proposal #1 * A 0 or 2 field is set to zero if this structure is the last proposal, otherwise set to 2. * A RESREVD field is set to zero. * A Proposal Length field is set to length of this proposal, including all transforms and attributes. It is 36 bytes according to Common Configuration. * A Proposal # field is set to 1 if this structure is the first proposal, otherwise set to 1 greater thatn the previous proposal. * A Protocol ID field is set to ESP (3). * A SPI Size field is set to 4. * A # of Transforms field is set to 3. * A SPI field is set to the sending entity's SPI (4 octets value)
Transform field is set to following (There are 3 Transform Structures).

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 (last) or 3 ! RESERVED ! Transform Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ !Transform Type ! RESERVED ! Transform ID ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Transform Attribute ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 29 Transform sub-structure format Transform #1 * A 0 or 3 field is set to zero if this structure is the last proposal, otherwise set to 3. * A RESERVED field is set to zero. * A Transform Length set to length of the Transform Substructure including Header and Attribute. It is 8 bytes for ENCR_3DES. * A Transform Type field is set to ENCR (1). * A RESERVED field is set to zero. * A Transform ID set to ENCR_3DES (3).
Transform #2 * A 0 or 3 field is set to zero if this structure is the last proposal, otherwise set to 3. * A RESERVED field is set to zero. * A Transform Length set to length of the Transform Substructure including Header and Attribute. It is 8 bytes for AUTH_HMAC_SHA1. * A Transform Type field is set to INTEG (3). * A RESERVED field is set to zero. * A Transform ID set to AUTH_HMAC_SHA1 (2).
Transform #3 * A 0 or 3 field is set to zero if this structure is the last proposal, otherwise set to 3. * A RESERVED field is set to zero. * A Transform Length set to length of the Transform Substructure including Header and Attribute. It is 8 bytes for ESN. * A Transform Type field is set to ESN (5). * A RESERVED field is set to zero. * A Transform ID set to No Extended Sequence Numbers (0).
  
  
  Part F
    Step 47: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 49: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed algorithms.
  
    Step 52: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
  
    Step 54: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted Nonce
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Nonce Data ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 30 Nonce Payload format
* A Next Payload field is set to TSi Payload (44). * A Critical field is set to zero. * A RESERVED field is set to zero. * A Payload Length field is set to length of the current payload. * A Nonce Data field is set to random data generated by the transmitting entity. * The size of the Nonce must between 16 and 256 octets.
  
  
  Part G
    Step 56: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 58: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed
      algorithms.
  
    Step 61: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
  
    Step 63: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted TSi
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Number of TSs ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ <Traffic Selectors> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 31 TSi Payload format
* A Next Payload field is set to TSr Payload (45). * A Critical field is set to zero. * A RESERVED field is set to zero. * A Payload Length field is set to length of the current payload. * A Number of TSs field is set to the number of actual traffic selectors. * A RESERVED field is set to zero.

The following traffic selector must be included in Traffic Selectors field.
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! TS Type !IP Protocol ID*| Selector Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start Port* | End Port* | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Starting Address* ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Ending Address* ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 32 Traffic Selector
* A TS Type set to TS_IPV6_ADDR_RANGE (8). * An IP Protocol ID field is set to zero. * A Selector Length field is set to length of this Traffic Selector Substructure including the header. It is 40 bytes for TS_IPV6_ADDR_RANGE. * A Start Port field is set to zero. * An End Port field is set to 65535. * A Starting Address field is set to less than or equal to NUT address. * A Ending Address field is set to greater thatn or equal to NUT address.
  
  
  Part H
    Step 65: Judgment #1
      The NUT transmits an IKE_SA_INIT request including "ENCR_3DES",
      "PRF_HMAC_SHA1", "AUTH_HMAC_SHA1_96" and "D-H group 2" as proposed
      algorithms.
  
    Step 67: Judgment #2
      The NUT transmits an IKE_AUTH request including "ENCR_3DES",
      "AUTH_HMAC_SHA1_96" and "No Extended Sequence Numbers" as proposed algorithms.
  
    Step 70: Judgment #3
      The NUT transmits an Echo Reply with IPsec ESP using corresponding algorithms.
  
    Step 72: Judgment #4
      The NUT transmits a CREATE_CHILD_SA request including properly formatted TSr
      Payload containing following values:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Next Payload !C! RESERVED ! Payload Length ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! Number of TSs ! RESERVED ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ <Traffic Selectors> ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 33 TSr Payload format
* A Next Payload field is set to zero. * A Critical field is set to zero. * A RESERVED field is set to zero. * A Payload Length field is set to length of the current payload. * A Number of TSs field is set to 1. * A RESERVED field is set to zero.
The following traffic selector must be included in Traffic Selectors field.

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! TS Type !IP Protocol ID*| Selector Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start Port* | End Port* | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Starting Address* ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! ! ~ Ending Address* ~ ! ! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 34 Traffic Selector
* A TS Type set to TS_IPV6_ADDR_RANGE (8). * An IP Protocol ID field is set to zero. * A Selector Length field is set to length of this Traffic Selector Substructure including the header. It is 40 bytes for TS_IPV6_ADDR_RANGE. * A Start Port field is set to zero. * An End Port field is set to 65535. * A Starting Address field is set to less than or equal to TN1 address. * A Starting Address field is set to less than or equal to TN1 address.


Possible Problems

  * The implementation may use different SA lifetimes by the implementation policy. In
    that case, the tester must change the expiration time to wait CREATE_CHILD_SA
    request.

  * CREATE_CHILD_SA request has following packet format.It may have additional
    payloads described below. Additional payloads can be ignored by this test. The order of
    payload may be different from this sample.

    [N(REKEY_SA)],
    [N(IPCOMP_SUPPORTED)+],
    [N(USE_TRANSPORT_MODE)],
    [N(ESP_TFC_PADDING_NOT_SUPPORTED)],
    [N(NON_FIRST_FRAGMENTS_ALSO)],
    SA, Ni, [KEi], TSi, TSr

  * The implementation may not set single proposal by the implementation policy. In this
    case, Security Association Payload contains multiple proposals.

  * Each of transforms can be located in the any order.

  * The implementation may not set single traffic selector by the implementation policy. In
    this case, Traffic Selector Payload contains multiple proposals.