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

ACVP TLS Key Derivation Function Algorithm JSON Specification
draft-ietf-acvp-subkdf135--tls-1.0

Abstract

This document defines the JSON schema for using SP800-135 TLS 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-135 TLS 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-135 TLS 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. Each KDF algorithm capability advertised is a self-contained JSON object.

2.1. Required Prerequisite Algorithms for KDF135 TLS Validations

Some KDF135 algorithm implementations rely on other cryptographic primitives. For example, TLS 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 Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value HMAC, SHA 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. KDF135 TLS Algorithm Capabilities JSON Values

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

SP800-135 TLS KDF Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The KDF to be validated value "kdf-components" No
mode The KDF-Component to be validated value "tls" No
revision The algorithm testing revision to use. value "1.0" No
prereqVals Prerequisite algorithm validations array of prereqAlgVal objects See Section 2.1 No
tlsVersion The version of TLS supported. array "v1.0/1.1", and "v1.2" No
hashAlg SHA functions supported if TLS Version "v1.2" is included in the registration. Note this field is only required when "v1.2" is present. array SHA2-256, SHA2-384, SHA2-512 Yes

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.

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-135 TLS 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 "kdf-components" value
mode "tls" value
revision "1.0" 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 TLS 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
tlsVersion The version of TLS used in the test group value No
hashAlg SHA version used value Yes
preMasterSecretLength Pre-master secret length in bits value No
keyBlockLength Key block length in bits value No
tests Array of individual test vector JSON objects, which are defined in Section 3.2 array No

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-135 TLS 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. value No
preMasterSecret Pre-master secret value value No
serverHelloRandom Server Hello random value value No
clientHelloRandom Client Hello random value value No
serverRandom Server random value value No
clientRandom Client random value value 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 7 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 TLS.

Vector Set Response JSON Object
JSON Value Description JSON type
tcId Numeric identifier for the test case, unique across the entire vector set. value
masterSecret Master secret value value
keyBlock Key block value of the expansion step value

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-135 TLS KDF Capabilities JSON Object

The following is a example JSON object advertising support for SHA-256.

          
{
    "algorithm": "kdf-components",
    "mode": "tls",
    "revision": "1.0",
    "prereqVals": [
        {
            "algorithm": "HMAC",
            "valValue": "123456"
        },
        {
            "algorithm": "SHA",
            "valValue": "123456"
        }
    ],
    "tlsVersion": [
        "v1.0/1.1",
        "v1.2"
    ],
    "hashAlg": [
        "SHA2-256",
        "SHA2-384",
        "SHA2-512"
    ]
}
            
        

Appendix B. Example Test Vectors JSON Object

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

          
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "algorithm": "kdf-components",
        "mode": "tls",
        "revision": "1.0",
        "testGroups": [
            {
                "tgId": 1,
                "tlsVersion": "v1.0/1.1",
                "hashAlg": "SHA-1",
                "preMasterSecretLength": 384,
                "keyBlockLength": 832,
                "tests": [
                    {
                        "tcId": 1,
                        "clientHelloRandom": "00D5EDFC0A7D8B0913DEB191B592B7AE03503F48E876D702CD7A467E823A416B",
                        "serverHelloRandom": "14D06FC8F2792762BA9E5894147583C65D3BF0DA8D9FAE4CC46A443A675AF274",
                        "clientRandom": "DDFB77CB1304A0541C6CC07779441F5018385111E368CE4D69C8E8E455737601",
                        "serverRandom": "D59EB4E444005709409C572BA8A160EE10A8BAEFC5C70BBBDD79E57D648B8ADD",
                        "preMasterSecret": "2F0D26CC2487169D83D95064A17BC70AE8C775A8C5228227A21184211B0EE26442520D7C9DA07578F8046A6A9D791351"
                    }
                ]
            }
        ]
    }
]
            
        

Appendix C. Example Test Results JSON Object

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

          
[{
		"acvVersion": <acvp-version>
	},
	{
		"vsId": 1564,
		"testGroups": [{
			"tgId": 1,
			"tests": [{
				"tcId": 1,
				"masterSecret": "38E544579C06B3F515E1CE556E8F63D72694BAD1CC27F0896EFF2C0BC0BA82B958CB2B008191656DD76FCDD0A30A1375",
				"keyBlock": "9F39392B46ABF3D852F4F31BE188909738749CAAF93A4AB6F1EBE645EAACE04B2F1792EFD16946D63674CEB0D75F44210502108ACDF4B2A6630E1706480807EC068FE16127430FF8B9C87EDE119BC91A9890D2761131169E1FB7DAC72282BB32B772BEC716C2D549"
			}]
		}]
	}
]
            
        

Author's Address

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