TBD B. Fussell, Ed.
Internet-Draft Cisco Systems, Inc.
Intended status: Informational R. Hammett, Ed.
Expires: February 2, 2019 G2, Inc.
August 1, 2018

ACVP Message Authentication Algorithm JSON Specification
draft-ietf-acvp-submac-1.0

Abstract

This document defines the JSON schema for using HMAC and CMAC algorithms with the ACVP specification.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 2, 2019.

Copyright Notice

Copyright (c) 2018 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. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. 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 and CMAC crypto algorithms using ACVP.

1.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted in RFC 2119.

2. 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. 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:

2.1. Test Coverage

The tests described in this document have the intention of ensuring an implementation is conformant to [SP-800-38B] and [FIPS-198-1].

2.1.1. CMAC Requirements Covered

2.1.2. CMAC Requirements Not Covered

2.1.3. GMAC Requirements Covered

2.1.4. GMAC Requirements Not Covered

2.1.5. HMAC Requirements Covered

2.1.6. HMAC Requirements Not Covered

N/A

3. 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 HMAC and CMAC algorithms to the ACVP server.

The algorithm capabilities are 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 for details on the registration message. Each algorithm capability advertised is a self-contained JSON object.

3.1. Required Prerequisite Algorithms for MAC Validations

Each MAC implementation relies on other cryptographic primitives. For example, CMAC 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:

Required MAC Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value AES, SHA, TDES No
valValue algorithm validation number value actual number or "same" No
prereqAlgVal prerequistie algorithm validation object with algorithm and valValue properties see above No

4. CMAC-AES

4.1. CMAC-AES Algorithm Capabilities Registration

Each algorithm capability advertised is a self-contained JSON object using the following values.

CMAC-AES Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The MAC algorithm to be validated. value CMAC-AES No
revision The algorithm testing revision to use. value "1.0" No
prereqVals prerequistie algorithm validations, See Section 3.1 for examples array of prereqAlgVal objects See Section 3.1 No
capabilities The CMAC-AES capabilities array of capability objects See Table 3 No

Each capability object describes a separate permutation of direction and key length.

CMAC-AES Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
direction The MAC direction(s) to test. array gen, ver No
keyLen The keyLen supported value 128, 192, 256 No
msgLen The CMAC message lengths supported in bits. Min/max/increment and values must be mod 8. Domain 0-524288 No
macLen The supported mac sizes. Domain 32-128 No

macLen for CMAC contains a Domain of values, the server may choose values defined by these rules:

msgLen for CMAC contains a Domain of values, the server may choose values defined by these rules:

4.1.1. 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",
      "keyLen": 128,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    },
    {
      "direction": "ver",
      "keyLen": 128,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    },
    {
      "direction": "gen",
      "keyLen": 192,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    },
    {
      "direction": "ver",
      "keyLen": 192,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    },
    {
      "direction": "gen",
      "keyLen": 256,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    },
    {
      "direction": "ver",
      "keyLen": 256,
      "keyingOption": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 64,
          "max": 128,
          "increment": 8
        }
      ]
    }
  ]
}
            
                        

4.2. CMAC-AES 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 HMAC and CMAC crypto algorithms.

The test vector set JSON schema is a multi-level hierarchy that contains meta data for the entire vector set as well as individual test vectors to be processed by the ACVP client. The following table describes the JSON elements at the top level of the hierarchy.

CMAC-AES Vector Set JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
algorithm The algorithm used for the test vectors. value
revision The algorithm testing revision to use. value
testGroups Array of test group JSON objects, which are defined in Section 4.2.1 array

4.2.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 HMAC and CMAC JSON elements of the Test Group JSON object.

CMAC-AES Test Group JSON Object
JSON Value Description JSON type Optional
tgId Numeric identifier for the test group, unique across the entire vector set. value No
testType Test category type (AFT) value No
direction The direction of the tests - gen or ver value No
keyLen Length of key in bits to use value No
msgLen Length of message/hash in bits value No
macLen Length of MAC in bits to generate/verify value No
tests Array of individual test vector JSON objects, which are defined in Section 4.2.2 array No

4.2.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.

CMAC-AES Test Case JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
key Encryption key to use AES value No
msg Value of the message value No
mac MAC value, for CMAC verify value Yes

4.2.3. Example CMAC-AES Test Vector JSON Object

