Internet-Draft | ACVP KAS ECC SP800-56Ar3 | 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. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
There are no acknowledgements.¶
This document defines the JSON schema for testing SP800-56Ar3 KAS ECC 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-56Ar3 KAS ECC 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:¶
The ACVP server performs a set of tests on 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 KAS capabilities. This section describes the design of the tests used to validate implementations of KAS algorithms.¶
There are two test types for KAS testing:¶
The tests described in this document have the intention of ensuring an implementation is conformant to [SP800-56Ar3].¶
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 KAS ECC 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" } ]¶
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 | Optional |
---|---|---|---|---|
algorithm | a prerequisite algorithm | value | CMAC, DRBG, ECDSA, HMAC, KMAC, SHA, SP800-108 | No |
valValue | algorithm validation number | value | actual number or "same" | No |
prereqAlgVal | prerequistie algorithm validation | object with algorithm and valValue properties | see above | Yes |
KAS has conditional prerequisite algorithms, depending on the capabilities registered:¶
Prerequisite Algorithm | Condition |
---|---|
DRBG | Always REQUIRED |
SHA | Always REQUIRED |
ECDSA | If the implementation supports fullVal (see Section 7.4), then ECDSA keyVer validation is REQUIRED. If the implementation supports keyPairGen (see Section 7.4), then ECDSA keyGen and ECDSA keyVer validation are REQUIRED. |
CMAC | CMAC validation REQUIRED when IUT is performing KeyConfirmation (KC) or a KDF and utilizing CMAC. |
HMAC | HMAC validation REQUIRED when IUT is performing KeyConfirmation (KC) or a KDF and utilizing HMAC. |
KMAC | KMAC validation REQUIRED when IUT is performing KeyConfirmation (KC) or a KDF and utilizing KMAC. |
Each algorithm capability advertised is a self-contained JSON object using the following values.¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
algorithm | The algorithm under test | value | KAS-ECC | No |
revision | The algorithm testing revision to use. | value | "Sp800-56Ar3" | No |
prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See Section 7.2 | No |
function | Type of function supported | array | See Section 7.4 | Yes |
iutId | The identifier of the IUT, i.e., the IDu or IDv from Sections 5.8 and 6 of SP 800-56Ar3. This identifier is referred to as uPartyId or vPartyId in Section 7.5.1.3. | hex | No | |
scheme | Array of supported key agreement schemes each having their own capabilities | object | See Section 7.5.1 | No |
domainParameterGenerationMethods | Array of IUT supported domain parameter generation methods. | array | P-224, P-256, P-384, P-521, K-233, K-283, K-409, K-571, B-233, B-283, B-409, B-571 | No |
Note: Some optional values are REQUIRED depending on the algorithm. Failure to provide these values will result in the ACVP server returning an error to the ACVP client during registration.¶
The following function types MAY be advertised by the ACVP compliant crypto module:¶
All other scheme capabilities are advertised as a self-contained JSON object using the following values. Note that AT LEAST one valid scheme must be registered.¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
kasRole | The roles that the IUT can support for the scheme. A value of "initiator" indicates that the IUT can support the role of Party U. A value of "responder" indicates that the IUT can support the role of Party V. "initiator" and "responder" are the legacy terms (pre-SP 800-56Ar2) for Party U and Party V. | array of string | "initiator", "responder" | No |
kdfMethods | The KDF methods to use when testing KAS schemes. | object | Section 7.5.1.1 | No |
keyConfirmationMethod | The KeyConfirmation capabilities (when supported) for the scheme. | object | Section 7.5.1.2 | Yes |
l | The length of the key to derive (using a KDF) or transport (using a KTS scheme). This value should be large enough to accommodate the key length used for the mac algorithms in use for key confirmation, ideally the maximum value the IUT can support with their KAS/KTS implementation. Maximum value (for testing purposes) is 1024. | integer | 128 minimum without KC, 136 minimum with KC, maximum 1024. | No |
Note that AT LEAST one KDF Method is required for KAS schemes. The following MAY be advertised by the ACVP compliant crypto module:¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
oneStepKdf | Indicates the IUT will be testing key derivation using the SP800-56Cr1 OneStepKdf. | object | Section 7.5.1.1.1 | Yes |
oneStepNoCounterKdf | Indicates the IUT will be testing key derivation using the SP800-56Cr1 OneStepNoCounterKdf. | object | Section 7.5.1.1.2 | Yes |
twoStepKdf | Indicates the IUT will be testing key derivation using the SP800-56Cr1 TwoStepKdf. | object | Section 7.5.1.1.3 | Yes |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
auxFunctions | The auxiliary functions to use with the KDF. | array of Table 8 | See Table 8 | No |
fixedInfoPattern | The pattern used for fixedInfo construction. | string | See Section 7.5.1.3 | No |
encoding | The encoding type to use with fixedInfo construction. Note concatenation is currently supported. ASN.1 should be coming. | array of string | concatenation | No |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
auxFunctionName | The auxiliary function to use. Note that a customization string of "KDF" is used for the function when KMAC is utilized. | 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 | No |
macSaltMethods | How the salt is determined (default being all 00s, random being a random salt). | array of string | default, random | Not optional for mac based auxiliary functions. |
The one step no counter KDF is a special implementation of the one step KDF. This implementation of the KDF does not utilize a 32 bit counter as a part of the concatenation that gets fed into function H
. As such, there is no loop within the KDF due to there being no information changing between iterations of the potential concatenation, and the KDF output length is capped at the output length of the chosen aux function (or 2048 in the case of KMAC).¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
auxFunctions | The auxiliary functions to use with the KDF. | array of Table 10 | See Table 10 | No |
fixedInfoPattern | The pattern used for fixedInfo construction. | string | See Section 7.5.1.3 | No |
encoding | The encoding type to use with fixedInfo construction. Note concatenation is currently supported. ASN.1 should be coming. | array of string | concatenation | No |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
auxFunctionName | The auxiliary function to use. Note that a customization string of "KDF" is used for the function when KMAC is utilized. | 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 | No |
l | The length of the keying material to derive (cannot exceed output length of aux function) | integer | may not exceed output length of aux function | No |
macSaltMethods | How the salt is determined (default being all 00s, random being a random salt). | array of string | default, random | Not optional for mac based auxiliary functions. |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
capabilities | The capabilities supported for the Two Step KDF. | array of Table 12 | See Table 12 | No |
Note this capabilities object is very similar to the capability object from SP800-108. Specific restrictions inherited from SP800-108 include the following.¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
macSaltMethod | How the salt is determined (default being all 00s, random being a random salt). | array of string | default, random | Not optional for mac based auxiliary functions. |
fixedInfoPattern | The pattern used for fixedInfo construction. | string | See Section 7.5.1.3 | No |
encoding | The encoding type to use with fixedInfo construction. Note concatenation is currently supported. ASN.1 should be coming. | array of string | concatenation | No |
kdfMode | The strategy for running the KDF. | string | counter, fedback, double pipeline iteration | No |
macMode | The macMode supported by the KDF. | array of string | CMAC-AES128, CMAC-AES192, CMAC-AES256, 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 | No |
fixedDataOrder | The counter locations supported by the KDF. | array of string | none, before fixed data, after fixed data, before iterator | No |
counterLength | The counter lengths supported for the KDF. | array of integer | 8, 16, 24, 32 | Not optional for counter mode. |
supportedLengths | The supported derivation lengths. | domain | Single range (of literal) expected. Registered value must support the L value provided. | No |
supportsEmptyIv | The KDF supports an empty IV (feedback mode). | boolean | true, false | No |
requiresEmptyIv | The KDF requires an empty IV (feedback mode). | boolean | true, false | Yes |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
macMethods | The MAC methods to use when testing KAS or KTS schemes with key confirmation. | object | Section 7.5.1.4 | No |
keyConfirmationDirections | The directions in which key confirmation is supported. | array | unilateral, bilateral | No |
keyConfirmationRoles | The roles in which key confirmation is supported. | array | provider, recipient | No |
IUTs MUST be capable of specifying how the FixedInfo is constructed for the KAS/KTS negotiation. 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 { || ephemeralKey } { || ephemeralNonce } { || dkmNonce }¶
vPartyInfo¶
vPartyId { || ephemeralKey } { || ephemeralNonce } { || dkmNonce }¶
context¶
algorithmId¶
label¶
l¶
Example (Note that party U is the server in this case "434156536964", party V is the IUT "a1b2c3d4e5"):¶
Evaluated as:¶
Note that AT LEAST one mac method must be supplied when making use of Key Confirmation.¶
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
CMAC | Utilizes CMAC as the MAC algorithm. | object | See Section 7.5.1.4.1. Note that the keyLen must be 128, 192, or 256 for this MAC. | Yes |
HMAC-SHA-1 | Utilizes HMAC-SHA-1 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-224 | Utilizes HMAC-SHA2-224 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-256 | Utilizes HMAC-SHA2-256 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-384 | Utilizes HMAC-SHA2-384 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-512 | Utilizes HMAC-SHA2-512 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-512/224 | Utilizes HMAC-SHA2-512/224 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA2-512/256 | Utilizes HMAC-SHA2-512/256 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA3-224 | Utilizes HMAC-SHA3-224 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA3-256 | Utilizes HMAC-SHA3-256 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA3-384 | Utilizes HMAC-SHA3-384 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
HMAC-SHA3-512 | Utilizes HMAC-SHA3-512 as the MAC algorithm. | object | See Section 7.5.1.4.1 | Yes |
KMAC-128 | Utilizes KMAC-128 as the MAC algorithm. Note that a customization string of "KC" is used for the function when KMAC is utilized for Key Confirmation. | object | See Section 7.5.1.4.1 | Yes |
KMAC-256 | Utilizes KMAC-256 as the MAC algorithm. Note that a customization string of "KC" is used for the function when KMAC is utilized for Key Confirmation. | object | See Section 7.5.1.4.1 | Yes |
JSON Value | Description | JSON Type | Valid Values | Optional |
---|---|---|---|---|
keyLen | The amount of bits from the DKM to pass into the KeyConfirmation MAC function. | integer | 128 - 512. Note that the DKM is REQUIRED to have at least 8 bits available after subtracting the keyLen specified. | No |
macLen | The amount of bits to use as the tag from the MAC function. | integer | 64 - 512. | No |
The following is a example JSON object advertising support for KAS ECC.¶
{ "algorithm": "KAS-ECC", "revision": "Sp800-56Ar3", "prereqVals": [ { "algorithm": "ECDSA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" }, { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "KMAC", "valValue": "123456" }, { "algorithm": "HMAC", "valValue": "123456" } ], "function": [ "keyPairGen", "partialVal" ], "iutId": "123456ABCD", "scheme": { "ephemeralUnified": { "kasRole": [ "initiator", "responder" ], "kdfMethods": { "oneStepKdf": { "auxFunctions": [ { "auxFunctionName": "KMAC-128", "macSaltMethods": [ "default" ] } ], "fixedInfoPattern": "algorithmId||l||uPartyInfo||vPartyInfo", "encoding": [ "concatenation" ] }, "oneStepNoCounterKdf": { "auxFunctions": [ { "auxFunctionName": "KMAC-128", "l": 256, "macSaltMethods": [ "default" ] } ], "fixedInfoPattern": "algorithmId||l||uPartyInfo||vPartyInfo", "encoding": [ "concatenation" ] }, "twoStepKdf": { "capabilities": [ { "macSaltMethods": [ "random" ], "fixedInfoPattern": "l||label||uPartyInfo||vPartyInfo||context", "encoding": [ "concatenation" ], "kdfMode": "feedback", "macMode": [ "HMAC-SHA3-224" ], "supportedLengths": [ 512 ], "fixedDataOrder": [ "after fixed data" ], "counterLength": [ 32 ], "requiresEmptyIv": false, "supportsEmptyIv": false } ] } }, "l": 512 }, "onePassDh": { "kasRole": [ "initiator", "responder" ], "kdfMethods": { "oneStepKdf": { "auxFunctions": [ { "auxFunctionName": "KMAC-128", "macSaltMethods": [ "default" ] } ], "fixedInfoPattern": "algorithmId||l||uPartyInfo||vPartyInfo", "encoding": [ "concatenation" ] }, "twoStepKdf": { "capabilities": [ { "macSaltMethods": [ "random" ], "fixedInfoPattern": "l||label||uPartyInfo||vPartyInfo||context", "encoding": [ "concatenation" ], "kdfMode": "feedback", "macMode": [ "HMAC-SHA3-224" ], "supportedLengths": [ 512 ], "fixedDataOrder": [ "after fixed data" ], "counterLength": [ 32 ], "requiresEmptyIv": false, "supportsEmptyIv": false } ] } }, "keyConfirmationMethod": { "macMethods": { "KMAC-128": { "keyLen": 128, "macLen": 128 } }, "keyConfirmationDirections": [ "unilateral" ], "keyConfirmationRoles": [ "provider", "recipient" ] }, "l": 512 } }, "domainParameterGenerationMethods": [ "P-224" ] }¶
The various schemes of KAS all have their own requirements as to keys and nonces per scheme, per party. The below table demonstrates those generation requirements, i.e., what values will be provided by the server per scheme and party:¶
Scheme | KasMode | KasRole | KeyConfirmationRole | KeyConfirmationDirection | StaticKeyPair | EphemeralKeyPair | EphemeralNonce | DkmNonce |
---|---|---|---|---|---|---|---|---|
fullUnified | NoKdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
fullUnified | NoKdfNoKc | ResponderPartyV | None | None | True | True | False | False |
fullUnified | KdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
fullUnified | KdfNoKc | ResponderPartyV | None | None | True | True | False | False |
fullUnified | KdfKc | InitiatorPartyU | Provider | Unilateral | True | True | False | False |
fullUnified | KdfKc | InitiatorPartyU | Provider | Bilateral | True | True | False | False |
fullUnified | KdfKc | InitiatorPartyU | Recipient | Unilateral | True | True | False | False |
fullUnified | KdfKc | InitiatorPartyU | Recipient | Bilateral | True | True | False | False |
fullUnified | KdfKc | ResponderPartyV | Provider | Unilateral | True | True | False | False |
fullUnified | KdfKc | ResponderPartyV | Provider | Bilateral | True | True | False | False |
fullUnified | KdfKc | ResponderPartyV | Recipient | Unilateral | True | True | False | False |
fullUnified | KdfKc | ResponderPartyV | Recipient | Bilateral | True | True | False | False |
fullMqv | NoKdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
fullMqv | NoKdfNoKc | ResponderPartyV | None | None | True | True | False | False |
fullMqv | KdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
fullMqv | KdfNoKc | ResponderPartyV | None | None | True | True | False | False |
fullMqv | KdfKc | InitiatorPartyU | Provider | Unilateral | True | True | False | False |
fullMqv | KdfKc | InitiatorPartyU | Provider | Bilateral | True | True | False | False |
fullMqv | KdfKc | InitiatorPartyU | Recipient | Unilateral | True | True | False | False |
fullMqv | KdfKc | InitiatorPartyU | Recipient | Bilateral | True | True | False | False |
fullMqv | KdfKc | ResponderPartyV | Provider | Unilateral | True | True | False | False |
fullMqv | KdfKc | ResponderPartyV | Provider | Bilateral | True | True | False | False |
fullMqv | KdfKc | ResponderPartyV | Recipient | Unilateral | True | True | False | False |
fullMqv | KdfKc | ResponderPartyV | Recipient | Bilateral | True | True | False | False |
ephemeralUnified | NoKdfNoKc | InitiatorPartyU | None | None | False | True | False | False |
ephemeralUnified | NoKdfNoKc | ResponderPartyV | None | None | False | True | False | False |
ephemeralUnified | KdfNoKc | InitiatorPartyU | None | None | False | True | False | False |
ephemeralUnified | KdfNoKc | ResponderPartyV | None | None | False | True | False | False |
onePassUnified | NoKdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
onePassUnified | NoKdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassUnified | KdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
onePassUnified | KdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassUnified | KdfKc | InitiatorPartyU | Provider | Unilateral | True | True | False | False |
onePassUnified | KdfKc | InitiatorPartyU | Provider | Bilateral | True | True | False | False |
onePassUnified | KdfKc | InitiatorPartyU | Recipient | Unilateral | True | True | False | False |
onePassUnified | KdfKc | InitiatorPartyU | Recipient | Bilateral | True | True | False | False |
onePassUnified | KdfKc | ResponderPartyV | Provider | Unilateral | True | False | False | False |
onePassUnified | KdfKc | ResponderPartyV | Provider | Bilateral | True | False | True | False |
onePassUnified | KdfKc | ResponderPartyV | Recipient | Unilateral | True | False | True | False |
onePassUnified | KdfKc | ResponderPartyV | Recipient | Bilateral | True | False | True | False |
onePassMqv | NoKdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
onePassMqv | NoKdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassMqv | KdfNoKc | InitiatorPartyU | None | None | True | True | False | False |
onePassMqv | KdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassMqv | KdfKc | InitiatorPartyU | Provider | Unilateral | True | True | False | False |
onePassMqv | KdfKc | InitiatorPartyU | Provider | Bilateral | True | True | False | False |
onePassMqv | KdfKc | InitiatorPartyU | Recipient | Unilateral | True | True | False | False |
onePassMqv | KdfKc | InitiatorPartyU | Recipient | Bilateral | True | True | False | False |
onePassMqv | KdfKc | ResponderPartyV | Provider | Unilateral | True | False | False | False |
onePassMqv | KdfKc | ResponderPartyV | Provider | Bilateral | True | False | True | False |
onePassMqv | KdfKc | ResponderPartyV | Recipient | Unilateral | True | False | True | False |
onePassMqv | KdfKc | ResponderPartyV | Recipient | Bilateral | True | False | True | False |
onePassDh | NoKdfNoKc | InitiatorPartyU | None | None | False | True | False | False |
onePassDh | NoKdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassDh | KdfNoKc | InitiatorPartyU | None | None | False | True | False | False |
onePassDh | KdfNoKc | ResponderPartyV | None | None | True | False | False | False |
onePassDh | KdfKc | InitiatorPartyU | Recipient | Unilateral | False | True | False | False |
onePassDh | KdfKc | ResponderPartyV | Provider | Unilateral | True | False | False | False |
staticUnified | NoKdfNoKc | InitiatorPartyU | None | None | True | False | False | False |
staticUnified | NoKdfNoKc | ResponderPartyV | None | None | True | False | False | False |
staticUnified | KdfNoKc | InitiatorPartyU | None | None | True | False | False | True |
staticUnified | KdfNoKc | ResponderPartyV | None | None | True | False | False | False |
staticUnified | KdfKc | InitiatorPartyU | Provider | Unilateral | True | False | False | True |
staticUnified | KdfKc | InitiatorPartyU | Provider | Bilateral | True | False | False | True |
staticUnified | KdfKc | InitiatorPartyU | Recipient | Unilateral | True | False | False | True |
staticUnified | KdfKc | InitiatorPartyU | Recipient | Bilateral | True | False | False | True |
staticUnified | KdfKc | ResponderPartyV | Provider | Unilateral | True | False | False | False |
staticUnified | KdfKc | ResponderPartyV | Provider | Bilateral | True | False | True | False |
staticUnified | KdfKc | ResponderPartyV | Recipient | Unilateral | True | False | True | False |
staticUnified | KdfKc | ResponderPartyV | Recipient | Bilateral | True | False | True | False |
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-56Ar3 KAS ECC 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 9.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 secure hash JSON elements of the Test Group JSON object.¶
The test group for KAS/KTS ECC is as follows:¶
JSON Value | Description | JSON Type | Optional |
---|---|---|---|
tgId | Numeric identifier for the test group, unique across the entire vector set. | value | No |
testType | The type of test for the group (AFT or VAL). | value | No |
scheme | The scheme in use for the group. See Section 7.5.1 for possible values. | value | No |
kasRole | The role of the IUT for the test group. A value of "initiator" indicates that the IUT will assume the role of Party U. A value of "responder" indicates that the IUT will assume the role of Party V. "initiator" and "responder" are the legacy terms (pre-SP 800-56Ar2) for Party U and Party V. | value | No |
l | The length of key to derive/transport. | value | No |
iutId | The identifier of the IUT, i.e., the IDu or IDv (depends on the value of kasRole) from Sections 5.8 and 6 of SP 800-56Ar3. This identifier is referred to as uPartyId or vPartyId in Section 7.5.1.3. It is provided to the ACVP server in the capabilities registration. | value | No |
serverId | The identifier of the ACVP server, i.e., the IDu or IDv (depends on the role being assumed by the ACVP server; dependent on the value of kasRole) from Sections 5.8 and 6 of SP 800-56Ar3. This identifier is referred to as uPartyId or vPartyId in Section 7.5.1.3. A hex string. | value | No |
kdfConfiguration | The KDF configuration for the group. | Object, See Section 9.1.1 | No |
macConfiguration | The MAC configuration for the group. | Object, See Section 9.1.2 | Not optional for schemes using key confirmation. |
keyConfirmationDirection | The key confirmation direction. | value | Yes |
keyConfirmationRole | The key confirmation role. | value | Yes |
domainParameterGenerationMode | The domain parameter type used. | value | No |
tests | The tests for the group. | Array of objects, See Section 9.2. | No |
Describes the KDF configuration for use under the test group.¶
JSON Value | Description | JSON Type | Optional |
---|---|---|---|
kdfType | The type of KDF to use for the group. | value - oneStep, oneStepNoCounter, twoStep | No |
saltMethod | The strategy used for salting. | value - default (all 00s), random | No |
fixedInfoPattern | The pattern used for constructing the fixedInfo. | value - See Section 7.5.1.3. | No |
fixedInfoEncoding | The pattern used for constructing the fixedInfo. | value - See Section 7.5.1.3. | No |
auxFunction | The auxiliary function used in the KDF. | value - See Table 8. | Not optional for OneStepKdf. |
macMode | The MAC function used in the KDF. | value - See Table 12. | Not optional for TwoStepKdf. |
counterLocation | The counter location. | value | Yes |
counterLen | The counter length. | value | Yes |
ivLen | The iv length. | value | Yes |
Describes the key confirmation MAC configuration for use under the test group.¶
JSON Value | Description | JSON Type | Optional |
---|---|---|---|
macType | The macType used in key confirmation. | value - 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, CMAC, KMAC-128, KMAC-256 | No |
keyLen | The number of bits to take from the DKM to use for the mac key in key confirmation. | value | No |
macLen | The number of bits to use for the MAC tag. | value | No |
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 | Optional |
---|---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set. | value | No |
ephemeralPublicKeyIutX | The IUT's ephemeral public key X value. | value | Yes |
ephemeralPublicKeyIutY | The IUT's ephemeral public key Y value. | value | Yes |
staticPublicKeyIutX | The IUT's static public key X value. | value | Yes |
staticPublicKeyIutY | The IUT's static public key Y value. | value | Yes |
ephemeralPublicKeyServerX | The Server's ephemeral public key X value. | value | Yes |
ephemeralPublicKeyServerY | The Server's ephemeral public key Y value. | value | Yes |
staticPublicKeyServerX | The Server's static public key X value. | value | Yes |
staticPublicKeyServerY | The Server's static public key Y value. | value | Yes |
dkmNonceIut | The IUT's nonce used in static schemes for Key Confirmation. | value | Yes |
ephemeralNonceIut | The IUT's ephemeral nonce used in some schemes. | value | Yes |
dkmNonceServer | The Server's nonce used in static schemes for Key Confirmation. | value | Yes |
ephemeralNonceServer | The Server's ephemeral nonce used in some schemes. | value | Yes |
staticPrivateKeyIut | The IUT's static private key. | value | Yes |
ephemeralPrivateKeyIut | The IUT's ephemeral private key. | value | Yes |
kdfParameter | The KDF parameters for this test case. | value - See Section 9.2.1. | Yes |
dkm | The derived keying material. | value | Yes |
tag | The tag generated as a part of key conformation (from the IUT perspective). | value | Yes |
KDF specific options used for the test case.¶
JSON Value | Description | JSON Type | Optional |
---|---|---|---|
kdfType | The type of KDF utilized. | value | No |
salt | The salt used for the test case. | value | Yes |
iv | The iv used for the test case. | value | Yes |
algorithmId | The random "algorithID" used for the test case when applicable to the fixedInfo pattern. | value | Yes |
context | The random "context" used for the test case when applicable to the fixedInfo pattern. | value | Yes |
label | The random "label" used for the test case when applicable to the fixedInfo pattern. | value | Yes |
The following is a example JSON object for KAS-FFC test vectors sent from the ACVP server to the crypto module.¶
{ "vsId": 0, "algorithm": "KAS-ECC", "revision": "Sp800-56Ar3", "testGroups": [ { "tgId": 1, "testType": "AFT", "tests": [ { "staticPublicServerX": "B7A4DDA5DC3A317647B39F39E05390A88F12F53861C24635", "staticPublicServerY": "CA2776BF6A0F35B727F3057340E89A1600915B81BB2E87B7", "tcId": 1, "ephemeralNonceServer": "44588073AACC3CFD6C9A5E2A0973B6BDDFC35F67EEA96FD0B070DF05F24A4B381F05CE9ACC67739B157CF8EE7459A64E", "kdfParameter": { "kdfType": "oneStep", "salt": "00000000000000000000000000000000", "algorithmId": "A51CF275ABE573209CBC606A934352FE" } } ], "domainParameterGenerationMode": "P-224", "scheme": "staticUnified", "kasRole": "initiator", "l": 512, "iutId": "123456ABCD", "serverId": "434156536964", "kdfConfiguration": { "kdfType": "oneStep", "saltMethod": "default", "fixedInfoPattern": "algorithmId||l||uPartyInfo||vPartyInfo", "fixedInfoEncoding": "concatenation", "auxFunction": "KMAC-128" }, "macConfiguration": { "macType": "KMAC-128", "keyLen": 128, "macLen": 128 }, "keyConfirmationDirection": "unilateral", "keyConfirmationRole": "provider" }, { "tgId": 2, "testType": "VAL", "tests": [ { "staticPublicServerX": "87F6D507656EBC3D4D655FD4C0F13BE0F98D5B7472A3B247", "staticPublicServerY": "CFBC8EE38F4EF2DF1B97BF410ABCF4968F1115E7B80E34C6", "staticPrivateIut": "F43B6F08F570D469ED31CF920516114B1B5E3C3C7BDD6B14", "staticPublicIutX": "7573E06C6BACA56D5AFD08A1A014776BDDA7F4593645A07D", "staticPublicIutY": "93D0C1CDC5C23BD045AD6258448436A55E3C310B4333F551", "tcId": 21, "ephemeralNonceServer": "6F4C587D3CEF0B1D0D5B359B18FFB8B72C879EB3997E768826552082D56931D965E7F315FD7254C434871FA1E160873F", "dkmNonceIut": "AB5CCC3B75AA1FB85D28D5D53126B362AAABA3C51D427B6D138BEFD7EE636E1BC239FB45630BF6D7F0E80B59835916B9", "kdfParameter": { "kdfType": "oneStep", "salt": "00000000000000000000000000000000", "algorithmId": "342BCBC9DE15458BCA294BD16FFA10A7" }, "dkm": "B9FDC93EA0B6A7906C6DB8EC17475B3073A8AD1C24CB1287AB8A6AEA46CABA4FDFD7B0CB77F74CDCF3DFF8DCC41560CF", "tag": "3279D63C9192B7FEF71F6735921B3B46" } ], "domainParameterGenerationMode": "P-224", "scheme": "staticUnified", "kasRole": "initiator", "l": 512, "iutId": "123456ABCD", "serverId": "434156536964", "kdfConfiguration": { "kdfType": "oneStep", "saltMethod": "default", "fixedInfoPattern": "algorithmId||l||uPartyInfo||vPartyInfo", "fixedInfoEncoding": "concatenation", "auxFunction": "KMAC-128" }, "macConfiguration": { "macType": "KMAC-128", "keyLen": 128, "macLen": 128 }, "keyConfirmationDirection": "unilateral", "keyConfirmationRole": "provider" } ] }¶
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 Value | Description | JSON type | Optional |
---|---|---|---|
acvVersion | Protocol version identifier | value | No |
vsId | Unique numeric identifier for the vector set | value | No |
testGroups | Array of JSON objects that represent each test vector group. See Table 24. | array | No |
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 Value | Description | JSON type | Optional |
---|---|---|---|
tgId | The test group Id | value | No |
tests | Array of JSON objects that represent each test vector group. See Table 25. | array | No |
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.¶
JSON Value | Description | JSON type | Optional |
---|---|---|---|
tcId | The test case Id | value | No |
testPassed | Used in VAL test types, should the KAS/KTS negotiation have succeeded? | boolean | Yes |
ephemeralPublicKeyIutX | The IUT's ephemeral public key X value. | value | Yes |
ephemeralPublicKeyIutY | The IUT's ephemeral public key Y value. | value | Yes |
staticPublicKeyIutX | The IUT's static public key X value. | value | Yes |
staticPublicKeyIutX | The IUT's static public key Y value. | value | Yes |
dkmNonceIut | The IUT's nonce used in static schemes for Key Confirmation. | value | Yes |
ephemeralNonceIut | The IUT's ephemeral nonce used in some schemes. | value | Yes |
dkm | The derived keying material. | value | Yes |
tag | The tag generated as a part of key confirmation (from the IUT perspective). | value | Yes |
The following is an example JSON object for KAS-ECC test results sent from the crypto module to the ACVP server.¶
[ { "acvVersion": "version" }, { "vsId": 0, "algorithm": "KAS-ECC", "revision": "Sp800-56Ar3", "testGroups": [ { "tgId": 1, "tests": [ { "staticPublicIutX": "ED9CF3FE1B79D014F7FF60DFDBFC19457C4F3EBEB0BB10B5", "staticPublicIutY": "5CA8819BC0D39E67AE9AB4747DC563ADA1AE1E9DBA12C272", "tcId": 1, "dkmNonceIut": "215D9AB3A371B395802FD0FCD97815EDFC468DC631735BAEEA0F18498EFC3B52BBABD2B953DE7B64EF20D899093B031D", "dkm": "56505307C7F11F4640C96D863FA3634120F2B2CAB262AE29B1CD26252BC1537E84DF3EB75C1E240983B599B30690F9B0", "tag": "CE39683069F0DA7624F72086FB4B2B8E" } ] }, { "tgId": 3, "tests": [ { "tcId": 21, "testPassed": true } ] } ] } ]¶
The ECC CDH Component Test for SP800-56Ar3¶
Each algorithm capability advertised is a self-contained JSON object using the following values.¶
JSON Value | Description | JSON type | Valid Values | Optional |
algorithm | The algorithm under test | value | KAS-ECC | No |
mode | The algorithm mode | value | CDH-Component | No |
revision | The algorithm testing revision to use. | value | "Sp800-56Ar3" | No |
prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See Section 7.2 | No |
function | Type of function supported | array | See Section 7.4 | Yes |
curve | Array of supported curves | array | P-224, P-256, P-384, P-521, K-233, K-283, K-409, K-571, B-233, B-283, B-409, B-571 | No |
The following is a example JSON object advertising support for KAS ECC CDH-Component.¶
{ "algorithm": "KAS-ECC", "mode": "CDH-Component", "revision": "Sp800-56Ar3", "prereqVals": [{ "algorithm": "ECDSA", "valValue": "123456" }], "function": ["keyPairGen"], "curve": ["P-224", "K-233", "B-233"] }¶
JSON Value | Description | JSON type | Valid Values | Optional |
---|---|---|---|---|
algorithm | The algorithm under test | value | KAS-ECC | No |
mode | The algorithm mode under test | value | CDH-Component | No |
revision | The algorithm testing revision to use. | value | "Sp800-56Ar3" | No |
testGroups | Array of individual test group JSON objects, which are defined in Section 11.2.1 | Array | Array of test group information | No |
JSON Value | Description | JSON type | Valid Values | Optional |
---|---|---|---|---|
testType | The test type expected within the group. AFT is the only valid value for ECC Component. | value | AFT | No |
curve | The curve used in the test group | value | P-224, P-256, P-384, P-521, K-233, K-283, K-409, K-571, B-233, B-283, B-409, B-571 | No |
tests | Array of individual test vector JSON objects, which are defined in Section 11.2.2 | array | No |
JSON Value | Description | Valid Values | Optional |
---|---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set. | value | No |
publicServerX | The X coordinate of the server's public key | value | Yes |
publicServerY | The Y coordinate of the server's public key | value | Yes |
publicIutX | The X coordinate of the iut's public key | value | No |
publicIutY | The Y coordinate of the iut's public key | value | No |
The shared secret Z | value | No |
The following is a example JSON object for KAS ECC CDH-Component test vectors sent from the ACVP server to the crypto module.¶
[{ "acvVersion": "1.0" }, { "vsId": 1750, "algorithm": "KAS-ECC", "mode": "CDH-Component", "revision": "Sp800-56Ar3", "testGroups": [{ "tgId": 1, "testType": "AFT", "curve": "P-192", "tests": [{ "tcId": 1, "publicServerX": "CAEF2CBA796BB7FC143D3EAED698C26AAE6F6F79DF3974EE", "publicServerY": "03ED6D7A90637629DBCEBFF4A2D1D771D9D4CF9F0D88CE90" }] }, { "tgId": 2, "testType": "AFT", "curve": "K-163", "tests": [{ "tcId": 26, "publicServerX": "048C46D674E1218D0BD3C9FCD120ECE8B4DB7310E7", "publicServerY": "ED3EEDB656E035C779081090BE44B743E857E3B4" }] }, { "tgId": 3, "testType": "AFT", "curve": "B-163", "tests": [{ "tcId": 51, "publicServerX": "8EE7C8F08BF47B21CA2FE911B721651B90E52391", "publicServerY": "0461DF3646E95598EAE4F5C6A634E71006ABC6FE1F" }] } ] } ]¶
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 Value | Description | JSON type |
---|---|---|
acvVersion | Protocol version identifier | value |
vsId | Unique numeric identifier for the vector set | value |
testGroups | Array of JSON objects that represent each test vector group. See Section 11.3.2 | 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 Value | Description | JSON type |
---|---|---|
tgId | The test group Id | value tests |
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 DRBG test vector.¶
JSON Value | Description | JSON type | Optional |
---|---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set. | value | No |
publicIutX | x value of the IUT public key | value | No |
publicIutY | x value of the IUT public key | value | No |
Computed shared secret Z | value | No |
The following is a example JSON object for KAS ECC CDH Component test results sent from the crypto module to the ACVP server.¶
[{ "acvVersion": "1.0" }, { "vsId": 1750, "testGroups": [{ "tgId": 1, "tests": [{ "tcId": 1, "publicIutX": "DB9FBC84CBAD3EED42C31CDBF2882041634D040219C3E47A", "publicIutY": "9BD672733BCCEF2BD805E97FF9BBFE0FFC003BEEEF56868B", "z": "8BEAEA60DFAC075F9F25A5CFEA39818D98D3EA4B9D4C34A8" }] }, { "tgId": 2, "tests": [{ "tcId": 26, "publicIutX": "058C593D1D4E8238102BDE6B497218D92F8EDD2997", "publicIutY": "0437682E4608984EFC7FB619FB260EF27CAF704D7B", "z": "075D9A831E0665521D613AEAA59B8C8CDFBAC8C683" }] }, { "tgId": 3, "tests": [{ "tcId": 51, "publicIutX": "04128CD094F6988AA26DA2B100A71A31214CC9C50B", "publicIutY": "01A3A88C9F0987E488922573D0A31D300532F0B268", "z": "07EC896621BF1703EB7567196ED1DE5742C4695990" }] } ] } ]¶
There are no additional security considerations outside of those outlined in the ACVP document.¶
This document does not require any action by IANA.¶