Network Working Group B. Fussell, Ed. Internet-Draft 10 August 2020 Intended status: Informational Expires: 11 February 2021 ACVP ECDSA 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 11 February 2021. Copyright Notice Copyright (c) 2020 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 . . . . . . . . . . . . . . . . . . . . . . 2 2. Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Terms and definitions . . . . . . . . . . . . . . . . . . . . 3 5. Supported ECDSA Algorithms . . . . . . . . . . . . . . . . . 3 5.1. Supported Conformances for ECDSA Algorithms . . . . . . . 3 6. Test Types and Test Coverage . . . . . . . . . . . . . . . . 4 6.1. Test Types . . . . . . . . . . . . . . . . . . . . . . . 4 6.2. Test Coverage . . . . . . . . . . . . . . . . . . . . . . 5 6.2.1. Requirements Covered . . . . . . . . . . . . . . . . 5 Fussell Expires 11 February 2021 [Page 1] Internet-Draft ACVP ECDSA August 2020 6.2.2. Requirements Not Covered . . . . . . . . . . . . . . 5 7. Capabilities Registration . . . . . . . . . . . . . . . . . . 6 7.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . 6 7.2. Required Prerequisite Algorithms for ECDSA Validations . 7 7.3. ECDSA Algorithm Registration Properties . . . . . . . . . 8 7.3.1. The KeyGen Mode Capabilities . . . . . . . . . . . . 9 7.3.2. The KeyVer Mode Capabilities . . . . . . . . . . . . 12 7.3.3. The SigGen Mode Capabilities . . . . . . . . . . . . 14 7.3.4. The SigVer Mode Capabilities . . . . . . . . . . . . 18 7.3.5. The Deterministic ECDSA SigGen Mode Capabilities . . 22 8. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 25 9. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 26 9.1. ECDSA KeyGen Test Vectors . . . . . . . . . . . . . . . . 26 9.1.1. ECDSA KeyGen Test Groups JSON Schema . . . . . . . . 27 9.1.2. ECDSA KeyGen Test Groups JSON Schema . . . . . . . . 27 9.2. ECDSA KeyVer Test Vectors . . . . . . . . . . . . . . . . 28 9.2.1. ECDSA KeyVer Test Groups JSON Schema . . . . . . . . 28 9.2.2. ECDSA KeyVer Test Groups JSON Schema . . . . . . . . 29 9.3. ECDSA SigGen Test Vectors . . . . . . . . . . . . . . . . 30 9.3.1. ECDSA SigGen Test Groups JSON Schema . . . . . . . . 30 9.3.2. ECDSA SigGen Test Groups JSON Schema . . . . . . . . 31 9.4. ECDSA SigVer TestVectors . . . . . . . . . . . . . . . . 33 9.4.1. ECDSA SigVer Test Groups JSON Schema . . . . . . . . 33 9.4.2. ECDSA SigVer Test Groups JSON Schema . . . . . . . . 33 9.5. Deterministic ECDSA SigGen Test Vectors . . . . . . . . . 36 9.5.1. Deterministic ECDSA SigGen Test Groups JSON Schema . 36 9.5.2. detECDSA SigGen Test Case JSON Schema . . . . . . . . 36 10. Test Vector Responses . . . . . . . . . . . . . . . . . . . . 38 10.1. ECDSA KeyGen Test Vector Responses . . . . . . . . . . . 40 10.2. ECDSA KeyVer Test Vector Responses . . . . . . . . . . . 41 10.3. ECDSA SigGen Test Vector Responses . . . . . . . . . . . 41 10.4. ECDSA SigVer Test Vector Responses . . . . . . . . . . . 43 10.5. Deterministic ECDSA SigGen Test Vector Responses . . . . 44 11. Security Considerations . . . . . . . . . . . . . . . . . . . 46 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 13. Normative references . . . . . . . . . . . . . . . . . . . . 47 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 47 1. Acknowledgements There are no acknowledgements. 2. Abstract This document defines the JSON schema for testing FIPS PUB 186 ECDSA implementations with the ACVP specification. Fussell Expires 11 February 2021 [Page 2] Internet-Draft ACVP ECDSA August 2020 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 PUB 186 ECDSA implementations using ACVP. 4. Terms and definitions No terms and definitions are listed in this document. 5. Supported ECDSA Algorithms The following ECDSA algorithms MAY be advertised by the ACVP compliant cryptographic module. The list is in the form "algorithm / mode / revision". * ECDSA / KeyGen / 1.0 * ECDSA / KeyVer / 1.0 * ECDSA / SigGen / 1.0 * ECDSA / SigVer / 1.0 * ECDSA / KeyGen / FIPS186-5 * ECDSA / KeyVer / FIPS186-5 * ECDSA / SigGen / FIPS186-5 * ECDSA / SigVer / FIPS186-5 * DetECDSA / SigGen / FIPS186-5 5.1. Supported Conformances for ECDSA Algorithms The following ECDSA algorithms MAY claim conformance to [SP800-106]: * ECDSA / SigGen / 1.0 Fussell Expires 11 February 2021 [Page 3] Internet-Draft ACVP ECDSA August 2020 * ECDSA / SigVer / 1.0 * ECDSA / SigGen / FIPS186-5 * ECDSA / SigVer / FIPS186-5 * DetECDSA / SigGen / FIPS186-5 6. Test Types and Test Coverage 6.1. Test Types The ACVP server performs a set of tests on the specified ECDSA 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 ECDSA capabilities. This section describes the design of the tests used to validate implementations of the ECDSA algorithms. * ECDSA / KeyGen / * "AFT" - Algorithm Functional Test. The IUT is REQUIRED for each test case provided, to generate a key pair based on an approved curve. This information is then communicated to the ACVP server and validated. * ECDSA / KeyVer / * "AFT" - Algorithm Functional Test. The ACVP server is REQUIRED to generate a series of keys based on the IUT provided NIST curve(s). The keys generated by the server MAY or *MAY NOT* be valid, the IUT is REQUIRED to determine if the keys provided in the test cases are valid or invalid keys as they relate to the curve. * ECDSA / 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 validated with the ACVP server given the IUT's communicated curve, public key, and signature. * ECDSA / 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 curve, key, and message. Fussell Expires 11 February 2021 [Page 4] Internet-Draft ACVP ECDSA August 2020 * DetECDSA / SigGen / FIPS186-5 "AFT" - Algorithm Functional Test. This testing mode expects the IUT to generate valid signatures based on the ACVP provided message. The signature is then validated with the ACVP server given the IUT's communicated curve, public key, and signature. The random value used in the signature is generated according to the Deterministic ECDSA algorithm in [FIPS186-5]. 6.2. Test Coverage The tests described in this document have the intention of ensuring an implementation is conformant to [FIPS186-4], [FIPS186-5], [SP800-89], and [SP800-106]. 6.2.1. Requirements Covered * FIPS 186-4 - Section 3. General Discussion. Domain parameter generation, key generation, signature generation, and signature validation are all within scope of ACVP server testing. * FIPS 186-4 - Section 6. The Eliliptic Curve Digital Signature Algorithm (ECDSA). The ACVP server SHALL allow testing with the recommended NIST curves. The ACVP server SHALL support a variety of curves/hash function for creation and delivery to/from the IUT. Key pair generation/verification testing SHALL be provided by the ACVP server. Both Signature Generation and Validation testing mechanmisms SHALL be provided by the ACVP server. * SP800-106 - Sections 3. Randomized Hashing and 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 * FIPS 186-4 - Section 3. General Discussion. Assurances of private key secrecy and ownership SHALL NOT be within scope of ACVP testing. * FIPS 186-4 - Section 6. The Elliptic Curve Digital Signature Algorithm (ECDSA). 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 SHALL NOT provide testing for the validity of domain parameters as testing is (currently) limited to approved NIST curves. 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. Fussell Expires 11 February 2021 [Page 5] Internet-Draft ACVP ECDSA August 2020 * 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 ECDSA 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. 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 Fussell Expires 11 February 2021 [Page 6] Internet-Draft ACVP ECDSA August 2020 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" } ] Figure 1 7.2. Required Prerequisite Algorithms for ECDSA Validations Each ECDSA implementation relies on other cryptographic primitives. For example, ECDSA SigGen 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 | SHA, or | | | algorithm | | DRBG | +--------------+----------------+---------------------+-----------+ | valValue | algorithm | string | Actual | | | validation | | number or | | | number | | "same" | +--------------+----------------+---------------------+-----------+ | prereqAlgVal | prerequisite | object with | See above | | | algorithm | algorithm and | | | | validation | valValue properties | | +--------------+----------------+---------------------+-----------+ Table 2: Required ECDSA Prerequisite Algorithms JSON Values Fussell Expires 11 February 2021 [Page 7] Internet-Draft ACVP ECDSA August 2020 7.3. ECDSA Algorithm Registration Properties Each ECDSA algorithm capability advertised is a self-contained JSON object using the following values. +==============+================+==============+====================+ | JSON Value | Description | JSON type | Valid Values | +==============+================+==============+====================+ | algorithm | The ECDSA | string | See Section 5 | | | algorithm to | | | | | be validated | | | +--------------+----------------+--------------+--------------------+ | mode | The ECDSA mdoe | string | See Section 5 | | | to be | | | | | validated | | | +--------------+----------------+--------------+--------------------+ | revision | The algorithm | string | See Section 5 | | | testing | | | | | revision to | | | | | use | | | +--------------+----------------+--------------+--------------------+ | prereqVals | Prerequisite | array of | See | | | algorithm | prereqAlgVal | Section 7.2 | | | validations | objects | | +--------------+----------------+--------------+--------------------+ | capabilities | The individual | array of | See | | | ECDSA Mode and | capability | Section 7.3.1, | | | Revision | objects | Section 7.3.2, | | | capabilities | | Section 7.3.3, | | | | | Section 7.3.4, | | | | | Section 7.3.5 | +--------------+----------------+--------------+--------------------+ | conformances | Used to denote | array of | See | | | the | strings | Section 5.1 | | | conformances | | | | | that can apply | | | | | to specific | | | | | modes of ECDSA | | | +--------------+----------------+--------------+--------------------+ Table 3: ECDSA Algorithm Capabilities JSON Values | NOTE: The 'componentTest' property is only valid for detECDSA / | SigGen / FIPS186-5, ECDSA / SigGen / * and ECDSA / SigVer / * | registrations. Fussell Expires 11 February 2021 [Page 8] Internet-Draft ACVP ECDSA August 2020 7.3.1. The KeyGen Mode Capabilities The ECDSA KeyGen 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 ECDSA KeyGen mode capability set is advertised as a self- contained JSON object. 7.3.1.1. KeyGen Capabilities For Revision "1.0" The complete list of ECDSA / KeyGen / 1.0 capabilities MAY be advertised by the ACVP compliant crypto module: +======================+=============+=======+====================+ | JSON Value | Description | JSON | Valid Values | | | | type | | +======================+=============+=======+====================+ | curve | The curve | array | Any non-empty | | | names | | subset of | | | supported | | {"P-224", "P-256", | | | for the IUT | | "P-384", "P-521", | | | in keyGen. | | "B-233", "B-283", | | | | | "B-409", "B-571", | | | | | "K-233", "K-283", | | | | | "K-409", "K-571"} | +----------------------+-------------+-------+--------------------+ | secretGenerationMode | The method | array | Any non-empty | | | used to | | subset of {"extra | | | generate | | bits", "testing | | | the | | candidates"} | | | randomness | | | | | incoporated | | | | | in the key. | | | +----------------------+-------------+-------+--------------------+ Table 4: ECDSA KeyGen 1.0 Capabilities JSON Values | NOTE: The 'secretGenerationMode' can be found in [FIPS186-4] | Appendix B.4. Below is an example of the registration for ECDSA / KeyGen / 1.0 Fussell Expires 11 February 2021 [Page 9] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "KeyGen", "revision": "1.0", "prereqVals": [ { "algorithm": "DRBG", "valValue": "123456" } ], "curve": [ "P-224", "P-256", "P-384", "P-521", "B-233", "B-283", "B-409", "B-571", "K-233", "K-283", "K-409", "K-571" ], "secretGenerationMode": [ "extra bits", "testing candidates" ] } Figure 2 7.3.1.2. KeyGen Capabilities For Revision "FIPS186-5" The complete list of ECDSA / KeyGen / FIPS186-5 capabilities MAY be advertised by the ACVP compliant crypto module: Fussell Expires 11 February 2021 [Page 10] Internet-Draft ACVP ECDSA August 2020 +======================+==============+=======+===================+ | JSON Value | Description | JSON | Valid Values | | | | type | | +======================+==============+=======+===================+ | curve | The curve | array | Any non-empty | | | names | | subset of | | | supported | | {"P-224", | | | for the IUT | | "P-256", "P-384", | | | in keyGen. | | "P-521"} | +----------------------+--------------+-------+-------------------+ | secretGenerationMode | The method | array | Any non-empty | | | used to | | subset of {"extra | | | generate the | | bits", "testing | | | randomness | | candidates"} | | | incoporated | | | | | in the key. | | | +----------------------+--------------+-------+-------------------+ Table 5: ECDSA KeyGen FIPS186-5 Capabilities JSON Values | NOTE: The 'secretGenerationMode' can be found in [FIPS186-5] | Appendix A.2. Below is an example of the registration for ECDSA / KeyGen / FIPS186-5 { "algorithm": "ECDSA", "mode": "KeyGen", "revision": "FIPS186-5", "prereqVals": [ { "algorithm": "DRBG", "valValue": "123456" } ], "curve": [ "P-224", "P-256", "P-384", "P-521" ], "secretGenerationMode": [ "extra bits", "testing candidates" ] } Fussell Expires 11 February 2021 [Page 11] Internet-Draft ACVP ECDSA August 2020 Figure 3 7.3.2. The KeyVer Mode Capabilities The ECDSA KeyVer 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 ECDSA KeyVer mode capability set is advertised as a self- contained JSON object. 7.3.2.1. KeyVer Capabilities For Revision "1.0" The complete list of ECDSA / KeyVer / 1.0 capabilities MAY be advertised by the ACVP compliant crypto module: +=======+=============+=======+=====================================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=======+=============+=======+=====================================+ | curve | The curve | array | Any non-empty subset of | | | names | | {"P-192", "P-224", "P-256", | | | supported | | "P-384", "P-521", "B-163", | | | for the IUT | | "B-233", "B-283", "B-409", | | | in keyVer. | | "B-571", "K-163", "K-233", | | | | | "K-283", "K-409", "K-571"} | +-------+-------------+-------+-------------------------------------+ Table 6: ECDSA KeyVer 1.0 Capabilities JSON Values Below is an example of the registration for ECDSA / KeyVer / 1.0 Fussell Expires 11 February 2021 [Page 12] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "KeyVer", "revision": "1.0", "prereqVals": [ { "algorithm": "DRBG", "valValue": "123456" } ], "curve": [ "P-192", "P-224", "P-256", "P-384", "P-521", "B-163", "B-233", "B-283", "B-409", "B-571", "K-163", "K-233", "K-283", "K-409", "K-571" ] } Figure 4 7.3.2.2. KeyVer Capabilities For Revision "FIPS186-5" The complete list of ECDSA / KeyVer / FIPS186-5 capabilities MAY be advertised by the ACVP compliant crypto module: +=======+===========================+=======+=======================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=======+===========================+=======+=======================+ | curve | The curve names | array | Any non-empty subset | | | supported for the | | of {"P-224", "P-256", | | | IUT in keyVer. | | "P-384", "P-521"} | +-------+---------------------------+-------+-----------------------+ Table 7: ECDSA KeyVer FIPS186-5 Capabilities JSON Values Fussell Expires 11 February 2021 [Page 13] Internet-Draft ACVP ECDSA August 2020 Below is an example of the registration for ECDSA / KeyVer / FIPS186-5 { "algorithm": "ECDSA", "mode": "KeyVer", "revision": "FIPS186-5", "prereqVals": [ { "algorithm": "DRBG", "valValue": "123456" } ], "curve": [ "P-224", "P-256", "P-384", "P-521" ] } Figure 5 7.3.3. The SigGen Mode Capabilities The ECDSA SigGen 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 ECDSA SigGen mode capability set is advertised as a self- contained JSON object. 7.3.3.1. SigGen Capabilities For Revision "1.0" The complete list of ECDSA / SigGen / 1.0 capabilities MAY be advertised by the ACVP compliant crypto module: Fussell Expires 11 February 2021 [Page 14] Internet-Draft ACVP ECDSA August 2020 +=========+===================+=======+============================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+===================+=======+============================+ | curve | The curves | array | Any non-empty subset of | | | supported with a | | {"P-224", "P-256", | | | particular set of | | "P-384", "P-521", "B-233", | | | hash algorithms. | | "B-283", "B-409", "B-571", | | | | | "K-233", "K-283", "K-409", | | | | | "K-571"} | +---------+-------------------+-------+----------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA2-224", "SHA2-256", | | | supported when | | "SHA2-384", "SHA2-512", | | | signing a message | | "SHA2-512/224", | | | for a particular | | "SHA2-512/256", | | | set of curves. | | "SHA3-224", "SHA3-256", | | | | | "SHA3-384", "SHA3-512"} | +---------+-------------------+-------+----------------------------+ Table 8: ECDSA SigGen 1.0 Capabilities JSON Values | NOTE: Separate capability JSON objects in the array MAY | represent different groupings of curves and hash algorithms. | For example if one object in the 'capabilities' array has | 'curve' "P-224" and 'hashAlg' "SHA2-224" while the next object | has 'curve' "P-256" and 'hashAlg' "SHA2-256", then the tests | generated will maintain those relations. A test group will be | generated with cases for signatures over "P-224" using | "SHA2-224" and a test group will be generated with cases for | signatures over "P-256" using "SHA2-256". Below is an example of the registration for ECDSA / SigGen / 1.0 Fussell Expires 11 February 2021 [Page 15] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "SigGen", "revision": "1.0", "prereqVals": [{ "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "componentTest": false, "capabilities": [ { "curve": [ "P-224", "P-256" ], "hashAlg": [ "SHA2-224", "SHA2-256" ] }, { "curve": [ "P-512" ], "hashAlg": [ "SHA3-512" ] }], "conformances": [ "SP800-106" ] } Figure 6 7.3.3.2. SigGen Capabilities For Revision "FIPS186-5" The complete list of ECDSA / SigGen / FIPS186-5 capabilities MAY be advertised by the ACVP compliant crypto module: Fussell Expires 11 February 2021 [Page 16] Internet-Draft ACVP ECDSA August 2020 +=========+================+=======+===========================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+================+=======+===========================+ | curve | The curves | array | Any non-empty subset of | | | supported with | | {"P-224", "P-256", | | | a particular | | "P-384", "P-521"} | | | set of hash | | | | | algorithms. | | | +---------+----------------+-------+---------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA2-224", "SHA2-256", | | | supported when | | "SHA2-384", "SHA2-512", | | | signing a | | "SHA2-512/224", | | | message for a | | "SHA2-512/256", | | | particular set | | "SHA3-224", "SHA3-256", | | | of curves. | | "SHA3-384", "SHA3-512", | | | | | "SHAKE-128", "SHAKE-256"} | +---------+----------------+-------+---------------------------+ Table 9: ECDSA SigGen FIPS186-5 Capabilities JSON Values | NOTE: Separate capability JSON objects in the array MAY | represent different groupings of curves and hash algorithms. | For example if one object in the 'capabilities' array has | 'curve' "P-224" and 'hashAlg' "SHA2-224" while the next object | has 'curve' "P-256" and 'hashAlg' "SHA2-256", then the tests | generated will maintain those relations. A test group will be | generated with cases for signatures over "P-224" using | "SHA2-224" and a test group will be generated with cases for | signatures over "P-256" using "SHA2-256". Below is an example of the registration for ECDSA / SigGen / FIPS186-5 Fussell Expires 11 February 2021 [Page 17] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "SigGen", "revision": "FIPS186-5", "prereqVals": [{ "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "componentTest": false "capabilities": [ { "curve": [ "P-224", "P-256" ], "hashAlg": [ "SHA2-224", "SHA2-256" ] }, { "curve": [ "P-512" ], "hashAlg": [ "SHA3-512" ] }], "conformances": [ "SP800-106" ] } Figure 7 7.3.4. The SigVer Mode Capabilities The ECDSA SigVer 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 11 February 2021 [Page 18] Internet-Draft ACVP ECDSA August 2020 Each ECDSA SigVer mode capability set is advertised as a self- contained JSON object. 7.3.4.1. SigVer Capabilities For Revision "1.0" The complete list of ECDSA / SigVer / 1.0 capabilities MAY be advertised by the ACVP compliant crypto module: +=========+===================+=======+=============================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+===================+=======+=============================+ | curve | The curves | array | Any non-empty subset of | | | supported with | | {"P-192", "P-224", "P-256", | | | a particular | | "P-384", "P-521", "B-163", | | | set of hash | | "B-233", "B-283", "B-409", | | | algorithms. | | "B-571", "K-163", "K-233", | | | | | "K-283", "K-409", "K-571"} | +---------+-------------------+-------+-----------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA-1", "SHA2-224", | | | supported when | | "SHA2-256", "SHA2-384", | | | signing a | | "SHA2-512", "SHA2-512/224", | | | message for a | | "SHA2-512/256", "SHA3-224", | | | particular set | | "SHA3-256", "SHA3-384", | | | of curves. | | "SHA3-512"} | +---------+-------------------+-------+-----------------------------+ Table 10: ECDSA SigVer Capabilities JSON Values | NOTE: Separate capability JSON objects in the array MAY | represent different groupings of curves and hash algorithms. | For example if one object in the 'capabilities' array has | 'curve' "P-224" and 'hashAlg' "SHA2-224" while the next object | has 'curve' "P-256" and 'hashAlg' "SHA2-256", then the tests | generated will maintain those relations. A test group will be | generated with cases for signatures over "P-224" using | "SHA2-224" and a test group will be generated with cases for | signatures over "P-256" using "SHA2-256". Below is an example of the registration for ECDSA / SigVer / 1.0 Fussell Expires 11 February 2021 [Page 19] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "SigVer", "revision": "1.0", "prereqVals": [{ "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "componentTest": false, "capabilities": [ { "curve": [ "P-224", "P-256" ], "hashAlg": [ "SHA2-224", "SHA2-256" ] }, { "curve": [ "P-512" ], "hashAlg": [ "SHA3-512" ] }], "conformances": [ "SP800-106" ] } Figure 8 7.3.4.2. SigVer Capabilities For Revision "FIPS186-5" The complete list of ECDSA / SigVer / FIPS186-5 capabilities MAY be advertised by the ACVP compliant crypto module: Fussell Expires 11 February 2021 [Page 20] Internet-Draft ACVP ECDSA August 2020 +=========+================+=======+===========================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+================+=======+===========================+ | curve | The curves | array | Any non-empty subset of | | | supported with | | {"P-224", "P-256", | | | a particular | | "P-384", "P-521"} | | | set of hash | | | | | algorithms. | | | +---------+----------------+-------+---------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA2-224", "SHA2-256", | | | supported when | | "SHA2-384", "SHA2-512", | | | signing a | | "SHA2-512/224", | | | message for a | | "SHA2-512/256", | | | particular set | | "SHA3-224", "SHA3-256", | | | of curves. | | "SHA3-384", "SHA3-512", | | | | | "SHAKE-128", "SHAKE-256"} | +---------+----------------+-------+---------------------------+ Table 11: ECDSA SigVer Capabilities JSON Values | NOTE: Separate capability JSON objects in the array MAY | represent different groupings of curves and hash algorithms. | For example if one object in the 'capabilities' array has | 'curve' "P-224" and 'hashAlg' "SHA2-224" while the next object | has 'curve' "P-256" and 'hashAlg' "SHA2-256", then the tests | generated will maintain those relations. A test group will be | generated with cases for signatures over "P-224" using | "SHA2-224" and a test group will be generated with cases for | signatures over "P-256" using "SHA2-256". Below is an example of the registration for ECDSA / SigVer / FIPS186-5 Fussell Expires 11 February 2021 [Page 21] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "ECDSA", "mode": "SigVer", "revision": "FIPS186-5", "prereqVals": [{ "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "componentTest": false, "capabilities": [ { "curve": [ "P-224", "P-256" ], "hashAlg": [ "SHA2-224", "SHA2-256" ] }, { "curve": [ "P-512" ], "hashAlg": [ "SHA3-512" ] }], "conformances": [ "SP800-106" ] } Figure 9 7.3.5. The Deterministic ECDSA SigGen Mode Capabilities The ECDSA SigGen 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 11 February 2021 [Page 22] Internet-Draft ACVP ECDSA August 2020 Each ECDSA SigGen mode capability set is advertised as a self- contained JSON object. 7.3.5.1. Deterministic ECDSA SigGen Capabilities For Revision "FIPS186-5" The complete list of detECDSA / SigGen / FIPS186-5 capabilities MAY be advertised by the ACVP compliant crypto module: +=========+================+=======+===========================+ | JSON | Description | JSON | Valid Values | | Value | | type | | +=========+================+=======+===========================+ | curve | The curves | array | Any non-empty subset of | | | supported with | | {"P-224", "P-256", | | | a particular | | "P-384", "P-521"} | | | set of hash | | | | | algorithms. | | | +---------+----------------+-------+---------------------------+ | hashAlg | The hash | array | Any non-empty subset of | | | functions | | {"SHA2-224", "SHA2-256", | | | supported when | | "SHA2-384", "SHA2-512", | | | signing a | | "SHA2-512/224", | | | message for a | | "SHA2-512/256", | | | particular set | | "SHA3-224", "SHA3-256", | | | of curves. | | "SHA3-384", "SHA3-512", | | | | | "SHAKE-128", "SHAKE-256"} | +---------+----------------+-------+---------------------------+ Table 12: Deterministic ECDSA SigGen FIPS186-5 Capabilities JSON Values | NOTE: Separate capability JSON objects in the array MAY | represent different groupings of curves and hash algorithms. | For example if one object in the 'capabilities' array has | 'curve' "P-224" and 'hashAlg' "SHA2-224" while the next object | has 'curve' "P-256" and 'hashAlg' "SHA2-256", then the tests | generated will maintain those relations. A test group will be | generated with cases for signatures over "P-224" using | "SHA2-224" and a test group will be generated with cases for | signatures over "P-256" using "SHA2-256". Below is an example of the registration for detECDSA / SigGen / FIPS186-5 Fussell Expires 11 February 2021 [Page 23] Internet-Draft ACVP ECDSA August 2020 { "algorithm": "detECDSA", "mode": "SigGen", "revision": "FIPS186-5", "prereqVals": [{ "algorithm": "SHA", "valValue": "123456" }, { "algorithm": "DRBG", "valValue": "123456" } ], "componentTest": false, "capabilities": [ { "curve": [ "P-224", "P-256" ], "hashAlg": [ "SHA2-224", "SHA2-256" ] }, { "curve": [ "P-512" ], "hashAlg": [ "SHA3-512" ] }], "conformances": [ "SP800-106" ] } Figure 10 Fussell Expires 11 February 2021 [Page 24] Internet-Draft ACVP ECDSA August 2020 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 PUB 186 ECDSA 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 13: Top Level Test Vector JSON Elements An example of this would look like this { "acvVersion": "version", "vsId": 1, "algorithm": "Alg1", "mode": "Mode1", "revision": "Revision1.0", "testGroups": [ ... ] } Figure 11 Fussell Expires 11 February 2021 [Page 25] Internet-Draft ACVP ECDSA August 2020 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 ECDSA / SigGen / 1.0, ECDSA / KeyVer / FIPS186-5, etc. This section describes the JSON schema for a test vector set used with ECDSA 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. +============+=====================================+=========+ | 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 14: ECDSA Vector Set JSON Object 9.1. ECDSA KeyGen Test Vectors Fussell Expires 11 February 2021 [Page 26] Internet-Draft ACVP ECDSA August 2020 9.1.1. 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 test group for ECDSA / KeyGen / * is as follows: +======================+==============================+========+ | JSON Value | Description | JSON | | | | type | +======================+==============================+========+ | testType | The test operation performed | string | +----------------------+------------------------------+--------+ | curve | The curve type used for the | string | | | test group | | +----------------------+------------------------------+--------+ | secretGenerationMode | The secret generation mode | string | | | used for the group | | +----------------------+------------------------------+--------+ | tests | Array of individual test | array | | | vector JSON objects, which | | | | are defined in Section 9.1.2 | | +----------------------+------------------------------+--------+ Table 15: ECDSA KeyGen Test Group JSON Object 9.1.2. ECDSA KeyGen Test Groups 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. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ Table 16: ECDSA KeyGen Test Case JSON Object Fussell Expires 11 February 2021 [Page 27] Internet-Draft ACVP ECDSA August 2020 The following is an example JSON object sent from the server to the client for ECDSA / KeyGen. While the example will specify a revision, the format is identical for both revisions available. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "ECDSA", "mode": "KeyGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "curve": "P-224", "secretGenerationMode": "extra bits", "tests": [ { "tcId": 1 } ] } ] } ] Figure 12 9.2. ECDSA KeyVer Test Vectors 9.2.1. 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 test group for ECDSA / KeyVer / * is as follows: Fussell Expires 11 February 2021 [Page 28] Internet-Draft ACVP ECDSA August 2020 +============+=============================================+========+ | JSON | Description | JSON | | Value | | type | +============+=============================================+========+ | testType | The test operation performed | string | +------------+---------------------------------------------+--------+ | curve | The curve type used for the test group | string | +------------+---------------------------------------------+--------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.2.2 | | +------------+---------------------------------------------+--------+ Table 17: ECDSA KeyVer Test Group JSON Object 9.2.2. ECDSA KeyVer Test Groups 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. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | qx | The public key curve point x | hex | +------------+---------------------------------------+-----------+ | qy | The public key curve point y | hex | +------------+---------------------------------------+-----------+ Table 18: ECDSA KeyVer Test Case JSON Object The following is an example JSON object sent from the server to the client for ECDSA / KeyVer. While the example will specify a revision, the format is identical for both revisions available. Fussell Expires 11 February 2021 [Page 29] Internet-Draft ACVP ECDSA August 2020 [ { "acvVersion": }, { "vsId": 1564, "algorithm": "ECDSA", "mode": "KeyVer", "revision": "1.0", "testGroups": [ { "tgId": 1, "curve": "P-192", "tests": [ { "tcId": 1, "qx": "01ED77E3F1591D2EC730D0ED6D592F8DD24158D0E696408DBD", "qy": "BF31C6463EB1B6B55C8930550B88CF8D1F6432A832B40FB4" } ] } ] } ] Figure 13 9.3. ECDSA SigGen Test Vectors 9.3.1. 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 test group for ECDSA / SigGen / * is as follows: Fussell Expires 11 February 2021 [Page 30] Internet-Draft ACVP ECDSA August 2020 +=============+=====================================+========+ | JSON Value | Description | JSON | | | | type | +=============+=====================================+========+ | testType | The test operation performed | string | +-------------+-------------------------------------+--------+ | curve | The curve type used for the test | string | | | vectors | | +-------------+-------------------------------------+--------+ | hashAlg | SHA version used | string | +-------------+-------------------------------------+--------+ | 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 | array | | | JSON objects, which are defined in | | | | Section 9.3.2 | | +-------------+-------------------------------------+--------+ Table 19: ECDSA SigGen Test Group JSON Object 9.3.2. ECDSA SigGen Test Groups 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. +================+=======================================+=========+ | 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 | +----------------+---------------------------------------+---------+ Table 20: ECDSA SigGen Test Case JSON Object Fussell Expires 11 February 2021 [Page 31] Internet-Draft ACVP ECDSA August 2020 | NOTE: The 'randomValue' and 'randomValueLen' will only be | present if the 'conformance' "SP800-106" is present in the | group. The following is an example JSON object sent from the server to the client for ECDSA / SigGen. While the example will specify a revision, the format is identical for both revisions available. [ { "acvVersion": }, { "vsId": 1564, "algorithm": "ECDSA", "mode": "SigGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "curve": "P-224", "hashAlg": "SHA2-224", "tests": [ { "tcId": 1, "message": "AB6F57713A3BD323B4AFDCFBE202EE0..." } ] }, { "tgId": 2, "curve": "P-224", "hashAlg": "SHA2-224", "conformance": "SP800-106", "tests": [ { "tcId": 2, "message": "23B4AFDCFBE202EE00A9CF5C787D19FD90..." } ] } ] } ] Figure 14 Fussell Expires 11 February 2021 [Page 32] Internet-Draft ACVP ECDSA August 2020 9.4. ECDSA SigVer TestVectors 9.4.1. 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 test group for ECDSA / SigVer / * is as follows: +=============+=====================================+========+ | JSON Value | Description | JSON | | | | type | +=============+=====================================+========+ | testType | The test operation performed | string | +-------------+-------------------------------------+--------+ | curve | The curve type used for the test | string | | | vectors | | +-------------+-------------------------------------+--------+ | hashAlg | SHA version used | string | +-------------+-------------------------------------+--------+ | 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 | array | | | JSON objects, which are defined in | | | | Section 9.4.2 | | +-------------+-------------------------------------+--------+ Table 21: ECDSA SigVer Test Group JSON Object 9.4.2. ECDSA SigVer Test Groups 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. Fussell Expires 11 February 2021 [Page 33] Internet-Draft ACVP ECDSA August 2020 +================+=======================================+=========+ | 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 | | +----------------+---------------------------------------+---------+ | qx | The public key curve point x | hex | +----------------+---------------------------------------+---------+ | qy | The public key curve point y | hex | +----------------+---------------------------------------+---------+ | 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 22: ECDSA SigVer Test Case JSON Object | NOTE: The 'randomValue' and 'randomValueLen' will only be | present if the 'conformance' "SP800-106" is present in the | group. The following is an example JSON object sent from the server to the client for ECDSA / SigVer. While the example will specify a revision, the format is identical for both revisions available. Fussell Expires 11 February 2021 [Page 34] Internet-Draft ACVP ECDSA August 2020 [ { "acvVersion": }, { "vsId": 1564, "algorithm": "ECDSA", "mode": "sigVer", "revision": "1.0", "testGroups": [ { "tgId": 1, "curve": "P-192", "hashAlg": "SHA-1", "tests": [ { "tcId": 1, "message": "D38A81D0C5201BA4A06A8C4760AC15DB266B1...", "qx": "B08AFEAC74E42C66EBAF13807E2EB5769F5123645C...", "qy": "55847857E5E48025BE9053952E0E1ECFB1D883CF9F...", "r": "E31121E544D476DC3FA79B4DCB0A7252B6E80468BBF...", "s": "6E3F47F2327E36AD936E0F4BE245C05F264BA9300E9..." } ] }, { "tgId": 2, "curve": "P-192", "hashAlg": "SHA-1", "conformance": "SP800-106", "tests": [ { "tcId": 2, "message": "D38A81D04A06A8C4760AC15DB266B17B48B...", "randomValue": "1527E0FE37FD1162F5DD0D975E83C0D...", "randomValueLen": 1024 "qx": "D1E896486D9D986A464D3469941F93FC65556E2CB...", "qy": "ADCB8D50375DC76907195B6AF6C06F...", "r": "6D9D986A464D3469941F93FC65556E2CB8AB5F113...", "s": "8E713EB6106EF0E19E241DB4B4831E06437E5C..." } ] } ] } ] Figure 15 Fussell Expires 11 February 2021 [Page 35] Internet-Draft ACVP ECDSA August 2020 9.5. Deterministic ECDSA SigGen Test Vectors 9.5.1. 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 test group for detECDSA / SigGen / * is as follows: +=============+=====================================+========+ | JSON Value | Description | JSON | | | | type | +=============+=====================================+========+ | testType | The test operation performed | string | +-------------+-------------------------------------+--------+ | curve | The curve type used for the test | string | | | vectors | | +-------------+-------------------------------------+--------+ | hashAlg | SHA version used | string | +-------------+-------------------------------------+--------+ | 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 | array | | | JSON objects, which are defined in | | | | Section 9.3.2 | | +-------------+-------------------------------------+--------+ Table 23: Deterministic ECDSA SigGen Test Group JSON Object 9.5.2. detECDSA 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. Fussell Expires 11 February 2021 [Page 36] Internet-Draft ACVP ECDSA August 2020 +================+=======================================+=========+ | 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 | +----------------+---------------------------------------+---------+ Table 24: Deterministic ECDSA SigGen Test Case JSON Object | NOTE: The 'randomValue' and 'randomValueLen' will only be | present if the 'conformance' "SP800-106" is present in the | group. The following is an example JSON object sent from the server to the client for detECDSA / SigGen / FIPS186-5. Fussell Expires 11 February 2021 [Page 37] Internet-Draft ACVP ECDSA August 2020 [ { "acvVersion": }, { "vsId": 1564, "algorithm": "detECDSA", "mode": "SigGen", "revision": "FIPS186-5", "testGroups": [ { "tgId": 1, "curve": "P-224", "hashAlg": "SHA2-224", "tests": [ { "tcId": 1, "message": "AB6F57713A3BD323B4AFDCFBE202EE0..." } ] }, { "tgId": 2, "curve": "P-224", "hashAlg": "SHA2-224", "conformance": "SP800-106", "tests": [ { "tcId": 2, "message": "23B4AFDCFBE202EE00A9CF5C787D19FD90..." } ] } ] } ] Figure 16 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. Fussell Expires 11 February 2021 [Page 38] Internet-Draft ACVP ECDSA August 2020 +===============+============================+===========+ | 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 26 | | +---------------+----------------------------+-----------+ Table 25: Response JSON Object An example of this is the following { "acvVersion": "version", "vsId": 1, "testGroups": [ ... ] } Figure 17 The 'testGroups' section is used to organize the ACVP client response in a similar manner to how it distributes vectors. +==========+==========================================+=========+ | 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 27, | | | | Table 28, Table 30, Table 31 or Table 33 | | +----------+------------------------------------------+---------+ Table 26: Response Group Objects An example of this is the following { "tgId": 1, "tests": [ ... ] } Figure 18 Fussell Expires 11 February 2021 [Page 39] Internet-Draft ACVP ECDSA August 2020 10.1. ECDSA 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 a single test vector to be processed by the ACVP client. The following table describes the JSON elements for each ECDSA / KeyGen / * test vector. +============+==============================+===========+ | JSON Value | Description | JSON type | +============+==============================+===========+ | tcId | The test case identifier | integer | +------------+------------------------------+-----------+ | d | The private key | hex | +------------+------------------------------+-----------+ | qx | The public key curve point x | hex | +------------+------------------------------+-----------+ | qy | The public key curve point y | hex | +------------+------------------------------+-----------+ Table 27: ECDSA KeyGen Test Case Response JSON Object The following is an example JSON test vector response object for ECDSA / KeyGen. While the example will not specify a revision, the format is identical for both revisions available. [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "qx": "7B1AA6BE712542282B8D088C23316...", "qy": "BCC9213347A7F988A2FF9EF14C852...", "d": "38524F26660BBA72E74EB39DEF3855..." } ] } ] } ] Figure 19 Fussell Expires 11 February 2021 [Page 40] Internet-Draft ACVP ECDSA August 2020 10.2. ECDSA KeyVer Test Vector Responses 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 / KeyVer / * test vector. +============+=================================+===========+ | JSON Value | Description | JSON type | +============+=================================+===========+ | tcId | The test case identifier | integer | +------------+---------------------------------+-----------+ | testPassed | Whether or not the key verified | boolean | +------------+---------------------------------+-----------+ Table 28: ECDSA KeyVer Test Case Response JSON Object The following is an example JSON test vector response object for ECDSA / KeyVer. While the example will not specify a revision, the format is identical for both revisions available. [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": false } ] } ] } ] Figure 20 10.3. ECDSA SigGen Test Vector Responses The test groups for ECDSA / SigGen / * contain public key properties. The groups can be described using the following table. Fussell Expires 11 February 2021 [Page 41] Internet-Draft ACVP ECDSA August 2020 +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | qx | The x component of the public key | hex | +------------+-----------------------------------------+-----------+ | qy | The y component of the public key | hex | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 29: ECDSA SigGen 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 ECDSA / SigGen / * 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: ECDSA SigGen Test Case Response JSON Object | NOTE: The properties 'randomValue' and 'randomValueLen' SHALL | only be present in test groups where the corresponding test | group in the prompt had the 'conformance' property set to | "SP800-106". The following is an example JSON test vector response object for ECDSA / SigGen. While the example will not specify a revision, the format is identical for both revisions available. Fussell Expires 11 February 2021 [Page 42] Internet-Draft ACVP ECDSA August 2020 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "qx": "3B1D9E4D986F651C3C213B2A1304693BDB...", "qy": "E56F7B7C9E6355E573B7B3B6C0E1ECD70E...", "tests": [ { "tcId": 1, "r": "3E2A9588DF3D3F11B16368A30C8...", "s": "C6E4A8C51E0A0E11C4C6D6F8F3C..." } ] }, { "tgId": 2, "qx": "A1304693BDBA632CB93A3B8BA632CB93A3...", "qy": "ECD70E4ABBA632CB93A3BA632CB93A3DF1...", "tests": [ { "tcId": 2, "r": "3E2A9588DF3D3F11B16368A30C8...", "s": "C6E4A8C51E0A0E11C4C6D6F8F3C...", "randomValue": "0A0E11C4C6D6F8F3C..." "randomValueLen": 1024 } ] } ] } ] Figure 21 10.4. ECDSA 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 a single test vector to be processed by the ACVP client. The following table describes the JSON elements for each ECDSA / SigVer / * test vector. Fussell Expires 11 February 2021 [Page 43] Internet-Draft ACVP ECDSA August 2020 +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | The test case identifier | integer | +------------+---------------------------------------+-----------+ | testPassed | Whether or not the signature verified | boolean | +------------+---------------------------------------+-----------+ Table 31: ECDSA SigVer Test Case Response JSON Object The following is an example JSON test vector response object for ECDSA / SigVer. While the example will not specify a revision, the format is identical for both revisions available. [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": false } ] } ] } ] Figure 22 10.5. Deterministic ECDSA SigGen Test Vector Responses The test groups for detECDSA / SigGen / FIPS186-5 contain public key properties. The groups can be described using the following table. Fussell Expires 11 February 2021 [Page 44] Internet-Draft ACVP ECDSA August 2020 +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | qx | The x component of the public key | hex | +------------+-----------------------------------------+-----------+ | qy | The y component of the public key | hex | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 32: Deterministic ECDSA SigGen 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 detECDSA / SigGen / FIPS186-5 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 33: Deterministic ECDSA SigGen Test Case Response JSON Object | NOTE: The properties 'randomValue' and 'randomValueLen' SHALL | only be present in test groups where the corresponding test | group in the prompt had the 'conformance' property set to | "SP800-106". The following is an example JSON test vector response object for detECDSA / SigGen / FIPS186-5. Fussell Expires 11 February 2021 [Page 45] Internet-Draft ACVP ECDSA August 2020 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "qx": "3B1D9E4D986F651C3C213B2A1304693BDB...", "qy": "E56F7B7C9E6355E573B7B3B6C0E1ECD70E...", "tests": [ { "tcId": 1, "r": "3E2A9588DF3D3F11B16368A30C8...", "s": "C6E4A8C51E0A0E11C4C6D6F8F3C..." } ] }, { "tgId": 2, "qx": "A1304693BDBA632CB93A3B8BA632CB93A3...", "qy": "ECD70E4ABBA632CB93A3BA632CB93A3DF1...", "tests": [ { "tcId": 2, "r": "3E2A9588DF3D3F11B16368A30C8...", "s": "C6E4A8C51E0A0E11C4C6D6F8F3C...", "randomValue": "0A0E11C4C6D6F8F3C..." "randomValueLen": 1024 } ] } ] } ] Figure 23 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. Fussell Expires 11 February 2021 [Page 46] Internet-Draft ACVP ECDSA August 2020 13. Normative references [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", IETF RFC 2119, IETF RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC7991] Hoffman, P., "The "xml2rfc" Version 3 Vocabulary", IETF RFC 7991, IETF RFC 7991, DOI 10.17487/RFC7991, December 2016, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", IETF RFC 8174, IETF RFC 8174, DOI 10.17487/RFC8174, May 2017, . [ACVP] National Institute of Standards and Technology, "Automatic Cryptographic Validation Protocol", ACVP ACVP, 2019. [FIPS186-4] "FIPS Pub 186-4", FIPS186 FIPS186-4. [SP800-89] "SP800-89", SP800 SP800-89. [SP800-106] "SP800-106", SP800 SP800-106. [FIPS186-5] "FIPS Pub 186-5", FIPS186 FIPS186-5. Author's Address Barry Fussell (editor) Email: bfussell@cisco.com Fussell Expires 11 February 2021 [Page 47]