Network Working Group B. Fussell, Ed. Internet-Draft 3 April 2024 Intended status: Informational Expires: 5 October 2024 ACVP DSA Algorithm JSON Specification Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 5 October 2024. Copyright Notice 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. Table of Contents 1. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 3 2. Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. Notation conventions . . . . . . . . . . . . . . . . . . 3 4.2. Terms and Definitions . . . . . . . . . . . . . . . . . . 3 4.2.1. Prompt . . . . . . . . . . . . . . . . . . . . . . . 3 4.2.2. Registration . . . . . . . . . . . . . . . . . . . . 3 4.2.3. Response . . . . . . . . . . . . . . . . . . . . . . 4 4.2.4. Test Case . . . . . . . . . . . . . . . . . . . . . . 4 Fussell Expires 5 October 2024 [Page 1] Internet-Draft ACVP DSA April 2024 4.2.5. Test Group . . . . . . . . . . . . . . . . . . . . . 4 4.2.6. Test Vector Set . . . . . . . . . . . . . . . . . . . 4 4.2.7. Validation . . . . . . . . . . . . . . . . . . . . . 4 5. Supported DSA Algorithms . . . . . . . . . . . . . . . . . . 4 5.1. Supported Conformances for DSA Algorithms . . . . . . . . 4 6. Test Types and Test Coverage . . . . . . . . . . . . . . . . 4 6.1. Test Types . . . . . . . . . . . . . . . . . . . . . . . 5 6.2. Test Coverage . . . . . . . . . . . . . . . . . . . . . . 5 6.2.1. Requirements Covered . . . . . . . . . . . . . . . . 5 6.2.2. Requirements Not Covered . . . . . . . . . . . . . . 6 7. Capabilities Registration . . . . . . . . . . . . . . . . . . 6 7.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . 7 7.2. Required Prerequisite Algorithms for DSA Validations . . 8 7.3. DSA Algorithm Capabilities Registration . . . . . . . . . 8 7.4. DSA pqgGen Mode Capabilities . . . . . . . . . . . . . . 9 7.5. DSA pqgVer Mode Capabilities . . . . . . . . . . . . . . 12 7.5.1. DSA keyGen Mode Capabilities . . . . . . . . . . . . 15 7.5.2. DSA sigGen Mode Capabilities . . . . . . . . . . . . 17 7.5.3. DSA sigVer Mode Capabilities . . . . . . . . . . . . 19 8. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 22 9. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 23 9.1. DSA pqgGen Test Vectors . . . . . . . . . . . . . . . . . 24 9.1.1. DSA pqgGen Test Groups JSON Schema . . . . . . . . . 24 9.1.2. DSA pqgGen Test Case JSON Schema . . . . . . . . . . 25 9.2. DSA pqgVer Test Vectors . . . . . . . . . . . . . . . . . 28 9.2.1. DSA pqgVer Test Groups JSON Schema . . . . . . . . . 28 9.2.2. DSA pqgVer Test Case JSON Schema . . . . . . . . . . 29 9.3. DSA keyGen Test Vectors . . . . . . . . . . . . . . . . . 33 9.3.1. DSA keyGen Test Groups JSON Schema . . . . . . . . . 33 9.3.2. DSA keyGen Test Case JSON Schema . . . . . . . . . . 33 9.4. DSA sigGen Test Vectors . . . . . . . . . . . . . . . . . 34 9.4.1. DSA sigGen Test Groups JSON Schema . . . . . . . . . 34 9.4.2. DSA sigGen Test Case JSON Schema . . . . . . . . . . 35 9.5. DSA sigVer Test Vectors . . . . . . . . . . . . . . . . . 36 9.5.1. DSA sigVer Test Groups JSON Schema . . . . . . . . . 37 9.5.2. DSA sigVer Test Case JSON Schema . . . . . . . . . . 38 10. Test Vector Responses . . . . . . . . . . . . . . . . . . . . 40 10.1. DSA PQGGen Test Vector Responses . . . . . . . . . . . . 41 10.2. DSA PQGVer Test Vector Responses . . . . . . . . . . . . 44 10.3. DSA keyGen Test Vector Responses . . . . . . . . . . . . 46 10.4. DSA sigGen Test Vector Responses . . . . . . . . . . . . 47 10.5. DSA sigVer Test Vector Responses . . . . . . . . . . . . 49 11. Security Considerations . . . . . . . . . . . . . . . . . . . 51 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 51 13. Normative References . . . . . . . . . . . . . . . . . . . . 51 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 52 Fussell Expires 5 October 2024 [Page 2] Internet-Draft ACVP DSA April 2024 1. Acknowledgements There are no acknowledgements. 2. Abstract This document defines the JSON schema for testing FIPS 186-4 DSA implementations with the ACVP specification. 3. Introduction 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 FIPS 186-4 DSA implementations using ACVP. 4. Conventions 4.1. Notation conventions 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. 4.2. Terms and Definitions 4.2.1. Prompt JSON sent from the server to the client describing the tests the client performs 4.2.2. Registration The initial request from the client to the server describing the capabilities of one or several algorithm, mode and revision combinations Fussell Expires 5 October 2024 [Page 3] Internet-Draft ACVP DSA April 2024 4.2.3. Response JSON sent from the client to the server in response to the prompt 4.2.4. Test Case An individual unit of work within a prompt or response 4.2.5. Test Group A collection of test cases that share similar properties within a prompt or response 4.2.6. Test Vector Set A collection of test groups under a specific algorithm, mode, and revision 4.2.7. Validation JSON sent from the server to the client that specifies the correctness of the response 5. Supported DSA Algorithms The following DSA algorithm / mode / revision combinations MAY be advertised by the ACVP compliant cryptographic module: * DSA / keyGen / 1.0 * DSA / pqgGen / 1.0 * DSA / pqgVer / 1.0 * DSA / sigGen / 1.0 * DSA / sigVer / 1.0 5.1. Supported Conformances for DSA Algorithms The following DSA algorithms MAY claim conformance to [SP800-106]: * DSA / sigGen / 1.0 * DSA / sigVer / 1.0 6. Test Types and Test Coverage Fussell Expires 5 October 2024 [Page 4] Internet-Draft ACVP DSA April 2024 6.1. Test Types The ACVP server performs a set of tests on the specified 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 DSA capabilities. This section describes the design of the tests used to validate implementations of the DSA algorithms. * DSA / keyGen / 1.0 "AFT" - Algorithm Functional Test. The IUT is REQUIRED for each test case provided, to generate a key pair based on a generated group level PQG. This information is then communicated to the ACVP server and validated. * DSA / pqgGen / 1.0 "GDT" - Generated Data Test. The IUT in this test mode is REQUIRED to generate PQ or G as a response to the ACVP provided test vector set. * DSA / pqgVer / 1.0 "GDT" - Generated Data Test. In this test mode, the ACVP server is REQUIRED to generate domain parameters for transmission to the IUT. The IUT is expected to evaluate the validity of the domain parameters. * DSA / sigGen / 1.0 "AFT" - Algorithm Functional Test. This testing mode expects the IUT to generate valid signatures based on the ACVP provided message. The IUT communicates the PQG, public key, and signature to the ACVP server, and the signature is then validated. * DSA / sigVer / 1.0 "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 PQG, key, and message. 6.2. Test Coverage The tests described in this document have the intention of ensuring an implementation is conformant to [FIPS186-4] and [SP800-89]. 6.2.1. Requirements Covered * FIPS186-4 Section 3 General Discussion. Domain parameter generation, key generation, signature generation, and signature validation are all within scope of ACVP server testing. * FIPS186-4 Section 4 The Digital Signature Algorithm (DSA). The ACVP server provides a means of the generation and validation of domain parameters. The ACVP server is SHALL support a variety of Fussell Expires 5 October 2024 [Page 5] Internet-Draft ACVP DSA April 2024 parameter sizes/hash function for creation and delivery to/from the IUT. The ACVP server SHALL allow for the testing of the validity of domain parameters. Key pair generation testing SHALL be provided by the ACVP server. Both Signature Generation and Validation testing mechanmisms SHALL be provided by the ACVP server. * SP800-106 Section 3 Randomized Hashing and Section 4 Digital Signatures Using Randomized Hashing. The IUT SHALL be provided or provide a random value that should be used to "randomize" a message prior to signing and/or verifying an original message. 6.2.2. Requirements Not Covered * FIPS186-4 Section 3 General Discussion. Assurances of private key secrecy and ownership SHALL NOT be within scope of ACVP testing. * FIPS186-4 Section 4 The Digital Signature Algorithm (DSA). The IUT's selection of parameter sizes and hash functions SHALL NOT be within scope of ACVP server testing. Though the ACVP server SHALL support a variety of parameter sizes/hash functions, the IUT's selection of these is out of scope of testing. The ACVP server MAY provide testing for the validity of domain parameters, but testing SHALL NOT provide assurances the IUT has validated a set of domain parameters prior to their use. Domain parameter and key pair management SHALL NOT be within scope of ACVP testing. * SP800-106 Section 3.3 The Random Value. DSA, ECDSA, and RSA have random values generated as per their signing process, this random value can be used as the input to the message randomization function, doing so however is out of scope of this testing. 7. Capabilities Registration 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 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. Fussell Expires 5 October 2024 [Page 6] Internet-Draft ACVP DSA April 2024 7.1. Prerequisites 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 | +---------------+-----------------------------+-----------+ Table 1: Prerequisite Properties 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" } ] Fussell Expires 5 October 2024 [Page 7] Internet-Draft ACVP DSA April 2024 7.2. Required Prerequisite Algorithms for DSA Validations Each DSA implementation relies on other cryptographic primitives. For example, DSA uses an underlying SHA algorithm. Each of these underlying algorithm primitives must be validated, either separately or as part of the same submission. ACVP provides a mechanism for specifying the required prerequisites: +==============+===========+==============+==============+==========+ |JSON Value |Description| JSON type | Valid Values |algorithm | +==============+===========+==============+==============+==========+ |a prerequisite|string | DRBG, SHA, | valValue |algorithm | |algorithm | | SHA_OPT2 | |validation| | | | | |number | +--------------+-----------+--------------+--------------+----------+ |string |actual | prereqAlgVal | prerequistie |object | | |number or | | algorithm |with | | |"same" | | validation |algorithm | | | | | |and | | | | | |valValue | | | | | |properties| +--------------+-----------+--------------+--------------+----------+ |see above |prereqVals | prerequistie | array of |see above | | | | algorithm | prereqAlgVal | | | | | validations | objects | | +--------------+-----------+--------------+--------------+----------+ Table 2: Required DSA Prerequisite Algorithms JSON Values 7.3. DSA Algorithm Capabilities Registration Each algorithm capability advertised is a self-contained JSON object using the following values. Fussell Expires 5 October 2024 [Page 8] Internet-Draft ACVP DSA April 2024 +==============+=======================+==============+=============+ | JSON Value | Description | JSON type | Valid | | | | | Values | +==============+=======================+==============+=============+ | algorithm | The algorithm under | string | "DSA" | | | test | | | +--------------+-----------------------+--------------+-------------+ | mode | The DSA mode to be | string | "pqgGen", | | | validated | | "pqgVer", | | | | | "keyGen", | | | | | "sigGen", | | | | | "sigVer" | +--------------+-----------------------+--------------+-------------+ | revision | The algorithm | string | "1.0" | | | testing revision to | | | | | use. | | | +--------------+-----------------------+--------------+-------------+ | prereqVals | prerequistie | array of | See | | | algorithm | prereqAlgVal | Section 7.2 | | | validations | objects | | +--------------+-----------------------+--------------+-------------+ | capabilities | array of JSON | Array of | See Section | | | objects, each with | JSON objects | 7.4, | | | fields pertaining to | | Section | | | the global DSA mode | | 7.5, | | | indicated above and | | Section | | | identified uniquely | | 7.5.1, | | | by the combination | | Section | | | of the DSA "mode" | | 7.5.2 or | | | and indicated | | Section | | | properties | | 7.5.3 | +--------------+-----------------------+--------------+-------------+ | conformances | Used to denote the | Array of | See | | | optional | strings | Section 5.1 | | | conformances that | | | | | can apply to | | | | | specific modes of | | | | | DSA. | | | +--------------+-----------------------+--------------+-------------+ Table 3: DSA Algorithm Capabilities JSON Values 7.4. DSA pqgGen Mode Capabilities The DSA / pqgGen / 1.0 mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message. Fussell Expires 5 October 2024 [Page 9] Internet-Draft ACVP DSA April 2024 Each DSA / pqgGen / 1.0 mode capability set is advertised as a self- contained JSON object. The complete list of DSA PQ and G generation capabilities may be advertised by the ACVP compliant crypto module: +=========+=============+=======+==================================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+=============+=======+==================================+ | l | The length | value | 2048, or 3072 | | | in bits of | | | | | the field | | | | | and the | | | | | length in | | | | | bits of | | | | | prime p. | | | +---------+-------------+-------+----------------------------------+ | n | The length | value | 224, or 256 when L is 2048. | | | in bits of | | Otherwise 256. | | | q which is | | | | | a prime | | | | | factor of | | | | | (p-1). | | | +---------+-------------+-------+----------------------------------+ | pqGen | The methods | array | Any non-empty subset of | | | supported | | {"probable", "provable"}. | | | to generate | | | | | p and q. | | | +---------+-------------+-------+----------------------------------+ | gGen | The methods | array | Any non-empty subset of | | | supported | | {"unverifiable", "canonical"}. | | | to generate | | | | | g. | | | +---------+-------------+-------+----------------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA2-224", "SHA2-256", | | | supported | | "SHA2-384", "SHA2-512", | | | when | | "SHA2-512/224", "SHA2-512/256"}. | | | generating | | Note that the digest size of the | | | p, q and g. | | hash function MUST be equal to | | | | | or greater than N. | +---------+-------------+-------+----------------------------------+ Table 4: DSA pqgGen Capabilities JSON Values An example of the DSA / pqgGen / 1.0 registration is the following Fussell Expires 5 October 2024 [Page 10] Internet-Draft ACVP DSA April 2024 { "algorithm": "DSA", "mode": "pqgGen", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "capabilities": [ { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 2048, "n": 224, "hashAlg": [ "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 2048, "n": 256, "hashAlg": [ "SHA2-256", Fussell Expires 5 October 2024 [Page 11] Internet-Draft ACVP DSA April 2024 "SHA2-384", "SHA2-512", "SHA2-512/256" ] }, { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 3072, "n": 256, "hashAlg": [ "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/256" ] } ] } 7.5. DSA pqgVer Mode Capabilities The DSA / pqgVer / 1.0 mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message. Each DSA / pqgVer / 1.0 mode capability set is advertised as a self- contained JSON object. The complete list of DSA P, Q and G verification capabilities may be advertised by the ACVP compliant crypto module: Fussell Expires 5 October 2024 [Page 12] Internet-Draft ACVP DSA April 2024 +=========+=============+=======+==================================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+=============+=======+==================================+ | l | The length | value | 1024, 2048, or 3072 | | | in bits of | | | | | the field | | | | | and the | | | | | length in | | | | | bits of | | | | | prime p. | | | +---------+-------------+-------+----------------------------------+ | n | The length | value | 160 when L is 1024. 224, or 256 | | | in bits of | | when L is 2048. Otherwise 256. | | | q which is | | | | | a prime | | | | | factor of | | | | | (p-1). | | | +---------+-------------+-------+----------------------------------+ | pqGen | The methods | array | Any non-empty subset of | | | supported | | {"probable", "provable"}. | | | to generate | | | | | p and q. | | | +---------+-------------+-------+----------------------------------+ | gGen | The methods | array | Any non-empty subset of | | | supported | | {"unverifiable", "canonical"}. | | | to generate | | | | | g. | | | +---------+-------------+-------+----------------------------------+ | hashAlg | The hash | array | Any non-empty subset of {"SHA- | | | functions | | 1", "SHA2-224", "SHA2-256", | | | supported | | "SHA2-384", "SHA2-512", | | | when | | "SHA2-512/224", "SHA2-512/256"}. | | | generating | | Note that the digest size of the | | | p, q and g. | | hash function MUST be equal to | | | | | or greater than N. | +---------+-------------+-------+----------------------------------+ Table 5: DSA pqgVer Capabilities JSON Values An example of the DSA / pqgVer / 1.0 registration is the following { "algorithm": "DSA", "mode": "pqgVer", "revision": "1.0", "prereqVals": [ { Fussell Expires 5 October 2024 [Page 13] Internet-Draft ACVP DSA April 2024 "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "capabilities": [ { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 1024, "n": 160, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 2048, "n": 224, "hashAlg": [ "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" Fussell Expires 5 October 2024 [Page 14] Internet-Draft ACVP DSA April 2024 ] }, { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 2048, "n": 256, "hashAlg": [ "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/256" ] }, { "pqGen": [ "probable", "provable" ], "gGen": [ "unverifiable", "canonical" ], "l": 3072, "n": 256, "hashAlg": [ "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/256" ] } ] } 7.5.1. DSA keyGen Mode Capabilities The DSA / keyGen / 1.0 mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message. Fussell Expires 5 October 2024 [Page 15] Internet-Draft ACVP DSA April 2024 Each DSA / keyGen / 1.0 mode capability set is advertised as a self- contained JSON object. The complete list of DSA key generation capabilities may be advertised by the ACVP compliant crypto module: +=======+==========================+=======+=================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=======+==========================+=======+=================+ | l | The length in bits of | value | 2048, or 3072 | | | the field and the length | | | | | in bits of prime p. | | | +-------+--------------------------+-------+-----------------+ | n | The length in bits of q | value | 224, or 256 | | | which is a prime factor | | when L is 2048. | | | of (p-1). | | Otherwise 256. | +-------+--------------------------+-------+-----------------+ Table 6: DSA keyGen Capabilities JSON Values An example of this is the following Fussell Expires 5 October 2024 [Page 16] Internet-Draft ACVP DSA April 2024 { "algorithm": "DSA", "mode": "keyGen", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "capabilities": [ { "n": 224, "l": 2048 }, { "n": 256, "l": 2048 }, { "n": 256, "l": 3072 } ] } 7.5.2. DSA sigGen Mode Capabilities The DSA / sigGen / 1.0 mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message. Each DSA / sigGen / 1.0 mode capability set is advertised as a self- contained JSON object. The complete list of DSA signature generation capabilities may be advertised by the ACVP compliant crypto module: Fussell Expires 5 October 2024 [Page 17] Internet-Draft ACVP DSA April 2024 +=========+====================+=======+=========================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+====================+=======+=========================+ | l | The length in bits | value | 2048, or 3072 | | | of the field and | | | | | the length in bits | | | | | of prime p. | | | +---------+--------------------+-------+-------------------------+ | n | The length in bits | value | 224, or 256 when L is | | | of q which is a | | 2048. Otherwise 256. | | | prime factor of | | | | | (p-1). | | | +---------+--------------------+-------+-------------------------+ | hashAlg | The hash functions | array | Any non-empty subset of | | | supported when | | {"SHA2-224","SHA2-256", | | | signing a message. | | "SHA2-384", "SHA2-512", | | | | | "SHA2-512/224", | | | | | "SHA2-512/256"}. | +---------+--------------------+-------+-------------------------+ Table 7: DSA sigGen Capabilities JSON Values An example of this is the following { "algorithm": "DSA", "mode": "sigGen", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "capabilities": [ { "n": 224, "l": 2048, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", Fussell Expires 5 October 2024 [Page 18] Internet-Draft ACVP DSA April 2024 "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "n": 256, "l": 2048, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "n": 256, "l": 3072, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] } ], "conformances": [ "SP800-106" ] } 7.5.3. DSA sigVer Mode Capabilities The DSA / sigVer / 1.0 mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message. Each DSA / sigVer / 1.0 mode capability set is advertised as a self- contained JSON object. Fussell Expires 5 October 2024 [Page 19] Internet-Draft ACVP DSA April 2024 The complete list of DSA signature verification capabilities may be advertised by the ACVP compliant crypto module: +=========+===================+=======+=============================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+===================+=======+=============================+ | l | The length in | value | 1024, 2048, or 3072 | | | bits of the | | | | | field and the | | | | | length in bits | | | | | of prime p. | | | +---------+-------------------+-------+-----------------------------+ | n | The length in | value | 160 when L is 1024. 224, or | | | bits of q | | 256 when L is2048. | | | which is a | | Otherwise 256. | | | prime factor | | | | | of (p-1). | | | +---------+-------------------+-------+-----------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA-1","SHA2-224", | | | supported when | | "SHA2-256", "SHA2-384", | | | verifying a | | "SHA2-512", "SHA2-512/224", | | | message. | | "SHA2-512/256"}. | +---------+-------------------+-------+-----------------------------+ Table 8: DSA sigVer Capabilities JSON Values An example of this is the following { "algorithm": "DSA", "mode": "sigVer", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "capabilities": [ { "n": 160, "l": 1024, Fussell Expires 5 October 2024 [Page 20] Internet-Draft ACVP DSA April 2024 "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "n": 224, "l": 2048, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "n": 256, "l": 2048, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] }, { "n": 256, "l": 3072, "hashAlg": [ "SHA-1", "SHA2-224", "SHA2-256", "SHA2-384", "SHA2-512", "SHA2-512/224", "SHA2-512/256" ] Fussell Expires 5 October 2024 [Page 21] Internet-Draft ACVP DSA April 2024 } ], "conformances": [ "SP800-106" ] } 8. 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 FIPS 186-4 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 | string | | | exchange | | +-------------+--------------------------------------+-----------+ | mode | Mode defined in the capability | string | | | exchange | | +-------------+--------------------------------------+-----------+ | revision | Protocol test revision selected | string | +-------------+--------------------------------------+-----------+ | testGroups | Array of test groups containing test | array | | | data, see Section 9 | | +-------------+--------------------------------------+-----------+ Table 9: Top Level Test Vector JSON Elements An example of this would look like this Fussell Expires 5 October 2024 [Page 22] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1, "algorithm": "Alg1", "mode": "Mode1", "revision": "Revision1.0", "testGroups": [ ... ] } ] 9. 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 session would require multiple test vector sets to be downloaded and processed by the ACVP client. Each test vector set represents an individual crypto algorithm, such as DSA / sigGen / 1.0 etc. This section describes the JSON schema for a test vector set used with DSA crypto 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. Fussell Expires 5 October 2024 [Page 23] Internet-Draft ACVP DSA April 2024 +============+=====================================+=========+ | JSON Value | Description | JSON | | | | type | +============+=====================================+=========+ | acvVersion | Protocol version identifier | string | +------------+-------------------------------------+---------+ | vsId | Unique numeric identifier for the | integer | | | vector set | | +------------+-------------------------------------+---------+ | algorithm | The algorithm used for the test | string | | | vectors | | +------------+-------------------------------------+---------+ | mode | The mode used for the test vectors | string | +------------+-------------------------------------+---------+ | revision | The algorithm testing revision to | string | | | use | | +------------+-------------------------------------+---------+ | testGroups | Array of test group JSON objects, | array | | | which are defined in Section 9.1.1, | | | | Section 9.2.1, Section 9.3.1, | | | | Section 9.4.1, or Section 9.5.1 | | | | depending on the algorithm | | +------------+-------------------------------------+---------+ Table 10: DSA Vector Set JSON Object 9.1. DSA pqgGen Test Vectors 9.1.1. DSA pqgGen 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 test group for DSA / pqgGen / * is as follows: Fussell Expires 5 October 2024 [Page 24] Internet-Draft ACVP DSA April 2024 +==========+=============================================+=========+ | JSON | Description | JSON | | Value | | type | +==========+=============================================+=========+ | tgId | The test group identifier | integer | +----------+---------------------------------------------+---------+ | testType | The test operation performed | string | +----------+---------------------------------------------+---------+ | l | Length in bits of prime modulus p | integer | +----------+---------------------------------------------+---------+ | n | Length in bits of prime divisor q | integer | +----------+---------------------------------------------+---------+ | pqMode | The specific pq generation mode used in the | string | | | test group | | +----------+---------------------------------------------+---------+ | gMode | The specific g generation mode used in the | string | | | test group | | +----------+---------------------------------------------+---------+ | hashAlg | The hash algorithm used in the test group | string | +----------+---------------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.1.2 | | +----------+---------------------------------------------+---------+ Table 11: DSA PQGGen Test Group JSON Object 9.1.2. DSA pqgGen 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 DSA / pqgGen / 1.0 test vector. Fussell Expires 5 October 2024 [Page 25] Internet-Draft ACVP DSA April 2024 +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | p | The prime modulus | hex | +------------+---------------------------------------+-----------+ | q | The prime divisor of p - 1 | hex | +------------+---------------------------------------+-----------+ | domainSeed | The seed used to generate p and q in | hex | | | the probable method | | +------------+---------------------------------------+-----------+ | index | The index value provided to the g | hex | | | generator in the canonical method | | +------------+---------------------------------------+-----------+ Table 12: DSA PQGGen Test Case JSON Object | NOTE 1: For groups generating a p and q value, only the 'tcId' | property will be present. It is the client's responsibility to | generate a valid p and q pair with the specified properties | using the specified generation method from [FIPS186-4]. | NOTE 2: For groups generating a g value, using the | "unverifiable" method, only the 'tcId', 'p' and 'q' will be | provided. For groups generating a g value using the | "canonical" method, an additional 'domainSeed' and 'index' will | be provided. For more information about these generation | methods see Appendix A in [FIPS186-4]. The following is an example JSON object sent from the server to the client for DSA / pqgGen / 1.0. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "DSA", "mode": "pqgGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "l": 2048, "n": 224, Fussell Expires 5 October 2024 [Page 26] Internet-Draft ACVP DSA April 2024 "hashAlg": "SHA2-224", "pqMode": "probable", "testType": "GDT", "tests": [ { "tcId": 1, } ] }, { "tgId": 2, "l": 2048, "n": 224, "hashAlg": "SHA2-384", "pqMode": "provable", "testType": "GDT", "tests": [ { "tcId": 2, } ] }, { "tgId": 3, "l": 2048, "n": 224, "hashAlg": "SHA2-224", "testType": "GDT", "gMode": "unverifiable", "tests": [ { "tcId": 3, "p": "B9D5DEC1F8541708F...", "q": "9F3FCC1DA20ACCD5C..." } ] }, { "tgId": 4, "l": 2048, "n": 224, "hashAlg": "SHA2-224", "testType": "GDT", "gMode": "canonical", "tests": [ { "tcId": 4, "p": "CACDDA5F26C38B7EF...", Fussell Expires 5 October 2024 [Page 27] Internet-Draft ACVP DSA April 2024 "q": "A4D538BAE42A35316...", "domainSeed": "E8A171F4...", "index": "AD" } ] } ] } ] 9.2. DSA pqgVer Test Vectors 9.2.1. DSA pqgVer 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 test group for DSA / pqgVer / * is as follows: Fussell Expires 5 October 2024 [Page 28] Internet-Draft ACVP DSA April 2024 +==========+=============================================+=========+ | JSON | Description | JSON | | Value | | type | +==========+=============================================+=========+ | tgId | The test group identifier | integer | +----------+---------------------------------------------+---------+ | testType | The test operation performed | string | +----------+---------------------------------------------+---------+ | l | Length in bits of prime modulus p | integer | +----------+---------------------------------------------+---------+ | n | Length in bits of prime divisor q | integer | +----------+---------------------------------------------+---------+ | pqMode | The specific pq generation mode used in the | string | | | test group | | +----------+---------------------------------------------+---------+ | gMode | The specific g generation mode used in the | string | | | test group | | +----------+---------------------------------------------+---------+ | hashAlg | The hash algorithm used in the test group | string | +----------+---------------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.2.2 | | +----------+---------------------------------------------+---------+ Table 13: DSA PQGVer Test Group JSON Object 9.2.2. DSA pqgVer 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 DSA / pqgVer / 1.0 test vector. Fussell Expires 5 October 2024 [Page 29] Internet-Draft ACVP DSA April 2024 +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | p | The prime modulus | hex | +------------+---------------------------------------+-----------+ | q | The prime divisor of p - 1 | hex | +------------+---------------------------------------+-----------+ | domainSeed | The seed used to generate p and q in | hex | | | the probable method | | +------------+---------------------------------------+-----------+ | counter | The counter used to generate p and q | integer | | | in the probable method | | +------------+---------------------------------------+-----------+ | pSeed | The seed used to generate p in the | hex | | | provable method | | +------------+---------------------------------------+-----------+ | qSeed | The seed used to generate q in the | hex | | | provable method | | +------------+---------------------------------------+-----------+ | pCounter | The counter used to generate p in the | integer | | | provable method | | +------------+---------------------------------------+-----------+ | qCounter | The counter used to generate q in the | integer | | | provable method | | +------------+---------------------------------------+-----------+ | g | The generator | hex | +------------+---------------------------------------+-----------+ | h | The index value provided to the g | hex | | | generator in the unverifiable method | | +------------+---------------------------------------+-----------+ | index | The index value provided to the g | hex | | | generator in the canonical method | | +------------+---------------------------------------+-----------+ Table 14: DSA PQGVer Test Case JSON Object | NOTE 1: For groups verifying a p and q value using the | "probable" method, only the 'tcId', 'p', 'q', 'domainSeed' and | 'counter' properties will be present. | NOTE 2: For groups verifying a p and q value using the | "provable" method, only the 'tcId', 'p', 'q', 'pCounter', | 'qCounter', 'pSeed' and 'qSeed' properties will be present. Fussell Expires 5 October 2024 [Page 30] Internet-Draft ACVP DSA April 2024 | NOTE 3: For groups verifying a g value using the "unverifiable" | method, only the 'tcId', 'p', 'q', 'g', 'h', and 'domainSeed' | properties will be present. | NOTE 4: For groups verifying a g value using the "canonical" | method, only the 'tcId', 'p', 'q', 'g', and 'index' properties | will be present. The following is an example JSON object sent from the server to the client for DSA / pqgVer / 1.0. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "DSA", "mode": "pqgVer", "revision": "1.0", "testGroups": [ { "tgId": 1, "l": 1024, "n": 160, "hashAlg": "SHA-1", "testType": "GDT", "pqMode": "probable", "tests": [ { "tcId": 1, "p": "9D9269AC94DB5003355...", "q": "C5C97FD66D441234E78...", "domainSeed": "259947680F...", "counter": 309 }, ] }, { "tgId": 2, "l": 1024, "n": 160, "hashAlg": "SHA-1", "testType": "GDT", "pqMode": "provable", "tests": [ { "tcId": 36, Fussell Expires 5 October 2024 [Page 31] Internet-Draft ACVP DSA April 2024 "p": "4BDC98F8302E24CEDCE...", "q": "A00C3FEAF8F56910DA5...", "pCounter": 1874, "qCounter": 115, "pSeed": "C4967615C4E1391...", "qSeed": "C4967615C4E1391..." }, ] }, { "tgId": 3, "l": 1024, "n": 160, "hashAlg": "SHA-1", "testType": "GDT", "gMode": "unverifiable", "tests": [ { "tcId": 211, "p": "A1648B0F29F5D38DA507...", "q": "9BCF7E1625844A88EABB...", "g": "0FB0987B157E12F15D78...", "h": "02", "domainSeed": "D9F63E102A9..." }, ] }, { "tgId": 4, "l": 1024, "n": 160, "hashAlg": "SHA-1", "testType": "GDT", "gMode": "canonical", "tests": [ { "tcId": 246, "p": "9A1B46A4498962D12FDE...", "q": "B70E07662CADF2A41914...", "g": "45659A0B48B5B581E5CA...", "index": "45" }, ] } ] } ] Fussell Expires 5 October 2024 [Page 32] Internet-Draft ACVP DSA April 2024 9.3. DSA keyGen Test Vectors 9.3.1. 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 test group for DSA / keyGen / * is as follows: +==========+=============================================+=========+ | JSON | Description | JSON | | Value | | type | +==========+=============================================+=========+ | tgId | The test group identifier | integer | +----------+---------------------------------------------+---------+ | testType | The test operation performed | string | +----------+---------------------------------------------+---------+ | l | Length in bits of prime modulus p | integer | +----------+---------------------------------------------+---------+ | n | Length in bits of prime divisor q | integer | +----------+---------------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.3.2 | | +----------+---------------------------------------------+---------+ Table 15: DSA keyGen Test Group JSON Object 9.3.2. 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 DSA / keyGen / 1.0 test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ Table 16: DSA keyGen Test Case JSON Object Fussell Expires 5 October 2024 [Page 33] Internet-Draft ACVP DSA April 2024 | NOTE: The client is responsible for generating domain | parameters and a key to be verified by the server. The following is an example JSON object sent from the server to the client for DSA / keyGen / 1.0. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "DSA", "mode": "keyGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "l": 2048, "n": 224, "tests": [ { "tcId": 1 }, ] } ] } ] 9.4. DSA sigGen Test Vectors 9.4.1. 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 test group for DSA / sigGen / * is as follows: Fussell Expires 5 October 2024 [Page 34] Internet-Draft ACVP DSA April 2024 +=============+======================================+=========+ | JSON Value | Description | JSON | | | | type | +=============+======================================+=========+ | tgId | The test group identifier | integer | +-------------+--------------------------------------+---------+ | testType | The test operation performed | string | +-------------+--------------------------------------+---------+ | l | Length in bits of prime modulus p | integer | +-------------+--------------------------------------+---------+ | n | Length in bits of prime divisor q | integer | +-------------+--------------------------------------+---------+ | hashAlg | The hash algorithm used in the test | string | | | group | | +-------------+--------------------------------------+---------+ | conformance | Signifies all test cases within the | string | | | group should utilize random message | | | | hashing as described in [SP800-106]. | | +-------------+--------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 9.4.2 | | +-------------+--------------------------------------+---------+ Table 17: DSA sigGen Test Group JSON Object 9.4.2. 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 DSA / sigGen / 1.0 test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | message | The message used to generate | hex | | | signature or verify signature | | +------------+---------------------------------------+-----------+ Table 18: DSA sigGen Test Case JSON Object The following is an example JSON object sent from the server to the client for DSA / sigGen / 1.0. Fussell Expires 5 October 2024 [Page 35] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1564, "algorithm": "DSA", "mode": "sigGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "l": 2048, "n": 224, "hashAlg": "SHA-1", "tests": [ { "tcId": 1, "message": "C1FEBB069145F..." } ] }, { "tgId": 2, "l": 2048, "n": 224, "hashAlg": "SHA-1", "conformance": "SP800-106", "tests": [ { "tcId": 2, "message": "C1FEBB069145F..." } ] } ] } ] 9.5. DSA sigVer Test Vectors Fussell Expires 5 October 2024 [Page 36] Internet-Draft ACVP DSA April 2024 9.5.1. 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 test group for DSA / sigVer / * is as follows: +=============+======================================+=========+ | JSON Value | Description | JSON | | | | type | +=============+======================================+=========+ | tgId | The test group identifier | integer | +-------------+--------------------------------------+---------+ | testType | The test operation performed | string | +-------------+--------------------------------------+---------+ | l | Length in bits of prime modulus p | integer | +-------------+--------------------------------------+---------+ | n | Length in bits of prime divisor q | integer | +-------------+--------------------------------------+---------+ | p | Domain parameter P | hex | +-------------+--------------------------------------+---------+ | q | Domain parameter Q | hex | +-------------+--------------------------------------+---------+ | g | Domain parameter G | hex | +-------------+--------------------------------------+---------+ | hashAlg | The hash algorithm used in the test | string | | | group | | +-------------+--------------------------------------+---------+ | conformance | Signifies all test cases within the | string | | | group should utilize random message | | | | hashing as described in [SP800-106]. | | +-------------+--------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 9.5.2 | | +-------------+--------------------------------------+---------+ Table 19: DSA sigVer Test Group JSON Object Fussell Expires 5 October 2024 [Page 37] Internet-Draft ACVP DSA April 2024 9.5.2. 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 DSA / sigVer / 1.0 test vector. +================+=======================================+=========+ | JSON Value | Description | JSON | | | | type | +================+=======================================+=========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +----------------+---------------------------------------+---------+ | message | The message used to generate | hex | | | signature or verify signature | | +----------------+---------------------------------------+---------+ | randomValue | The random value to be used as an | hex | | | input into the message randomization | | | | function as described in [SP800-106]. | | +----------------+---------------------------------------+---------+ | randomValueLen | The random value's bit length. | integer | +----------------+---------------------------------------+---------+ | r | The signature component R | hex | +----------------+---------------------------------------+---------+ | s | The signature component S | hex | +----------------+---------------------------------------+---------+ | y | The public key component Y | hex | +----------------+---------------------------------------+---------+ Table 20: DSA sigVer Test Case JSON Object | NOTE: The 'randomValue' and 'randomValueLen' properties are | only present if the 'conformance' property of the group is set | to "SP800-106". The following is an example JSON object sent from the server to the client for DSA / sigVer / 1.0. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "DSA", "mode": "sigVer", "revision": "1.0", Fussell Expires 5 October 2024 [Page 38] Internet-Draft ACVP DSA April 2024 "testGroups": [ { "tgId": 1, "l": 1024, "n": 160, "p": "A48828B4A4E149C2D1FC66F108D370A2A9E87...", "q": "D3C53E62338D4231E42FA9683175C404FBF52...", "g": "7BDDD6B8E9B4667397B278F98F446C418EF1A...", "hashAlg": "SHA-1", "tests": [ { "tcId": 1, "message": "1A128C1A61091CE52A8B89D69A3...", "y": "A3A2F1AFC3091204B7D7ED3617A80E0FD...", "r": "C390851DE10669399308D9F401B0286AA...", "s": "26BE6EFDCD2ED6946BFCFE2D396AB3A2E..." }, ] }, { "tgId": 2, "l": 1024, "n": 160, "p": "66F108D370A2A9E87DBD49BC09A27017621A...", "q": "1F855467465A653D2245B7E31C910A18EF79...", "g": "F098ACF73BFC43B1B5E7BFB065FBBDDD6B8E...", "hashAlg": "SHA-1", "conformance": "SP800-106", "tests": [ { "tcId": 2, "message": "A0F409909E31C2C23BB7A24B8103F11F...", "randomValue": "DB0D25A72C8DEFA0F409909E31C2..." "randomValueLen": 1024, "y": "A3A284CB56F3A0EF37749B5EA4D2EC824ED5E7EAD481BE520B...", "r": "15FE6F6DAEFD42CD5FA7444221CB545BB0CDB95DC9D76E0...", "s": "B9AF193E6832934537B0B05D177BA8F7DA48D9DD84D27B8AFE9..." }, ] } ] } ] Fussell Expires 5 October 2024 [Page 39] Internet-Draft ACVP DSA April 2024 10. 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. +===============+============================+===========+ | JSON Property | Description | JSON Type | +===============+============================+===========+ | acvVersion | The ACVP version used | string | +---------------+----------------------------+-----------+ | vsId | The vector set identifier | integer | +---------------+----------------------------+-----------+ | testGroups | The test group objects in | array | | | the response, see Table 22 | | +---------------+----------------------------+-----------+ Table 21: Response JSON Object 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. Some algorithm / mode / revision combinations might require that additional test group properties are provided in the response. +==========+==========================================+=========+ | JSON | Description | JSON | | Property | | Type | +==========+==========================================+=========+ | tgId | The test group identifier | integer | +----------+------------------------------------------+---------+ | tests | The test case objects in the response, | array | | | depending on the algorithm see Table 24, | | | | Table 26, Table 28, Table 30 or Table 32 | | +----------+------------------------------------------+---------+ Table 22: Response Group Objects An example of this is the following Fussell Expires 5 October 2024 [Page 40] Internet-Draft ACVP DSA April 2024 { "tgId": 1, "tests": [ ... ] } 10.1. DSA PQGGen Test Vector Responses The test groups for DSA / pqgGen / 1.0 contain public key properties. The groups can be described using the following table. +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 23: DSA PQGGen Test Group Response JSON Object 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 DSA / pqgGen / 1.0 test vector. Fussell Expires 5 October 2024 [Page 41] Internet-Draft ACVP DSA April 2024 +============+================================+===========+ | JSON Value | Description | JSON type | +============+================================+===========+ | tcId | The test case identifier | integer | +------------+--------------------------------+-----------+ | p | The prime modulus | hex | +------------+--------------------------------+-----------+ | q | The prime divisor of p - 1 | hex | +------------+--------------------------------+-----------+ | g | The generator | hex | +------------+--------------------------------+-----------+ | domainSeed | The seed used to generate p | hex | | | and q in the probable method | | +------------+--------------------------------+-----------+ | counter | The counter used to generate p | integer | | | and q in the probable method | | +------------+--------------------------------+-----------+ | pSeed | The seed used to generate p in | hex | | | the provable method | | +------------+--------------------------------+-----------+ | qSeed | The seed used to generate q in | hex | | | the provable method | | +------------+--------------------------------+-----------+ | pCounter | The counter used to generate p | integer | | | in the provable method | | +------------+--------------------------------+-----------+ | qCounter | The counter used to generate q | integer | | | in the provable method | | +------------+--------------------------------+-----------+ Table 24: DSA PQGGen Test Case Response JSON Object | NOTE 1: The properties 'p', 'q', 'domainSeed' and 'counter' are | only required in test groups generating p and q using the | probable generation method in [FIPS186-4]. An example of this | is 'tgId' 1 in the following example. | NOTE 2: The properties 'p', 'q', 'domainSeed', 'pSeed', | 'qSeed', 'pCounter' and 'qCounter' are only required in test | groups generating p and q using the provable generation method | in [FIPS186-4]. An example of this is 'tgId' 2 in the | following example. | NOTE 3: The property 'g' is only required in test groups | generating g under both allowed modes of generation, canonical | and unverifiable. An example of this is 'tgId' 3 and 4 in the | following example. Fussell Expires 5 October 2024 [Page 42] Internet-Draft ACVP DSA April 2024 The following is an example JSON test vector response object for DSA / pqgGen / 1.0. [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "p":"E0BB55A249993FE4...", "q":"C0074BDDC42F22F5...", "domainSeed":"01AA98A...", "counter":379 } ] }, { "tgId": 2, "tests": [ { "tcId": 2, "p":"84B73C1CE8E8C10F8...", "q":"A0B7917C9020F2332...", "domainSeed":"98179EF2...", "pSeed":"98179EF2D7FD0...", "qSeed":"98179EF2D7FD0...", "pCounter":596, "qCounter":255 } ] }, { "tgId": 3, "tests": [ { "tcId": 3, "g": "01098AD5E87869EF..." } ] }, { "tgId": 4, Fussell Expires 5 October 2024 [Page 43] Internet-Draft ACVP DSA April 2024 "tests": [ { "tcId": 4, "g": "5C4AB5D4C901A375..." } ] } ] } ] 10.2. DSA PQGVer Test Vector Responses The test groups for DSA / pqgVer / 1.0 contain public key properties. The groups can be described using the following table. +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 25: DSA PQGVer Test Group Response JSON Object 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 DSA / pqgVer / 1.0 test vector. +============+==========================================+===========+ | JSON Value | Description | JSON type | +============+==========================================+===========+ | tcId | The test case identifier | integer | +------------+------------------------------------------+-----------+ | testPassed | Whether or not the pq | boolean | | | pair or g verified | | +------------+------------------------------------------+-----------+ Table 26: DSA PQGVer Test Case Response JSON Object The following is an example JSON test vector response object for DSA / pqgVer / 1.0. Fussell Expires 5 October 2024 [Page 44] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": false, } ] }, { "tgId": 2, "tests": [ { "tcId": 36, "testPassed": false, } ] }, { "tgId": 3, "tests": [ { "tcId": 211, "testPassed": true, } ] }, { "tgId": 4, "tests": [ { "tcId": 246, "testPassed": true, } ] } ] } ] Fussell Expires 5 October 2024 [Page 45] Internet-Draft ACVP DSA April 2024 10.3. DSA keyGen Test Vector Responses The test groups for DSA / keyGen / 1.0 contain public key properties. The groups can be described using the following table. +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | p | The prime modulus | hex | +------------+-----------------------------------------+-----------+ | q | The prime divisor of p - 1 | hex | +------------+-----------------------------------------+-----------+ | g | The generator | hex | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 27: DSA keyGen Test Group Response JSON Object 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 DSA / keyGen / 1.0 test vector. +============+=============================+===========+ | JSON Value | Description | JSON type | +============+=============================+===========+ | tcId | The test case identifier | integer | +------------+-----------------------------+-----------+ | x | The private key component X | hex | +------------+-----------------------------+-----------+ | y | The public key component Y | hex | +------------+-----------------------------+-----------+ Table 28: DSA keyGen Test Case Response JSON Object The following is an example JSON test vector response object for DSA / keyGen / 1.0. Fussell Expires 5 October 2024 [Page 46] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "p": "9D75F12AD16C09A618F3D25...", "q": "F9146BFEC592547B8C69737...", "g": "96A7DD911D076093EBBA4D9...", "tests": [ { "tcId": 1, "x": "6316A9021906CB3F9F6...", "y": "8520DE9F113D659F708..." } ] } ] } ] 10.4. DSA sigGen Test Vector Responses The test groups for DSA / sigGen / 1.0 contain public key properties. The groups can be described using the following table. +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | p | The prime modulus | hex | +------------+-----------------------------------------+-----------+ | q | The prime divisor of p - 1 | hex | +------------+-----------------------------------------+-----------+ | g | The generator | hex | +------------+-----------------------------------------+-----------+ | y | The public key component Y | hex | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 29: DSA sigGen Test Group Response JSON Object Fussell Expires 5 October 2024 [Page 47] Internet-Draft ACVP DSA April 2024 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 DSA / sigGen / 1.0 test vector. +================+=======================================+=========+ | JSON Value | Description | JSON | | | | type | +================+=======================================+=========+ | tcId | The test case identifier | integer | +----------------+---------------------------------------+---------+ | r | The signature component R | hex | +----------------+---------------------------------------+---------+ | s | The signature component S | hex | +----------------+---------------------------------------+---------+ | randomValue | The random value to be used as an | hex | | | input into the message randomization | | | | function as described in [SP800-106]. | | +----------------+---------------------------------------+---------+ | randomValueLen | The random value's bit length. | integer | +----------------+---------------------------------------+---------+ Table 30: DSA sigGen Test Case Response JSON Object | NOTE: The properties 'randomValue' and 'randomValueLen' are | only required for groups that had the 'conformance' property | set to "SP800-106". The following is an example JSON test vector response object for DSA / sigGen / 1.0. Fussell Expires 5 October 2024 [Page 48] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "p": "C8DC6C77CC31ADAE68F3221D59C7...", "q": "B1B7BCF2467F8CC46FCDD2A41327...", "g": "6C07130A6F6D05AAC9350936EE06...", "y": "79143F63ECCC06B3D35C61DA2FB8...", "tests": [ { "tcId": 1, "r": "4E7F70A92EC0E6871E2EA278...", "s": "641A74C54A0B642DED9FE6EE..." } ] }, { "tgId": 2, "p": "77CC31ADAE68F3221D59C75538F6...", "q": "82E17546E564816AFB54987C879A...", "g": "B1303035FE460CEBF21DDA00CC08...", "y": "D699C3B6E150E60443BA461C2564...", "tests": [ { "tcId": 2, "r": "4E7F70A92EC0E6871E2EA275...", "s": "641A74C54A0B642DED9FE6EE...", "randomValue": "23678643ACB728...", "randomValueLen": 1024 } ] } ] } ] 10.5. DSA sigVer Test Vector Responses The test groups for DSA / sigVer / 1.0 contain public key properties. The groups can be described using the following table. Fussell Expires 5 October 2024 [Page 49] Internet-Draft ACVP DSA April 2024 +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 31: DSA sigVer Test Group Response JSON Object 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 DSA / sigVer / 1.0 test vector. +============+==========================================+===========+ | JSON Value | Description | JSON type | +============+==========================================+===========+ | tcId | The test case identifier | integer | +------------+------------------------------------------+-----------+ | testPassed | Whether or not the pq | boolean | | | pair or g verified | | +------------+------------------------------------------+-----------+ Table 32: DSA sigVer Test Case Response JSON Object The following is an example JSON test vector response object for DSA / sigVer / 1.0. Fussell Expires 5 October 2024 [Page 50] Internet-Draft ACVP DSA April 2024 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": true }, { "tcId": 2, "testPassed": true } ] } ] } ] 11. Security Considerations There are no additional security considerations outside of those outlined in the ACVP document. 12. IANA Considerations This document does not require any action by IANA. 13. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC7991] Hoffman, P., "The "xml2rfc" Version 3 Vocabulary", RFC 7991, RFC 7991, DOI 10.17487/RFC7991, December 2016, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, RFC 8174, DOI 10.17487/RFC8174, May 2017, . Fussell Expires 5 October 2024 [Page 51] Internet-Draft ACVP DSA April 2024 [FIPS186-4] National Institute of Standards and Technology, "Digital Signature Standard (DSS)", NIST FIPS 186-4, July 2013, . [SP800-89] Barker, E. B., "Recommendation for Obtaining Assurances for Digital Signature Applications", NIST SP 800-89, November 2006, . [SP800-106] Dang, Q. H., "Randomized Hashing for Digital Signatures", NIST SP 800-106, February 2009, . [ACVP] Fussell, B., Vassilev, A., and H. Booth, "Automatic Cryptographic Validation Protocol", ACVP, 1 July 2019. Author's Address Barry Fussell (editor) Email: bfussell@cisco.com Fussell Expires 5 October 2024 [Page 52]