TBD A. Vassilev, Ed.
Internet-Draft National Institute of Standards and Technology
Intended status: Informational November 1, 2018
Expires: May 5, 2019

ACVP Deterministic Random Bit Generator (DRBG) Algorithm JSON Specification
draft-ietf-acvp-subdrbg-1.0

Abstract

This document defines the JSON schema for testing DRBG implementations from SP 800-90A 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 May 5, 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 NIST-approved DRBG algorithms from SP 800-90A [SP800-90A] 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.

1.2. Default values

ACVP has default values for many of the input parameters for testing the DRBG algorithms.For example, the Entropy Input, Nonce, Personalization String, and Addtional Input parameters have default values. The specific details and restrictions on each of these input lengths is specified in Section 3 , Table 5 and the notes following it. To indicate a preference for using a default value for any of these parameters, the value zero (0) should be set. If the implementation does not support one of these defaults, the corresponding supported bit length values shall be set explicitly.

2. Test Types and Test Coverage

The ACVP server performs a set of tests on the IUT's DRBG 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 permutation of DRBG capabilities. This section describes the design of the tests used to validate implementations of the DRBG algorithms. There is a single test type for DRBG testing:

2.1. Test Coverage

The tests described in this document have the intention of ensuring an implementation is conformant to [SP800-90A].

2.1.1. Requirements Covered

2.1.2. Requirements Not Covered

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 DRBG algorithms to the ACVP server.

3.1. Supported DRBG Algorithms

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

Supported DRBG Algorithm and Modes JSON Values
JSON algorithm value JSON mode value
"hashDRBG" "SHA-1"
"SHA2-224"
"SHA2-256"
"SHA2-384"
"SHA2-512"
"SHA2-512/224"
"SHA2-512/256"
"hmacDRBG" "SHA-1"
"SHA2-224"
"SHA2-256"
"SHA2-384"
"SHA2-512"
"SHA2-512/224"
"SHA2-512/256"
"ctrDRBG" "TDES"
"AES-128"
"AES-192"
"AES-256"

Note 1: The ctrDRBG algorithm in TDES mode shall only be used with the three-key option of the Triple-DES algorithm.

3.1.1. Supported values per DRBG option

DRBG minimum/maximum values for several options such as minimum entropy and nonce, vary depending on the DRBG capabilities registered. The following table depicts those values

Supported values per DRBG option table
DRBG Algorithm Mode Derivation Function Security Strength Min Entropy Max Entropy Max PersoString Max Addl String Min Nonce
Counter AES128 TRUE 128 128 2^35 2^35 2^35 64
Counter AES192 TRUE 192 192 2^35 2^35 2^35 96
Counter AES256 TRUE 256 256 2^35 2^35 2^35 128
Counter TDES TRUE 112 112 2^35 2^35 2^35 56
Counter AES128 FALSE 128 256 256 256 256 0
Counter AES192 FALSE 192 320 320 320 320 0
Counter AES256 FALSE 256 384 384 384 384 0
Counter TDES FALSE 112 232 232 232 232 0
Hash SHA1 N/A 80 80 2^35 2^35 2^35 40
Hash SHA2-224 N/A 112 112 2^35 2^35 2^35 56
Hash SHA2-256 N/A 128 128 2^35 2^35 2^35 64
Hash SHA2-384 N/A 192 192 2^35 2^35 2^35 96
Hash SHA2-512 N/A 256 256 2^35 2^35 2^35 128
Hash SHA2-512/224 N/A 112 112 2^35 2^35 2^35 56
Hash SHA2-512/256 N/A 128 128 2^35 2^35 2^35 64
Hmac SHA1 N/A 128 128 2^35 2^35 2^35 64
Hmac SHA2-224 N/A 192 192 2^35 2^35 2^35 96
Hmac SHA2-256 N/A 256 256 2^35 2^35 2^35 128
Hmac SHA2-384 N/A 256 256 2^35 2^35 2^35 128
Hmac SHA2-512 N/A 256 256 2^35 2^35 2^35 128
Hmac SHA2-512/224 N/A 192 192 2^35 2^35 2^35 96
Hmac SHA2-512/256 N/A 256 256 2^35 2^35 2^35 128

3.2. Required Prerequisite Algorithms for DRBG Validations

Each DRBG implementation relies on other cryptographic primitives (algorithms) - see [SP800-90A] . For example, a hashDRBG uses an underlying hash 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 DRBG Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value "SHA", "HMAC", "AES", "TDES" No
valValue algorithm validation number value actual number, e.g. "123456", or "same" No
prereqAlgVal prerequistie algorithm validation object with algorithm and valValue properties see above No
prereqVals prerequistie algorithm validations array of prereqAlgVal objects see above No