The following is an example JSON test vector object for CMAC-AES.

                            
{
	"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": "89DE09D747FB4B2669B59759A15BAAF068CAF31FD938DFCFFB38ECED53BA91DD659FD91E6CCCFEC5F972B1AD66BF78FE7FE319E58F514362FC75A346C144981B63FD18195A2AD482AF83711C9ADC449F7EAD32EBD5F4DB7EB93348404EAD496B8F4C89AB5FF7ACB2CFEFD96BD0FC9645B6F1F30AB02767ECA8771106DCA47188EE42183121FB9172B8E2133DE084F6CA3924E4BF3638ADA77DAAA6F06A6494E32CBAEFC6C6D0699BB12A425DCFE5974F687B6A71879D42DE08DF018A96429CFA40E32378D35E46A4956C5D7916B6877F353D33075FD4C64F32C3250D74FF070EA358135664CD8C9B82C9454EED75A12EEC758A9E514053533A884560FAC96DDBBA4AEEB8E473F4BFDB8447B22800D7782320D6E2DAC2599111F8CA598D6720CA7C6E4FC5EDC54FC3576460AAD1644B04E1D2C81B93EA49090FDB7E33374C243B2F19177405B94BEC3C69CC24CC686D8F2B01A6B2A350E394"
				},
				{
					"tcId": 26,
					"key": "D1D99979CD96C3401291905F53B2ECA4",
					"message": "6D054A7D1CD161B21F80E6586E5821DDA97451D98F815663932872720BD2156752EA650AE0EC4AB9FEE5635B1CCF1B123CF0247D2487BCD3102B6A668B5F9882DB03278A6B5DCECDF176604B55668FFD8EFED2A454F16A7A75D168AFBA3C305E31B8C1ABCCAA110E94796F8F0231A479DA25A2BCBECA3A9DAFF4357C6C63476106627DF9DF692231BA906E8F8E196FAA4DD412019D36C1AEB2A015EFDCCB9E0308FDA871DBF14DED263FF28079ED3DC4E411470A664F5EAED458EB2D564971AD10E77DCCDE53BB95DF7951FCE595079ECD6C394D78AFEB85CA87C596872D66783BD816808B0B311E5EC0BA52D5283699EE725ABDC2AD85266808D80F72195599CB27241B2FF6112829FCFBFDD5548EA29637B0DCC731A060F345769D335B1B5ABE90A664CBCCD19F4F21EE630E786BDFA60C6A8D731329718CEFE80095604918600976413334AE01C524F0F0A22D50DB460CFE7D737B6334"
				},
				{
					"tcId": 27,
					"key": "672556E105B83BF39FC9E45268BD35D1",
					"message": "39A3DD0652483A26FB9D71F30A5E29D326627FE16E29E3A3BF8EDF68645B477B5DE88499EDB3CF9E036F3D0D316241EE7C569F74925AD0BD3DCBBA21E73D9638ABA2554C4CA62AC5D7113B3FE7216E79AFC7A6FB94F21EB234D0401879A6B03EAE242EA0DCF1B523513467B00C048E7DE333C8977C455DD943323D01C97CF93EC24843769E52AD785E2340F2CC61E571D2099472E47286F29BCDF28A69144692263312F176618777A6AD0A0338F8A636BCA6150F0E1F72D539BAD726C95425682678EA7297A118E819A2925747C0AD72F3BCDF8E7D6C0A11A6AA938E4AA119390451C4E56B99F29C34927C1830197FCD4921C7E38E29BAEA5E560C8A3D4D7B96BBC370C78EF794BA9F6DB737576867B334D1DCC537D4FD751952DDFF549109ECCAD38198CCB49F25E7FEB88B9FD33D3B56601B473946693C5C3D7B2D1C7BB857F9560B94A3BD145019150BA11159B39480F97B0DE90243D6"
				},
				{
					"tcId": 28,
					"key": "1E220113298DA3B30E14F1432C16FCE8",
					"message": "497E82B322B18B0295F3B4359AC0CFAF1D36B46F36C9E123B95B90985B06AC6AFAFB772E21CCA4665CEABFF9C1CE3D78F804BEBAC6F171C0ADA47FC718E7EC55EC7603D739C8B4DBF07B60A78A8EC83922A880485B99E0FED2B1F7D5A895E2BD9149888A085F21794C1953A6EF4471A47A285CFAA57E9F75000B375A4100F5432150ECFC3342627FA325C7FB0EE0090A0B39D69ED9030E7D46BBCC6ADFC49F14156187F94F7DDE50C736FEB3FCE530CC76171EE1150AA5A94A3B79119329B5A1D9C3E03EAC7F212A1AECA97EAD58B8BFCD5F94946578D8F5A0347970A7F93C70B4AB0BB5A4FE2B0AAC8459ED0045DDC3AC210ACF996A4DE478853CD88ACEAE73D9A9C48A1B64E0D82F2EFFB25C517BDD0C033E566C16197835271A85D65A38AB37B63E7B23E9C7EA7777E6B3E3820C930B1333C279E5291724E774E34F574F15E1E23568E486F03FC6B83B962E3E60A90A69DD26701A8D6C"
				},
				{
					"tcId": 29,
					"key": "B2EDB3F5189E14E1E860A8B70D5CF676",
					"message": "EAF87567D104DF3DA93312EEB0B695409E927F6D2EF287AC12130AC82082D600DDCFDD0074DF3CFB41CE347FAC8BEADAA522D7CE33E539C7F8E9470E00210CDDB3BF799B913B627561B35368BA80955A210AE92C5F89C0566A6E3BD6559DAE9537EE0042E60BE58E4F3757F43CA43634C09CABAEB644CCB30260A776C9B2ACB8A7900DF0B556F7CDB9A0712C3CC2B711E505880156552645DFB598DDD99E2FC06394B6F3B51C3A499E0204DD89AB699A3E8015F9720F4D5D84C30CEF9F95CFBE7DFAD7A55DF591FBFFFB10A3B3AA08EBA53873A95CADBA3A3913E947173945AFA6B88791970ED2B12972A62D4A86716D0A2429E4447676058C6EB42FA6BB6DA5295B2A2518130FCF1CB81FD3B247A9EE438F0284DF6E0AD0DEA0A4A7DDEF6A48465974F375B5FD0DA809534F4654A53116921F1004B3FF9E4E9FDA1520B8D86F0766285878BF8062A00638DE0C5970B9B6C560B65F71AF6E"
				},
				{
					"tcId": 30,
					"key": "7BD39F41F80079D7D0DC0154F833086A",
					"message": "AB1311F60133E446CEF81973E4FC67DB365441AD367BA0E38AFD564F137AE8AC7ED0C64551EBC7A5A5F49765835C67A33F38BA1A3EFDA4725962E2C9D9893A665D9CD04BA0A613F06F7FAADBEDF9466CC62FD84DE146494E1C67EB65DC362450CF855FC9C92DD217869B60874CC0D944C7BEFFFDDA09ECBC66997873BE9A8BD007F79CC73E0E2BC52DB257CD02B0E794DAAAFF68062C476B4C9DD7F4F3FFCADE6863383455B3EEC727062A2175395A3E8D6C738878F4333F2BF27A2DD653CC57D4CC065DEE75014D32785D3A6B725DC7CBAE47BF579EAB6FC126A95701214084409594D20025ECD52CCA272364F466D4497C4F16D80CED689F0783DB4B2D185A9CC12FD247A6431AC51FCC44074B774402F584197BDD466F68DC794440B1F5F80F2F6FDB3968CACE95CBF41E7C5544194CC38D412627890B9D683A1175D9E6B93E499A4C64C4088F36AA4105E8E3D8A2EEEE1E266A3441A9"
				},
				{
					"tcId": 31,
					"key": "64F8BD1CC49FD16A4DF0253F31917ED4",
					"message": "340104D85093FDB0740B597207D25496D5670CAF006507470783EFE2071E2026CE2C333D86F5E7BBDA91F2440C4589366BE8C337CA0B59683E8ACD384FD842675066B79008BF7F989FD7BB5ACE46D2D5BB3EBB4985708D85BD3CFC058D869295ECC18ADF1A4475263249A7579117A53B905BBFE26E2E29DA46D1D57DE6B1E2462E4C71738262307A212978AE4BD35792BAE2B770CDC1E25D350C424BBF9650ABF8F22BE9A95F1E47CC8CA4518C5EE7881C9414365DDB3959361AD3A0A9FC07C57B050D335B7426CE19144B061B197809ADEC47C75BCBB00525865ED02E375C1793BF6A05679574645B6F020EE15EE094EB02D706149B85E50A74C8CFD9823E1B222C65FCAD630B84F25C62E0B1BB7AED5637526C537F44F9BC1869721966C1BE50B3C95B4C37CC3D6E2A85589441FE73E7E2369A418ECFEB88B2337AA179AF77B5F622B02E62CF8CD294FB226ACCABF0920AECC9DD76B572"
				},
				{
					"tcId": 32,
					"key": "AF2B918C3CC53D064688E1A517A33D2C",
					"message": "8FC205EB22775C0570A1867E3FB6E2FCF2A743171107190B89CE8A2A04C1B46A0D45781207AAB25BEC6C55F35E21F662F660C68BED54DD08D40C95D4D24872C595E49F3519D85DB933306BEF10EE181FA25C727787494FAD7A91EA6563E58B575C65E2774098BF69D74DD53D015899BF71F9B95EA0CE2A775BE0CED8423507086E6C48A9AE89195CBB1345B1C0AB8D496A2D9A6AEEFAC4A40F900159F47A7C1DFF96E88EA104EC0C64A858657239085C3AC353BE53069E57FBE9AE9B967D041478B8EBC908C70CBEEBEE718D51C08EBD2C97D7F98EF4D6EA5FF156ADC2D8FAD535AA2501F734F411BCE2B329F0FE485297707490523ABE9DB9E2FEFCD8C8A09E18628B9912262DA0282A334D9290CC5DED2F7662771237C144382724D51C3BF02F45BABD5B35810ED3EBA38AFC03D6E107D31814B8D0E4D21FE7CF9434018BCCB42F506971D33106432F325BE456A914CD5C2561E8F01F80"
				}
			]
		},
		{
			"tgId": 10,
			"testType": "AFT",
			"direction": "ver",
			"keyLen": 128,
			"msgLen": 0,
			"macLen": 64,
			"tests": [{
					"tcId": 73,
					"key": "D5E09A89B2A4627BF987517B66A51564",
					"message": "",
					"mac": "CBBC968859633C24"
				},
				{
					"tcId": 74,
					"key": "646A150116ABAA37662FE9D8BB278693",
					"message": "",
					"mac": "21D069331196E579"
				},
				{
					"tcId": 75,
					"key": "5C185C01FBC57A40FC373F199374D1CC",
					"message": "",
					"mac": "9507F00153543DE6"
				},
				{
					"tcId": 76,
					"key": "4E3A4C7AE2DCA644FF752B8B74CACEF8",
					"message": "",
					"mac": "6D58E6464497A9B4"
				},
				{
					"tcId": 77,
					"key": "BA924D356A696E97BEF0477A9D600FCE",
					"message": "",
					"mac": "93FEA54132999B1D"
				},
				{
					"tcId": 78,
					"key": "DA877E0EFC098E1EAD8B2DC61A5B98D5",
					"message": "",
					"mac": "24E6ED4D00D7122C"
				},
				{
					"tcId": 79,
					"key": "61698DB0B49E2F252849590E940CBCF3",
					"message": "",
					"mac": "2C531F92D23D6B2B"
				},
				{
					"tcId": 80,
					"key": "BE149E46BE89BF16BDDE41D1A494AEA4",
					"message": "",
					"mac": "7A858023143F6B98"
				},
				{
					"tcId": 81,
					"key": "9A9F006EF8EDFDA0F1113FC6FEF2E84D",
					"message": "",
					"mac": "C0750CD586472C8A"
				},
				{
					"tcId": 82,
					"key": "F68A91DE6AC099F7D72D7B211245D8D9",
					"message": "",
					"mac": "C91C3DCC36F2BC21"
				},
				{
					"tcId": 83,
					"key": "23E9BEA8C4F14330B2836FDD0B6E803F",
					"message": "",
					"mac": "F884E64E0CA4D34F"
				},
				{
					"tcId": 84,
					"key": "02636CC18751A5CF27C56D2C69793BC4",
					"message": "",
					"mac": "1D5F5531BA263CC2"
				},
				{
					"tcId": 85,
					"key": "46D7DA4F123C37F05FC269FCF92B1FC1",
					"message": "",
					"mac": "06D743483812AAB4"
				},
				{
					"tcId": 86,
					"key": "C28DD76F2A31C90EE4A91313CB7D4ECC",
					"message": "",
					"mac": "09B6D2C848F8C9FD"
				},
				{
					"tcId": 87,
					"key": "810BAE6E85149F244179CA7F1488353B",
					"message": "",
					"mac": "68D7AFF612EAEDB4"
				},
				{
					"tcId": 88,
					"key": "C67C04544E0DDDE14FAE608135909FED",
					"message": "",
					"mac": "E9B7FE8ECF21DDD7"
				},
				{
					"tcId": 89,
					"key": "D9D5B9D32533DB3276BE4FFF3D79374A",
					"message": "",
					"mac": "081BAFA11BFDF238"
				},
				{
					"tcId": 90,
					"key": "D8A05E45602DD6ACBE989BD0F26CED9E",
					"message": "",
					"mac": "D84F8EE112352837"
				},
				{
					"tcId": 91,
					"key": "E09B79F64B11F00B48081EEEA0482821",
					"message": "",
					"mac": "4D927CED15907953"
				},
				{
					"tcId": 92,
					"key": "24B7BE1D4F72AE1A1C5FBDB2A3AC8287",
					"message": "",
					"mac": "548CBD558D8F6E3A"
				}
			]
		}
	]
}
            
                        

