Network Working Group B. Fussell, Ed. Internet-Draft Intended status: Informational R. Hammett, Ed. Expires: 20 September 2024 19 March 2024 ACVP Message Authentication Algorithm JSON Specification draft-ietf-acvp-sub-mac-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 20 September 2024. Copyright Notice Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Table of Contents 1. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 3 2. Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. Notation conventions . . . . . . . . . . . . . . . . . . 4 4.2. Terms and Definitions . . . . . . . . . . . . . . . . . . 4 4.2.1. Prompt . . . . . . . . . . . . . . . . . . . . . . . 4 4.2.2. Registration . . . . . . . . . . . . . . . . . . . . 4 4.2.3. Response . . . . . . . . . . . . . . . . . . . . . . 4 Fussell & Hammett Expires 20 September 2024 [Page 1] Internet-Draft ACVP MAC March 2024 4.2.4. Test Case . . . . . . . . . . . . . . . . . . . . . . 4 4.2.5. Test Group . . . . . . . . . . . . . . . . . . . . . 4 4.2.6. Test Vector Set . . . . . . . . . . . . . . . . . . . 4 4.2.7. Validation . . . . . . . . . . . . . . . . . . . . . 4 5. Supported HMAC, CMAC, and GMAC Algorithms . . . . . . . . . . 4 6. Test Types and Test Coverage . . . . . . . . . . . . . . . . 5 6.1. Test Types . . . . . . . . . . . . . . . . . . . . . . . 5 6.2. Test Coverage . . . . . . . . . . . . . . . . . . . . . . 6 6.2.1. CMAC Requirements Covered . . . . . . . . . . . . . . 6 6.2.2. CMAC Requirements Not Covered . . . . . . . . . . . . 6 6.2.3. GMAC Requirements Covered . . . . . . . . . . . . . . 6 6.2.4. GMAC Requirements Not Covered . . . . . . . . . . . . 7 6.2.5. HMAC Requirements Covered . . . . . . . . . . . . . . 7 6.2.6. HMAC Requirements Not Covered . . . . . . . . . . . . 7 7. Capabilities Registration . . . . . . . . . . . . . . . . . . 8 7.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . 8 7.2. Required Prerequisite Algorithms for MAC Validations . . 9 7.3. MAC Algorithm Registration Properties . . . . . . . . . . 9 8. CMAC-AES . . . . . . . . . . . . . . . . . . . . . . . . . . 10 8.1. CMAC-AES Algorithm Capabilities Registration . . . . . . 10 8.1.1. CMAC-AES Capability Details . . . . . . . . . . . . . 10 8.1.2. Example CMAC-AES Capabilities JSON Object . . . . . . 11 9. CMAC-TDES . . . . . . . . . . . . . . . . . . . . . . . . . . 12 9.1. CMAC-TDES Algorithm Capabilities Registration . . . . . . 13 9.1.1. CMAC-TDES Capability Details . . . . . . . . . . . . 13 9.1.2. Example CMAC-TDES Capabilities JSON Object . . . . . 14 10. GMAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 10.1. AES-GMAC Algorithm Capabilities Registration . . . . . . 14 10.1.1. Example AES-GMAC Capabilities JSON Object . . . . . 16 11. HMAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 11.1. HMAC Algorithm Capabilities Registration . . . . . . . . 16 11.2. Supported HMAC Algorithms . . . . . . . . . . . . . . . 18 11.2.1. Example HMAC Capabilities JSON Object . . . . . . . 18 12. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 19 13. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 20 13.1. CMAC-AES Test Vectors . . . . . . . . . . . . . . . . . 21 13.1.1. CMAC-AES Test Groups JSON Schema . . . . . . . . . . 21 13.1.2. CMAC-AES Test Case JSON Schema . . . . . . . . . . . 22 13.1.3. Example CMAC-AES Test Vector JSON Object . . . . . . 23 13.2. CMAC-TDES Test Vectors . . . . . . . . . . . . . . . . . 24 13.2.1. CMAC-TDES Test Groups JSON Schema . . . . . . . . . 24 13.2.2. CMAC-TDES Test Case JSON Schema . . . . . . . . . . 25 13.2.3. Example CMAC-TDES Test Vector JSON Object . . . . . 26 13.3. AES-GMAC Test Vectors . . . . . . . . . . . . . . . . . 27 13.3.1. AES-GMAC Test Groups JSON Schema . . . . . . . . . . 27 13.3.2. AES-GMAC Test Case JSON Schema . . . . . . . . . . . 28 13.3.3. Example AES-GMAC Test Vector JSON Object . . . . . . 29 13.4. HMAC Test Vectors . . . . . . . . . . . . . . . . . . . 30 Fussell & Hammett Expires 20 September 2024 [Page 2] Internet-Draft ACVP MAC March 2024 13.4.1. HMAC Test Groups JSON Schema . . . . . . . . . . . . 31 13.4.2. HMAC Test Case JSON Schema . . . . . . . . . . . . . 31 13.4.3. Example HMAC Test Vector JSON Object . . . . . . . . 32 14. Responses . . . . . . . . . . . . . . . . . . . . . . . . . . 33 14.1. CMAC-AES Test Vector Responses . . . . . . . . . . . . . 34 14.1.1. CMAC-AES Vector Set Group Responses . . . . . . . . 34 14.1.2. Example CMAC-AES Test Vector Response JSON Object . 34 14.2. CMAC-TDES Test Vector Responses . . . . . . . . . . . . 35 14.2.1. CMAC-TDES Vector Set Group Responses . . . . . . . . 35 14.2.2. Example CMAC-TDES Test Vector Response JSON Object . . . . . . . . . . . . . . . . . . . . . . . 36 14.3. AES-GMAC Test Vector Responses . . . . . . . . . . . . . 37 14.3.1. AES-GMAC Vector Set Group Responses . . . . . . . . 37 14.3.2. Example AES-GMAC Test Vector Response JSON Object . 38 14.4. HMAC Test Vector Responses . . . . . . . . . . . . . . . 38 14.4.1. HMAC Vector Set Group Responses . . . . . . . . . . 39 14.4.2. Example HMAC Test Vector Response JSON Object . . . 39 15. Security Considerations . . . . . . . . . . . . . . . . . . . 40 16. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40 17. Normative References . . . . . . . . . . . . . . . . . . . . 40 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 41 1. Acknowledgements There are no acknowledgements. 2. Abstract This document defines the JSON schema for testing HMAC, CMAC, and GMAC implementations with the ACVP specification. 3. Introduction The Automated Crypto Validation Protocol (ACVP) defines a mechanism to automatically verify the cryptographic implementation of a software or hardware crypto module. The ACVP specification defines how a crypto module communicates with an ACVP server, including crypto capabilities negotiation, session management, authentication, vector processing and more. The ACVP specification does not define algorithm specific JSON constructs for performing the crypto validation. A series of ACVP sub-specifications define the constructs for testing individual crypto algorithms. Each sub- specification addresses a specific class of crypto algorithms. This sub-specification defines the JSON constructs for testing HMAC, CMAC, and GMAC implementations using ACVP. 4. Conventions Fussell & Hammett Expires 20 September 2024 [Page 3] Internet-Draft ACVP MAC March 2024 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 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 HMAC, CMAC, and GMAC Algorithms The following Message Authentication Code Algorithms MAY be advertised by the ACVP compliant cryptographic module: Fussell & Hammett Expires 20 September 2024 [Page 4] Internet-Draft ACVP MAC March 2024 * HMAC-SHA-1 * HMAC-SHA2-224 * HMAC-SHA2-256 * HMAC-SHA2-384 * HMAC-SHA2-512 * HMAC-SHA2-512/224 * HMAC-SHA2-512/256 * HMAC-SHA3-224 * HMAC-SHA3-256 * HMAC-SHA3-384 * HMAC-SHA3-512 * CMAC-AES * CMAC-TDES * ACVP-AES-GMAC 6. Test Types and Test Coverage The ACVP server performs a set of tests on the MAC algorithms in order to assess the correctness and robustness of the implementation. A typical ACVP validation session would require multiple tests to be performed for every supported cryptographic algorithm, such as CMAC- AES, CMAC-TDES, HMAC-SHA-1, HMAC-SHA2-256, etc. This section describes the design of the tests used to validate implementations of MAC algorithms. 6.1. Test Types There is a single test type for MACs (broken into subsections for CMACs). the single test type, algorithm functional test (AFT) can be described as follows: * "AFT" - Algorithm Function Test. The IUT processes all of HMAC, GMAC and the "gen" direction of CMAC by running the randomly chosen key and message data (with constraints as per the IUT's capabilities registration) through the MAC algorithm. CMAC has an Fussell & Hammett Expires 20 September 2024 [Page 5] Internet-Draft ACVP MAC March 2024 additional "ver" direction present in its testing to ensure the IUT can successfully determine when a MAC does not match its originating message/key combination. 6.2. Test Coverage The tests described in this document have the intention of ensuring an implementation is conformant to [SP800-38B] and [FIPS-198-1]. 6.2.1. CMAC Requirements Covered * SP 800-38B Section 6.2 Mac Generation. ACVP server creates random sets of keys and messages for the IUT to process, then compares the IUT's result to the ACVP result. * SP 800-38B Section 6.3 Mac Verification. ACVP server creates random sets of keys, messages, and macs. These test vectors are then randomly altered to ensure the MAC will not match the given key and message. Using the provided test case, the IUT is expected to validate the mac against the provided key and message. 6.2.2. CMAC Requirements Not Covered * SP 800-38B Section 5.4 Sub-keys. While sub-keys are computed, as they are intermediate values, are not validated via current testing. * SP 800-38B Section 5.5 Input and Output Data. The 'mlen' is provided and not inferred. * SP 800-38B Appendix A. Length of MAC. The ACVP server will generate vectors as per the IUT's specified criteria. The IUT SHOULD register its entire range of supported MAC lengths, regardless of security strength. The ACVP server will test a random sampling of valid MAC lengths as per the IUT registration - this generally includes the minimum and maximum MAC length. 6.2.3. GMAC Requirements Covered * SP 800-38D Section 5.1 Block Cipher. ACVP testing SHALL make use of the AES block cipher when testing GMAC. * SP 800-38D Section 5.2 Two Gcm Functions. ACVP testing MAY test both the generate and verify functions of GCM (without making use of a payload) to help ensure a proper implementation. The ACVP and IUT MAY test the encrypt (generate) and decrypt (verify) utilizing a key, IV/nonce, and AAD as described in this document section. Fussell & Hammett Expires 20 September 2024 [Page 6] Internet-Draft ACVP MAC March 2024 * SP 800-38D Section 6 Mathematical Components of GCM. GHASH and GCTR produce intermediate values and SHALL be (indirectly) evaluated for correctness via the ACVP generated GMAC test vectors. * SP 800-38D Section 7 GCM Specification. When the IUT registers a direction capability of "encrypt", the ACVP server MUST generate vectors for the GCM-AE function. When the IUT registers a capability of "decrypt", the ACVP server MUST generate test vectors for the GCM-AD function. 6.2.4. GMAC Requirements Not Covered * SP 800-38D Section 5.2.1.1 Input Data. GMAC MUST NOT make use of a plaintext. * SP 800-38D Section 5.2.1.2 Output Data. GMAC MUST NOT make use of a ciphertext. * SP 800-38D Section 7 GCM Specification. The ACVP server MUST NOT make use of a plaintext or ciphertext for the generation of test vectors for use in GMAC testing. * SP 800-38D Section 8 Uniqueness Requirement on IVs and Keys. Key establishment, IV construction, or number of invocations for a specific key/IV SHALL NOT be tested under the scope of the ACVP testing. 6.2.5. HMAC Requirements Covered * FIPS 198-1 Section 3 Cryptographic Keys. The ACVP server will test, depending on the nature of the IUT capabilities registration, keys that are below, at, or above the hashing algorithm block size. * FIPS 198-1 Section 4 HMAC Specification. Mac Generation. ACVP server creates random sets of keys and messages for the IUT to process, then compares the IUT's result to the ACVP result. * FIPS 198-1 Section 5 Truncation. The ACVP server is capable of generating MACs as per the capability registration of the IUT. Groups will be created containing a random sampling of valid MAC lengths from the IUT registration. 6.2.6. HMAC Requirements Not Covered N/A Fussell & Hammett Expires 20 September 2024 [Page 7] Internet-Draft ACVP MAC March 2024 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 MAC 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 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 Fussell & Hammett Expires 20 September 2024 [Page 8] Internet-Draft ACVP MAC March 2024 "prereqVals": [ { "algorithm": "Alg1", "valValue": "Val-1234" }, { "algorithm": "Alg2", "valValue": "same" } ] 7.2. Required Prerequisite Algorithms for MAC Validations Each MAC implementation relies on other cryptographic primitives. For example, HMAC 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 | string | AES, SHA, TDES | | | prerequisite | | with associated | | | algorithm | | mode such as ECB, | | | | | GCM or digest size | +--------------+--------------+--------------+--------------------+ | valValue | algorithm | string | Actual number or | | | validation | | "same" | | | number | | | +--------------+--------------+--------------+--------------------+ | prereqAlgVal | prerequisite | object with | See above | | | algorithm | algorithm | | | | validation | and valValue | | | | | properties | | +--------------+--------------+--------------+--------------------+ Table 2: Required MAC Prerequisite Algorithms JSON Values 7.3. MAC Algorithm Registration Properties Each MAC algorithm capability advertised is a self-contained JSON object using the following values. Fussell & Hammett Expires 20 September 2024 [Page 9] Internet-Draft ACVP MAC March 2024 +==============+===============+==============+====================+ | JSON Value | Description | JSON type | Valid Values | +==============+===============+==============+====================+ | algorithm | The MAC | string | See Section 5 | | | algorithm to | | | | | be validated | | | +--------------+---------------+--------------+--------------------+ | revision | The algorithm | string | "1.0" | | | testing | | | | | revision to | | | | | use | | | +--------------+---------------+--------------+--------------------+ | prereqVals | Prerequisite | array of | See Section 7.2 | | | algorithm | prereqAlgVal | | | | validations | objects | | +--------------+---------------+--------------+--------------------+ | capabilities | The | array of | See Section 8.1.1, | | | individual | capability | Section 9.1.1, | | | MAC | objects | Section 10.1, or | | | capabilities | | Section 11.1 | +--------------+---------------+--------------+--------------------+ Table 3: MAC Algorithm Capabilities JSON Values 8. CMAC-AES 8.1. CMAC-AES Algorithm Capabilities Registration Each CMAC-AES algorithm capability advertised is a self-contained JSON object using Table 3. Each capability object describes a separate permutation of direction and key length. 8.1.1. CMAC-AES Capability Details +===========+==========================+==========+==============+ | JSON | Description | JSON | Valid Values | | Value | | type | | +===========+==========================+==========+==============+ | direction | The MAC direction(s) to | array | "gen" and/or | | | test | | "ver" | +-----------+--------------------------+----------+--------------+ | keyLen | The keyLen supported | array of | [128, 192, | | | | integer | 256] | +-----------+--------------------------+----------+--------------+ | msgLen | The CMAC message lengths | Domain | Min: 0, Max: | | | supported in bits, | | 524288, Inc: | | | values MUST be mod 8 | | 8 | +-----------+--------------------------+----------+--------------+ Fussell & Hammett Expires 20 September 2024 [Page 10] Internet-Draft ACVP MAC March 2024 | macLen | The supported mac sizes | Domain | Min: 1, Max: | | | | | 128 | +-----------+--------------------------+----------+--------------+ Table 4: CMAC-AES Capabilities JSON Values 'macLen' for CMAC is a Domain of values, the server MAY choose values defined by these rules: * The smallest CMAC length supported * A second CMAC length supported * The largest CMAC length supported 'msgLen' for CMAC is a Domain of values, the server MAY choose values defined by these rules: * The smallest message length supported * Two message lengths divisible by block size * Two message lengths NOT divisible by block size * The largest message length supported 8.1.2. Example CMAC-AES Capabilities JSON Object The following is an example JSON object advertising support for CMAC- AES. { "algorithm": "CMAC-AES", "revision": "1.0", "capabilities": [ { "direction": ["gen", "ver"], "keyLen": [128], "msgLen": [ { "min": 0, "max": 65536, "increment": 8 } ], "macLen": [ { "min": 64, Fussell & Hammett Expires 20 September 2024 [Page 11] Internet-Draft ACVP MAC March 2024 "max": 128, "increment": 8 } ] }, { "direction": ["gen", "ver"], "keyLen": [192], "msgLen": [ { "min": 0, "max": 65536, "increment": 8 } ], "macLen": [ { "min": 64, "max": 128, "increment": 8 } ] }, { "direction": ["gen", "ver"], "keyLen": [256], "msgLen": [ { "min": 0, "max": 65536, "increment": 8 } ], "macLen": [ { "min": 64, "max": 128, "increment": 8 } ] } ] } 9. CMAC-TDES Fussell & Hammett Expires 20 September 2024 [Page 12] Internet-Draft ACVP MAC March 2024 9.1. CMAC-TDES Algorithm Capabilities Registration Each CMAC-TDES algorithm capability advertised is a self-contained JSON object using Table 3. Each capability object describes a separate permutation of direction and key length. 9.1.1. CMAC-TDES Capability Details +==============+==============================+========+=========+ | JSON Value | Description | JSON | Valid | | | | type | Values | +==============+==============================+========+=========+ | direction | The MAC direction(s) to test | array | "gen", | | | | | "ver" | +--------------+------------------------------+--------+---------+ | keyingOption | The Keying Option used in | array | 1, 2 | | | TDES. Keying option 1 (1) | | | | | is 3 distinct keys (K1, K2, | | | | | K3). Keying Option 2 (2) is | | | | | 2 distinct only suitable for | | | | | decrypt (K1, K2, K1). | | | | | Keying option 3 (No longer | | | | | valid for testing, save TDES | | | | | KATs) is a single key, now | | | | | deprecated (K1, K1, K1). | | | +--------------+------------------------------+--------+---------+ | msgLen | The CMAC message lengths | Domain | Min: 0, | | | supported in bits, values | | Max: | | | MUST be mod 8 | | 524288, | | | | | Inc: 8 | +--------------+------------------------------+--------+---------+ | macLen | The supported mac sizes | Domain | Min: | | | | | 32, | | | | | Max: 64 | +--------------+------------------------------+--------+---------+ Table 5: CMAC-TDES Capabilities JSON Values 'macLen' for CMAC contains a Domain of values, the server may choose values defined by these rules: * The smallest CMAC length supported * A second CMAC length supported * The largest CMAC length supported Fussell & Hammett Expires 20 September 2024 [Page 13] Internet-Draft ACVP MAC March 2024 'msgLen' for CMAC contains a Domain of values, the server may choose values defined by these rules: * The smallest message length supported * Two message lengths divisible by block size * Two message lengths NOT divisible by block size * The largest message length supported 9.1.2. Example CMAC-TDES Capabilities JSON Object The following is an example JSON object advertising support for CMAC- TDES. { "algorithm": "CMAC-TDES", "revision": "1.0", "capabilities": [ { "direction": ["gen", "ver"], "keyingOption": [1], "msgLen": [ { "min": 0, "max": 65536, "increment": 8 } ], "macLen": [ { "min": 32, "max": 64, "increment": 8 } ] } ] } 10. GMAC 10.1. AES-GMAC Algorithm Capabilities Registration Each algorithm capability advertised is a self-contained JSON object using the following values. Fussell & Hammett Expires 20 September 2024 [Page 14] Internet-Draft ACVP MAC March 2024 +============+===================+==============+=================+ | JSON Value | Description | JSON Type | Valid Values | +============+===================+==============+=================+ | algorithm | The MAC algorithm | string | "ACVP-AES-GMAC" | | | to be validated | | | +------------+-------------------+--------------+-----------------+ | revision | The algorithm | string | "1.0" | | | testing revision | | | | | to use | | | +------------+-------------------+--------------+-----------------+ | prereqVals | Prerequistie | array of | See Section 7.2 | | | algorithm | prereqAlgVal | | | | validations | objects | | +------------+-------------------+--------------+-----------------+ | direction | The GMAC | array | "encrypt", | | | direction(s) to | | "decrypt" | | | test | | | +------------+-------------------+--------------+-----------------+ | keyLen | The keyLen | array | 128, 192, 256 | | | supported | | | +------------+-------------------+--------------+-----------------+ | ivLen | The IV lengths | domain | Min: 8, Max: | | | supported in | | 1024, Inc: 8 | | | bits, values MUST | | | | | be mod 8 | | | +------------+-------------------+--------------+-----------------+ | ivGen | The IV generation | string | "internal", | | | method (from the | | "external" | | | perspective of | | | | | the IUT) | | | +------------+-------------------+--------------+-----------------+ | ivGenMode | The IV generation | string | "8.2.1", | | | mode for use when | | "8.2.2" | | | the IUT is | | | | | generating IVs | | | +------------+-------------------+--------------+-----------------+ | aadLen | The additional | domain | Min: 0, Max: | | | authenticated | | 65536, Inc: 8 | | | data length in | | | | | bits | | | +------------+-------------------+--------------+-----------------+ | tagLen | The supported | array | 32, 64, 96, | | | mac/tag lengths | | 104, 112, 120, | | | | | 128 | +------------+-------------------+--------------+-----------------+ Table 6: AES-GMAC Algorithm Capabilities JSON Values Fussell & Hammett Expires 20 September 2024 [Page 15] Internet-Draft ACVP MAC March 2024 10.1.1. Example AES-GMAC Capabilities JSON Object The following is an example JSON object advertising support for AES- GMAC. { "algorithm": "ACVP-AES-GMAC", "revision": "1.0", "direction": [ "encrypt", "decrypt" ], "keyLen": [ 128 ], "ivLen": [ 96, 120 ], "ivGen": "external", "aadLen": [ 8, 120 ], "tagLen": [ 32, 128 ] } 11. HMAC 11.1. HMAC Algorithm Capabilities Registration Each algorithm capability advertised is a self-contained JSON object using the following values. Fussell & Hammett Expires 20 September 2024 [Page 16] Internet-Draft ACVP MAC March 2024 +============+===================+==============+==============+ | JSON Value | Description | JSON type | Valid Values | +============+===================+==============+==============+ | algorithm | The MAC algorithm | string | See | | | and mode to be | | Section 11.2 | | | validated | | | +------------+-------------------+--------------+--------------+ | revision | The algorithm | string | "1.0" | | | testing revision | | | | | to use | | | +------------+-------------------+--------------+--------------+ | prereqVals | prerequistie | array of | See | | | algorithm | prereqAlgVal | Section 7.2 | | | validations | objects | | +------------+-------------------+--------------+--------------+ | keyLen | The keyLen Domain | domain | Min: 8, Max: | | | supported by the | | 524288, | | | IUT in bits | | Increment: 8 | +------------+-------------------+--------------+--------------+ | macLen | The supported mac | domain | Min: 32 | | | sizes, maximum is | | | | | dependent on | | | | | algorithm, see | | | | | Section 11.2 | | | +------------+-------------------+--------------+--------------+ Table 7: HMAC Algorithm Capabilities JSON Values 'keyLen' for HMAC contains a Domain of values, the server MAY choose values defined by these rules: * 2 values below the Hash's block length. See Section 11.2 * The Hash's block length. * 2 values above the Hash's block length. 'macLen' for HMAC contains a Domain of values, the server MAY choose values defined by these rules: * The smallest HMAC length supported * A second HMAC length supported * The largest HMAC length supported Fussell & Hammett Expires 20 September 2024 [Page 17] Internet-Draft ACVP MAC March 2024 11.2. Supported HMAC Algorithms The following HMAC algorithms contain specific individual properties: +===================+==============+================+ | Algorithm Value | Block Length | Max MAC Length | +===================+==============+================+ | HMAC-SHA-1 | 512 | 160 | +-------------------+--------------+----------------+ | HMAC-SHA2-224 | 512 | 224 | +-------------------+--------------+----------------+ | HMAC-SHA2-256 | 512 | 256 | +-------------------+--------------+----------------+ | HMAC-SHA2-384 | 1024 | 384 | +-------------------+--------------+----------------+ | HMAC-SHA2-512 | 1024 | 512 | +-------------------+--------------+----------------+ | HMAC-SHA2-512/224 | 1024 | 224 | +-------------------+--------------+----------------+ | HMAC-SHA2-512/256 | 1024 | 256 | +-------------------+--------------+----------------+ | HMAC-SHA3-224 | 1152 | 224 | +-------------------+--------------+----------------+ | HMAC-SHA3-256 | 1088 | 256 | +-------------------+--------------+----------------+ | HMAC-SHA3-384 | 832 | 384 | +-------------------+--------------+----------------+ | HMAC-SHA3-512 | 576 | 512 | +-------------------+--------------+----------------+ Table 8: Algorithms w/ block size and max MAC length. 11.2.1. Example HMAC Capabilities JSON Object The following is an example JSON object advertising support for HMAC. Fussell & Hammett Expires 20 September 2024 [Page 18] Internet-Draft ACVP MAC March 2024 { "algorithm": "HMAC-SHA-1", "revision": "1.0", "keyLen": [ { "min": 8, "max": 2048, "increment": 8 } ], "macLen": [ { "min": 80, "max": 160, "increment": 8 } ] } 12. 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 HMAC, CMAC, and GMAC algorithms. The test vector set JSON schema is a multi-level hierarchy that contains meta data for the entire vector set as well as individual test vectors to be processed by the ACVP client. The following table describes the JSON elements at the top level of the hierarchy. Fussell & Hammett Expires 20 September 2024 [Page 19] Internet-Draft ACVP MAC March 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 13 | | +-------------+--------------------------------------+-----------+ Table 9: 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": [ ... ] } ] 13. 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 HMAC- SHA-1, HMAC-SHA2-224, CMAC-AES, etc. This section describes the JSON schema for a test vector set used with MAC crypto algorithms. Fussell & Hammett Expires 20 September 2024 [Page 20] Internet-Draft ACVP MAC March 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 vector | integer | | | set | | +------------+-------------------------------------------+---------+ | algorithm | The algorithm 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 Section 13.1.1, | | | | Section 13.2.1, Section 13.3.1, or | | | | Section 13.4.1 depending on the algorithm | | +------------+-------------------------------------------+---------+ Table 10: MAC Vector Set JSON Object 13.1. CMAC-AES Test Vectors 13.1.1. CMAC-AES 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 CMAC-AES JSON elements of the Test Group JSON object. Fussell & Hammett Expires 20 September 2024 [Page 21] Internet-Draft ACVP MAC March 2024 +===========+========================================+=========+ | JSON | Description | JSON | | Value | | type | +===========+========================================+=========+ | tgId | Numeric identifier for the test group, | integer | | | unique across the entire vector set | | +-----------+----------------------------------------+---------+ | testType | Test category type | string | +-----------+----------------------------------------+---------+ | direction | The direction of the tests - gen or | string | | | ver | | +-----------+----------------------------------------+---------+ | keyLen | Length of key in bits to use | integer | +-----------+----------------------------------------+---------+ | msgLen | Length of message in bits | integer | +-----------+----------------------------------------+---------+ | macLen | Length of MAC in bits to generate/ | integer | | | verify | | +-----------+----------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 13.1.2 | | +-----------+----------------------------------------+---------+ Table 11: CMAC-AES Test Group JSON Object 13.1.2. CMAC-AES 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 secure MAC test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | key | Encryption key to use | hex | +------------+---------------------------------------+-----------+ | msg | Value of the message | hex | +------------+---------------------------------------+-----------+ | mac | MAC value, for CMAC verify | hex | +------------+---------------------------------------+-----------+ Table 12: CMAC-AES Test Case JSON Object Fussell & Hammett Expires 20 September 2024 [Page 22] Internet-Draft ACVP MAC March 2024 13.1.3. Example CMAC-AES Test Vector JSON Object The following is an example JSON test vector object for CMAC-AES, truncated for brevity. { "vsId": 1, "algorithm": "CMAC-AES", "revision": "1.0", "testGroups": [{ "tgId": 4, "testType": "AFT", "direction": "gen", "keyLen": 128, "msgLen": 2752, "macLen": 64, "tests": [{ "tcId": 25, "key": "E2547E38B28B2C24892C133FF4770688", "message": "89DE09D747FB4B2669B59759..." }, { "tcId": 26, "key": "D1D99979CD96C3401291905F53B2ECA4", "message": "6D054A7D1CD161B21F80E658..." }, { "tcId": 27, "key": "672556E105B83BF39FC9E45268BD35D1", "message": "39A3DD0652483A26FB9D71F3..." } ] }, { "tgId": 10, "testType": "AFT", "direction": "ver", "keyLen": 128, "msgLen": 0, "macLen": 64, "tests": [{ "tcId": 73, "key": "D5E09A89B2A4627BF987517B66A51564", "message": "", "mac": "CBBC968859633C24" }, { "tcId": 74, Fussell & Hammett Expires 20 September 2024 [Page 23] Internet-Draft ACVP MAC March 2024 "key": "646A150116ABAA37662FE9D8BB278693", "message": "", "mac": "21D069331196E579" }, { "tcId": 75, "key": "5C185C01FBC57A40FC373F199374D1CC", "message": "", "mac": "9507F00153543DE6" } ] } ] } 13.2. CMAC-TDES Test Vectors 13.2.1. CMAC-TDES 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 CMAC-TDES JSON elements of the Test Group JSON object. Fussell & Hammett Expires 20 September 2024 [Page 24] Internet-Draft ACVP MAC March 2024 +===========+========================================+=========+ | JSON | Description | JSON | | Value | | type | +===========+========================================+=========+ | tgId | Numeric identifier for the test group, | integer | | | unique across the entire vector set | | +-----------+----------------------------------------+---------+ | testType | Test category type | string | +-----------+----------------------------------------+---------+ | direction | The direction of the tests - gen or | string | | | ver | | +-----------+----------------------------------------+---------+ | keyLen | Length of key in bits to use | integer | +-----------+----------------------------------------+---------+ | msgLen | Length of message in bits | integer | +-----------+----------------------------------------+---------+ | macLen | Length of MAC in bits to generate/ | integer | | | verify | | +-----------+----------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 13.2.2 | | +-----------+----------------------------------------+---------+ Table 13: CMAC-TDES Test Group JSON Object 13.2.2. CMAC-TDES 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 secure MAC test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | key1, | Encryption keys to use for TDES | hex | | key2, key3 | | | +------------+---------------------------------------+-----------+ | msg | Value of the message | hex | +------------+---------------------------------------+-----------+ | mac | MAC value, for CMAC verify | hex | +------------+---------------------------------------+-----------+ Table 14: CMAC-TDES Test Case JSON Object Fussell & Hammett Expires 20 September 2024 [Page 25] Internet-Draft ACVP MAC March 2024 13.2.3. Example CMAC-TDES Test Vector JSON Object The following is an example JSON test vector object for CMAC-TDES, truncated for brevity. { "vsId": 1, "algorithm": "CMAC-TDES", "revision": "1.0", "testGroups": [{ "tgId": 4, "testType": "AFT", "direction": "gen", "keyLen": 192, "msgLen": 752, "macLen": 32, "keyingOption": 1, "tests": [{ "tcId": 25, "message": "4D2D07AE0224289BE111...", "key1": "7FFDB31A3A06BF0D", "key2": "5201FFE83CC5253E", "key3": "BBECA60F1D631BB8" }, { "tcId": 26, "message": "7A70F3CE17598AC3553F...", "key1": "82E572E29C84009E", "key2": "28390918155E4891", "key3": "A0D24C94C306FE56" }, { "tcId": 27, "message": "2DAF1E213A6AE9E88FEB...", "key1": "662A89E47D86F6A0", "key2": "CB9D612E199B4AD2", "key3": "AE3AEBA19FAB4340" } ] }, { "tgId": 10, "testType": "AFT", "direction": "ver", "keyLen": 192, "msgLen": 0, "macLen": 32, "keyingOption": 1, Fussell & Hammett Expires 20 September 2024 [Page 26] Internet-Draft ACVP MAC March 2024 "tests": [{ "tcId": 73, "message": "", "mac": "D78010B3", "key1": "D127F902CFF69A82", "key2": "785D99EF117E5B56", "key3": "36D4CB2C34A3AF30" }, { "tcId": 74, "message": "", "mac": "5313D9E8", "key1": "9D5DAC4D75E0A349", "key2": "6A55855C62D8C767", "key3": "CBD9FC7CCBDA8BE9" }, { "tcId": 75, "message": "", "mac": "07B1926F", "key1": "B711BA268A1F3663", "key2": "AA83B2195E85BFC6", "key3": "AA1CFBC128AAE0FD" } ] } ] } 13.3. AES-GMAC Test Vectors 13.3.1. AES-GMAC 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 GMAC JSON elements of the Test Group JSON object. Fussell & Hammett Expires 20 September 2024 [Page 27] Internet-Draft ACVP MAC March 2024 +===========+========================================+=========+ | JSON | Description | JSON | | Value | | Type | +===========+========================================+=========+ | tgId | Numeric identifier for the test group, | integer | | | unique across the entire vector set | | +-----------+----------------------------------------+---------+ | testType | Test category type | string | +-----------+----------------------------------------+---------+ | direction | The direction of the tests - encrypt | string | | | or decrypt | | +-----------+----------------------------------------+---------+ | keyLen | Length of key in bits to use | integer | +-----------+----------------------------------------+---------+ | ivLen | Length of IV in bits | integer | +-----------+----------------------------------------+---------+ | ivGen | IV Generation (internal or external) | string | +-----------+----------------------------------------+---------+ | ivGenMode | The mode an internal IV has been | string | | | generated using | | +-----------+----------------------------------------+---------+ | aadLen | Length of AAD in bits | integer | +-----------+----------------------------------------+---------+ | tagLen | Length of tag/MAC in bits to generate/ | integer | | | verify | | +-----------+----------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 13.3.2 | | +-----------+----------------------------------------+---------+ Table 15: AES-GMAC Test Group JSON Object 13.3.2. AES-GMAC 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 secure MAC test vector. Fussell & Hammett Expires 20 September 2024 [Page 28] Internet-Draft ACVP MAC March 2024 +============+=======================================+===========+ | JSON Value | Description | JSON Type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | key | Encryption key to use | hex | +------------+---------------------------------------+-----------+ | iv | Value of the IV | hex | +------------+---------------------------------------+-----------+ | aad | Value of the AAD | hex | +------------+---------------------------------------+-----------+ | tag | MAC/tag value, for validating on a | hex | | | decrypt operation | | +------------+---------------------------------------+-----------+ Table 16: AES-GMAC Test Case JSON Object 13.3.3. Example AES-GMAC Test Vector JSON Object The following is an example JSON test vector object for AES-GMAC, truncated for brevity Fussell & Hammett Expires 20 September 2024 [Page 29] Internet-Draft ACVP MAC March 2024 { "vsId": 0, "algorithm": "ACVP-AES-GMAC", "revision": "1.0", "testGroups": [{ "tgId": 1, "testType": "AFT", "direction": "encrypt", "keyLen": 128, "ivLen": 96, "ivGen": "external", "aadLen": 0, "tagLen": 32, "tests": [{ "tcId": 1, "key": "B1E9747F9E016F0376B1F379CD345B8A", "aad": "", "iv": "6294CEEDFCC3037A023100E8" }] }, { "tgId": 2, "testType": "AFT", "direction": "decrypt", "keyLen": 128, "ivLen": 96, "ivGen": "external", "aadLen": 0, "tagLen": 32, "tests": [{ "tcId": 2, "key": "CD345B8AE016F03765E9747F9B1F379A", "aad": "", "iv": "6207CEEDFA094CC3032310E8", "tag": "AB1254CE" }] } ] } 13.4. HMAC Test Vectors Fussell & Hammett Expires 20 September 2024 [Page 30] Internet-Draft ACVP MAC March 2024 13.4.1. HMAC 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 HMAC JSON elements of the Test Group JSON object. +==========+==============================================+=========+ | JSON | Description | JSON | | Value | | type | +==========+==============================================+=========+ | tgId | Numeric identifier for the test group, | integer | | | unique across the entire vector set | | +----------+----------------------------------------------+---------+ | testType | Test category type | string | +----------+----------------------------------------------+---------+ | keyLen | Length of key in bits to use | integer | +----------+----------------------------------------------+---------+ | msgLen | Length of message in bits | integer | +----------+----------------------------------------------+---------+ | macLen | Length of MAC in bits to generate | integer | +----------+----------------------------------------------+---------+ | tests | Array of individual test vector JSON | array | | | objects, which are defined in | | | | Section 13.4.2 | | +----------+----------------------------------------------+---------+ Table 17: HMAC Test Group JSON Object 13.4.2. HMAC 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 secure MAC test vector. Fussell & Hammett Expires 20 September 2024 [Page 31] Internet-Draft ACVP MAC March 2024 +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | key | The value of the key | hex | +------------+---------------------------------------+-----------+ | msg | Value of the message | hex | +------------+---------------------------------------+-----------+ Table 18: HMAC Test Case JSON Object 13.4.3. Example HMAC Test Vector JSON Object The following is an example JSON test vector object for HMAC, truncated for brevity. { "vsId": 1, "algorithm": "HMAC-SHA-1", "revision": "1.0", "testGroups": [{ "tgId": 1, "testType": "AFT", "keyLen": 56, "msgLen": 128, "macLen": 80, "tests": [{ "tcId": 1, "key": "0CBB3AA866E4D1", "msg": "28CD4091D45F28CD5709CC9B6F1E9D0D" }, { "tcId": 2, "key": "7FB3F60ACB9FB7", "msg": "9F224BF653F9BE143FFA0518D12761F7" }, { "tcId": 3, "key": "3834463234DA39", "msg": "F0FA740D261D5916B06F09AFBB04C94E" } ] }] } Fussell & Hammett Expires 20 September 2024 [Page 32] Internet-Draft ACVP MAC March 2024 14. Responses After the ACVP client downloads and processes a vector set, it must send the response vectors back to the ACVP server. The following table describes the JSON object that represents a vector set response. +===============+============================+===========+ | JSON Property | Description | JSON Type | +===============+============================+===========+ | acvVersion | The ACVP version used | string | +---------------+----------------------------+-----------+ | vsId | The vector set identifier | integer | +---------------+----------------------------+-----------+ | testGroups | The test group objects in | array | | | the response, see Table 20 | | +---------------+----------------------------+-----------+ Table 19: 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 response, | array | | | depending on the algorithm see Table 21, | | | | Table 22, Table 23 or Table 24 | | +----------+------------------------------------------+---------+ Table 20: Response Group Objects An example of this is the following Fussell & Hammett Expires 20 September 2024 [Page 33] Internet-Draft ACVP MAC March 2024 { "tgId": 1, "tests": [ ... ] } 14.1. CMAC-AES Test Vector Responses 14.1.1. CMAC-AES Vector Set Group 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 CMAC-AES test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | mac | The value of the computed MAC output | hex | | | for 'gen' test type groups | | +------------+---------------------------------------+-----------+ | testPassed | The result of CMAC verify for 'ver' | boolean | | | test type groups | | +------------+---------------------------------------+-----------+ Table 21: CMAC-AES Test Case Results JSON Object 14.1.2. Example CMAC-AES Test Vector Response JSON Object The following is an example JSON test vector response object for CMAC-AES. Fussell & Hammett Expires 20 September 2024 [Page 34] Internet-Draft ACVP MAC March 2024 { "vsId": 1, "testGroups": [{ "tgId": 4, "tests": [{ "tcId": 25, "mac": "7AA2D56A0AE76620" }, { "tcId": 26, "mac": "9E23524D3CD18C93" }, { "tcId": 27, "mac": "4D51872CBFAA102A" } ] }, { "tgId": 10, "tests": [{ "tcId": 73, "testPassed": true }, { "tcId": 74, "testPassed": true }, { "tcId": 75, "testPassed": true } ] } ] } 14.2. CMAC-TDES Test Vector Responses 14.2.1. CMAC-TDES Vector Set Group 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 CMAC-TDES test vector. Fussell & Hammett Expires 20 September 2024 [Page 35] Internet-Draft ACVP MAC March 2024 +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | mac | The value of the computed MAC output | hex | | | for 'gen' test type groups | | +------------+---------------------------------------+-----------+ | testPassed | The result of CMAC verify for 'ver' | boolean | | | test type groups | | +------------+---------------------------------------+-----------+ Table 22: CMAC-TDES Test Case Results JSON Object 14.2.2. Example CMAC-TDES Test Vector Response JSON Object The following is an example JSON test vector response object for CMAC-TDES. Fussell & Hammett Expires 20 September 2024 [Page 36] Internet-Draft ACVP MAC March 2024 { "vsId": 1, "algorithm": "CMAC-TDES", "revision": "1.0", "testGroups": [{ "tgId": 4, "tests": [{ "tcId": 25, "mac": "6FA27FDC" }, { "tcId": 26, "mac": "89CE2842" }, { "tcId": 27, "mac": "5E03D980" } ] }, { "tgId": 10, "tests": [{ "tcId": 73, "testPassed": true }, { "tcId": 74, "testPassed": true }, { "tcId": 75, "testPassed": true } ] } ] } 14.3. AES-GMAC Test Vector Responses 14.3.1. AES-GMAC Vector Set Group 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 GMAC test vector. Fussell & Hammett Expires 20 September 2024 [Page 37] Internet-Draft ACVP MAC March 2024 +============+=======================================+===========+ | JSON Value | Description | JSON Type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | tag | Value of the computed tag/MAC output, | hex | | | for 'encrypt' direction groups | | +------------+---------------------------------------+-----------+ | testPassed | The result of decrypt verify, for | boolean | | | 'decrypt' direction groups | | +------------+---------------------------------------+-----------+ Table 23: AES-GMAC Test Case Results JSON Object 14.3.2. Example AES-GMAC Test Vector Response JSON Object The following is an example JSON test vector response object for AES- GMAC. { "vsId": 1, "algorithm": "ACVP-AES-GMAC", "revision": "1.0", "testGroups": [{ "tgId": 1, "tests": [{ "tcId": 1, "tag": "6FA27FDC" }] }, { "tgId": 2, "tests": [{ "tcId": 2, "testPassed": true }] } ] } 14.4. HMAC Test Vector Responses Fussell & Hammett Expires 20 September 2024 [Page 38] Internet-Draft ACVP MAC March 2024 14.4.1. HMAC Vector Set Group 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 HMAC test vector. +============+=======================================+===========+ | JSON Value | Description | JSON type | +============+=======================================+===========+ | tcId | Numeric identifier for the test case, | integer | | | unique across the entire vector set | | +------------+---------------------------------------+-----------+ | mac | Value of the computed MAC output | hex | +------------+---------------------------------------+-----------+ Table 24: HMAC Test Case Results JSON Object 14.4.2. Example HMAC Test Vector Response JSON Object The following is an example JSON test vector response object for HMAC. { "vsId": 1, "algorithm": "HMAC-SHA-1", "revision": "1.0", "testGroups": [{ "tgId": 1, "tests": [{ "tcId": 1, "mac": "0970D053D6829C251070" }, { "tcId": 2, "mac": "3A476E0407D7ADF14792" }, { "tcId": 3, "mac": "5B219B4C4862242DB175" } ] }] } Fussell & Hammett Expires 20 September 2024 [Page 39] Internet-Draft ACVP MAC March 2024 15. Security Considerations There are no additional security considerations outside of those outlined in the ACVP document. 16. IANA Considerations This document does not require any action by IANA. 17. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC7991] Hoffman, P., "The "xml2rfc" Version 3 Vocabulary", RFC 7991, RFC 7991, DOI 10.17487/RFC7991, December 2016, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [FIPS-198-1] National Institute of Standards and Technology, "The Keyed-Hash Message Authentication Code (HMAC)", NIST FIPS 198-1, July 2008, . [SP800-38B] Dworkin, M. J., "Recommendation for Block Cipher Modes of Operation - the CMAC Mode for Authentication", NIST SP 800-38B, October 2016, . [SP800-38D] Dworkin, M. J., "Recommendation for Block Cipher Modes of Operation - Galois/Counter Mode (GCM) and GMAC", NIST SP 800-38D, November 2007, . [ACVP] Fussell, B., Vassilev, A., and H. Booth, "Automatic Cryptographic Validation Protocol", ACVP, 1 July 2019. [CMACVS] "The CMAC Validation System (CMACVS)", NIST CMACVS. Fussell & Hammett Expires 20 September 2024 [Page 40] Internet-Draft ACVP MAC March 2024 [HMACVS] "The Keyed-Hash Message Authentication Code Validation System (HMACVS)", NIST HMACVS. [SHA3VS] "The Secure Hash Algorithm 3 Validation System (SHA3VS)", NIST SHA3VS. [SHAVS] "The Secure Hash Algorithm Validation System (SHAVS)", NIST SHAVS. Authors' Addresses Barry Fussell (editor) Email: bfussell@cisco.com Russell Hammett (editor) Email: russ.hammett@g2-inc.com Fussell & Hammett Expires 20 September 2024 [Page 41]