3.3. Supported DRBG Algorithm Capabilities

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 DRBG mode capability advertised is a self-contained JSON object. The following JSON values are used for DRBG mode capabilities:

DRBG Mode Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
mode The algorithm mode to be validated value See Table 1 No
revision The algorithm testing revision to use. value 1.0 No
derFuncEnabled derivation function option, see the notes below Table 5 for more information. boolean true/false Yes, applicable to ctrDRBG only
entropyInputLen the supported bit lengths of the entropy input. See Table 5 notes below. Domain min - at least the maximum security strength supported by the mechanism/option, max - larger values are optional, step - increment. No
nonceLen See Table 5 notes below. Domain min - at least one half of the maximum security strength supported by the mechanism/option; max: - longer nonces are permitted, step - increment. Set to zero (0) if not supported. No
persoStringLen See Table 5 notes below. Domain min - the maximum security strength supported by the mechanism/option; max - largest supported length, step - increment to calculate all supported lengths. Set all to zero (0) if not supported. No
additionalInputLen See Table 5 notes below. Domain min - the maximum security strength supported by the mechanism/option; max - largest supported length, step - increment to calculate all supported lengths; set all to zero (0) if not supported. No
returnedBitsLen See Table 5 notes below. value No

Each DRBG algorithm capability advertised is a self-contained JSON object. The following JSON values are used for DRBG algorithm capabilities:

DRBG Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The DRBG algorithm to be validated. value See Table 1 No
prereqVals The prerequisite algorithm validations array of prereqAlgVal objects - see Section 3.2 array No
predResistanceEnabled an implementation that can be used with prediction resistance. See Table 5 notes below. array of boolean containing one or two distinct values [true], [true, false], or [false] No
reseedImplemented Reseeding of the DRBG shall be performed in accordance with the specification for the given DRBG mechanism. See Table 5 notes below. boolean true/false No
capabilities An array of objects describing the capabilities of a mode of the algorithm. See Table 4 for more information. array No

Note 2: If an implementation utilizes a nonce in the construction of a seed during instantiation, the length of the nonce shall be at least half the maximum security strength supported. See Tables 2 and 3 in [SP800-90A] for help on choosing appropriate parameter values for the tested DRBG implementation.

Note 3: If an implementation can only be used without prediction resistance, the array predResistanceEnabled shall only contain a single 'false' element.

Note 4: Implementations that either have prediction resistance always ON or always OFF, the array predResistanceEnabled shall contain two distinct elements, 'true' and 'false'.

Note 5: Implementations containing multiple equal array elements for predResistanceEnabled will be rejected.

Note 6: For ctrDRBG implementations, the derFuncEnabled property must be included.

Note 7: All DRBGs are tested at their maximum supported security strength so this is the minimum bit length of the entropy input that ACVP will accept. The maximum supported security strength is also the default value for this input. Longer entropy inputs are permitted, with the following exception: for ctrDRBG with derFuncEnabled set to false, the bit length must equal the seed length. See Tables 2 and 3 in [SP800-90A] for help on choosing appropriate parameter values for the DRBG being tested.

Note 8: ctrDRBG with derFuncEnabled set to false does not use a nonce; the nonce values, if supplied, will be ignored for this case. The default nonce bit length is one-half the maximum security strength supported by the mechanism/option. See Tables 2 and 3 in [SP800-90A] for help on choosing appropriate parameter values for the tested DRBG implementation.

Note 9: ACVP allows bit length values for persoString ranging from the maximum supported security strength except in the case of derFuncEnabled set to false, where the second personalization string length must be less than or equal to the seed length. If the implementation only supports one personalization string length, then set only that value as the range min and max and set the step to zero (0). If the implementation does not use at all a persoString, set all range parameters (min, max, step) to 0 (zero). If the implementation can work with and without persoString, set the min to zero (0), set the max to at least the maximum supported strength and set the step equal to at least the maximum supported strength to avoid testing lengths less than that. See Tables 2 and 3 in [SP800-90A] for help on choosing appropriate parameter values for the tested DRBG implementation.

Note 10: The addtionalInput configuration and restrictions are the same as those for the persoString.

4. 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 algorithm, such as Hash_DRBG, etc. This section describes the JSON schema for a test vector set used with DRBG 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.

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

4.1. Test Groups JSON Schema

The test_groups 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 DRBG JSON elements of the Test Group JSON object.