4.3. CMAC-AES 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.

CMAC-AES Vector Set Response JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
testGroups Array of JSON objects that represent each test vector group. See Table 8 array

The testGroups section is used to organize the ACVP client response in a similar manner to how it receives vectors. Several algorithms SHALL require the client to send back group level properties in their response. This structure helps accommodate that.

CMAC-AES Vector Set Group Response JSON Object
JSON Value Description JSON type
tgId The test group Id value
tests The tests associated to the group specified in tgId value

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 DRBG test vector.

CMAC-AES Test Case Results JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
mac value of the computed MAC output value Yes
testPassed The result of CMAC verify boolean Yes

4.3.1. Example CMAC-AES Test Vector Response JSON Object

The following is an example JSON test vector response object for CMAC-AES.

                            
{
	"vsId": 1,
    "algorithm": "CMAC",
    "revision": "1.0",
    "testGroups": [{
			"tgId": 4,
			"tests": [{
					"tcId": 25,
					"mac": "7AA2D56A0AE76620"
				},
				{
					"tcId": 26,
					"mac": "9E23524D3CD18C93"
				},
				{
					"tcId": 27,
					"mac": "4D51872CBFAA102A"
				},
				{
					"tcId": 28,
					"mac": "027BCA655EC9ACEB"
				},
				{
					"tcId": 29,
					"mac": "A86D99B6121507A6"
				},
				{
					"tcId": 30,
					"mac": "25E5F000F2B1E071"
				},
				{
					"tcId": 31,
					"mac": "F2DBA25F9A903C80"
				},
				{
					"tcId": 32,
					"mac": "1D35816BD32CA4DB"
				}
			]
		},
		{
			"tgId": 10,
			"tests": [{
					"tcId": 73,
					"testPassed": true
				},
				{
					"tcId": 74,
					"testPassed": true
				},
				{
					"tcId": 75,
					"testPassed": true
				},
				{
					"tcId": 76,
					"testPassed": true
				},
				{
					"tcId": 77,
					"testPassed": false
				},
				{
					"tcId": 78,
					"testPassed": true
				},
				{
					"tcId": 79,
					"testPassed": true
				},
				{
					"tcId": 80,
					"testPassed": true
				},
				{
					"tcId": 81,
					"testPassed": true
				},
				{
					"tcId": 82,
					"testPassed": true
				},
				{
					"tcId": 83,
					"testPassed": true
				},
				{
					"tcId": 84,
					"testPassed": true
				},
				{
					"tcId": 85,
					"testPassed": true
				},
				{
					"tcId": 86,
					"testPassed": false
				},
				{
					"tcId": 87,
					"testPassed": true
				},
				{
					"tcId": 88,
					"testPassed": false
				},
				{
					"tcId": 89,
					"testPassed": true
				},
				{
					"tcId": 90,
					"testPassed": false
				},
				{
					"tcId": 91,
					"testPassed": false
				},
				{
					"tcId": 92,
					"testPassed": false
				}
			]
		}
	]
}
            
                        

