Internet-Draft | ACVP SLH-DSA | October 2024 |
Livelsberger | Expires 10 April 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 10 April 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 Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) 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 Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) 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 SLH-DSA algorithms MAY be advertised by the ACVP compliant cryptographic module. The list is in the form "algorithm / mode / revision".¶
The ACVP server performs a set of tests on the specified SLH-DSA algorithm 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 SLH-DSA capabilities. This section describes the design of the tests used to validate implementations of the SLH-DSA algorithms.¶
The tests described in this document have the intention of ensuring an implementation is conformant to [FIPS205].¶
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 SLH-DSA 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" } ]¶
Each SLH-DSA implementation relies on other cryptographic primitives. For example, SLH-DSA keyGen uses an underlying SHA or SHAKE 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 | string | SHA, SHAKE or HMAC |
valValue | algorithm validation number | string | Actual number or "same" |
prereqAlgVal | prerequisite algorithm validation | object with algorithm and valValue properties | See above |
Each SLH-DSA algorithm capability advertised is a self-contained JSON object using the following values.¶
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
algorithm | The algorithm to be validated | string | "SLH-DSA" |
mode | The SLH-DSA mode to be validated | string | See Section 5 |
revision | The algorithm testing revision to use | string | See Section 5 |
prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See Section 7.2 |
parameterSets | The SLH-DSA parameter sets supported. Only applicable to SLH-DSA / keyGen / FIPS205. | array of strings | "SLH-DSA-SHA2-128s", "SLH-DSA-SHA2-128f", "SLH-DSA-SHA2-192s", "SLH-DSA-SHA2-192f", "SLH-DSA-SHA2-256s", "SLH-DSA-SHA2-256f", "SLH-DSA-SHAKE-128s", "SLH-DSA-SHAKE-128f", "SLH-DSA-SHAKE-192s", "SLH-DSA-SHAKE-192f", "SLH-DSA-SHAKE-256s", "SLH-DSA-SHAKE-256f" |
capabilities | The capabilities of the implementation. Pairs of parameter sets and associated supported message lengths. Only applicable to SLH-DSA / sigGen / FIPS205 and SLH-DSA / sigVer / FIPS205 | array of capability objects | See Table 4 |
deterministic | The SLH-DSA signature generation variants supported. A value of "true" indicates that deterministic signature generation is supported and a value of "false" indicates that non-deterministic signature generation is supported. Only applicable to SLH-DSA / sigGen / FIPS205 | array of booleans | true, false |
Each capability advertised is a self-contained JSON object using the following values.¶
JSON Value | Description | JSON Type | Valid Values |
---|---|---|---|
parameterSets | The SLH-DSA parameter sets supported | array of strings | "SLH-DSA-SHA2-128s", "SLH-DSA-SHA2-128f", "SLH-DSA-SHA2-192s", "SLH-DSA-SHA2-192f", "SLH-DSA-SHA2-256s", "SLH-DSA-SHA2-256f", "SLH-DSA-SHAKE-128s", "SLH-DSA-SHAKE-128f", "SLH-DSA-SHAKE-192s", "SLH-DSA-SHAKE-192f", "SLH-DSA-SHAKE-256s", "SLH-DSA-SHAKE-256f" |
messageLength | The supported message lengths in bits | domain | Min: 8, Max: 65536, Incr: 8 |
Below is an example of the registration for SLH-DSA / keyGen / FIPS205¶
{ "algorithm": "SLH-DSA", "mode": "keyGen", "revision": "FIPS205", "prereqVals": [ { "algorithm": "SHA2-256", "valValue": "123456" }, { "algorithm": "SHA2-512", "valValue": "123456" }, { "algorithm": "SHAKE256", "valValue": "123456" } ], "parameterSets": [ "SLH-DSA-SHA2-128s", "SLH-DSA-SHA2-192f", "SLH-DSA-SHAKE-192s", "SLH-DSA-SHAKE-256f" ] }¶
Below is an example of the registration for SLH-DSA / sigGen / FIPS205¶
{ "algorithm": "SLH-DSA", "mode": "sigGen", "revision": "FIPS205", "prereqVals": [ { "algorithm": "SHA2-256", "valValue": "123456" }, { "algorithm": "SHA2-512", "valValue": "123456" }, { "algorithm": "HMAC-SHA-512", "valValue": "123456" }, { "algorithm": "SHAKE256", "valValue": "123456" } ], "capabilities": [ { "parameterSets": ["SLH-DSA-SHA2-192s", "SLH-DSA-SHA2-256f", "SLH-DSA-SHAKE-192s", "SLH-DSA-SHAKE-256f"], "messageLength": [ { "min": 8, "max": 65536, "increment": 8 } ] }, { "parameterSets": ["SLH-DSA-SHAKE-128f"], "messageLength": [ { "min": 1024, "max": 4096, "increment": 8 } ] } ], "deterministic": [true, false] }¶
Below is an example of the registration for SLH-DSA / sigVer / FIPS205¶
{ "algorithm": "SLH-DSA", "mode": "sigVer", "revision": "FIPS205", "prereqVals": [ { "algorithm": "SHA2-256", "valValue": "123456" }, { "algorithm": "SHA2-512", "valValue": "123456" }, { "algorithm": "SHAKE256", "valValue": "123456" } ], "capabilities": [ { "parameterSets": ["SLH-DSA-SHA2-192s", "SLH-DSA-SHA2-256f", "SLH-DSA-SHAKE-192s", "SLH-DSA-SHAKE-256f"], "messageLength": [ { "min": 8, "max": 65536, "increment": 8 } ] }, { "parameterSets": ["SLH-DSA-SHAKE-128f"], "messageLength": [ { "min": 1024, "max": 4096, "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 Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) 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. Depending on the algorithm, see Section 8.1.1, Section 8.2.1 or Section 8.3.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 SLH-DSA JSON elements of the Test Group JSON object.¶
The test group for SLH-DSA / keyGen / FIPS205 is as follows:¶
JSON Value | Description | JSON type |
---|---|---|
tgId | Numeric identifier for the test group, unique across the entire vector set | integer |
testType | The test operation performed | string |
parameterSet | The SLH-DSA parameter set used | string |
tests | Array of individual test vector JSON objects, which are defined in Section 8.1.2 | 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 SLH-DSA / keyGen / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set | integer |
skSeed | Private seed value | hex |
skPrf | PRF key value | hex |
pkSeed | Public seed value | hex |
The following is an example JSON object sent from the server to the client for SLH-DSA / keyGen / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 1564, "algorithm": "SLH-DSA", "mode": "keyGen", "revision": "FIPS205", "testGroups": [ { "tgId": 1, "testType": "AFT", "parameterSet": "SLH-DSA-SHA2-128s", "tests": [ { "tcId": 1, "skSeed": "2F896D61D9CD9038CA303394FADAA22A", "skPrf": "24AC5EC1D86A989CA2196C3C8632419C", "pkSeed": "1A05A42FE300E87B16AEE116CB2E2363" } ] } ] } ]¶
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 SLH-DSA JSON elements of the Test Group JSON object.¶
The test group for SLH-DSA / sigGen / FIPS205 is as follows:¶
JSON Value | Description | JSON type |
---|---|---|
tgId | Numeric identifier for the test group, unique across the entire vector set | integer |
testType | The test operation performed | string |
parameterSet | The SLH-DSA parameter set used | string |
deterministic | Whether the signatures should be generated using the deterministic or non-deterministic signature generation variant | boolean |
tests | Array of individual test vector JSON objects, which are defined in Section 8.2.2 | 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 SLH-DSA / sigGen / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set | integer |
sk | The secret key that should be used to generate a signature | hex |
additionalRandomness | Additional randomness used by the non-deterministic SLH-DSA signature generation variant. Only present for test groups where "deterministic": false . |
hex |
messageLength | The length of message in bits | integer |
message | The message used to generate the signature | hex |
The following is an example JSON object sent from the server to the client for SLH-DSA / sigGen / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 0, "algorithm": "SLH-DSA", "mode": "sigGen", "revision": "FIPS205", "testGroups": [ { "tgId": 1, "testType": "AFT", "parameterSet": "SLH-DSA-SHA2-192s", "deterministic": true, "tests": [ { "tcId": 1, "sk": "68A103...", "messageLength": 65536, "message": "EC1EF9E3B24E..." } ] }, { "tgId": 2, "testType": "AFT", "parameterSet": "SLH-DSA-SHA2-192s", "deterministic": false, "tests": [ { "tcId": 15, "sk": "D4E36A5...", "additionalRandomness": "FAFF13...", "messageLength": 46336, "message": "34F4B...", } ] } ] } ]¶
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 SLH-DSA JSON elements of the Test Group JSON object.¶
The test group for SLH-DSA / sigVer / FIPS205 is as follows:¶
JSON Value | Description | JSON type |
---|---|---|
tgId | Numeric identifier for the test group, unique across the entire vector set | integer |
testType | The test operation performed | string |
parameterSet | The SLH-DSA parameter set used | string |
tests | Array of individual test vector JSON objects, which are defined in Section 8.3.2 | 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 SLH-DSA / sigVer / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | Numeric identifier for the test case, unique across the entire vector set | integer |
pk | The public key to use to verify the signature | hex |
messageLength | The length of message in bits | integer |
message | The message used to verify with the signature | hex |
signature | The signature to verify | hex |
The following is an example JSON object sent from the server to the client for SLH-DSA / sigVer / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 0, "algorithm": "SLH-DSA", "mode": "sigVer", "revision": "FIPS205", "testGroups": [ { "tgId": 1, "testType": "AFT", "parameterSet": "SLH-DSA-SHA2-192s", "tests": [ { "tcId": 1, "pk": "6CB59...", "messageLength": 34592, "message": "4F0D7...", "signature": "C29A11B6C..." }, { "tcId": 2, "pk": "123ABC...", "messageLength": 16, "message": "8479", "signature": "6A99215FC2..." } ] } ] } ]¶
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 ACVP version used | string |
vsId | The vector set identifier | integer |
testGroups | The test group objects in the response, see Table 13 | 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 distributes vectors.¶
JSON Property | Description | JSON Type |
---|---|---|
tgId | The test group identifier | integer |
tests | The test case objects in the response. Depending on the algorithm, see Table 14, Table 15, or Table 16 | array |
An example of this is the following¶
{ "tgId": 1, "tests": [ ... ] }¶
Each test group contains an array of one or more test cases. Each test case is a JSON object that represents the results of an ACVP client processing a single test vector. The following table describes the JSON elements for each SLH-DSA / keyGen / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | The test case identifier | integer |
pk | The computed public key | hex |
sk | The computed secret key | hex |
The following is an example JSON test vector response object for SLH-DSA / keyGen / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 0, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "pk": "1012798...", "sk": "1012798..." } ] } ] } ]¶
Each test group contains an array of one or more test cases. Each test case is a JSON object that represents the results of an ACVP client processing a single test vector. The following table describes the JSON elements for each SLH-DSA / sigGen / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | The test case identifier | integer |
signature | The generated signature | hex |
The following is an example JSON test vector response object for SLH-DSA / sigGen / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "signature": "D7D4275..." } ] } ] } ]¶
Each test group contains an array of one or more test cases. Each test case is a JSON object that represents the results of an ACVP client processing a single test vector. The following table describes the JSON elements for each SLH-DSA / sigVer / FIPS205 test vector.¶
JSON Value | Description | JSON type |
---|---|---|
tcId | The test case identifier | integer |
testPassed | Whether or not the signature verified | boolean |
The following is an example JSON test vector response object for SLH-DSA / sigVer / FIPS205.¶
[ { "acvVersion": <acvp-version> }, { "vsId": 0, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": false } ] } ] } ]¶
There are no additional security considerations outside of those outlined in the ACVP document.¶
This document does not require any action by IANA.¶