Internet-Draft | ACVP KDF IKEv2 | November 2024 |
Celi | Expires 5 May 2025 | [Page] |
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 May 2025.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
There are no acknowledgements.¶
This document defines the JSON schema for testing SP800-135 IKEv2 KDF implementations with the ACVP specification.¶
The Automated Crypto Validation Protocol (ACVP) defines a mechanism to automatically verify the cryptographic implementation of a software or hardware crypto module. The ACVP specification defines how a crypto module communicates with an ACVP server, including crypto capabilities negotiation, session management, authentication, vector processing and more. The ACVP specification does not define algorithm specific JSON constructs for performing the crypto validation. A series of ACVP sub-specifications define the constructs for testing individual crypto algorithms. Each sub-specification addresses a specific class of crypto algorithms. This sub-specification defines the JSON constructs for testing SP800-135 IKEv2 KDF implementations using ACVP.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 of [RFC2119] and [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The initial request from the client to the server describing the capabilities of one or several algorithm, mode and revision combinations¶
A collection of test cases that share similar properties within a prompt or response¶
A collection of test groups under a specific algorithm, mode, and revision¶
JSON sent from the server to the client that specifies the correctness of the response¶
The following key derivation functions MAY be advertised by the ACVP compliant cryptographic module:¶
This section describes the design of the tests used to validate SP800-135 IKEv2 KDF implementations. There is only one test type: functional tests. Each has a specific value to be used in the testType field. The testType field definitions are:¶
"AFT" - Algorithm Functional Test. These tests can be processed by the client using a normal 'derive_key' operation. AFTs cause the implementation under test to exercise normal operations on a single block, multiple blocks, or partial blocks. In all cases, random data is used. The functional tests are designed to verify that the logical components of the key deriviation process are operating correctly.¶
The tests described in this document have the intention of ensuring an implementation is conformant to XXX.¶
ACVP requires crypto modules to register their capabilities. This allows the crypto module to advertise support for specific algorithms, notifying the ACVP server which algorithms need test vectors generated for the validation process. This section describes the constructs for advertising support of IKEv2 KDF algorithms to the ACVP server.¶
The algorithm capabilities MUST be advertised as JSON objects within the 'algorithms' value of the ACVP registration message. The 'algorithms' value is an array, where each array element is an individual JSON object defined in this section. The 'algorithms' value is part of the 'capability_exchange' element of the ACVP JSON registration message. See the ACVP specification [ACVP] for more details on the registration message.¶
Each algorithm implementation MAY rely on other cryptographic primitives. For example, RSA Signature algorithms depend on an underlying hash function. Each of these underlying algorithm primitives must be validated, either separately or as part of the same submission. ACVP provides a mechanism for specifying the required prerequisites:¶
Prerequisites, if applicable, MUST be submitted in the registration as the prereqVals
JSON property array inside each element of the algorithms
array. Each element in the prereqVals
array MUST contain the following properties¶
JSON Property | Description | JSON Type |
---|---|---|
algorithm | a prerequisite algorithm | string |
valValue | algorithm validation number | string |
A "valValue" of "same" SHALL be used to indicate that the prerequisite is being met by a different algorithm in the capability exchange in the same registration.¶
An example description of prerequisites within a single algorithm capability exchange looks like this¶
"prereqVals": [ { "algorithm": "Alg1", "valValue": "Val-1234" }, { "algorithm": "Alg2", "valValue": "same" } ]¶
The IKEv2 KDF mode capabilities are advertised as JSON objects within the 'capabilities_exchange' property.¶
A registration SHALL use these properties¶
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
algorithm | Name of the algorithm to be validated | string | "kdf-components" |
mode | Mode of the algorithm to be validated | string | "ikev2" |
revision | ACVP Test version | string | "1.0" |
capabilities | Array of objects describing capabilities | array | Contains each of the below properties |
initiatorNonceLength | The supported initiator nonce, Ni, length(s) used by the IUT in bits | domain | Min: 64, Max: 2048 |
responderNonceLength | The length(s) of data the IUT supports in bits, Nr | domain | Min: 64, Max: 2048 |
diffieHellmanSharedSecretLength | The length(s) of Diffie Hellman shared secrets, g^ir, the IUT supports in bits | domain | Min: 224, Max: 8192 |
derivedKeyingMaterialLength | The length(s) of the IKE SA derived keying material the IUT supports in bits | domain | Min: 160, Max: 16384 |
derivedKeyingMaterialChildLength | The length(s) of the CHILD SA derived keying material the IUT supports in bits | domain | Min: 160, Max: 16384 |
hashAlg | Valid hash algorithms used by the IUT | array | See Section 7.3.1 |
An example registration within an algorithm capability exchange looks like this¶
"capability_exchange": [ { "algorithm": "kdf-components", "mode": "IKEv2", "revision": "1.0", "capabilities": [ { "hashAlg": [ "sha-1", "sha2-224", "sha2-256" ], "initiatorNonceLength": [ { "min": 64, "max": 2048, "increment": 1 } ], "responderNonceLength": [ { "min": 64, "max": 2048, "increment": 1 } ], "diffieHellmanSharedSecretLength": [ { "min": 224, "max": 8192, "increment": 1 } ], "derivedKeyingMaterialLength": [ { "min": 384, "max": 16384, "increment": 1 } ], "derivedKeyingMaterialChildLength": [ { "min": 384, "max": 16384, "increment": 1 } ] }, { "hashAlg": [ "sha2-384", "sha2-512" ], "initiatorNonceLength": [ { "min": 64, "max": 2048, "increment": 1 } ], "responderNonceLength": [ { "min": 64, "max": 2048, "increment": 1 } ], "diffieHellmanSharedSecretLength": [ { "min": 224, "max": 8192, "increment": 1 } ], "derivedKeyingMaterialLength": [ { "min": 1024, "max": 16384, "increment": 1 } ], "derivedKeyingMaterialChildLength": [ { "min": 1024, "max": 16384, "increment": 1 } ] } ] } ]¶
The ACVP server provides test vectors to the ACVP client, which are then processed and returned to the ACVP server for validation. A typical ACVP validation test session would require multiple test vector sets to be downloaded and processed by the ACVP client. Each test vector set represents an individual cryptographic algorithm defined during the capability exchange. This section describes the JSON schema for a test vector set used with SP800-135 IKEv2 KDF algorithms.¶
The test vector set JSON schema is a multi-level hierarchy that contains meta data for the entire vector set as well as individual test vectors to be processed by the ACVP client. The following table describes the JSON elements at the top level of the hierarchy.¶
JSON Values | Description | JSON Type |
---|---|---|
acvVersion | Protocol version identifier | string |
vsId | Unique numeric vector set identifier | integer |
algorithm | Algorithm defined in the capability exchange | string |
mode | Mode defined in the capability exchange | string |
revision | Protocol test revision selected | string |
testGroups | Array of test group JSON objects, which are defined in Section 8.1 | array |
An example of this would look like this¶
[ { "acvVersion": <version> }, { "vsId": 1, "algorithm": "Alg1", "mode": "Mode1", "revision": "Revision1.0", "testGroups": [ ... ] } ]¶
The testGroups element at the top level in the test vector JSON object is an array of test groups. Test vectors are grouped into similar test cases to reduce the amount of data transmitted in the vector set. For instance, all test vectors that use the same key size would be grouped together. The Test Group JSON object contains meta data that applies to all test vectors within the group. The following table describes the SP800-135 IKEv2 KDF JSON elements of the Test Group JSON object¶
JSON Value | Description | JSON Type |
---|---|---|
tgId | Test group identifier | integer |
testType | Test operations to be performed | string |
hashAlg | The SHA type used for the test vectors | string |
nInitLength | Length of initiator nonce, Ni, in bits | hex |
nRespLength | Length of responder nonce, Nr, in bits | hex |
derivedKeyingMaterialLength | IKE SA Derived Keying Material length expected in bits. Applies to the derivedKeyingMaterial property in Table 8 | integer |
derivedKeyingMaterialChildLength | CHILD SA Derived Keying Material length expected in bits. Applies to the derivedKeyingMaterialChild and derivedKeyingMaterialDh properties in Table 8 | integer |
dhLength | Diffie Hellman shared secret length, g^ir, in bits | integer |
tests | Array of individual test cases | array |
Each test group contains an array of one or more test cases. Each test case is a JSON object that represents a single test vector to be processed by the ACVP client. The following table describes the JSON elements for each SP800-135 IKEv2 KDF test vector.¶
JSON Value | Description | JSON Type |
---|---|---|
tcId | Test case idenfitier | integer |
nInit | Value of the initiator nonce, Ni | hex |
nResp | Value of the responder nonce, Nr | hex |
gir | Diffie-Hellman shared secret, g^ir | hex |
girNew | New Diffie-Hellman shared secret, g^ir new | hex |
spiInit | security parameter indice of the initiator, SPIi | hex |
spiResp | security parameter indice of the responder, SPIr | hex |
Here is an abbreviated yet fully constructed example of the prompt.¶
{ "vsId": 1, "algorithm": "kdf-components", "mode": "IKEv2", "revision": "1.0", "testGroups": [ { "tgId": 1, "hashAlg": "SHA-1", "dhLength": 224, "nInitLength": 64, "nRespLength": 2048, "derivedKeyingMaterialLength": 16384, "derivedKeyingMaterialChildLength": 16384, "testType": "AFT", "tests": [ { "tcId": 1, "nInit": "258A2A59B5A960A3", "nResp": "1BC7543704848EF6...", "gir": "9528B0F97999E1C7FE...", "girNew": "EC54C9B02FFAFEC...", "spiInit": "52D5397B0061602B", "spiResp": "E45E291943E3E5ED" }, { "tcId": 2, "nInit": "9986940729199F59", "nResp": "479E9DC203FFE874...", "gir": "4380C15BC19F4872EF...", "girNew": "57D5AFAE6D80C15...", "spiInit": "C383DF2C6F9072BF", "spiResp": "5A7026194D4ACF79" } ] } ] }¶
After the ACVP client downloads and processes a vector set, it must send the response vectors back to the ACVP server. The following table describes the JSON object that represents a vector set response.¶
JSON Property | Description | JSON Type |
---|---|---|
acvVersion | The version of the protocol | string |
vsId | The vector set identifier | integer |
testGroups | The test group data | array |
An example of this is the following¶
{ "acvVersion": "version", "vsId": 1, "testGroups": [ ... ] }¶
The testGroups section is used to organize the ACVP client response in a similar manner to how it receives vectors. Several algorithms SHALL require the client to send back group level properties in their response. This structure helps accommodate that.¶
JSON Property | Description | JSON Type |
---|---|---|
tgId | The test group identifier | integer |
tests | The test case data | array |
An example of this is the following¶
{ "tgId": 1, "tests": [ ... ] }¶
The following table describes the JSON object that represents a test case response for a SP800-135 IKEv2 KDF.¶
JSON Value | Description | JSON Type |
---|---|---|
tcId | The test case identifier | integer |
sKeySeed | Results of the extraction step, SKEYSEED | hex |
sKeySeedReKey | The SKEYSEED value created when using the CREATE_CHILD_SA exchange to rekey an existing IKE SA | hex |
derivedKeyingMaterial | Derived key Material from expansion step | hex |
derivedKeyingMaterialChild | Expansion step results for CHILD SA | hex |
derivedKeyingMaterialDh | Expansion step results for CHILD SA DH | hex |
Here is an abbreviated example of the response¶
{ "vsId": 1, "algorithm": "kdf-components", "mode": "IKEv2", "revision": "1.0", "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "sKeySeed": "B5B0B203F931C2BD06D9...", "derivedKeyingMaterial": "C807976...", "derivedKeyingMaterialChild": "BA...", "derivedKeyingMaterialDh": "4A222...", "sKeySeedReKey": "7076E7DB098CE1A..." }, { "tcId": 2, "sKeySeed": "DAF33468A586B7E705CA...", "derivedKeyingMaterial": "5659749...", "derivedKeyingMaterialChild": "2A...", "derivedKeyingMaterialDh": "4554A...", "sKeySeedReKey": "CF78ADF8EE17348..." } ] } ] }¶
There are no additional security considerations outside of those outlined in the ACVP document.¶
This document does not require any action by IANA.¶
The following is a example JSON object advertising support for SHA-256.¶
The following is a example JSON object for SP800-135 IKEv2 KDF test vectors sent from the ACVP server to the crypto module.¶
The following is a example JSON object for SP800-135 IKEv2 KDF test results sent from the crypto module to the ACVP server.¶