5. CMAC-TDES

5.1. CMAC-TDES Algorithm Capabilities Registration

Each algorithm capability advertised is a self-contained JSON object using the following values.

CMAC-TDES Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The MAC algorithm to be validated. value CMAC-TDES No
revision The algorithm testing revision to use. value "1.0" No
prereqVals prerequistie algorithm validations, See Section 3.1 for examples array of prereqAlgVal objects See Section 3.1 No
capabilities The CMAC-TDES capabilities array of capability objects See Table 11 No
CMAC-TDES Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
direction The MAC direction(s) to test. array gen, ver No
keyingOption The Keying Option used in 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). value 1, 2 No
msgLen The CMAC message lengths supported in bits. Min/max/increment and values must be mod 8. Domain 0-524288 No
macLen The supported mac sizes. Domain 32-64 No

macLen for CMAC contains a Domain of values, the server may choose values defined by these rules:

msgLen for CMAC contains a Domain of values, the server may choose values defined by these rules:

5.1.1. 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",
      "keyingOption": 1,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 32,
          "max": 64,
          "increment": 8
        }
      ]
    },
    {
      "direction": "ver",
      "keyingOption": 1,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 32,
          "max": 64,
          "increment": 8
        }
      ]
    },
    {
      "direction": "ver",
      "keyLen": 0,
      "msgLen": [
        {
          "min": 0,
          "max": 65536,
          "increment": 8
        }
      ],
      "macLen": [
        {
          "min": 32,
          "max": 64,
          "increment": 8
        }
      ]
    }
  ]
}
            
                        

5.2. CMAC-TDES 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-TDES, etc. This section describes the JSON schema for a test vector set used with HMAC and CMAC crypto algorithms.

The test vector set JSON schema is a multi-level hierarchy that contains meta data for the entire vector set as well as individual test vectors to be processed by the ACVP client. The following table describes the JSON elements at the top level of the hierarchy.

CMAC-TDES Vector Set JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
algorithm The algorithm used for the test vectors. value
revision The algorithm testing revision to use. value
testGroups Array of test group JSON objects, which are defined in Section 5.2.1 array

5.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 HMAC and CMAC JSON elements of the Test Group JSON object.

CMAC-TDES Test Group JSON Object
JSON Value Description JSON type Optional
tgId Numeric identifier for the test group, unique across the entire vector set. value No
testType Test category type (AFT) value No
direction The direction of the tests - gen or ver value No
keyLen Length of key in bits to use value No
msgLen Length of message/hash in bits value No
macLen Length of MAC in bits to generate/verify value No
tests Array of individual test vector JSON objects, which are defined in Section 5.2.2 array No

5.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.

CMAC-TDES Test Case JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
key1, key2, key3 Encryption keys to use for TDES value No
msg Value of the message value No
mac MAC value, for CMAC verify value Yes

5.2.3. Example CMAC-TDES Test Vector JSON Object

