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

ACVP SP800-108 Key Derivation Function Algorithm JSON Specification
draft-ietf-acvp-subkdf108-1.0

Abstract

This document defines the JSON schema for using SP800-108 KDF 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 SP800-108 KDF 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. 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 SP800-108 KDF 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.

2.1. Required Prerequisite Algorithms for SP800-108 KDF Validations

Each SP800-108 KDF implementation relies on other cryptographic primitives. For example, the KDF must utilize an underlying MAC 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 SP800-108 KDF Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value KAS, DRBG, CMAC, HMAC No
valValue algorithm validation number value actual number 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

2.2. SP800-108 KDF Algorithm Capabilities Registration

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

SP800-108 KDF Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The KDF to be validated value "KDF" No
revision The algorithm testing revision to use. value "1.0" No
prereqVals prerequistie algorithm validations array of prereqAlgVal objects See Section 2.1 No
capabilities array of JSON objects, each with fields pertaining to the KDF mode identified uniquely by the combination of the "kdfMode" and indicated properties Array of JSON objects See Section 2.4

Note: Some optional values are required depending on the algorithm. Failure to provide these values will result in the ACVP server returning an error to the ACVP client during registration.

2.3. Supported SP800-108 KDF Modes

The following SP800-108 KDF modes may be advertised by the ACVP compliant crypto module:

2.4. Supported KDF Modes Capabilities

The KDF mode capabilities are advertised as JSON objects within the 'capabilities' value of the ACVP registration message - see Table 2 . The 'capabilities' value is an array, where each array element is a JSON object corresponding to a particular KDF mode defined in this section. The 'capabilities' 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 KDF mode's capabilities are advertised as JSON objects.

The complete list of KDF key generation capabilities may be advertised by the ACVP compliant crypto module:

KDF Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
kdfMode The KDF mode for testing. value See Section 2.3 No
macMode The MAC used in the KDF. array Any non-empty subset of MACs in Section 2.5 No
supportedLengths The lengths of data the IUT supports in bits. domain Minimum must be greater than or equal to 1. Maximum must be less than or equal to 4096. No
fixedDataOrder Describes where the counter appears in the fixed data array Any non-empty subset of {"none", "after fixed data", "before fixed data", "middle fixed data", "before iterator"}. Note that "none" and "before iterator" are not valid for "counter" KDF. "middle fixed data" is not valid for "feedback" nor "double pipeline iterator" KDF. No
counterLength Valid counter lengths in bits that appears in the fixed data array Any non-empty subset of {0, 8, 16, 24, 32}. Note that 0 describes that there is no counter used. The 0 option is not valid for "counter" KDF. No
supportsEmptyIv Whether the IUT supports an empty IV for Feedback KDF. boolean true/false No
requiresEmptyIv Whether the IUT requires an empty IV for Feedback KDF. boolean true/false No

2.5. Supported SP800-108 KDF MACs

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

3. 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 Key Derivation Function (KDF), such as SNMP, SSH, etc. This section describes the JSON schema for a test vector set used with SP800-108 KDF 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
acvVersion Protocol version identifier value
vsId Unique numeric identifier for the vector set value
algorithm See Section 2.3 value
revision The algorithm testing revision to use. value
testGroups Array of test group JSON objects, which are defined in Section 3.1 array

3.1. Test Groups JSON Schema

The testGroups element at the top level in the test vector JSON object is an array of test groups. Test vectors are grouped into similar test cases to reduce the amount of data transmitted in the vector set. For instance, all test vectors that use the same key size would be grouped together. The Test Group JSON object contains meta data that applies to all test vectors within the group. The following table describes the secure hash JSON elements of the Test Group JSON object.

The KDF test group for KDF108 is as follows:

Vector Group JSON Object
JSON Value Description JSON type Optional
tgId Numeric identifier for the test group, unique across the entire vector set. value No
kdfMode The kdfMode used for the test group. See Section 2.3 for possible values value No
macMode Psuedorandom function HMAC or CMAC used value No
counterLocation "none", "after fixed data", "before fixed data", "middle fixed data", or "before iterator" value No
keyOutLength Expected length of the derived key in bits. integer No
counterLength Expected length of the counter in bits. integer No
zeroLengthIv Whether or not the group utilizes a null IV. boolean No
tests Array of individual test vector JSON objects, which are defined in Section 3.2 array No

Note: The feedback mode KDF counter location of "counter after iterator" is referenced with the option "before fixed data" in the 'counterLocation' specification.

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

Test Case JSON Object
JSON Value Description JSON type Optional
tcId Numeric identifier for the test case, unique across the entire vector set. integer No
keyIn Key derivation key. The length corresponds to the supportedLengths (see Table 3). string No
iv IV required for feedback mode. Value may be empty. If not empty, the length corresponds to the underlying macMode (see Table 3) digest size. string Yes (only provided for feedback mode)
deferred This flag indicates that the client is responsible for generating inputs (keyIn, iv). If "true", the client must generate the relevant inputs and attach to associated vector set response. boolean No

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

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

The following table describes the JSON object that represents a vector set response for KDF108.

