Network Working Group C. Celi, Ed. Internet-Draft 23 April 2024 Intended status: Informational Expires: 25 October 2024 ACVP LMS JSON Specification draft-celi-acvp-lms-01 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 25 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 . . . . . . . . . . . . . . . . . . . . . . 2 2. Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 2 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 . . . . . . . . . . . . . . . . . . . . . . 3 Celi Expires 25 October 2024 [Page 1] Internet-Draft ACVP LMS April 2024 4.2.4. Test Case . . . . . . . . . . . . . . . . . . . . . . 3 4.2.5. Test Group . . . . . . . . . . . . . . . . . . . . . 4 4.2.6. Test Vector Set . . . . . . . . . . . . . . . . . . . 4 4.2.7. Validation . . . . . . . . . . . . . . . . . . . . . 4 5. Supported LMS Algorithms . . . . . . . . . . . . . . . . . . 4 6. Test Types and Test Coverage . . . . . . . . . . . . . . . . 4 6.1. Test Types . . . . . . . . . . . . . . . . . . . . . . . 4 6.2. Test Coverage . . . . . . . . . . . . . . . . . . . . . . 5 6.2.1. Requirements Covered . . . . . . . . . . . . . . . . 5 6.2.2. Requirements Not Covered . . . . . . . . . . . . . . 5 7. Capabilities Registration . . . . . . . . . . . . . . . . . . 5 7.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . 6 7.2. Required Prerequisite Algorithms for LMS Validations . . 7 7.3. LMS Algorithm Registration Properties . . . . . . . . . . 7 7.3.1. Valid LMS Modes . . . . . . . . . . . . . . . . . . . 9 7.3.2. Valid LMOTS Modes . . . . . . . . . . . . . . . . . . 10 7.3.3. LMS keyGen Mode Capabilities Example . . . . . . . . 11 7.3.4. LMS sigGen Mode Capabilities Example . . . . . . . . 12 7.3.5. LMS sigVer Mode Capabilities Example . . . . . . . . 12 8. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 13 9. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 14 9.1. LMS keyGen Test Vectors . . . . . . . . . . . . . . . . . 15 9.1.1. LMS keyGen Test Groups JSON Schema . . . . . . . . . 15 9.1.2. LMS keyGen Test Case JSON Schema . . . . . . . . . . 16 9.2. LMS sigGen Test Vectors . . . . . . . . . . . . . . . . . 17 9.2.1. LMS sigGen Test Groups JSON Schema . . . . . . . . . 17 9.2.2. LMS sigGen Test Groups JSON Schema . . . . . . . . . 18 9.3. LMS sigVer Test Vectors . . . . . . . . . . . . . . . . . 19 9.3.1. LMS sigVer Test Groups JSON Schema . . . . . . . . . 19 9.3.2. LMS sigVer Test Groups JSON Schema . . . . . . . . . 20 10. Test Vector Responses . . . . . . . . . . . . . . . . . . . . 21 10.1. LMS keyGen Test Vector Responses . . . . . . . . . . . . 23 10.2. LMS sigGen Test Vector Responses . . . . . . . . . . . . 23 10.3. LMS sigVer Test Vector Responses . . . . . . . . . . . . 25 11. Security Considerations . . . . . . . . . . . . . . . . . . . 26 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 13. Normative References . . . . . . . . . . . . . . . . . . . . 26 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 27 1. Acknowledgements There are no acknowledgements. 2. Abstract This document defines the JSON schema for testing LMS implementations with the ACVP specification. Celi Expires 25 October 2024 [Page 2] Internet-Draft ACVP LMS April 2024 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 LMS 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 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 Celi Expires 25 October 2024 [Page 3] Internet-Draft ACVP LMS April 2024 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 LMS Algorithms The following LMS algorithms MAY be advertised by the ACVP compliant cryptographic module. The list is in the form "algorithm / mode / revision". * LMS / keyGen / 1.0 * LMS / sigGen / 1.0 * LMS / sigVer / 1.0 6. Test Types and Test Coverage 6.1. Test Types The ACVP server performs a set of tests on the specified LMS 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 LMS capabilities. This section describes the design of the tests used to validate implementations of the LMS algorithms. * LMS / keyGen / * "AFT" - Algorithm Functional Test. The IUT is REQUIRED for each test case provided, to generate a key pair based on an approved tree structure. This information is then communicated to the ACVP server and validated. * LMS / 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 tree structure, public key, and signature. Celi Expires 25 October 2024 [Page 4] Internet-Draft ACVP LMS April 2024 * LMS / 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 tree structure, key, and message. 6.2. Test Coverage The tests described in this document have the intention of ensuring an implementation is conformant to [SP800-208]. 6.2.1. Requirements Covered * SP 800-208 Section 8. Conformance. The tests provided by ACVP are only able to provide a correctness assertion of an implementation. * Due to the randomized nature of generating LMS trees, the ACVP server MAY test implementations against the pseudorandom key generation process defined in [RFC8554] Appendix A. 6.2.2. Requirements Not Covered * SP800-208 Section 8. Conformance. Many requirements outlined in this section are not testable by ACVP. ACVP does not test the inability of an implementation to export a private key. ACVP does not provide any guarantees on the inability to reuse private OTS pairs of an implementation. 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 LMS 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. Celi Expires 25 October 2024 [Page 5] Internet-Draft ACVP LMS 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" } ] Celi Expires 25 October 2024 [Page 6] Internet-Draft ACVP LMS April 2024 7.2. Required Prerequisite Algorithms for LMS Validations Each LMS implementation relies on other cryptographic primitives. For example, LMS keyGen 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 LMS Prerequisite Algorithms JSON Values 7.3. LMS Algorithm Registration Properties Each LMS algorithm capability advertised is a self-contained JSON object using the following values. Celi Expires 25 October 2024 [Page 7] Internet-Draft ACVP LMS April 2024 +======================+===================+==============+=========+ | JSON Value | Description | JSON Type | Valid | | | | | Values | +======================+===================+==============+=========+ | algorithm | The LMS | string | See | | | algorithm to be | | Section | | | validated | | 5 | +----------------------+-------------------+--------------+---------+ | mode | The LMS mode to | string | See | | | be validated | | Section | | | | | 5 | +----------------------+-------------------+--------------+---------+ | revision | The algorithm | string | See | | | testing revision | | Section | | | to use | | 5 | +----------------------+-------------------+--------------+---------+ | prereqVals | Prerequisite | array of | See | | | algorithm | prereqAlgVal | Section | | | validations | objects | 7.2 | +----------------------+-------------------+--------------+---------+ | capabilities | The general | object | See | | | pairs of LMS and | | Table 4 | | | LMOTS modes that | | | | | are supported. | | | | | See note. | | | +----------------------+-------------------+--------------+---------+ | specificCapabilities | The set of exact | array of | See | | | LMS and LMOTS | objects | Table 5 | | | mode matches | | | | | that are | | | | | supported. See | | | | | note. | | | +----------------------+-------------------+--------------+---------+ Table 3: LMS Algorithm Capabilities JSON Values The capabilities advertised by the module must use the following JSON object schema. The ACVP server MAY select any pairing of values from the arrays to test. Note: The capabilities object is *preferred*, as it allows the ACVP server to select from a random sampling of the product of the registered capabilities. The specificCapabilities object can be used as an alternative, if your IUT does not support a wide variety of capabilities, and needs to have *specific* combinations tested against. Celi Expires 25 October 2024 [Page 8] Internet-Draft ACVP LMS April 2024 The two capabilities and specificCapabilities cannot be used together with the same registration. +============+===================+===========+==============+ | JSON Value | Description | JSON Type | Valid Values | +============+===================+===========+==============+ | lmsModes | An array of LMS | array of | See Section | | | modes supported | strings | 7.3.1 | +------------+-------------------+-----------+--------------+ | lmOtsModes | An array of LMOTS | array of | See Section | | | modes supported | strings | 7.3.2 | +------------+-------------------+-----------+--------------+ Table 4: LMS Capability Details The specificCapabilities advertised by the module must use the following JSON object schema. The ACVP server MUST test the listed values. +============+================+===========+==============+ | JSON Value | Description | JSON Type | Valid Values | +============+================+===========+==============+ | lmsMode | A single LMS | string | See Section | | | mode supported | | 7.3.1 | +------------+----------------+-----------+--------------+ | lmOtsMode | A single LMOTS | string | See Section | | | mode supported | | 7.3.2 | +------------+----------------+-----------+--------------+ Table 5: LMS Specific Capability Details 7.3.1. Valid LMS Modes The following LMS Modes MAY be registered by the module. The combinations of LMS Modes and LMOTS Modes MUST adhere to [SP800-208] Section 4, namely M = N, and the hash is the same. * LMS_SHA256_M24_H5 * LMS_SHA256_M24_H10 * LMS_SHA256_M24_H15 * LMS_SHA256_M24_H20 * LMS_SHA256_M24_H25 * LMS_SHA256_M32_H5 Celi Expires 25 October 2024 [Page 9] Internet-Draft ACVP LMS April 2024 * LMS_SHA256_M32_H10 * LMS_SHA256_M32_H15 * LMS_SHA256_M32_H20 * LMS_SHA256_M32_H25 * LMS_SHAKE_M24_H5 * LMS_SHAKE_M24_H10 * LMS_SHAKE_M24_H15 * LMS_SHAKE_M24_H20 * LMS_SHAKE_M24_H25 * LMS_SHAKE_M32_H5 * LMS_SHAKE_M32_H10 * LMS_SHAKE_M32_H15 * LMS_SHAKE_M32_H20 * LMS_SHAKE_M32_H25 7.3.2. Valid LMOTS Modes The following LMOTS Modes MAY be registerd by the module. * LMOTS_SHA256_N24_W1 * LMOTS_SHA256_N24_W2 * LMOTS_SHA256_N24_W4 * LMOTS_SHA256_N24_W8 * LMOTS_SHA256_N32_W1 * LMOTS_SHA256_N32_W2 * LMOTS_SHA256_N32_W4 * LMOTS_SHA256_N32_W8 Celi Expires 25 October 2024 [Page 10] Internet-Draft ACVP LMS April 2024 * LMOTS_SHAKE_N24_W1 * LMOTS_SHAKE_N24_W2 * LMOTS_SHAKE_N24_W4 * LMOTS_SHAKE_N24_W8 * LMOTS_SHAKE_N32_W1 * LMOTS_SHAKE_N32_W2 * LMOTS_SHAKE_N32_W4 * LMOTS_SHAKE_N32_W8 7.3.3. LMS keyGen Mode Capabilities Example Below is an example of the registration for LMS / keyGen / 1.0 { "algorithm": "LMS", "mode": "keyGen", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" } ], "capabilities": { "lmsModes": ["LMS_SHA256_M24_H5", "LMS_SHA256_M24_H10"], "lmOtsModes": ["LMOTS_SHA256_N24_W1", "LMOTS_SHA256_N24_W8"] } "specificCapabilities": [ { "lmsMode": "LMS_SHA256_M24_H5", "lmOtsMode": "LMOTS_SHA256_N24_W2" }, { "lmsMode": "LMS_SHAKE_M24_H25", "lmOtsMode": "LMOTS_SHAKE_N24_W1" } ] } Celi Expires 25 October 2024 [Page 11] Internet-Draft ACVP LMS April 2024 7.3.4. LMS sigGen Mode Capabilities Example Below is an example of the registration for LMS / sigGen / 1.0 { "algorithm": "LMS", "mode": "sigGen", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" } ], "capabilities": { "lmsModes": ["LMS_SHA256_M24_H5", "LMS_SHA256_M24_H10"], "lmOtsModes": ["LMOTS_SHA256_N24_W1", "LMOTS_SHA256_N24_W8"] } "specificCapabilities": [ { "lmsMode": "LMS_SHA256_M24_H5", "lmOtsMode": "LMOTS_SHA256_N24_W2" }, { "lmsMode": "LMS_SHAKE_M24_H25", "lmOtsMode": "LMOTS_SHAKE_N24_W1" } ] } 7.3.5. LMS sigVer Mode Capabilities Example Below is an example of the registration for LMS / sigVer / 1.0 Celi Expires 25 October 2024 [Page 12] Internet-Draft ACVP LMS April 2024 { "algorithm": "LMS", "mode": "sigVer", "revision": "1.0", "prereqVals": [ { "algorithm": "SHA", "valValue": "123456" } ], "capabilities": { "lmsModes": ["LMS_SHA256_M24_H5", "LMS_SHA256_M24_H10"], "lmOtsModes": ["LMOTS_SHA256_N24_W1", "LMOTS_SHA256_N24_W8"] } "specificCapabilities": [ { "lmsMode": "LMS_SHA256_M24_H5", "lmOtsMode": "LMOTS_SHA256_N24_W2" }, { "lmsMode": "LMS_SHAKE_M24_H25", "lmOtsMode": "LMOTS_SHAKE_N24_W1" } ] } 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 LMS 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. Celi Expires 25 October 2024 [Page 13] Internet-Draft ACVP LMS April 2024 +=============+======================================+===========+ | 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 6: Top Level Test Vector JSON Elements An example of this would look like this [ { "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 LMS / sigGen / 1.0, etc. This section describes the JSON schema for a test vector set used with LMS crypto algorithms. Celi Expires 25 October 2024 [Page 14] Internet-Draft ACVP LMS April 2024 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 vectors | string | +------------+-----------------------------------------+---------+ | mode | The mode used for the test vectors | string | +------------+-----------------------------------------+---------+ | revision | The algorithm testing revision to use | string | +------------+-----------------------------------------+---------+ | testGroups | Array of test group JSON objects, which | array | | | are defined in Table 16, Table 18, or | | | | Table 19 depending on the algorithm | | +------------+-----------------------------------------+---------+ Table 7: LMS Vector Set JSON Object 9.1. LMS keyGen Test Vectors 9.1.1. LMS keyGen Test Groups JSON Schema The testGroups element at the top level in the test vector JSON object is an array of test groups. Test vectors are grouped into similar test cases to reduce the amount of data transmitted in the vector set. For instance, all test vectors that use the same key size would be grouped together. The Test Group JSON object contains meta data that applies to all test vectors within the group. The following table describes the secure hash JSON elements of the Test Group JSON object. The test group for LMS / keyGen / 1.0 is as follows: Celi Expires 25 October 2024 [Page 15] Internet-Draft ACVP LMS April 2024 +============+=============================================+========+ | JSON | Description | JSON | | Value | | type | +============+=============================================+========+ | testType | The test operation performed | string | +------------+---------------------------------------------+--------+ | lmsMode | The LMS tree structure used | string | +------------+---------------------------------------------+--------+ | lmOtsMode | The LMOTS tree structure used | string | +------------+---------------------------------------------+--------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.1.2 | | +------------+---------------------------------------------+--------+ Table 8: LMS keyGen Test Group JSON Object 9.1.2. LMS 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 LMS test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | i | The public key identifier used to | hex | | | generate the LMS tree | | +------------+---------------------------------------+-----------+ | seed | The seed used to generate the OTS | hex | | | values | | +------------+---------------------------------------+-----------+ Table 9: LMS keyGen Test Case JSON Object The following is an example JSON object sent from the server to the client for LMS / keyGen / 1.0. Celi Expires 25 October 2024 [Page 16] Internet-Draft ACVP LMS April 2024 [ { "acvVersion": }, { "vsId": 1564, "algorithm": "LMS", "mode": "keyGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "testType": "AFT", "lmsMode": "LMS_SHA256_M24_H25", "lmOtsMode": "LMOTS_SHA256_N24_W8", "tests": [ { "tcId": 1, "seed": "99182FD07F0B3ED6619ACE121E1D8E25A0604524D4C9EE67", "i": "2A1E70061F78145D18F710B889A9B32F" } ] } ] } ] 9.2. LMS sigGen Test Vectors 9.2.1. LMS sigGen Test Groups JSON Schema The testGroups element at the top level in the test vector JSON object is an array of test groups. Test vectors are grouped into similar test cases to reduce the amount of data transmitted in the vector set. For instance, all test vectors that use the same key size would be grouped together. The Test Group JSON object contains meta data that applies to all test vectors within the group. The following table describes the secure hash JSON elements of the Test Group JSON object. The test group for LMS / sigGen / 1.0 is as follows: Celi Expires 25 October 2024 [Page 17] Internet-Draft ACVP LMS April 2024 +============+=============================================+========+ | JSON | Description | JSON | | Value | | type | +============+=============================================+========+ | testType | The test operation performed | string | +------------+---------------------------------------------+--------+ | lmsMode | The LMS tree structure used | string | +------------+---------------------------------------------+--------+ | lmOtsMode | The LMOTS tree structure used | string | +------------+---------------------------------------------+--------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.2.2 | | +------------+---------------------------------------------+--------+ Table 10: LMS sigGen Test Group JSON Object 9.2.2. LMS 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 LMS 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 the | hex | | | signature | | +------------+---------------------------------------+-----------+ Table 11: LMS sigGen Test Case JSON Object The following is an example JSON object sent from the server to the client for LMS / sigGen / 1.0. Celi Expires 25 October 2024 [Page 18] Internet-Draft ACVP LMS April 2024 [ { "acvVersion": }, { "vsId": 0, "algorithm": "LMS", "mode": "sigGen", "revision": "1.0", "testGroups": [ { "tgId": 1, "testType": "AFT", "lmsMode": "LMS_SHA256_M24_H5", "lmOtsMode": "LMOTS_SHA256_N24_W2", "tests": [ { "tcId": 1, "message": "2C4719..." }, { "tcId": 2, "message": "4F0E7D..." } ] } ] } ] 9.3. LMS sigVer Test Vectors 9.3.1. LMS sigVer Test Groups JSON Schema The testGroups element at the top level in the test vector JSON object is an array of test groups. Test vectors are grouped into similar test cases to reduce the amount of data transmitted in the vector set. For instance, all test vectors that use the same key size would be grouped together. The Test Group JSON object contains meta data that applies to all test vectors within the group. The following table describes the secure hash JSON elements of the Test Group JSON object. The test group for LMS / sigVer / 1.0 is as follows: Celi Expires 25 October 2024 [Page 19] Internet-Draft ACVP LMS April 2024 +============+=============================================+========+ | JSON | Description | JSON | | Value | | type | +============+=============================================+========+ | testType | The test operation performed | string | +------------+---------------------------------------------+--------+ | lmsMode | The LMS tree structure used | string | +------------+---------------------------------------------+--------+ | lmOtsMode | The LMOTS tree structure used | string | +------------+---------------------------------------------+--------+ | publicKey | The public key of the LMS tree | hex | +------------+---------------------------------------------+--------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in Section 9.3.2 | | +------------+---------------------------------------------+--------+ Table 12: LMS sigVer Test Group JSON Object 9.3.2. LMS 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 LMS 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 verify with the | hex | | | signature | | +------------+---------------------------------------+-----------+ | signature | THe signature to verify | hex | +------------+---------------------------------------+-----------+ Table 13: LMS sigVer Test Case JSON Object The following is an example JSON object sent from the server to the client for LMS / sigVer / 1.0. Celi Expires 25 October 2024 [Page 20] Internet-Draft ACVP LMS April 2024 [ { "acvVersion": }, { "vsId": 0, "algorithm": "LMS", "mode": "sigVer", "revision": "1.0", "isSample": false, "testGroups": [ { "tgId": 1, "testType": "AFT", "lmsMode": "LMS_SHA256_M24_H10", "lmOtsMode": "LMOTS_SHA256_N24_W1", "publicKey": "0000000B00000005FA5F14B9EEA8886576EF0E190A96F12D16734708776A2BB1D7F53610343D3B2F9361CB6F315E8860", "tests": [ { "tcId": 1, "message": "4F0D7...", "signature": "0000026300000005EE3..." }, { "tcId": 2, "message": "84793...", "signature": "8000017000000005E00..." } ] } ] } ] 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. Celi Expires 25 October 2024 [Page 21] Internet-Draft ACVP LMS April 2024 +===============+============================+===========+ | 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 15 | | +---------------+----------------------------+-----------+ Table 14: 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. +==========+======================================+=========+ | JSON | Description | JSON | | Property | | Type | +==========+======================================+=========+ | tgId | The test group identifier | integer | +----------+--------------------------------------+---------+ | tests | The test case objects in the | array | | | response, depending on the algorithm | | | | see Table 16, Table 18, or Table 19 | | +----------+--------------------------------------+---------+ Table 15: Response Group Objects An example of this is the following { "tgId": 1, "tests": [ ... ] } Celi Expires 25 October 2024 [Page 22] Internet-Draft ACVP LMS April 2024 10.1. LMS 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 LMS / keyGen / 1.0 test vector. +============+=====================================+===========+ | JSON Value | Description | JSON type | +============+=====================================+===========+ | tcId | The test case identifier | integer | +------------+-------------------------------------+-----------+ | publicKey | The computed public key of the tree | hex | +------------+-------------------------------------+-----------+ Table 16: LMS keyGen Test Case Response JSON Object The following is an example JSON test vector response object for LMS / keyGen / 1.0. [ { "acvVersion": }, { "vsId": 0, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "publicKey": "0000000B00000005D3933B303FD213427203BA0E04ED520B7E2AD3F4CAA4AA21F0A8E9C98944F6AAB32E9B5C6757DD30" }, { "tcId": 2, "publicKey": "0000000B0000000538805CFF7AB3B73570EDE8B2A8D5D78109DDBFBC5EABE8F178B7C4D86ECAF5B94BC0F6813F1CA565" } ] } ] } ] 10.2. LMS sigGen Test Vector Responses The test groups for LMS / sigGen / 1.0 contain public key properties. The groups can be described using the following table. Celi Expires 25 October 2024 [Page 23] Internet-Draft ACVP LMS April 2024 +============+=========================================+===========+ | JSON Value | Description | JSON type | +============+=========================================+===========+ | tgId | The test group identifier | integer | +------------+-----------------------------------------+-----------+ | publicKey | The public key of the tree the IUT used | hex | +------------+-----------------------------------------+-----------+ | tests | The individual test cases for the group | array | +------------+-----------------------------------------+-----------+ Table 17: LMS 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 LMS / sigGen / 1.0 test vector. +============+==========================+===========+ | JSON Value | Description | JSON type | +============+==========================+===========+ | tcId | The test case identifier | integer | +------------+--------------------------+-----------+ | signature | The generated signature | hex | +------------+--------------------------+-----------+ Table 18: LMS sigGen Test Case Response JSON Object The following is an example JSON test vector response object for LMS / sigGen / 1.0. Celi Expires 25 October 2024 [Page 24] Internet-Draft ACVP LMS April 2024 [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "publicKey": "0000000A000000064D2A698120B6AAF7FED6EA4E...", "tests": [ { "tcId": 1, "signature": "0000000F00000006D789CF...", } ] }, { "tgId": 2, "publicKey": "0000000B000000055FF5A7FD9CC554B3...", "tests": [ { "tcId": 2, "signature": "00000008000000053659BCB1079...", } ] } ] } ] 10.3. LMS 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 LMS / sigVer / 1.0 test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | The test case identifier | integer | +------------+---------------------------------------+-----------+ | testPassed | Whether or not the signature verified | boolean | +------------+---------------------------------------+-----------+ Table 19: LMS sigVer Test Case Response JSON Object Celi Expires 25 October 2024 [Page 25] Internet-Draft ACVP LMS April 2024 The following is an example JSON test vector response object for LMS / sigVer / 1.0. [ { "acvVersion": }, { "vsId": 1564, "testGroups": [ { "tgId": 1, "tests": [ { "tcId": 1, "testPassed": false } ] } ] } ] 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, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8554] McGrew, D., Curcio, M., and S. Fluhrer, "Leighton-Micali Hash-Based Signatures", RFC 8554, RFC 8554, DOI 10.17487/RFC8554, April 2019, . Celi Expires 25 October 2024 [Page 26] Internet-Draft ACVP LMS April 2024 [SP800-208] Cooper, D. A., Apon, D., Dang, Q. H., Davidson, M. S., Dworkin, M. J., and C. A. Miller, "Recommendation for Stateful Hash-Based Signature Schemes", NIST SP 800-208, October 2020, . [ACVP] Fussell, B., Vassilev, A., and H. Booth, "Automatic Cryptographic Validation Protocol", ACVP, 1 July 2019. Author's Address Christopher Celi (editor) Email: christopher.celi@nist.gov Celi Expires 25 October 2024 [Page 27]