The following is an example JSON test vector object for CMAC-TDES.

                            
{
	"vsId": 1,
	"algorithm": "CMAC-TDES",
	"revision": "1.0",
	"testGroups": [{
			"tgId": 4,
			"testType": "AFT",
			"direction": "gen",
			"keyLen": 192,
			"msgLen": 752,
			"macLen": 32,
			"tests": [{
					"tcId": 25,
					"key": "7FFDB31A3A06BF0D5201FFE83CC5253EBBECA60F1D631BB8",
					"message": "4D2D07AE0224289BE111E0D4522A8AC127FAD537D7D4240613A73EA23CA673F8DC554B4C8CC69699C1DCB638D06FCA54D858DF68F595B7987A937599BDEA77974AB1441D7E63190762CBCD8E6D9F9A8940FB8DB43EBDAA2172C9B0A5CDF9",
					"key1": "7FFDB31A3A06BF0D",
					"key2": "5201FFE83CC5253E",
					"key3": "BBECA60F1D631BB8"
				},
				{
					"tcId": 26,
					"key": "82E572E29C84009E28390918155E4891A0D24C94C306FE56",
					"message": "7A70F3CE17598AC3553FBADA0CC562018FD40C6D25B098EC0B905B1BC9F67DFCBD797494E4B05E2C6C3C0F655F9E95FFFE16782E1454A5EE04D87E7586F7FF65A51979A1C46118080320C1CB9E9CC48A05E113C95C2316361B39F5FCB861",
					"key1": "82E572E29C84009E",
					"key2": "28390918155E4891",
					"key3": "A0D24C94C306FE56"
				},
				{
					"tcId": 27,
					"key": "662A89E47D86F6A0CB9D612E199B4AD2AE3AEBA19FAB4340",
					"message": "2DAF1E213A6AE9E88FEBC70458AACBFB9B668EB22F12662B281D29A57B568CA35146E073D6B4BECB3E10AD8D398CADF672464707207FB40D23F4D6F93528F83D79019106A03D41E26DAE32E3208920FE165FCD739305A4E24D81B118972C",
					"key1": "662A89E47D86F6A0",
					"key2": "CB9D612E199B4AD2",
					"key3": "AE3AEBA19FAB4340"
				},
				{
					"tcId": 28,
					"key": "522729A011C73BE2079D67ECEBFCE42EF5F91F6ECD43F71E",
					"message": "7F1170A442EEAFCAFD00925C8BD2DB22AB2458AAAB6F6C2B061EB56F005DAC0D11392ADAA0E07FF6074208E22D5E07F4C4B9A1C9DDFD2FAAEB1185C2E5B60D06E2BFBB92C6A0DC4CED36A8DB19583D8BE09A260E638FCCCDCBF17A7D2D6D",
					"key1": "522729A011C73BE2",
					"key2": "079D67ECEBFCE42E",
					"key3": "F5F91F6ECD43F71E"
				},
				{
					"tcId": 29,
					"key": "B5FE32A150833A60A8C619C2A89BD8BCD8DFB2654AEB4923",
					"message": "839733866DC749C9F2F3756E02FB1FEAAF0BC47814CD52159EE1AA1945F50D789483E4705437482712F26FE8505233638B9004A2938669670888BEB5EF5BBB62DBC6C0355FAB7BB4AE57FE7E345A9E5D9699750157E83F55B8431CD0ECF6",
					"key1": "B5FE32A150833A60",
					"key2": "A8C619C2A89BD8BC",
					"key3": "D8DFB2654AEB4923"
				},
				{
					"tcId": 30,
					"key": "C2406CA7AA81A4A6FBB0D6A665B0D1410445F4CC132F46E6",
					"message": "95FC92BAC8AE751818427F2090B3BCC76BD1A5A3CAE6C5B914AF59DA589BDED6A2CF0B7A17CB659B46C9FF3163AFEC505D3BBBAF42AD9FA077AA862E49BBE21773E3CF7C031A022681E85169873C639ADDA2953AB352B9724B0F941AF2E6",
					"key1": "C2406CA7AA81A4A6",
					"key2": "FBB0D6A665B0D141",
					"key3": "0445F4CC132F46E6"
				},
				{
					"tcId": 31,
					"key": "AE90AF3424A99A304F0D54B1FDAAAA5B4D026169F067D997",
					"message": "AECC231068148AE400B1F1922684C681FBEC9C836B1593BB0805C8A38340564C1CA39C341588913C3E425934B8D219FED6D58553BC3AE44B003999FA51C8265AE6AA653F839C56813F58BD4F6093F5A2FF196CAA9A3CF782E21FD06C0AD0",
					"key1": "AE90AF3424A99A30",
					"key2": "4F0D54B1FDAAAA5B",
					"key3": "4D026169F067D997"
				},
				{
					"tcId": 32,
					"key": "B10CCB821E63EF98928D1BC20D797C5E9149B32BFC090140",
					"message": "B19716D364D0680873D83F4991839465C169CADA64D5B57454ADDCDA64D1778219B204571593C5965E8F84C373CF0DBD10F4C8124D932FB6EF2B662966C698F79CB3199E40A45A8A7C186E948CA5A0BAD743A1FDC91336325145FC701D41",
					"key1": "B10CCB821E63EF98",
					"key2": "928D1BC20D797C5E",
					"key3": "9149B32BFC090140"
				}
			],
			"keyingOption": 1
		},
		{
			"tgId": 10,
			"testType": "AFT",
			"direction": "ver",
			"keyLen": 192,
			"msgLen": 0,
			"macLen": 32,
			"tests": [{
					"tcId": 73,
					"key": "D127F902CFF69A82785D99EF117E5B5636D4CB2C34A3AF30",
					"message": "",
					"mac": "D78010B3",
					"key1": "D127F902CFF69A82",
					"key2": "785D99EF117E5B56",
					"key3": "36D4CB2C34A3AF30"
				},
				{
					"tcId": 74,
					"key": "9D5DAC4D75E0A3496A55855C62D8C767CBD9FC7CCBDA8BE9",
					"message": "",
					"mac": "5313D9E8",
					"key1": "9D5DAC4D75E0A349",
					"key2": "6A55855C62D8C767",
					"key3": "CBD9FC7CCBDA8BE9"
				},
				{
					"tcId": 75,
					"key": "B711BA268A1F3663AA83B2195E85BFC6AA1CFBC128AAE0FD",
					"message": "",
					"mac": "07B1926F",
					"key1": "B711BA268A1F3663",
					"key2": "AA83B2195E85BFC6",
					"key3": "AA1CFBC128AAE0FD"
				},
				{
					"tcId": 76,
					"key": "4DB908F0A14A3959AC76D38D171114CA3651F7FF9C9B20B5",
					"message": "",
					"mac": "7C920795",
					"key1": "4DB908F0A14A3959",
					"key2": "AC76D38D171114CA",
					"key3": "3651F7FF9C9B20B5"
				},
				{
					"tcId": 77,
					"key": "670AB0529BCE3007BDC7706FED307419291C6BA004943806",
					"message": "",
					"mac": "7988C839",
					"key1": "670AB0529BCE3007",
					"key2": "BDC7706FED307419",
					"key3": "291C6BA004943806"
				},
				{
					"tcId": 78,
					"key": "62AA8060A173FD6A19FB1E39C09914E8453D89A318FEAA0A",
					"message": "",
					"mac": "14B588F8",
					"key1": "62AA8060A173FD6A",
					"key2": "19FB1E39C09914E8",
					"key3": "453D89A318FEAA0A"
				},
				{
					"tcId": 79,
					"key": "9B954C62C795DD599807683D5531A513E88406D75B04CDC9",
					"message": "",
					"mac": "9BDD8078",
					"key1": "9B954C62C795DD59",
					"key2": "9807683D5531A513",
					"key3": "E88406D75B04CDC9"
				},
				{
					"tcId": 80,
					"key": "E085046DF6F97A3D9B00E3EA82482EBFA1DCA6EC94ACFD7E",
					"message": "",
					"mac": "D44BA0CD",
					"key1": "E085046DF6F97A3D",
					"key2": "9B00E3EA82482EBF",
					"key3": "A1DCA6EC94ACFD7E"
				},
				{
					"tcId": 81,
					"key": "526DE285D64F65A20F2E9F52E789AD59E6AE85200F95501F",
					"message": "",
					"mac": "F068F177",
					"key1": "526DE285D64F65A2",
					"key2": "0F2E9F52E789AD59",
					"key3": "E6AE85200F95501F"
				},
				{
					"tcId": 82,
					"key": "97FBEF5ADADC68CCDD5BAFB50853589EDF4918593D29F5C0",
					"message": "",
					"mac": "317B4969",
					"key1": "97FBEF5ADADC68CC",
					"key2": "DD5BAFB50853589E",
					"key3": "DF4918593D29F5C0"
				},
				{
					"tcId": 83,
					"key": "1D80CD109B749DCE6AF893051C0969B6705A264BFA49F2B2",
					"message": "",
					"mac": "FAFE8358",
					"key1": "1D80CD109B749DCE",
					"key2": "6AF893051C0969B6",
					"key3": "705A264BFA49F2B2"
				},
				{
					"tcId": 84,
					"key": "B48C715C2B4EB7F5D0865F7ABC0BFD1F2CD83EA54C5136D7",
					"message": "",
					"mac": "F456798B",
					"key1": "B48C715C2B4EB7F5",
					"key2": "D0865F7ABC0BFD1F",
					"key3": "2CD83EA54C5136D7"
				},
				{
					"tcId": 85,
					"key": "A8944ECE678BBFFD45C1557E59A6044352EF3B8808FD54DC",
					"message": "",
					"mac": "7CEEF54C",
					"key1": "A8944ECE678BBFFD",
					"key2": "45C1557E59A60443",
					"key3": "52EF3B8808FD54DC"
				},
				{
					"tcId": 86,
					"key": "B6CA0DD41423786CD0E524E69C2D21DE81522CB976796269",
					"message": "",
					"mac": "02E9CDE5",
					"key1": "B6CA0DD41423786C",
					"key2": "D0E524E69C2D21DE",
					"key3": "81522CB976796269"
				},
				{
					"tcId": 87,
					"key": "C2A4D041516F0B7535D37F2B55FB38CFB75F24285D7BEF39",
					"message": "",
					"mac": "4A099862",
					"key1": "C2A4D041516F0B75",
					"key2": "35D37F2B55FB38CF",
					"key3": "B75F24285D7BEF39"
				},
				{
					"tcId": 88,
					"key": "3F9879C2259E2C6E0E75799EC99FA126E9A59029ADCD6B7C",
					"message": "",
					"mac": "CB1FC90C",
					"key1": "3F9879C2259E2C6E",
					"key2": "0E75799EC99FA126",
					"key3": "E9A59029ADCD6B7C"
				},
				{
					"tcId": 89,
					"key": "5059F4B1CA3C438F56FF7F3115E2B7ACC0970ADF892FBBA0",
					"message": "",
					"mac": "6F5CFAEC",
					"key1": "5059F4B1CA3C438F",
					"key2": "56FF7F3115E2B7AC",
					"key3": "C0970ADF892FBBA0"
				},
				{
					"tcId": 90,
					"key": "DE8EB157BCE06D7A318ECE3D7E96B586FDDC6097E61C4F48",
					"message": "",
					"mac": "E67871E3",
					"key1": "DE8EB157BCE06D7A",
					"key2": "318ECE3D7E96B586",
					"key3": "FDDC6097E61C4F48"
				},
				{
					"tcId": 91,
					"key": "840A1C616D0D776BFAF99C1444507BACD11881E87C8E0329",
					"message": "",
					"mac": "C2D06FE4",
					"key1": "840A1C616D0D776B",
					"key2": "FAF99C1444507BAC",
					"key3": "D11881E87C8E0329"
				},
				{
					"tcId": 92,
					"key": "1A29B0ED9040FD2D6A7D20A4DF50E290AB1D497EC1D211AA",
					"message": "",
					"mac": "B5E61275",
					"key1": "1A29B0ED9040FD2D",
					"key2": "6A7D20A4DF50E290",
					"key3": "AB1D497EC1D211AA"
				}
			],
			"keyingOption": 1
		}
	]
}
            
                        