ACVP allows default bit lengths for the inputs to specific algorithms, typically communicated as numerical value zero (0). If an implementation does not support one of the defaults, the bit lengths the supported values shall be specified explicitly.

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
mode the mode of the DRBG, see Section 3.1 value No
derFunc use derivation function or not boolean, true/false Yes
predResistance use prediction resistance boolean true/false No
reSeed use reseeding boolean true/flase No
entropyInputLen entropy length value No
nonceLen nonce length; set to 0 (zero) if not used/supported. See also notes after Table 5 above. value No
persoStringLen personalization string length; set to 0 (zero) if not used/supported. See also notes after Table 5 above. value No
additonalInputLen additional input length; set to 0 (zero) if not used/supported. See also notes after Table 5 above. value No
returnedBitsLen returned bits length value No
tests Array of individual test vector JSON objects, which are defined in Section 4.2 array No

Note 11: According to SP 800-90A [SP800-90A] , a DRBG implementation has two separate controls for determining the correct test procedure for handling addtional entropy and other data in providing prediction resistance assurances. Depending on the capabilities advertised by the predResistanceEnabled and reseedImplemented flags ACVP generates test data according to the following test scenarios:

Test Procedures for Supported Prediction Resistance Options
Prediction Resistance Assurance Options Test Procedure
"predResistanceEnabled" : true; "reseedImplemented": true
Instantiate DRBG
Generate but don't output
Generate output
Uninstantiate
"predResistanceEnabled" : false; "reseedImplemented" : true
Instantiate DRBG
Reseed
Generate but don't output
Generate output
Uninstantiate
"predResistanceEnabled" : true/false; "reseedImplemented": false
Instantiate DRBG
Generate but don't output
Generate output
Uninstantiate

4.2. 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 vector to be processed by the ACVP client. The following table describes the JSON elements for each test case.

DRBG 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
entropyInput entropy value value No
nonce Value of the nonce value No
persoString value of the personlization string value No
otherInput array of additonal input/entropy input value pairs for testing. See Table 10 array No

Each test group contains an array of one or more tests. Each test object contains an otherInput object, which is an array of objects, each with the intendedUse property indicating if the particular test data is to be used for reSeed or generate - see Table 8 . Each test vector is a JSON object that represents a single test case to be processed by the ACVP client. The following table describes the JSON elements for each DRBG predcition resistance test vector.

Prediction Resistance Test Case JSON Object
JSON Value Description JSON type Optional
additionalInput value of the additional input string to use in predition resistance tests value No
entropyInput value of the entropy input to use in prediction resistance tests value No
intendedUse "reSeed", "generate" value No

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

Vector Set Response JSON Object
JSON Value Description JSON type
version Protocol version identifier value
vectorSetId Unique numeric identifier for the vector set value
testGroups Array of JSON objects that represent each test vector group. See Table 12 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.

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.

DRBG 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
returnedBits value of the computed DRBG output value No

6. Acknowledgements

TBD...

7. IANA Considerations

This memo includes no request to IANA.

8. Security Considerations

Security considerations are addressed by the ACVP specification.

9. Normative References

[ACVP] authSurName, authInitials., "ACVP Specification", 2016.
[DRBGVS] Keller, S. and T. Hall, "The NIST SP 800-90A Deterministic Random Bit Generator Validation System (DRBGVS)", October 2015.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[SP800-90A] Barker, E. and J. Kelsey, "Recommendation for Random Number Generation Using Deterministic Random Bit Generators", June 2015.

Appendix A. Example DRBG Capabilities JSON Object

The following is a example JSON object advertising support for ctrDRBG with 3KeyTDEA and all key sizes of AES.

