Internet-Draft | ACVP KAS KDF OneStepNoCounter | November 2024 |
Hammett | 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 KDA-OneStepNoCounter SP800-56C 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 KDA-OneStepNoCounter SP800-56C 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 algorithms MAY be advertised by the ACVP compliant cryptographic module:¶
The ACVP server performs a set of tests on the KDAs specific to the KAS protocol in order to assess the correctness and robustness of the implementation. A typical ACVP validation session SHALL require multiple tests to be performed for every supported permutation of KDA capabilities. This section describes the design of the tests used to validate implementations of KDA algorithms.¶
There are two test types for KDA testing:¶
The tests described in this document have the intention of ensuring an implementation is conformant to [SP800-56Cr2].¶
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 KDA-OneStepNoCounter SP800-56C 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 KDA-OneStepNoCounter SP800-56C mode capabilities are advertised as JSON objects within a root "algorithm" object. The OneStepNoCounter differs from the OneStep KDA only so far as the "l" property is specified on a per auxiliary function basis, there is no counter or loop within the KDA implementation itself, and as such is limited to producing DKM at a maximum length of the output length of the auxiliary function.¶
A registration SHALL use these properties:¶
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
algorithm | The algorithm under test | value | KDA |
mode | The mode under test | value | OneStepNoCounter |
revision | The algorithm testing revision to use. | value | "Sp800-56Cr2" |
prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See Section 7.2.1 |
auxFunctions | The auxiliary capabilities of the implementation. | array of Section 7.2.2 | See Section 7.2.2 |
fixedInfoPattern | The pattern used for fixedInfo construction. | string | See Section 7.2.3 |
encoding | The encoding type to use with fixedInfo construction. Note concatenation is currently supported. ASN.1 should be coming. | array of string | concatenation |
z | The domain of values representing the min/max lengths of Z the implementation can support. | Domain |
Some algorithm implementations rely on other cryptographic primitives. For example, IKEv2 uses an underlying SHA algorithm. 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:¶
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
algorithm | a prerequisite algorithm | value | DRBG, HMAC, KMAC, SHA |
valValue | algorithm validation number | value | actual number or "same" |
prereqAlgVal | prerequisite algorithm validation | object with algorithm and valValue properties | see above |
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
auxFunctionName | The auxiliary function to use. | string | SHA-1, SHA2-224, SHA2-256, SHA2-384, SHA2-512, SHA2-512/224, SHA2-512/256, SHA3-224, SHA3-256, SHA3-384, SHA3-512, HMAC-SHA-1, HMAC-SHA2-224, HMAC-SHA2-256, HMAC-SHA2-384, HMAC-SHA2-512, HMAC-SHA2-512/224, HMAC-SHA2-512/256, HMAC-SHA3-224, HMAC-SHA3-256, HMAC-SHA3-384, HMAC-SHA3-512, KMAC-128, KMAC-256 |
l | The length (in bits) of the keying material to derive. | number | (up to a max of 2048 for KMAC). The length may not exceed the output length of the auxiliary function. |
macSaltMethods | How the salt is determined (default being all 00s, random being a random salt). Required for MAC based auxFunctions. | array of string | default, random |
IUTs MUST be capable of specifying how the FixedInfo is constructed for the KDA construction. Note that for the purposes of testing against the ACVP system, both uPartyInfo and vPartyInfo are REQUIRED to be registered within the fixed info pattern.¶
Pattern candidates:¶
literal[0123456789ABCDEF]¶
uPartyInfo¶
uPartyId { || ephemeralData }¶
vPartyInfo¶
vPartyId { || ephemeralData }¶
context¶
algorithmId¶
label¶
l¶
t¶
Example (Note that party U is the server in this case "434156536964", party V is the IUT "a1b2c3d4e5"):¶
Evaluated as:¶
{ "algorithm": "KDA", "mode": "OneStepNoCounter", "revision": "Sp800-56Cr2", "prereqVals": [ { "algorithm": "DRBG", "valValue": "123456" }, { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "KMAC", "valValue": "123456" }, { "algorithm": "HMAC", "valValue": "123456" } ], "auxFunctions": [ { "auxFunctionName": "KMAC-128", "l": 256, "macSaltMethods": [ "default" ] } ], "fixedInfoPattern": "t||algorithmId||l||uPartyInfo||vPartyInfo", "encoding": [ "concatenation" ], "z": [{"min": 224, "max": 8192, "increment": 8}] }¶
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 KDA-OneStepNoCounter SP800-56C 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 KDA-OneStepNoCounter SP800-56C JSON elements of the Test Group JSON object¶
JSON Values | Description | JSON Type |
---|---|---|
tgId | Test group identifier | integer |
testType | Describes the operation the client should perform on the tests data | string |
tests | Array of individual test cases | See Section 8.2 |
kdfConfiguration | Describes the KDA configuration values used for the group | See Section 8.1.1 |
The 'tgId', 'testType' and 'tests' objects MUST appear in every test group element communicated from the server to the client as a part of a prompt. Other properties are dependent on which 'testType' the group is addressing.¶
Describes the KDA configuration for use under the test group.¶
JSON Value | Description | JSON Type |
---|---|---|
kdfType | The type of KDA to use for the group. | value - oneStepNoCounter |
saltMethod | The strategy used for salting. | value - default (all 00s), random |
fixedInfoPattern | The pattern used for constructing the fixedInfo. | value - See Section 7.2.3. |
fixedInfoEncoding | The pattern used for constructing the fixedInfo. | value - See Section 7.2.3. |
auxFunction | The auxiliary function used in the KDA. | value - See Section 7.2.2. |
l | the bit length of keying material to derive from the KDA | value |
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 KAS/KTS ECC test vector.¶
JSON Value | Description | JSON Type |
---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set. | integer |
kdfParameter | Object representing inputs into the KDA | See Section 8.2.1. |
fixedInfoPartyU | Fixed information specific to party U | See Section 8.2.2. |
fixedInfoPartyV | Fixed information specific to party V | See Section 8.2.2. |
KDA specific options used for the test case.¶
JSON Value | Description | JSON Type |
---|---|---|
kdfType | The type of KDA utilized. | value |
salt | The salt used for the test case. | value |
iv | The iv used for the test case. | value |
algorithmId | The random "algorithID" used for the test case when applicable to the fixedInfo pattern. | value |
context | The random "context" used for the test case when applicable to the fixedInfo pattern. | value |
label | The random "label" used for the test case when applicable to the fixedInfo pattern. | value |
z | shared secret z value to be used for the test case. | value |
t | auxiliary shared secret t. For [SP800-56Cr2] only. | value |
l | the bit length of keying material to derive from the KDA | value |
Fixed information that is included for party U/V for fixed info construction¶
JSON Value | Description | JSON Type |
---|---|---|
partyId | The party identifier | value |
ephemeralData | Ephemeral data (randomly) included as a part of the parties fixed info construction | value |
The following is a example JSON object for KDA oneStepNoCounter test vectors sent from the ACVP server to the crypto module.¶
{ "vsId": 0, "algorithm": "KDA", "mode": "OneStepNoCounter", "revision": "Sp800-56Cr2", "isSample": true, "testGroups": [ { "tgId": 1, "testType": "AFT", "tests": [ { "tcId": 1, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "38C23B0E27A508FA5393630EB2529886", "z": "F1D094E6AC78CA6CF5DF0CF4818AA539C20948A743E6034E517A8BDBD1A5", "l": 256 }, "fixedInfoPartyU": { "partyId": "4BBBCACB4F4935A26F2986D0AC0CA907", "ephemeralData": "2990C3BFDE1B7CB3F25D3BFE3CF532BA6ACD121064AF59B5478D9CFFCE37" }, "fixedInfoPartyV": { "partyId": "5C1821215357627954D1C5AF632D0FA1" } }, { "tcId": 2, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "97D361E33FC00D20DC9441BAAD227525", "z": "9C10B0BCDCBA2DC0C958768F43CA44DCDA25C6C3D9CD2FF59624E7893D53", "l": 256 }, "fixedInfoPartyU": { "partyId": "CD7EE0E0F27F8EBF84404186DB0E901F" }, "fixedInfoPartyV": { "partyId": "1F44DA482D5B7C8A3E5DD2A0757C3046", "ephemeralData": "7757E4C4FC9DB1BE7F26947F7525ECAFDFE965F6008345049B5349B732BA" } }, { "tcId": 3, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "651366BEFC5E4865FA52E7AC9423EC3C", "z": "B4C99EA76F6814CC3407182B0FDF3398602E87A6F47002ECC795F37B04F1", "l": 256 }, "fixedInfoPartyU": { "partyId": "CB41B82321FF7582518EB845DBEEC087" }, "fixedInfoPartyV": { "partyId": "394E1F258A6738BD5EFA3BAE1D2AB005", "ephemeralData": "5CC62780887CF384D8979EEEA2A39DD21310E519B58C8DA5DF1A5398E56D" } } ], "kdfConfiguration": { "kdfType": "oneStepNoCounter", "l": 256, "saltLen": 1312, "saltMethod": "default", "fixedInfoPattern": "t||uPartyInfo||vPartyInfo||l", "fixedInfoEncoding": "concatenation", "auxFunction": "KMAC-128" } }, { "tgId": 56, "testType": "VAL", "tests": [ { "tcId": 276, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "923900078F6BC4FDC56E5455D27A1E4F", "z": "8FAC52430C78858C06306EFAF1749C589A3D96B3A676D9553BC433EF", "l": 256 }, "fixedInfoPartyU": { "partyId": "BF1FD4A8751D00541ABDB52BE0E6E17E", "ephemeralData": "50F99C59DEA36E5CB0D128E72D02F7B7BB690632CF99957A4F616CD4" }, "fixedInfoPartyV": { "partyId": "AEF9114C4C033F4AE66FF4B966B85EBA", "ephemeralData": "24A7E21C88C301034ED414489BDDF582C865BB0E4DABC0481A089C5F" }, "dkm": "925A34BB3627FEB1C8999F37733D2F60125C9044DC33419BDC094FE201FEE498" }, { "tcId": 277, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "4A0D00323660B72A1102BEDF4A5387D1", "z": "7EAFA88B393B13C02BC01962940EDAEBA77F77CCF224F99541A7DE3F", "l": 256 }, "fixedInfoPartyU": { "partyId": "91F3D37CA74683679F234B4E3CA6773F" }, "fixedInfoPartyV": { "partyId": "1BF9949279A59BA5B16D3C2C25E2CC1E" }, "dkm": "BB7F921AB9F5DFDAE8BEB573BFACC535A5C2AFF953FE6B22F5720D29533BFFEC" }, { "tcId": 278, "kdfParameter": { "kdfType": "oneStepNoCounter", "salt": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "t": "1309E81CDA66BA615A7290060EEB471B", "z": "58B3C24FDF4A29B86F43486ED3AC99631CA38ADBF886E08BCDE546DF", "l": 256 }, "fixedInfoPartyU": { "partyId": "7B32F2C03BCF644CC1350A9D2DEB837B", "ephemeralData": "780A86EB63597F769F587D2E2CC87D06FCB55A99A5D46B920DC8F655" }, "fixedInfoPartyV": { "partyId": "B003871617E84AEBCBF9F2CFF6C6AF08", "ephemeralData": "94E440FC83142DBE94EA9D5B610C22649DD676DCDA75910E06E646C5" }, "dkm": "BD8D9CA80D431CF95DCFFF0BEC3BB7DE47700EAC91E3FE2E9706B520A03042FB" } ], "kdfConfiguration": { "kdfType": "oneStepNoCounter", "l": 256, "saltLen": 1312, "saltMethod": "default", "fixedInfoPattern": "t||uPartyInfo||vPartyInfo||l", "fixedInfoEncoding": "concatenation", "auxFunction": "KMAC-128" } } ] }¶
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 |
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 |
The testCase 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.¶
The following table describes the JSON object that represents a test case response for a KDA-OneStepNoCounter SP800-56C.¶
JSON Property | Description | JSON Type |
---|---|---|
tcId | The test case identifier | integer |
testPassed | Was the provided dkm valid? Only valid for the "VAL" test type. |
boolean |
dkm | The derived keying material. Provided by the IUT for "AFT" test type test cases. For single expansion tests. | hex |
dkms | The derived keying materials. Provided by the IUT for "AFT" test type test cases. For multi expansion groups. | array of hex |
Here is an abbreviated example of the response.¶
{ "vsId": 0, "algorithm": "KDA", "mode": "OneStepNoCounter", "revision": "Sp800-56Cr2", "isSample": true, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "dkm": "703574C2B2959324555C0E42DAB1AA8E83E8A590C27C4C949B594ABDBADB9722" }, { "tcId": 2, "dkm": "8F0A2955B8B08B5D26D9B242B2D45ECF019EC45D839D74CC8640F238A6CCD422" }, { "tcId": 3, "dkm": "79EB275B415B038D5F8AC446D52153C3287B2552DEF878B2BAAAADEEF753AE9C" }, { "tcId": 4, "dkm": "C6BA73A759927701125CA2D1D26B1909799813FFF77387F8B24AC29A4B4B17EB" }, { "tcId": 5, "dkm": "3C60B5EC3315E248C6361BDEF27BB9BFA560B8F30375AB7C27142858D51AF3B4" } ] }, { "tgId": 62, "tests": [ { "tcId": 141, "testPassed": true }, { "tcId": 142, "testPassed": false }, { "tcId": 143, "testPassed": true }, { "tcId": 144, "testPassed": true }, { "tcId": 145, "testPassed": true } ] } ] }¶
There are no additional security considerations outside of those outlined in the ACVP document.¶
This document does not require any action by IANA.¶