5.3. CMAC-TDES 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.

CMAC-TDES Vector Set Response JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
testGroups Array of JSON objects that represent each test vector group. See Table 16 array

The testGroups section is used to organize the ACVP client response in a similar manner to how it receives vectors. Several algorithms SHALL require the client to send back group level properties in their response. This structure helps accommodate that.

CMAC-TDES Vector Set Group Response JSON Object
JSON Value Description JSON type
tgId The test group Id value
tests The tests associated to the group specified in tgId value

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 DRBG test vector.

CMAC-TDES Test Case Results JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
mac value of the computed MAC output value Yes
testPassed The result of CMAC verify boolean Yes

5.3.1. Example CMAC-TDES Test Vector Response JSON Object

The following is an example JSON test vector response object for CMAC-TDES.

                            
{
    "vsId": 1,
	"algorithm": "CMAC-TDES",
	"revision": "1.0",
	"testGroups": [{
			"tgId": 4,
			"tests": [{
					"tcId": 25,
					"mac": "6FA27FDC"
				},
				{
					"tcId": 26,
					"mac": "89CE2842"
				},
				{
					"tcId": 27,
					"mac": "5E03D980"
				},
				{
					"tcId": 28,
					"mac": "EC68CA91"
				},
				{
					"tcId": 29,
					"mac": "ACAEF07C"
				},
				{
					"tcId": 30,
					"mac": "2207C5DF"
				},
				{
					"tcId": 31,
					"mac": "95248097"
				},
				{
					"tcId": 32,
					"mac": "33325023"
				}
			]
		},
		{
			"tgId": 10,
			"tests": [{
					"tcId": 73,
					"testPassed": true
				},
				{
					"tcId": 74,
					"testPassed": true
				},
				{
					"tcId": 75,
					"testPassed": true
				},
				{
					"tcId": 76,
					"testPassed": true
				},
				{
					"tcId": 77,
					"testPassed": false
				},
				{
					"tcId": 78,
					"testPassed": true
				},
				{
					"tcId": 79,
					"testPassed": true
				},
				{
					"tcId": 80,
					"testPassed": true
				},
				{
					"tcId": 81,
					"testPassed": false
				},
				{
					"tcId": 82,
					"testPassed": true
				},
				{
					"tcId": 83,
					"testPassed": true
				},
				{
					"tcId": 84,
					"testPassed": true
				},
				{
					"tcId": 85,
					"testPassed": true
				},
				{
					"tcId": 86,
					"testPassed": true
				},
				{
					"tcId": 87,
					"testPassed": true
				},
				{
					"tcId": 88,
					"testPassed": false
				},
				{
					"tcId": 89,
					"testPassed": true
				},
				{
					"tcId": 90,
					"testPassed": false
				},
				{
					"tcId": 91,
					"testPassed": true
				},
				{
					"tcId": 92,
					"testPassed": true
				}
			]
		}
	]
}
            
                        