Vector Set Response JSON Object
JSON Value Description JSON type
tcId Numeric identifier for the test case, unique across the entire vector set. value
breakLocation Where in the fixedData the counter is inserted. Only required when counterLocation is "middle fixed data". value
fixedData Fixed input data string value
keyOut The derived keying material output value
keyIn Key derivation key (see Table 6). Only required when deferred is "true". string
iv IV (see Table 6). Only required when deferred is "true". string

5. Acknowledgements

TBD...

6. IANA Considerations

This memo includes no request to IANA.

7. Security Considerations

Security considerations are addressed by the ACVP specification.

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

Appendix A. Example SP800-108 KDF Capabilities JSON Object

The following is a example JSON object advertising support for KDF.

          
{
    "algorithm": "KDF",
    "revision": "1.0",
    "prereqVals": [
        {
            "algorithm": "SHA",
            "valValue": "123456"
        },
        {
            "algorithm": "DRBG",
            "valValue": "123456"
        }
    ],
    "capabilities": [
        {
            "kdfMode": "counter",
            "macMode": [
                "CMAC-AES128",
                "CMAC-AES192",
                "CMAC-AES256",
                "CMAC-TDES",
                "HMAC-SHA-1",
                "HMAC-SHA2-224",
                "HMAC-SHA2-256",
                "HMAC-SHA2-384",
                "HMAC-SHA2-512"
            ],
            "supportedLengths": [
                {
                    "min": 8,
                    "max": 1024,
                    "increment": 1
                }
            ],
            "fixedDataOrder": [
                "after fixed data",
                "before fixed data",
                "middle fixed data"
            ],
            "counterLength": [
                8,
                16,
                24,
                32
            ],
            "supportsEmptyIv": false
        },
        {
            "kdfMode": "feedback",
            "macMode": [
                "CMAC-AES128",
                "CMAC-AES192",
                "CMAC-AES256",
                "CMAC-TDES",
                "HMAC-SHA-1",
                "HMAC-SHA2-224",
                "HMAC-SHA2-256",
                "HMAC-SHA2-384",
                "HMAC-SHA2-512"
            ],
            "supportedLengths": [
                {
                    "min": 8,
                    "max": 1024,
                    "increment": 1
                }
            ],
            "fixedDataOrder": [
                "none",
                "after fixed data",
                "before fixed data",
                "before iterator"
            ],
            "counterLength": [
                0,
                8,
                16,
                24,
                32
            ],
            "supportsEmptyIv": true,
            "requiresEmptyIv": false
        },
        {
            "kdfMode": "double pipeline iteration",
            "macMode": [
                "CMAC-AES128",
                "CMAC-AES192",
                "CMAC-AES256",
                "CMAC-TDES",
                "HMAC-SHA-1",
                "HMAC-SHA2-224",
                "HMAC-SHA2-256",
                "HMAC-SHA2-384",
                "HMAC-SHA2-512"
            ],
            "supportedLengths": [
                {
                    "min": 8,
                    "max": 1024,
                    "increment": 1
                }
            ],
            "fixedDataOrder": [
                "none",
                "after fixed data",
                "before fixed data",
                "before iterator"
            ],
            "counterLength": [
                0,
                8,
                16,
                24,
                32
            ],
            "supportsEmptyIv": false
        }
    ]
}
            
        

Appendix B. Example Test Vectors JSON Object

The following is a example JSON object for SP800-108 KDF test vectors sent from the ACVP server to the crypto module.

          
[{
		"acvVersion": "0..54"
	},
	{
		"vsId": 1564,
		"algorithm": "counterMode",
		"revision": "1.0",
		"testGroups": [{
			"tgId": 1,
			"kdfMode": "counter",
			"macMode": "CMAC-AES128",
			"counterLocation": "after fixed data",
			"keyOutLength": 1024,
			"counterLength": 8,
			"tests": [{
					"tcId": 1,
					"keyIn": "5DA38931E8D9174BC3279C8942D2DB82",
					"deferred": false
				},
				{
					"tcId": 2,
					"keyIn": "58F5426A40E3D5D2C94F0F97EB30C739",
					"deferred": false
				}
			]
		}]
	}
]
            
        

Appendix C. Example Test Results JSON Object

The following is a example JSON object for SP800-108 KDF test results sent from the crypto module to the ACVP server.

          
[{
		"acvVersion": <acvp-version>
	},
	{
		"vsId": 1564,
		"testGroups": [{
			"tgId": 1,
			"tests": [{
				"tcId": 1,
				"keyOut": "94D58F22FA9092B0375F7EE6841B6775226703E3232BF9CF496E4EF3CDE1037765DDC060C08C9B3A845E288EED171535EBA97D23DCF8F6D2D4CF9D980CB4F6D270D3A7859B1FE2BFCA81F0702B5767E35BE9B96BA65C5263EB0DECD5FA721FFA57CE208F53F910DB6087E93BEE1A24E790E1DF02C140E89E04DF5299A63B71DA",
				"fixedData": "FBF14DF02EE6C7DABCA6EF9AF59BB9A2"
			}]
		}]
	}
]
            
        

Author's Address

Barry Fussell (editor) Cisco Systems, Inc. 170 West Tasman Dr. San Jose, CA 95134 USA EMail: bfussell@cisco.com