From ff347c3815bedee2110162e449cd5105256ccaee Mon Sep 17 00:00:00 2001 From: livebe01 Date: Tue, 2 Jul 2024 16:51:36 -0400 Subject: [PATCH] Adds SLH-DSA and misc. updates Misc ML-DSA updates: * removes "GDT" test type * adds the messageLength registration property Minor updates to Test Vectors section of LMS, ML-DSA, and ML-KEM specs --- .../common-sections/06-test-vector-intro.adoc | 4 +- src/draft-celi-acvp-lms.adoc | 2 +- src/draft-celi-acvp-ml-dsa.adoc | 2 +- src/draft-celi-acvp-ml-kem.adoc | 2 +- src/draft-livelsberger-acvp-slh-dsa.adoc | 78 +++++++++++++++++ .../06-ecdsa-detsiggen-test-vectors.adoc | 3 +- .../06-ecdsa-keygen-test-vectors.adoc | 5 +- .../06-ecdsa-keyver-test-vectors.adoc | 5 +- .../06-ecdsa-siggen-test-vectors.adoc | 5 +- .../06-ecdsa-sigver-test-vectors.adoc | 5 +- .../sections/06-lms-keygen-test-vectors.adoc | 3 +- .../sections/06-lms-siggen-test-vectors.adoc | 5 +- .../sections/06-lms-sigver-test-vectors.adoc | 5 +- src/lms/sections/06-test-vectors.adoc | 38 +++++++- src/ml-dsa/sections/04-testtypes.adoc | 2 - src/ml-dsa/sections/05-capabilities.adoc | 4 +- .../06-ml-dsa-keygen-test-vectors.adoc | 3 +- .../06-ml-dsa-siggen-test-vectors.adoc | 5 +- .../06-ml-dsa-sigver-test-vectors.adoc | 5 +- src/ml-dsa/sections/06-test-vectors.adoc | 37 +++++++- .../sections/07-ml-dsa-siggen-responses.adoc | 22 ----- .../06-ml-kem-encapdecap-test-vectors.adoc | 5 +- .../06-ml-kem-keygen-test-vectors.adoc | 3 +- src/ml-kem/sections/06-test-vectors.adoc | 37 +++++++- src/rsa/sections/06-keygen-test-vectors.adoc | 1 + src/slh-dsa/sections/03-supported.adoc | 9 ++ src/slh-dsa/sections/04-testtypes.adoc | 29 +++++++ src/slh-dsa/sections/05-capabilities.adoc | 51 +++++++++++ .../05-slh-dsa-keygen-capabilities.adoc | 31 +++++++ .../05-slh-dsa-siggen-capabilities.adoc | 51 +++++++++++ .../05-slh-dsa-sigver-capabilities.adoc | 47 ++++++++++ .../06-slh-dsa-keygen-test-vectors.adoc | 68 +++++++++++++++ .../06-slh-dsa-siggen-test-vectors.adoc | 86 +++++++++++++++++++ .../06-slh-dsa-sigver-test-vectors.adoc | 77 +++++++++++++++++ src/slh-dsa/sections/06-test-vectors.adoc | 35 ++++++++ src/slh-dsa/sections/07-responses.adoc | 46 ++++++++++ .../sections/07-slh-dsa-keygen-responses.adoc | 40 +++++++++ .../sections/07-slh-dsa-siggen-responses.adoc | 38 ++++++++ .../sections/07-slh-dsa-sigver-responses.adoc | 38 ++++++++ src/slh-dsa/sections/98-references.adoc | 35 ++++++++ 40 files changed, 909 insertions(+), 58 deletions(-) create mode 100644 src/draft-livelsberger-acvp-slh-dsa.adoc create mode 100644 src/slh-dsa/sections/03-supported.adoc create mode 100644 src/slh-dsa/sections/04-testtypes.adoc create mode 100644 src/slh-dsa/sections/05-capabilities.adoc create mode 100644 src/slh-dsa/sections/05-slh-dsa-keygen-capabilities.adoc create mode 100644 src/slh-dsa/sections/05-slh-dsa-siggen-capabilities.adoc create mode 100644 src/slh-dsa/sections/05-slh-dsa-sigver-capabilities.adoc create mode 100644 src/slh-dsa/sections/06-slh-dsa-keygen-test-vectors.adoc create mode 100644 src/slh-dsa/sections/06-slh-dsa-siggen-test-vectors.adoc create mode 100644 src/slh-dsa/sections/06-slh-dsa-sigver-test-vectors.adoc create mode 100644 src/slh-dsa/sections/06-test-vectors.adoc create mode 100644 src/slh-dsa/sections/07-responses.adoc create mode 100644 src/slh-dsa/sections/07-slh-dsa-keygen-responses.adoc create mode 100644 src/slh-dsa/sections/07-slh-dsa-siggen-responses.adoc create mode 100644 src/slh-dsa/sections/07-slh-dsa-sigver-responses.adoc create mode 100644 src/slh-dsa/sections/98-references.adoc diff --git a/src/common/common-sections/06-test-vector-intro.adoc b/src/common/common-sections/06-test-vector-intro.adoc index 432a04df..f2544ef1 100644 --- a/src/common/common-sections/06-test-vector-intro.adoc +++ b/src/common/common-sections/06-test-vector-intro.adoc @@ -2,7 +2,7 @@ [#test-vectors] == Test Vectors -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 algorithm defined during the capability exchange. This section describes the JSON schema for a test vector set used with {spec-algorithm} algorithms. +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 {spec-algorithm} 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. @@ -15,7 +15,7 @@ The test vector set JSON schema is a multi-level hierarchy that contains meta da | 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 groups containing test data, see <> | array +| testGroups | Array of test group JSON objects, which are defined in <> | array |=== An example of this would look like this diff --git a/src/draft-celi-acvp-lms.adoc b/src/draft-celi-acvp-lms.adoc index 0607b153..acde30c9 100644 --- a/src/draft-celi-acvp-lms.adoc +++ b/src/draft-celi-acvp-lms.adoc @@ -50,7 +50,7 @@ include::lms/sections/05-lms-siggen-capabilities.adoc[] include::lms/sections/05-lms-sigver-capabilities.adoc[] -include::common/common-sections/06-test-vector-intro.adoc[] +//include::common/common-sections/06-test-vector-intro.adoc[] include::lms/sections/06-test-vectors.adoc[] diff --git a/src/draft-celi-acvp-ml-dsa.adoc b/src/draft-celi-acvp-ml-dsa.adoc index 1e621943..9898630a 100644 --- a/src/draft-celi-acvp-ml-dsa.adoc +++ b/src/draft-celi-acvp-ml-dsa.adoc @@ -50,7 +50,7 @@ include::ml-dsa/sections/05-ml-dsa-siggen-capabilities.adoc[] include::ml-dsa/sections/05-ml-dsa-sigver-capabilities.adoc[] -include::common/common-sections/06-test-vector-intro.adoc[] +//include::common/common-sections/06-test-vector-intro.adoc[] include::ml-dsa/sections/06-test-vectors.adoc[] diff --git a/src/draft-celi-acvp-ml-kem.adoc b/src/draft-celi-acvp-ml-kem.adoc index d9b4f179..b764c1d6 100644 --- a/src/draft-celi-acvp-ml-kem.adoc +++ b/src/draft-celi-acvp-ml-kem.adoc @@ -48,7 +48,7 @@ include::ml-kem/sections/05-ml-kem-keygen-capabilities.adoc[] include::ml-kem/sections/05-ml-kem-encapdecap-capabilities.adoc[] -include::common/common-sections/06-test-vector-intro.adoc[] +//include::common/common-sections/06-test-vector-intro.adoc[] include::ml-kem/sections/06-test-vectors.adoc[] diff --git a/src/draft-livelsberger-acvp-slh-dsa.adoc b/src/draft-livelsberger-acvp-slh-dsa.adoc new file mode 100644 index 00000000..a23f29fe --- /dev/null +++ b/src/draft-livelsberger-acvp-slh-dsa.adoc @@ -0,0 +1,78 @@ += ACVP SLH-DSA JSON Specification +:doctype: internet-draft +:docname: acvp-slh +:docnumber: draft-livelsberger-acvp-slh-dsa-01 +:abbrev: ACVP SLH-DSA +:ipr: trust200902 +:submission-type: independent +:area: Internet +:intended-series: informational +:revdate: 2024-06-25 +:forename_initials: B.R. +:lastname: Livelsberger +:fullname: Benjamin Livelsberger +:organization: National Institute of Standards and Technology +:street: 100 Bureau Drive +:city: Gaithersburg +:code: 20899 +:country: United States of America +:email: benjamin.livelsberger@nist.gov +:role: editor +:docfile: draft-livelsberger-acvp-slh-dsa.adoc +:mn-document-class: ietf +:mn-output-extensions: xml,rfc,txt,html +:area: General +:keyword: acvp, crypto + +// Singular name of the algorithm +:spec-algorithm: Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) +:algo-short-name: SLH-DSA + +include::common/common-sections/00-abstract.adoc[] + +include::common/common-sections/01-intro.adoc[] + +include::common/common-sections/02-conventions.adoc[] + +include::slh-dsa/sections/03-supported.adoc[] + +include::slh-dsa/sections/04-testtypes.adoc[] + +include::common/common-sections/05-capabilities-description.adoc[] + +include::common/common-sections/051-prerequisites.adoc[] + +include::slh-dsa/sections/05-capabilities.adoc[] + +include::slh-dsa/sections/05-slh-dsa-keygen-capabilities.adoc[] + +include::slh-dsa/sections/05-slh-dsa-siggen-capabilities.adoc[] + +include::slh-dsa/sections/05-slh-dsa-sigver-capabilities.adoc[] + +//include::common/common-sections/06-test-vector-intro.adoc[] + +include::slh-dsa/sections/06-test-vectors.adoc[] + +include::slh-dsa/sections/06-slh-dsa-keygen-test-vectors.adoc[] + +include::slh-dsa/sections/06-slh-dsa-siggen-test-vectors.adoc[] + +include::slh-dsa/sections/06-slh-dsa-sigver-test-vectors.adoc[] + +include::slh-dsa/sections/07-responses.adoc[] + +include::slh-dsa/sections/07-slh-dsa-keygen-responses.adoc[] + +include::slh-dsa/sections/07-slh-dsa-siggen-responses.adoc[] + +include::slh-dsa/sections/07-slh-dsa-sigver-responses.adoc[] + +include::common/common-sections/10-security.adoc[] + +include::common/common-sections/11-iana.adoc[] + +include::common/common-sections/99-acknowledgements.adoc[] + +// References must be given before appendixes +include::slh-dsa/sections/98-references.adoc[] diff --git a/src/ecdsa/sections/06-ecdsa-detsiggen-test-vectors.adoc b/src/ecdsa/sections/06-ecdsa-detsiggen-test-vectors.adoc index 5bcff769..a892a054 100644 --- a/src/ecdsa/sections/06-ecdsa-detsiggen-test-vectors.adoc +++ b/src/ecdsa/sections/06-ecdsa-detsiggen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ecdsa_detsigGen_tgjs]] ==== Deterministic ECDSA sigGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for DetECDSA / sigGen / * is as follows: @@ -13,6 +13,7 @@ The test group for DetECDSA / sigGen / * 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 | curve | The curve type used for the test vectors | string | hashAlg | SHA version used | string diff --git a/src/ecdsa/sections/06-ecdsa-keygen-test-vectors.adoc b/src/ecdsa/sections/06-ecdsa-keygen-test-vectors.adoc index e07518a0..fb755802 100644 --- a/src/ecdsa/sections/06-ecdsa-keygen-test-vectors.adoc +++ b/src/ecdsa/sections/06-ecdsa-keygen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ecdsa_keyGen_tgjs]] ==== ECDSA keyGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ECDSA / keyGen / * is as follows: @@ -13,6 +13,7 @@ The test group for ECDSA / keyGen / * 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 | curve | The curve type used for the test group | string | secretGenerationMode | The secret generation mode used for the group | string @@ -20,7 +21,7 @@ The test group for ECDSA / keyGen / * is as follows: |=== [[ecdsa_keyGen_tvjs]] -==== ECDSA keyGen Test Groups JSON Schema +==== ECDSA keyGen Test Case JSON Schema 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 ECDSA test vector. diff --git a/src/ecdsa/sections/06-ecdsa-keyver-test-vectors.adoc b/src/ecdsa/sections/06-ecdsa-keyver-test-vectors.adoc index ffbc74fc..00e281e5 100644 --- a/src/ecdsa/sections/06-ecdsa-keyver-test-vectors.adoc +++ b/src/ecdsa/sections/06-ecdsa-keyver-test-vectors.adoc @@ -4,7 +4,7 @@ [[ecdsa_keyVer_tgjs]] ==== ECDSA keyVer Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ECDSA / keyVer / * is as follows: @@ -13,13 +13,14 @@ The test group for ECDSA / keyVer / * 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 | curve | The curve type used for the test group | string | tests | Array of individual test vector JSON objects, which are defined in <> | array |=== [[ecdsa_keyVer_tvjs]] -==== ECDSA keyVer Test Groups JSON Schema +==== ECDSA keyVer Test Case JSON Schema 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 ECDSA test vector. diff --git a/src/ecdsa/sections/06-ecdsa-siggen-test-vectors.adoc b/src/ecdsa/sections/06-ecdsa-siggen-test-vectors.adoc index 5edd8b45..ce908603 100644 --- a/src/ecdsa/sections/06-ecdsa-siggen-test-vectors.adoc +++ b/src/ecdsa/sections/06-ecdsa-siggen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ecdsa_sigGen_tgjs]] ==== ECDSA sigGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ECDSA / sigGen / * is as follows: @@ -13,6 +13,7 @@ The test group for ECDSA / sigGen / * 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 | curve | The curve type used for the test vectors | string | hashAlg | SHA version used | string @@ -21,7 +22,7 @@ The test group for ECDSA / sigGen / * is as follows: |=== [[ecdsa_sigGen_tvjs]] -==== ECDSA sigGen Test Groups JSON Schema +==== ECDSA sigGen Test Case JSON Schema 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 ECDSA test vector. diff --git a/src/ecdsa/sections/06-ecdsa-sigver-test-vectors.adoc b/src/ecdsa/sections/06-ecdsa-sigver-test-vectors.adoc index 4f4609fe..f1fd3fb7 100644 --- a/src/ecdsa/sections/06-ecdsa-sigver-test-vectors.adoc +++ b/src/ecdsa/sections/06-ecdsa-sigver-test-vectors.adoc @@ -4,7 +4,7 @@ [[ecdsa_sigVer_tgjs]] ==== ECDSA sigVer Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ECDSA / sigVer / * is as follows: @@ -13,6 +13,7 @@ The test group for ECDSA / sigVer / * 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 | curve | The curve type used for the test vectors | string | hashAlg | SHA version used | string @@ -21,7 +22,7 @@ The test group for ECDSA / sigVer / * is as follows: |=== [[ecdsa_sigVer_tvjs]] -==== ECDSA sigVer Test Groups JSON Schema +==== ECDSA sigVer Test Case JSON Schema 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 ECDSA test vector. diff --git a/src/lms/sections/06-lms-keygen-test-vectors.adoc b/src/lms/sections/06-lms-keygen-test-vectors.adoc index 9f8b0785..520da340 100644 --- a/src/lms/sections/06-lms-keygen-test-vectors.adoc +++ b/src/lms/sections/06-lms-keygen-test-vectors.adoc @@ -4,7 +4,7 @@ [[LMS_keyGen_tgjs]] ==== LMS keyGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for LMS / keyGen / 1.0 is as follows: @@ -13,6 +13,7 @@ The test group for LMS / keyGen / 1.0 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 | lmsMode | The LMS tree structure used | string | lmOtsMode | The LMOTS tree structure used | string diff --git a/src/lms/sections/06-lms-siggen-test-vectors.adoc b/src/lms/sections/06-lms-siggen-test-vectors.adoc index c45a61b3..32107450 100644 --- a/src/lms/sections/06-lms-siggen-test-vectors.adoc +++ b/src/lms/sections/06-lms-siggen-test-vectors.adoc @@ -4,7 +4,7 @@ [[LMS_sigGen_tgjs]] ==== LMS sigGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for LMS / sigGen / 1.0 is as follows: @@ -13,6 +13,7 @@ The test group for LMS / sigGen / 1.0 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 | lmsMode | The LMS tree structure used | string | lmOtsMode | The LMOTS tree structure used | string @@ -20,7 +21,7 @@ The test group for LMS / sigGen / 1.0 is as follows: |=== [[LMS_sigGen_tvjs]] -==== LMS sigGen Test Groups JSON Schema +==== LMS sigGen Test Case JSON Schema 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 LMS test vector. diff --git a/src/lms/sections/06-lms-sigver-test-vectors.adoc b/src/lms/sections/06-lms-sigver-test-vectors.adoc index 0b074a5a..438e2208 100644 --- a/src/lms/sections/06-lms-sigver-test-vectors.adoc +++ b/src/lms/sections/06-lms-sigver-test-vectors.adoc @@ -4,7 +4,7 @@ [[LMS_sigVer_tgjs]] ==== LMS sigVer Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for LMS / sigVer / 1.0 is as follows: @@ -13,6 +13,7 @@ The test group for LMS / sigVer / 1.0 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 | lmsMode | The LMS tree structure used | string | lmOtsMode | The LMOTS tree structure used | string @@ -21,7 +22,7 @@ The test group for LMS / sigVer / 1.0 is as follows: |=== [[LMS_sigVer_tvjs]] -==== LMS sigVer Test Groups JSON Schema +==== LMS sigVer Test Case JSON Schema 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 LMS test vector. diff --git a/src/lms/sections/06-test-vectors.adoc b/src/lms/sections/06-test-vectors.adoc index d347d099..42e882c3 100644 --- a/src/lms/sections/06-test-vectors.adoc +++ b/src/lms/sections/06-test-vectors.adoc @@ -1,5 +1,39 @@ -[[tgjs]] -== +== Test Vectors + +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 {spec-algorithm} 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. + +.Top Level Test Vector JSON Elements +|=== +| 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 <>, <> or <> | array +|=== + +An example of this would look like this + +[source,json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 1, + "algorithm": "Alg1", + "mode": "Mode1", + "revision": "Revision1.0", + "testGroups": [ ... ] + } +] +---- + diff --git a/src/ml-dsa/sections/04-testtypes.adoc b/src/ml-dsa/sections/04-testtypes.adoc index 92601ae9..b0dcfef0 100644 --- a/src/ml-dsa/sections/04-testtypes.adoc +++ b/src/ml-dsa/sections/04-testtypes.adoc @@ -11,8 +11,6 @@ The ACVP server performs a set of tests on the specified ML-DSA algorithm in ord * ML-DSA / sigGen / * "AFT" - Algorithm Functional Test. This testing mode expects the IUT to generate valid signatures based on the ACVP provided message. The signature is then compared to the known result by the ACVP server given the IUT's communicated parameter set, public key, and signature. -* ML-DSA / sigGen / * "GDT" - Generated Data Test. This testing mode expects the IUT to generate a valid signature and key pair for the ACVP provided message. The client *SHALL* communicate the public key and signature back to the server. The signature is then validated by the ACVP server using the defined signature verification routine. - * ML-DSA / sigVer / * "AFT" - Algorithm Functional Test. The ACVP server generates a series of signatures to communicate to the IUT. The IUT is *REQUIRED* to determine the validity of the signature given the parameter set, key, and message. [[test_coverage]] diff --git a/src/ml-dsa/sections/05-capabilities.adoc b/src/ml-dsa/sections/05-capabilities.adoc index 946bb3f6..2015f6d4 100644 --- a/src/ml-dsa/sections/05-capabilities.adoc +++ b/src/ml-dsa/sections/05-capabilities.adoc @@ -29,6 +29,8 @@ Each ML-DSA algorithm capability advertised is a self-contained JSON object usin | prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See <> | parameterSets | The ML-DSA parameter sets supported | array of strings | "ML-DSA-44", "ML-DSA-65", "ML-DSA-87" | deterministic | The ML-DSA signature generation modes supported | array of booleans | true, false +| messageLength | The supported message lengths in bits | domain | Min: 8, Max: 65536, Incr: 8 |=== -Note: The deterministic property is only applicable to ML-DSA / sigGen / FIPS204. +NOTE: The deterministic and messageLength properties are only applicable to ML-DSA / sigGen / FIPS204. + diff --git a/src/ml-dsa/sections/06-ml-dsa-keygen-test-vectors.adoc b/src/ml-dsa/sections/06-ml-dsa-keygen-test-vectors.adoc index 61af4dad..8d21cd17 100644 --- a/src/ml-dsa/sections/06-ml-dsa-keygen-test-vectors.adoc +++ b/src/ml-dsa/sections/06-ml-dsa-keygen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ML-DSA_keyGen_tgjs]] ==== ML-DSA keyGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ML-DSA / keyGen / FIPS204 is as follows: @@ -13,6 +13,7 @@ The test group for ML-DSA / keyGen / FIPS204 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 ML-DSA parameter set used | string | tests | Array of individual test vector JSON objects, which are defined in <> | array diff --git a/src/ml-dsa/sections/06-ml-dsa-siggen-test-vectors.adoc b/src/ml-dsa/sections/06-ml-dsa-siggen-test-vectors.adoc index a2afdd0e..7277ced6 100644 --- a/src/ml-dsa/sections/06-ml-dsa-siggen-test-vectors.adoc +++ b/src/ml-dsa/sections/06-ml-dsa-siggen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ML-DSA_sigGen_tgjs]] ==== ML-DSA sigGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ML-DSA / sigGen / FIPS204 is as follows: @@ -13,6 +13,7 @@ The test group for ML-DSA / sigGen / FIPS204 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 ML-DSA parameter set used | string | deterministic | Whether the signatures should be generated using the deterministic or non-deterministic routine | boolean @@ -20,7 +21,7 @@ The test group for ML-DSA / sigGen / FIPS204 is as follows: |=== [[ML-DSA_sigGen_tvjs]] -==== ML-DSA sigGen Test Groups JSON Schema +==== ML-DSA sigGen Test Case JSON Schema 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 ML-DSA test vector. diff --git a/src/ml-dsa/sections/06-ml-dsa-sigver-test-vectors.adoc b/src/ml-dsa/sections/06-ml-dsa-sigver-test-vectors.adoc index 75b6712b..d78d45c7 100644 --- a/src/ml-dsa/sections/06-ml-dsa-sigver-test-vectors.adoc +++ b/src/ml-dsa/sections/06-ml-dsa-sigver-test-vectors.adoc @@ -4,7 +4,7 @@ [[ML-DSA_sigVer_tgjs]] ==== ML-DSA sigVer Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ML-DSA / sigVer / FIPS204 is as follows: @@ -13,6 +13,7 @@ The test group for ML-DSA / sigVer / FIPS204 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 ML-DSA parameter set used | string | pk | The public key used to generate the signature | hex @@ -20,7 +21,7 @@ The test group for ML-DSA / sigVer / FIPS204 is as follows: |=== [[ML-DSA_sigVer_tvjs]] -==== ML-DSA sigVer Test Groups JSON Schema +==== ML-DSA sigVer Test Case JSON Schema 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 ML-DSA test vector. diff --git a/src/ml-dsa/sections/06-test-vectors.adoc b/src/ml-dsa/sections/06-test-vectors.adoc index 433fd23f..d489748c 100644 --- a/src/ml-dsa/sections/06-test-vectors.adoc +++ b/src/ml-dsa/sections/06-test-vectors.adoc @@ -1,3 +1,36 @@ -[[tgjs]] -== \ No newline at end of file +== Test Vectors + +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 {spec-algorithm} 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. + +.Top Level Test Vector JSON Elements +|=== +| 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 <>, <> or <> | array +|=== + +An example of this would look like this + +[source,json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 1, + "algorithm": "Alg1", + "mode": "Mode1", + "revision": "Revision1.0", + "testGroups": [ ... ] + } +] +---- diff --git a/src/ml-dsa/sections/07-ml-dsa-siggen-responses.adoc b/src/ml-dsa/sections/07-ml-dsa-siggen-responses.adoc index 5825f65f..f9ce16fd 100644 --- a/src/ml-dsa/sections/07-ml-dsa-siggen-responses.adoc +++ b/src/ml-dsa/sections/07-ml-dsa-siggen-responses.adoc @@ -1,18 +1,6 @@ [[ML-DSA_sigGen_vector_responses]] === ML-DSA sigGen Test Vector Responses -The test groups for ML-DSA / sigGen / FIPS204 contain public key properties. The groups can be described using the following table. - -[[ML-DSA_sigGen_group_table]] -.ML-DSA sigGen Test Group Response JSON Object -|=== -| JSON Value | Description | JSON type - -| tgId | The test group identifier | integer -| pk | The public key the IUT used when the prompt test group property `"testType": "GDT"` | hex -| tests | The individual test cases for the group | 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 ML-DSA / sigGen / FIPS204 test vector. [[ML-DSA_sigGen_vs_tr_table]] @@ -37,22 +25,12 @@ The following is an example JSON test vector response object for ML-DSA / sigGen "testGroups": [ { "tgId": 1, - "pk": "A9ADC1E82...", "tests": [ { "tcId": 1, "signature": "D7D4275..." } ] - }, - { - "tgId": 2, - "tests": [ - { - "tcId": 2, - "signature": "75300EBBB6C..." - } - ] } ] } diff --git a/src/ml-kem/sections/06-ml-kem-encapdecap-test-vectors.adoc b/src/ml-kem/sections/06-ml-kem-encapdecap-test-vectors.adoc index 53ed5ec2..fa755496 100644 --- a/src/ml-kem/sections/06-ml-kem-encapdecap-test-vectors.adoc +++ b/src/ml-kem/sections/06-ml-kem-encapdecap-test-vectors.adoc @@ -4,7 +4,7 @@ [[ML-KEM_encapDecap_tgjs]] ==== ML-KEM encapDecap Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ML-KEM / encapDecap / FIPS203 is as follows: @@ -13,6 +13,7 @@ The test group for ML-KEM / encapDecap / FIPS203 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 ML-KEM parameter set used | string | function | Whether the tests are running encapsulation or decapsulation | string @@ -21,7 +22,7 @@ The test group for ML-KEM / encapDecap / FIPS203 is as follows: |=== [[ML-KEM_encapDecap_tvjs]] -==== ML-KEM encapDecap Test Groups JSON Schema +==== ML-KEM encapDecap Test Case JSON Schema 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 ML-KEM test vector. diff --git a/src/ml-kem/sections/06-ml-kem-keygen-test-vectors.adoc b/src/ml-kem/sections/06-ml-kem-keygen-test-vectors.adoc index 1a55d18a..66a007b9 100644 --- a/src/ml-kem/sections/06-ml-kem-keygen-test-vectors.adoc +++ b/src/ml-kem/sections/06-ml-kem-keygen-test-vectors.adoc @@ -4,7 +4,7 @@ [[ML-KEM_keyGen_tgjs]] ==== ML-KEM keyGen Test Groups JSON Schema -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 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 {algo-short-name} JSON elements of the Test Group JSON object. The test group for ML-KEM / keyGen / FIPS203 is as follows: @@ -13,6 +13,7 @@ The test group for ML-KEM / keyGen / FIPS203 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 ML-KEM parameter set used | string | tests | Array of individual test vector JSON objects, which are defined in <> | array diff --git a/src/ml-kem/sections/06-test-vectors.adoc b/src/ml-kem/sections/06-test-vectors.adoc index b042a982..a3c6909a 100644 --- a/src/ml-kem/sections/06-test-vectors.adoc +++ b/src/ml-kem/sections/06-test-vectors.adoc @@ -1,3 +1,36 @@ -[[tgjs]] -== +== Test Vectors + +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 {spec-algorithm} 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. + +.Top Level Test Vector JSON Elements +|=== +| 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 <> or <> | array +|=== + +An example of this would look like this + +[source,json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 1, + "algorithm": "Alg1", + "mode": "Mode1", + "revision": "Revision1.0", + "testGroups": [ ... ] + } +] +---- diff --git a/src/rsa/sections/06-keygen-test-vectors.adoc b/src/rsa/sections/06-keygen-test-vectors.adoc index dfcbd31b..3ab807eb 100644 --- a/src/rsa/sections/06-keygen-test-vectors.adoc +++ b/src/rsa/sections/06-keygen-test-vectors.adoc @@ -9,6 +9,7 @@ The testGroups element at the top level in the test vector JSON object is an arr |=== | JSON Value | Description | JSON type +| tgId | Numeric identifier for the test group, unique across the entire vector set | integer | modulo | RSA modulus size | integer | hashAlg | the hash algorithm | string | primeTest | Miller-Rabin constraint bound | string diff --git a/src/slh-dsa/sections/03-supported.adoc b/src/slh-dsa/sections/03-supported.adoc new file mode 100644 index 00000000..c5e7a88c --- /dev/null +++ b/src/slh-dsa/sections/03-supported.adoc @@ -0,0 +1,9 @@ + +[#supported] +== Supported SLH-DSA Algorithms + +The following SLH-DSA algorithms *MAY* be advertised by the ACVP compliant cryptographic module. The list is in the form "algorithm / mode / revision". + +* SLH-DSA / keyGen / FIPS205 +* SLH-DSA / sigGen / FIPS205 +* SLH-DSA / sigVer / FIPS205 diff --git a/src/slh-dsa/sections/04-testtypes.adoc b/src/slh-dsa/sections/04-testtypes.adoc new file mode 100644 index 00000000..89aa5a91 --- /dev/null +++ b/src/slh-dsa/sections/04-testtypes.adoc @@ -0,0 +1,29 @@ + +[#testtypes] +== Test Types and Test Coverage + +[#ttypes] +=== Test Types + +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. + +* SLH-DSA / keyGen / * "AFT" - Algorithm Functional Test. The IUT is *REQUIRED* for each test case provided, to generate a key pair from provided seed and key values, i.e., SK.seed, SK.prf, and PK.seed. The key pair is communicated to the ACVP server and validated. + +* SLH-DSA / sigGen / * "AFT" - Algorithm Functional Test. This testing mode *REQUIRES* the IUT to generate a valid signature for each test case given the ACVP-provided private key, message and a selected parameter set. The signature is then compared to the known result by the ACVP server. + +* SLH-DSA / sigVer / * "AFT" - Algorithm Functional Test. The ACVP server generates a series of signatures to communicate to the IUT. The IUT is *REQUIRED* to determine the validity of the signature given the parameter set, key, and message. + +[[test_coverage]] +=== Test Coverage + +The tests described in this document have the intention of ensuring an implementation is conformant to <>. + +[[requirements_covered]] +==== Requirements Covered + +* The tests will support ensuring the conformity and correctness of an implementation of the algorithms supported. + +[[requirements_not_covered]] +==== Requirements Not Covered + +* FIPS 205 Section 3.1. Additional Requirements. Requirements outlined in this section are not testable by an ACVP server. An ACVP server will not test that fresh seed values are used for fresh invocations of key generation, that approved deterministic random bit generators (DRBGs) are used with the correct security strengths, that sensitive data is destroyed, that key validation is performed, and that floating point arithmetic is not used. diff --git a/src/slh-dsa/sections/05-capabilities.adoc b/src/slh-dsa/sections/05-capabilities.adoc new file mode 100644 index 00000000..39aa5e95 --- /dev/null +++ b/src/slh-dsa/sections/05-capabilities.adoc @@ -0,0 +1,51 @@ + +[[prereq_algs]] +=== Required Prerequisite Algorithms for SLH-DSA Validations + +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: + +[[rereqs_table]] +.Required SLH-DSA Prerequisite Algorithms JSON Values +|=== +| 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 +|=== + +=== SLH-DSA Algorithm Registration Properties + +Each SLH-DSA algorithm capability advertised is a self-contained JSON object using the following values. + +[[SLH-DSA_caps_table]] +.SLH-DSA Algorithm Capabilities JSON 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 <> +| revision | The algorithm testing revision to use | string | See <> +| prereqVals | Prerequisite algorithm validations | array of prereqAlgVal objects | See <> +| 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 <> +| 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 +|=== + +NOTE: The parameterSets property is only applicable to SLH-DSA / keyGen / FIPS205. + +NOTE: The deterministic property is only applicable to SLH-DSA / sigGen / FIPS205. + +==== Capability JSON Values + +Each capability advertised is a self-contained JSON object using the following values. + +[[caps_table]] +.Registration Capability JSON 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 +|=== + diff --git a/src/slh-dsa/sections/05-slh-dsa-keygen-capabilities.adoc b/src/slh-dsa/sections/05-slh-dsa-keygen-capabilities.adoc new file mode 100644 index 00000000..7d37abe2 --- /dev/null +++ b/src/slh-dsa/sections/05-slh-dsa-keygen-capabilities.adoc @@ -0,0 +1,31 @@ + +[[SLH-DSA_keyGen_capabilities]] +==== SLH-DSA keyGen Mode Capabilities Example + +Below is an example of the registration for SLH-DSA / keyGen / FIPS205 + +[source, json] +---- +{ + "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" + ] +} +---- diff --git a/src/slh-dsa/sections/05-slh-dsa-siggen-capabilities.adoc b/src/slh-dsa/sections/05-slh-dsa-siggen-capabilities.adoc new file mode 100644 index 00000000..241bba24 --- /dev/null +++ b/src/slh-dsa/sections/05-slh-dsa-siggen-capabilities.adoc @@ -0,0 +1,51 @@ + +[[SLH-dsa_sigGen_capabilities]] +==== SLH-DSA sigGen Mode Capabilities Example + +Below is an example of the registration for SLH-DSA / sigGen / FIPS205 + +[source, json] +---- +{ + "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] +} +---- diff --git a/src/slh-dsa/sections/05-slh-dsa-sigver-capabilities.adoc b/src/slh-dsa/sections/05-slh-dsa-sigver-capabilities.adoc new file mode 100644 index 00000000..b5f76240 --- /dev/null +++ b/src/slh-dsa/sections/05-slh-dsa-sigver-capabilities.adoc @@ -0,0 +1,47 @@ + +[[SLH-dsa_sigVer_capabilities]] +==== SLH-DSA sigVer Mode Capabilities Example + +Below is an example of the registration for SLH-DSA / sigVer / FIPS205 + +[source, json] +---- +{ + "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 + } + ] + } + ] +} +---- diff --git a/src/slh-dsa/sections/06-slh-dsa-keygen-test-vectors.adoc b/src/slh-dsa/sections/06-slh-dsa-keygen-test-vectors.adoc new file mode 100644 index 00000000..ea7aa4ab --- /dev/null +++ b/src/slh-dsa/sections/06-slh-dsa-keygen-test-vectors.adoc @@ -0,0 +1,68 @@ +[[SLH-DSA_keyGen_test_vectors]] +=== SLH-DSA keyGen Test Vectors + +[[SLH-DSA_keyGen_tgjs]] +==== SLH-DSA keyGen Test Groups JSON Schema + +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 {algo-short-name} JSON elements of the Test Group JSON object. + +The test group for SLH-DSA / keyGen / FIPS205 is as follows: + +[[SLH-DSA_keyGen_vs_tg_table]] +.SLH-DSA keyGen Test Group JSON Object +|=== +| 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 <> | array +|=== + +[[SLH-DSA_keyGen_tvjs]] +==== SLH-DSA keyGen Test Case JSON Schema + +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. + +[[SLH-DSA_keyGen_vs_tc_table]] +.SLH-DSA keyGen Test Case JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "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" + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/06-slh-dsa-siggen-test-vectors.adoc b/src/slh-dsa/sections/06-slh-dsa-siggen-test-vectors.adoc new file mode 100644 index 00000000..b6cf7697 --- /dev/null +++ b/src/slh-dsa/sections/06-slh-dsa-siggen-test-vectors.adoc @@ -0,0 +1,86 @@ +[[SLH-DSA_sigGen_test_vectors]] +=== SLH-DSA sigGen Test Vectors + +[[SLH-DSA_sigGen_tgjs]] +==== SLH-DSA sigGen Test Groups JSON Schema + +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 {algo-short-name} JSON elements of the Test Group JSON object. + +The test group for SLH-DSA / sigGen / FIPS205 is as follows: + +[[SLH-DSA_sigGen_vs_tg_table]] +.SLH-DSA sigGen Test Group JSON Object +|=== +| 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 <> | array +|=== + +[[SLH-DSA_sigGen_tvjs]] +==== SLH-DSA sigGen Test Case JSON Schema + +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. + +[[SLH-DSA_sigGen_vs_tc_table]] +.SLH-DSA sigGen Test Case JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "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...", + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/06-slh-dsa-sigver-test-vectors.adoc b/src/slh-dsa/sections/06-slh-dsa-sigver-test-vectors.adoc new file mode 100644 index 00000000..a4d7c404 --- /dev/null +++ b/src/slh-dsa/sections/06-slh-dsa-sigver-test-vectors.adoc @@ -0,0 +1,77 @@ +[[SLH-DSA_sigVer_test_vectors]] +=== SLH-DSA sigVer Test Vectors + +[[SLH-DSA_sigVer_tgjs]] +==== SLH-DSA sigVer Test Groups JSON Schema + +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 {algo-short-name} JSON elements of the Test Group JSON object. + +The test group for SLH-DSA / sigVer / FIPS205 is as follows: + +[[SLH-DSA_sigVer_vs_tg_table]] +.SLH-DSA sigVer Test Group JSON Object +|=== +| 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 <> | array +|=== + +[[SLH-DSA_sigVer_tvjs]] +==== SLH-DSA sigVer Test Case JSON Schema + +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. + +[[SLH-DSA_sigVer_vs_tc_table]] +.SLH-DSA sigVer Test Case JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "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..." + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/06-test-vectors.adoc b/src/slh-dsa/sections/06-test-vectors.adoc new file mode 100644 index 00000000..a61db427 --- /dev/null +++ b/src/slh-dsa/sections/06-test-vectors.adoc @@ -0,0 +1,35 @@ +== Test Vectors + +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 {spec-algorithm} 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. + +.Top Level Test Vector JSON Elements +|=== +| 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 <>, <> or <> | array +|=== + +An example of this would look like this + +[source,json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 1, + "algorithm": "Alg1", + "mode": "Mode1", + "revision": "Revision1.0", + "testGroups": [ ... ] + } +] +---- diff --git a/src/slh-dsa/sections/07-responses.adoc b/src/slh-dsa/sections/07-responses.adoc new file mode 100644 index 00000000..d87ac8dd --- /dev/null +++ b/src/slh-dsa/sections/07-responses.adoc @@ -0,0 +1,46 @@ + +[#responses] +== Test Vector Responses + +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. + +[[response_table]] +.Response JSON Object +|=== +| 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 <> | array +|=== + +An example of this is the following + +[source, json] +---- +{ + "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. + +[[response_group_table]] +.Response Group Objects +|=== +| JSON Property | Description | JSON Type + +| tgId | The test group identifier | integer +| tests | The test case objects in the response. Depending on the algorithm, see <>, <>, or <> | array +|=== + +An example of this is the following + +---- +{ + "tgId": 1, + "tests": [ ... ] +} +---- diff --git a/src/slh-dsa/sections/07-slh-dsa-keygen-responses.adoc b/src/slh-dsa/sections/07-slh-dsa-keygen-responses.adoc new file mode 100644 index 00000000..bfaa7c07 --- /dev/null +++ b/src/slh-dsa/sections/07-slh-dsa-keygen-responses.adoc @@ -0,0 +1,40 @@ +[[SLH-DSA_keyGen_vector_responses]] +=== SLH-DSA keyGen Test Vector Responses + +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. + +[[SLH-DSA_keyGen_vs_tr_table]] +.SLH-DSA keyGen Test Case Response JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 0, + "testGroups": [ + { + "tgId": 1, + "tests": [ + { + "tcId": 1, + "pk": "1012798...", + "sk": "1012798..." + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/07-slh-dsa-siggen-responses.adoc b/src/slh-dsa/sections/07-slh-dsa-siggen-responses.adoc new file mode 100644 index 00000000..ea135fbd --- /dev/null +++ b/src/slh-dsa/sections/07-slh-dsa-siggen-responses.adoc @@ -0,0 +1,38 @@ +[[SLH-DSA_sigGen_vector_responses]] +=== SLH-DSA sigGen Test Vector Responses + +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. + +[[SLH-DSA_sigGen_vs_tr_table]] +.SLH-DSA sigGen Test Case Response JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 1564, + "testGroups": [ + { + "tgId": 1, + "tests": [ + { + "tcId": 1, + "signature": "D7D4275..." + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/07-slh-dsa-sigver-responses.adoc b/src/slh-dsa/sections/07-slh-dsa-sigver-responses.adoc new file mode 100644 index 00000000..561bf827 --- /dev/null +++ b/src/slh-dsa/sections/07-slh-dsa-sigver-responses.adoc @@ -0,0 +1,38 @@ +[[SLH-DSA_sigVer_vector_responses]] +=== SLH-DSA sigVer Test Vector Responses + +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. + +[[SLH-DSA_sigVer_vs_tr_table]] +.SLH-DSA sigVer Test Case Response JSON Object +|=== +| 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. + +[source, json] +---- +[ + { + "acvVersion": + }, + { + "vsId": 0, + "testGroups": [ + { + "tgId": 1, + "tests": [ + { + "tcId": 1, + "testPassed": false + } + ] + } + ] + } +] +---- diff --git a/src/slh-dsa/sections/98-references.adoc b/src/slh-dsa/sections/98-references.adoc new file mode 100644 index 00000000..f2ac831c --- /dev/null +++ b/src/slh-dsa/sections/98-references.adoc @@ -0,0 +1,35 @@ + +[bibliography] +== Normative References + +* [[[RFC2119,RFC 2119]]] +* [[[RFC8174,RFC 8174]]] + +* [[[FIPS205,NIST FIPS 205]]] + +[%bibitem] +=== Automatic Cryptographic Validation Protocol +id:: ACVP +docid:: + id::: ACVP +contributor:: +contributor.person.name.initial:: B. +contributor.person.name.surname:: Fussell +contributor.person.affiliation.organization.name:: Cisco +contributor:: +contributor.person.name.initial:: A. +contributor.person.name.surname:: Vassilev +contributor.person.affiliation.organization.name:: National Institute of Standards and Technology +contributor.person.affiliation.organization.abbreviation:: NIST +contributor:: +contributor.person.name.initial:: H. +contributor.person.name.surname:: Booth +contributor.person.affiliation.organization.name:: National Institute of Standards and Technology +contributor.person.affiliation.organization.abbreviation:: NIST +contributor:: +contributor.role:: publisher +contributor.organization.name:: National Institute of Standards and Technology +contributor.organization.abbreviation:: NIST +date:: +date.type:: published +date.value:: 2019-07-01