6. GMAC

6.1. AES-GMAC Algorithm Capabilities Registration

Each algorithm capability advertised is a self-contained JSON object using the following values.

AES-GMAC Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The MAC algorithm to be validated. value ACVP-AES-GMAC No
revision The algorithm testing revision to use. value "1.0" No
prereqVals prerequistie algorithm validations, See Section 3.1 for examples array of prereqAlgVal objects See Section 3.1 No
direction The GMAC direction(s) to test. array encrypt, decrypt No
keyLen The keyLen supported value 128, 192, 256 No
ivLen The IV lengths supported in bits. Min/max/increment and values must be mod 8. Domain 8-1024 No
ivGen The IV generation method (from the perspective of the IUT). string internal, external No
ivGenMode The IV generation mode for use when the IUT is internally generating IVs. string 8.2.1, 8.2.2 Yes
tagLen The supported mac/tag lengths. Domain 32, 64, 96, 104, 112, 120, 128 No

6.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
  ]
}
            
                        

6.2. AES-GMAC 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 ACVP-AES-GMAC. This section describes the JSON schema for a test vector set used with the ACVP-AES-GMAC crypto algorithm.

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.

AES-GMAC Vector Set JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
algorithm The algorithm used for the test vectors. value
revision The algorithm testing revision to use. value
testGroups Array of test group JSON objects, which are defined in Section 6.2.1 array

6.2.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 HMAC and CMAC JSON elements of the Test Group JSON object.

AES-GMAC Test Group JSON Object
JSON Value Description JSON type Optional
tgId Numeric identifier for the test group, unique across the entire vector set. value No
testType Test category type (AFT) value No
direction The direction of the tests - encrypt or decrypt value No
keyLen Length of key in bits to use value No
ivLen Length of IV in bits value No
ivGen IV Generation (internal or external) value No
ivGenMode The mode an internal IV has been generated using. value Yes
aadLen Length of AAD in bits value No
tagLen Length of tag/MAC in bits to generate/verify value No
tests Array of individual test vector JSON objects, which are defined in Section 6.2.2 array No

6.2.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.

AES-GMAC Test Case JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
key Encryption key to use AES value No
iv Value of the IV. value No
aad Value of the AAD. value No
tag MAC/tag value, for validating on a decrypt operation. value Yes

6.2.3. Example AES-GMAC Test Vector JSON Object

The following is an example JSON test vector object for AES-GMAC.

                            
{
  "vsId": 0,
  "algorithm": "ACVP-AES-GMAC",
  "revision": "1.0",
  "isSample": false,
  "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"
      }]
    }
  ]
}
            
                        

6.3. AES-GMAC 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.

AES-GMAC Vector Set Response JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
testGroups Array of JSON objects that represent each test vector group. See Table 23 array

The testGroups section is used to organize the ACVP client response in a similar manner to how it receives vectors. Several algorithms SHALL require the client to send back group level properties in their response. This structure helps accommodate that.

AES-GMAC Vector Set Group Response JSON Object
JSON Value Description JSON type
tgId The test group Id value
tests The tests associated to the group specified in tgId value

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 DRBG test vector.

AES-GMAC Test Case Results JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
tag value of the computed tag/MAC output value Yes
testPassed The result of decrypt verify boolean Yes

6.3.1. 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
      }]
    }
  ]
}
            
                        

7. HMAC

7.1. HMAC Algorithm Capabilities Registration

Each algorithm capability advertised is a self-contained JSON object using the following values.