{
  "algorithm": "ctrDRBG",
  "revision": "1.0",
  "prereqVals": [{"algorithm": "AES", "valValue": "1234"}, {"algorithm": "TDES", "valValue": "5678"}],
  "predResistanceEnabled": [
    true,
    false
  ],
  "reseedImplemented": true,
  "capabilities": [
    {
      "mode": "AES-128",
      "derFuncEnabled": true,
      "entropyInputLen": [
        256
      ],
      "nonceLen": [
        256
      ],
      "persoStringLen": [
        256
      ],
      "additionalInputLen": [
        256
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "AES-192",
      "derFuncEnabled": true,
      "entropyInputLen": [
        320
      ],
      "nonceLen": [
        320
      ],
      "persoStringLen": [
        320
      ],
      "additionalInputLen": [
        320
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "AES-256",
      "derFuncEnabled": true,
      "entropyInputLen": [
        384
      ],
      "nonceLen": [
        384
      ],
      "persoStringLen": [
        384
      ],
      "additionalInputLen": [
        384
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "TDES",
      "derFuncEnabled": true,
      "entropyInputLen": [
        232
      ],
      "nonceLen": [
        232
      ],
      "persoStringLen": [
        232
      ],
      "additionalInputLen": [
        232
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "AES-128",
      "derFuncEnabled": false,
      "entropyInputLen": [
        256
      ],
      "nonceLen": [
        256
      ],
      "persoStringLen": [
        256
      ],
      "additionalInputLen": [
        256
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "AES-192",
      "derFuncEnabled": false,
      "entropyInputLen": [
        320
      ],
      "nonceLen": [
        320
      ],
      "persoStringLen": [
        320
      ],
      "additionalInputLen": [
        320
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "AES-256",
      "derFuncEnabled": false,
      "entropyInputLen": [
        384
      ],
      "nonceLen": [
        384
      ],
      "persoStringLen": [
        384
      ],
      "additionalInputLen": [
        384
      ],
      "returnedBitsLen": 512
    },
    {
      "mode": "TDES",
      "derFuncEnabled": false,
      "entropyInputLen": [
        232
      ],
      "nonceLen": [
        232
      ],
      "persoStringLen": [
        232
      ],
      "additionalInputLen": [
        232
      ],
      "returnedBitsLen": 512
    }
  ]
}
                    

The following is a example JSON object advertising support for hashDRBG with AES-256. Note that in this example the implementation works with or without additional input and personalization data.

        {
  "algorithm": "hashDRBG",
  "revision": "1.0",
  "prereqVals": [{"algorithm": "AES", "valValue": "1234"}, {"algorithm": "SHA", "valValue": "5678"}],
  "predResistanceEnabled": [
    true,
    false
  ],
  "reseedImplemented": true,
  "capabilities": [
    {
      "mode": "SHA-1",
      "derFuncEnabled": false,
      "entropyInputLen": [
        160
      ],
      "nonceLen": [
        160
      ],
      "persoStringLen": [
        160
      ],
      "additionalInputLen": [
        160
      ],
      "returnedBitsLen": 640
    },
    {
      "mode": "SHA2-224",
      "derFuncEnabled": false,
      "entropyInputLen": [
        224
      ],
      "nonceLen": [
        224
      ],
      "persoStringLen": [
        224
      ],
      "additionalInputLen": [
        224
      ],
      "returnedBitsLen": 896
    },
    {
      "mode": "SHA2-256",
      "derFuncEnabled": false,
      "entropyInputLen": [
        256
      ],
      "nonceLen": [
        256
      ],
      "persoStringLen": [
        256
      ],
      "additionalInputLen": [
        256
      ],
      "returnedBitsLen": 1024
    },
    {
      "mode": "SHA2-384",
      "derFuncEnabled": false,
      "entropyInputLen": [
        384
      ],
      "nonceLen": [
        384
      ],
      "persoStringLen": [
        384
      ],
      "additionalInputLen": [
        384
      ],
      "returnedBitsLen": 1536
    },
    {
      "mode": "SHA2-512",
      "derFuncEnabled": false,
      "entropyInputLen": [
        512
      ],
      "nonceLen": [
        512
      ],
      "persoStringLen": [
        512
      ],
      "additionalInputLen": [
        512
      ],
      "returnedBitsLen": 2048
    },
    {
      "mode": "SHA2-512/224",
      "derFuncEnabled": false,
      "entropyInputLen": [
        224
      ],
      "nonceLen": [
        224
      ],
      "persoStringLen": [
        224
      ],
      "additionalInputLen": [
        224
      ],
      "returnedBitsLen": 896
    },
    {
      "mode": "SHA2-512/256",
      "derFuncEnabled": false,
      "entropyInputLen": [
        256
      ],
      "nonceLen": [
        256
      ],
      "persoStringLen": [
        256
      ],
      "additionalInputLen": [
        256
      ],
      "returnedBitsLen": 1024
    }
  ]
}
                    

Appendix B. Example Test Vectors JSON Object

The following is a example JSON object for ctrDRBG test vectors sent from the ACVP server to the crypto module.

              [
                { "acvVersion": <acvp-version> },
                { "vectorSetId": 1133,
                  "algorithm": "ctrDRBG",
                  "mode": "3KeyTDEA",
                  "revision": "1.0",
                  "testGroups": [
                    {
                      "tgId": 1,
                      "derFunc": true,
                      "predResistance": true,
                      "reSeed": true,
                      "entropyInputLen": 112,
                      "nonceLen": 56,
                      "persoStringLen": 112,
                      "additionalInputLen": 112,
                      "returnedBitsLen": 256,
                      "tests": [
                        {
                          "tcId": 1815,
                          "entropyInput":"78aac2cb444594e29dc97b0195b5",
                          "nonce":"41ef9c67ffe438",
                          "persoString":"b8e84de200a9239a043a7a9a6a03",
                          "otherInput" : [
                             { "intendedUse" : "generate",
                               "additionalInput":"f1e8edf002b331ec49ec0c1f18fa",
                               "entropyInput": "6cd4096638bbaeda28289582a10d"},
                            { "intendedUse" : "generate",
                              "additionalInput" : "f5357737023e3304508a00b3ba02",
                              "entropyInput" : "a0cdf5c1c670fd7b65a4f0a899e4"}
                            ]
                          },
                        {
                          "tcId": 1816,
                          "entropyInput" : "b8ab88b9c5fda8544b90a043684e",
                          "nonce": "f1bcc6ff60dd37",
                          "persoString" : "018c1f9d22f3c7f701a5f1cab07d",
                          "otherInput" : [
                             {"intendedUse" : "generate",
                              "additionalInput" : "356a6e908bfce2d660f20f3fbd1e",
                              "entropyInput" : "bed693401bfd53ce4c36c2233ada"},
                             {"intendedUse" : "generate",
                              "additionalInput" : "4321b3ab3a0ce88e02bdcd0306d9",
                              "entropyInput" : "a632ef16f20da17f02e484df4a41"}
                          ]
                        }
                      ]
                    }
                  ]
                }
	    ]
                    

The following is a example JSON object for hmacDRBG test vectors sent from the ACVP server to the crypto module.

              [
                { "acvVersion": <acvp-version> },
                { "vectorSetId": 1146,
                  "algorithm": "hmacDRBG",
                  "mode": "AES-256",
                  "revision": "1.0",
                  "testGroups": [
                    {
                      "tgId": 1,
                      "predResistance": true,
                      "reSeed": false,
                      "entropyInputLen": 256,
                      "nonceLen": 128,
                      "persoStringLen": 256,
                      "additionalInputLen": 256,
                      "returnedBitsLen": 1024,
                      "tests": [
                        {
                          "tcId": 2111,
                          "entropyInput": "ee3392c5f3de6f3f8c4f28d852afacd2cbaa89ed48d1c5d4311662962aa70a98",
                          "nonce": "b991a820fac75fd02642ad8fa651eda4",
                          "persoString": "30f3a50b0e2309dab93ea2aa095e5df8e4b2a42690572b31e53fb79a195481e5",
                          "otherInput" : [
                             {"intendedUse" : "generate",
                               "additionalInput":"4ea46abe95b2e4184113f908ae30123207d481908b7af7ef348657bbf3b4a002",
                               "entropyInput": "e4413a2e404f12c644b0b1d7a49a0fbf3d8703d571ffd02168c11b4ade6fc903"},
                             {"intendedUse" : "generate",
                              "additionalInput" : "61b7204c8fef294f2a9f2e73a83a8a7a04c38e3b3eaaed1b920abfceab912492",
                              "entropyInput" : "968ea185d1439fa2d67eb55ac93ba596b1ea679de7c6e44f80dc6f213455f1ed"}
                            ]
                          },
                        {
                          "tcId": 2112,
                          "entropyInput" : "a0ace75784b97224de2957e5f60dc85b25331fcf7901f37418d3c9de17ed4261",
                          "nonce": "b671308068fc7909a360c772f62a4c5e",
                          "persoString" : "338d5f2bd93262da154385e9ed90b7862e3c892f13e1d7d19924b2eb8b3bab21",
                          "otherInput" : [
                             {"intendedUse" : "generate",
                              "additionalInput" : "7acd8bfae17ff4edbac3437817d6b3fce12a04c4034ac6bef0b1b88f7dcd7c85",
                              "entropyInput" : "47b26bbe93a5cc19a410523a072e04333f06c54af0049fc41e66213763020ef7"},
                             {"intendedUse" : "generate",
                              "additionalInput" : "d4b24c74538e3a1083a2cc0a4414a9f558f0a2dc186e3b9a5294cd541acdad87",
                              "entropyInput" : "acb63f3b5995608a1331641cd43208444a9ec95e4bb2a438f614156b6a77c8c3"}
                          ]
                        }
                      ]
                    }
                  ]
                }
             ]
                    

The following is a example JSON object for hashDRBG test vectors sent from the ACVP server to the crypto module. In this example the implementation is tested without additional input and personalization data.

              [
                { "acvVersion": <acvp-version> },
                { "vectorSetId": 1156,
                  "algorithm": "hashDRBG",
                  "mode": "SHA2-256",
                  "revision": "1.0",
                  "testGroups": [
                    {
                      "tgId": 1,
                      "predResistance": true,
                      "reSeed": false,
                      "entropyInputLen": 256,
                      "nonceLen": 128,
                      "persoStringLen": 0,
                      "additionalInputLen": 0,
                      "returnedBitsLen": 1024,
                      "tests": [
                        {
                          "tcId": 2151,
                          "entropyInput": "ae0a3acd541d0d582a8510f3028caa143fe1e5226a8469d40b979d3a0d1bbe69",
                          "nonce": "786f03ad697332d74fad7a14604cee44",
                          "persoString": "",
                          "otherInput" : [
                               {"intendedUse" : "generate",
                                "additionalInput": "",
                                "entropyInput": "4852aed7c47fd305aa680a6557d2f6e4112342a04eb91ed9f843671d0673cecd"},
                               {"intendedUse" : "generate",
                                "additionalInput" : "",
                                "entropyInput" : "8b8a35a12e2d112685258742a9ad81931595fb06a7443329317e4eab9814e888"}
                            ]
                          },
                        {
                          "tcId": 2152,
                          "entropyInput" : "26d8c9a9b982cd7016c9208fe95b2f4003e0ebf84c1e80a4087f2bc3e0fc5674",
                          "nonce": "36dff124f908a95a022edf615618cd31",
                          "persoString" : "",
                          "otherInput" : [
                             {"intendedUse" : "generate",
                              "additionalInput" : "",
                              "entropyInput" : "648bbdc4d40571905c69e7e2b15e36e08c812a6c509cef68bf75281e87f7a154"},
                             {"intendedUse" : "generate",
                              "additionalInput" : "",
                              "entropyInput" : "fff51d05b1349506c354a0e6ee01edcff21c509dff5cbb582c8fdc01d6e8bd5b"}
                          ]
                        }
                      ]
                    }
                  ]
                }
	     ]
                    

The following is a example JSON object for hashDRBG test vectors sent from the ACVP server to the crypto module. In this example the implementation is tested with "predResistance": "no", "reSeed" : "yes" options.

              [
                { "acvVersion": <acvp-version> },
                { "vectorSetId": 1157,
                  "algorithm": "hashDRBG",
                  "mode": "SHA2-256",
                  "revision": "1.0",
                  "testGroups": [
                    {
                      "tgId": 1,
                      "predResistance": false,
                      "reSeed": true,
                      "entropyInputLen": 256,
                      "nonceLen": 128,
                      "persoStringLen": 256,
                      "additionalInputLen": 256,
                      "returnedBitsLen": 1024,
                      "tests": [
                        {
                          "tcId": 3151,
                          "entropyInput": "860d051cedbb935a32ef3ba4f4437cf67c1a85a46a13a7f4db382933629890a8",
                          "nonce": "5813070f9774d21e644d64e8d291b511",
                          "persoString": "545ba29faf1bb1bf26756782f9c1fa00170f47012b05168ad82565f594af46b1",
                          "otherInput" : [
                               {"intendedUse" : "reSeed",
                                 "additionalInput": "95b082d603393b2207975607ac6b6472bd458c5d3d4727e1e92ebc031130231d",
                                "entropyInput": "2e92955b17e7e76fc75a478ba88f5f5b805c42945cbbcf8c669b1996c52ae3af"},
                               {"intendedUse" : "generate",
                                 "additionalInput" : "ddfa41eb363d76e3943689a13d31ebd38408f26d51a83289e3d52c2081b96ad0",
                                "entropyInput" : ""},
                               {"intendedUse" : "generate",
                                "additionalInput" : "edb884991dd2507de07647901b8880d9db48b0f07d90a9ca8cb399581fa4dd55",
                                "entropyInput" : ""}
                            ]
                          },
                        {
                          "tcId": 3152,
                          "entropyInput" : "371d2944c9ace670684d34d0bdc2eb45b0193fa6e7ec216867d8eb83f1f34104",
                          "nonce": "4bb34ab1e882d97687c3f8935913ee0f",
                          "persoString" : "c5b03354a9fad34a8eb5bd28613ac34e48898979501b10ce92e9a46e19c6de42",
                          "otherInput" : [
                             {"intendedUse" : "reSeed",
                              "additionalInput" : "6e3fa8e58779fec2b5028b28fae40d25023d8d4725a91b132219fd3d3eb6e1f0",
                              "entropyInput" : "afd7e6b0b48a526e896dab46cc9689fce20df47a0a50fad812f08b310b96bccf"},
                             {"intendedUse" : "generate",
                              "additionalInput" : "deb8ed574906115a3e46b822c86dbf59f33c78052451f3a68f0eb08973bc1047",
                              "entropyInput" : ""},
                             {"intendedUse" : "generate",
                              "additionalInput" : "a554bb9b5986b89161332649dd400b2a157656f8a1a8cf4a8fb875fa3d568140",
                              "entropyInput" : ""}
                          ]
                        }
                      ]
                    }
                  ]
                }
             ]
                    

The following is a example JSON object for hashDRBG test vectors sent from the ACVP server to the crypto module. In this example the implementation is tested with "predResistance": "no", "reSeed" : "no" options.

              [
                { "acvVersion": <acvp-version> },
                { "vectorSetId": 1167,
                  "algorithm": "hashDRBG",
                  "mode": "SHA2-256",
                  "revision": "1.0",
                  "testGroups": [
                    {
                      "tgId": 1,
                      "predResistance": false,
                      "reSeed": false,
                      "entropyInputLen": 256,
                      "nonceLen": 128,
                      "persoStringLen": 256,
                      "additionalInputLen": 256,
                      "returnedBitsLen": 1024,
                      "tests": [
                        {
                          "tcId": 4151,
                          "entropyInput": "090db63c22de171068527c6ad049e4aade69d5b590efb8f582604e6e07a2c2dc",
                          "nonce": "6f7c6bec9825079cabd9478d88f337c8",
                          "persoString": "c2f1a5980619779253dc54e2d4a52bf17aed023f566cfaa109ae96e031b64bd0",
                          "otherInput" : [
                               {"intendedUse" : "generate",
                                "additionalInput": "3fc72d3cc74b6124d49fa3269be61888e5e0e7a79d16def1d24aa9c7bcb9244b",
                                "entropyInput": ""},
                               {"intendedUse" : "generate",
                                "additionalInput" : "968a3e79dbf0d3a46c715ee2d65d7cc5dc6f74d4256ab63d41250de5ba3ddbfc",
                                "entropyInput" : ""}
                            ]
                          },
                        {
                          "tcId": 4152,
                          "entropyInput" : "bd0e2dbba872bb62ca2897be7fd038f5c7162eb9358ef970f120ea32f6fd3cb9",
                          "nonce": "a97dfbaea505a3e36210a85636197b2d",
                          "persoString" : "7d0de87d097551feffb7c5232645878df2579ff93a2ed07d5f357295bd5753d8",
                          "otherInput" : [
                             {"intendedUse" : "generate",
                              "additionalInput" : "fe1adf1da7c5275b1eaa3fe3010655ed9d5539eb47cc64c864b6c1fa920b0d07",
                              "entropyInput" : ""},
                             {"intendedUse" : "generate",
                              "additionalInput" : "1df719a96103c452e644f6a4d0fd8d80865328314ec4af24ef9fdf6da4d2cd8e",
                              "entropyInput" : ""}
                          ]
                        }
                      ]
                    }
                  ]
                }
             ]
                    

Appendix C. Example Test Results JSON Object

The following is a example JSON object for ctrDRBG with 3KeyTDEA test results sent from the crypto module to the ACVP server.

          [{
              "acvVersion": <acvp-version>
            },
            {
              "vectorSetId": 1133,
              "testGroups": [{
                  "tgId": 1,
                  "tests": [{
                      "tcId": 1815,
                      "returnedBits ": "4565e85447af7134775816588f1b0faf8b402a951db17753d01809d14724449d"
                    },
                    {
                      "tcId": 1816,
                      "returnedBits": "b67acc3b2231ec54344d5be2ee8fcac72e83651b8cf2ac2bc361171b882f0965"
                    }
                  ]
                }
              ]
            }
          ]
                    

The following is a example JSON object for HMAC_DRBG test results sent from the crypto module to the ACVP server.

          [{
              "acvVersion": <acvp-version>
            },
            {
              "vectorSetId": 1146,
              "testGroups": [{
                "tgId": 1,
                "tests": [{
                    "tcId": 2111,
                    "returnedBits": "e42130fd1d920a2bcd177c0de0d5834c9b05a6ecdf3bc46e3733869f762dc2e7d97357934d8061db033670c3739369924b321216c30b3e45d9bc8c0bad61d8fdc03dffd70725e793ebfe98bc15358764402f4e2c71be4acfad898649b51c5d2625374a61be2b59833d2dfcc593eddcffbac79016b22a992ae6f5f82bae194e06"
                  },
                  {
                    "tcId": 2112,
                    "returnedBits": "495b2a0de6b5fc4545fdd5fec93362d1203b1dfef3528f7d852fb89ba1c45059bd52cb7a80176dd71c26108912be6f3c33d95d5cee92349ba6bf16db42c4c828729a9b4a5f53e60655df55f0e58753ad2785d53fc44fe98a5e214e8172554bd53047f38a67f8a5af11111e33dcc5e705824a78d661839994f3529cec5a83a9f0"
                  }
                ]
              }]
            }
          ]
                    

The following is a example JSON object for hashDRBG test results sent from the crypto module to the ACVP server.

          [{
              "acvVersion": <acvp-version>
            },
            {
              "vectorSetId": 1156,
              "testGroups": [{
                "tgId": 1,
                "tests": [{
                    "tcId": 2151,
                    "returnedBits ": "1af967534c670271e26c9b991ec975b78c84623853cd531368f5b2e81f015f97ffbb8cd4533d4354ed432fbdf8025f04786745fd006e173f34e6f01e136bd9b4db2b96919dfa12e8deecf7b7c72b1d329afa99c29e844b27ee34d468a4b20b5739c00ad405943aeb5084285468765190112c5e44756770479552f2f2913ed362"
                  },
                  {
                    "tcId": 2152,
                    "returnedBits": "8a74a8c31ea4e6e62f8a77b45da8ec9d8b75e6813f15327c5beb8cb4b56b15e85f95ace34826f8da9048be7c800b33d6c4d3c6558b3e2e0ccfe867a2c6107dc7bacf513017c1a5bcb65ce16ed49aefe764ea7a13d36ceb7f9c443a0cb81f55abcc0c7b2d7d97858ee0b237a72364e826dd6b25df84914f2b354e03fd7fea758e"
                  }
                ]
              }]
            }
          ]
                    

The following is a example JSON object for hashDRBG test results sent from the crypto module to the ACVP server.

          [{
              "acvVersion": <acvp-version>
            },
            {
              "vectorSetId": 1157,
              "testGroups": [{
                "tgId": 1,
                "tests": [{
                    "tcId": 3151,
                    "returnedBits ": "0eadc82746890ee0b6c20b10016e2fd037073d952ed075d1ad4c53f6971ee6405ec40f6fd090c639a800ab9092f537913608787fbc77efd0465a84688da189f14c0d2adba5953f07ea463f4a772bb1f52a3c589cd89231acf0ff06269611f7a908eb171143d5a78d0fb7dca8326d235f3f4f3f25a0a69f0a596d6dbac1eb0cdc"
                  },
                  {
                    "tcId": 3152,
                    "returnedBits": "6452be2ee730d7245b28efa7a0dcd50299aaa126c5aa6dc8be3ae1c75ff54c412b1776a4beba8cb7c7bf9e2ec8c7fe2de5f51c4d740e20f5d9bbef3b743c81b958e05880ad9bbc8794be156e6d4b2f6a826787ce1fb479e449a27aa99831eba6c0fc990eabff928fafa703619f85060090548e2a23911a1e5adec5ac15a29798"
                  }
                ]
              }]
            }
          ]
                    

The following is a example JSON object for hashDRBG test results sent from the crypto module to the ACVP server.

        [{
            "acvVersion": <acvp-version>
          },
          {
            "vectorSetId": 1167,
            "testGroups": [{
              "tgId": 1,
              "tests": [{
                  "tcId": 4151,
                  "returnedBits ": "5dbfd26651bc71597e8f5b06c650bbf2c8117c0735bd903027628b7d7e0658abb818ad63f67d5d9f38f3bc976a0d3c89764122acf3b6a704cd9af0c3ebbde3cd90e4787a4b90267752e5585188f572b2a7f7dfa424cf05f5a2bf49540b90a887af4b352ddf226ee62809f329652faba219c27b430172feb58b875d2611324f9e"
                },
                {
                  "tcId": 4152,
                  "returnedBits": "ff3cce0b5585172b1f93b22a00d9757f60f15f773b33a93b40f01a5e00328dcc78e8827897ec141132104dfb670b0d8ce7a60ab66e89aa5322ea3a497a6861dc0457ab86b1c28c290cef05fd52a78641172f5ef5a1511d31c8eeb9373cb0098c24e12abe3f907a1633f21defdfd2b232dedca7035de0bda31585d0b0321a9009"
                }
              ]
            }]
          }
        ]
                    

Author's Address

Apostol Vassilev (editor) National Institute of Standards and Technology 100 Bureau Dr. Gaithersburg, MD 20899 USA EMail: apostol.vassilev@nist.gov