HMAC Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The MAC algorithm and mode to be validated. value See Section 7.2 No
revision The algorithm testing revision to use. value 1.0 No
prereqVals prerequistie algorithm validations, See Section 3.1 for examples array of prereqAlgVal objects See Section 3.1 No
keyLen The keyLen Domain supported by the IUT in bits. Domain 8-524288 No
macLen The supported mac sizes. (range dependent on algorithm, see Section 7.2). Domain 32-512 No

keyLen for HMAC contains a Domain of values, the server may choose values defined by these rules:

macLen for HMAC contains a Domain of values, the server may choose values defined by these rules:

7.2. Supported HMAC Algorithms

The following algorithms may be advertised by the ACVP compliant crypto module:

Algorithms w/ block size and max CMAC length.
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

7.2.1. Example HMAC Capabilities JSON Object

The following is an example JSON object advertising support for HMAC.

                            
{
  "algorithm": "HMAC-SHA-1",
  "revision": "1.0",
  "keyLen": [
    {
      "min": 8,
      "max": 2048,
      "increment": 8
    }
  ],
  "macLen": [
    {
      "min": 80,
      "max": 160,
      "increment": 8
    }
  ]
}
            
                        

7.3. HMAC 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 HMAC crypto algorithms.

The test vector set JSON schema is a multi-level hierarchy that contains meta data for the entire vector set as well as individual test vectors to be processed by the ACVP client. The following table describes the JSON elements at the top level of the hierarchy.

HMAC Vector Set JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
algorithm The algorithm and mode used for the test vectors. See Section 7.2 for possible values. value
revision The algorithm testing revision to use. value
testGroups Array of test group JSON objects, which are defined in Section 7.3.1 array

7.3.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 and CMAC JSON elements of the Test Group JSON object.

HMAC Test Group JSON Object
JSON Value Description JSON type Optional
tgId Numeric identifier for the test group, unique across the entire vector set. value No
testType Test category type (AFT) value No
keyLen Length of key in bits to use value No
msgLen Length of message/hash in bits value No
macLen Length of MAC in bits to generate/verify value No
tests Array of individual test vector JSON objects, which are defined in Section 7.3.2 array No

7.3.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.

HMAC Test Case JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
key The value of the key value No
msg Value of the message value No

7.3.3. Example HMAC Test Vector JSON Object

The following is an example JSON test vector object for HMAC.

                            
{
    "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"
			},
			{
				"tcId": 4,
				"key": "ED97154BE9D252",
				"msg": "4B491408D929C33980C13091FF95DCD7"
			},
			{
				"tcId": 5,
				"key": "24D8F9E20EA536",
				"msg": "DD0919DF2CDCB622E95D60E2E93E2B14"
			},
			{
				"tcId": 6,
				"key": "9AE463E4D85480",
				"msg": "DF4653D381B8FFF3B507A5B28708DCF2"
			},
			{
				"tcId": 7,
				"key": "E82C2306DADB20",
				"msg": "ABD9D90C4C912FC1F4208E8DC82C316A"
			},
			{
				"tcId": 8,
				"key": "98262DE8011B43",
				"msg": "79DD85559EF4C577DE8808B875398A36"
			},
			{
				"tcId": 9,
				"key": "064251F70AD327",
				"msg": "6719543EF69843BA4421EA9730470539"
			},
			{
				"tcId": 10,
				"key": "3B1887195138EC",
				"msg": "F1D7716FFF84F4472E2214DAA1662583"
			}
		]
	}]
}
            
                        

7.4. HMAC 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.

HMAC Vector Set Response JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
testGroups Array of JSON objects that represent each test vector group. See Table 31 array

The testGroups section is used to organize the ACVP client response in a similar manner to how it receives vectors. Several algorithms SHALL require the client to send back group level properties in their response. This structure helps accommodate that.

HMAC Vector Set Group Response JSON Object
JSON Value Description JSON type
tgId The test group Id value
tests The tests associated to the group specified in tgId value

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 DRBG test vector.

HMAC Test Case Results JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. value No
mac value of the computed MAC output value No

7.4.1. 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"
			},
			{
				"tcId": 4,
				"mac": "07A689738031C215C55C"
			},
			{
				"tcId": 5,
				"mac": "1A2633ADC7D119FBCD67"
			},
			{
				"tcId": 6,
				"mac": "4C41990B6E99AA39D03F"
			},
			{
				"tcId": 7,
				"mac": "9097773C9429DA776C16"
			},
			{
				"tcId": 8,
				"mac": "2F86E2DF1E5D65793373"
			},
			{
				"tcId": 9,
				"mac": "AE7222EA6DA826814612"
			},
			{
				"tcId": 10,
				"mac": "3CA58B0FA50E7EC66D0D"
			}
		]
	}]
}
            
                        

8. Acknowledgements

TBD...

9. IANA Considerations

This memo includes no request to IANA.

10. Security Considerations

Security considerations are addressed by the ACVP specification.

11. References

11.1. Normative References

[ACVP] authSurName, authInitials., "ACVP Specification", 2016.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.

11.2. Informative References

[CMACVS] Sharon S. Keller, SSK., "The CMAC Validation System (CMACVS)", 2011.
[FIPS-198-1] NIST, "The Keyed-Hash Message Authentication Code (HMAC)", 2008.
[HMACVS] Lawrence E. Bassham III, LEB., "The Keyed-Hash Message Authentication Code Validation System (HMACVS)", 2016.
[SHA3VS] Lawrence E. Bassham III, LEB., "The Secure Hash Algorithm 3 Validation System (SHA3VS)", 2016.
[SHAVS] Lawrence E. Bassham III, LEB., "The Secure Hash Algorithm Validation System (SHAVS)", 2014.
[SP-800-38B] NIST, "Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication", 2005.
[SP-800-38D] NIST, "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", 2007.

Authors' Addresses

Barry Fussell (editor) Cisco Systems, Inc. 170 West Tasman Dr. San Jose, CA 95134 USA EMail: bfussell@cisco.com
Russell Hammett (editor) G2, Inc. 302 Sentinel Dr Suite 300 Annapolis Junction , MD 20701 USA EMail: russ.hammett@g2-inc.com