TBD C. Celi, Ed.
Internet-Draft National Institute of Standards and Technology
Intended status: Informational August 1, 2018
Expires: February 2, 2019

ACVP EDDSA Algorithm JSON Specification
draft-ietf-acvp-subeddsa-1.0

Abstract

This document defines the JSON schema for using EDDSA 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 EDDSA 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. Supported EDDSA Algorithms

The following EDDSA algorithms MAY be advertised by the ACVP compliant cryptographic module:

3. Test Types and Test Coverage

The ACVP server performs a set of tests on the specified EDDSA algorithm in order to assess the correctness and robustness of the implementation. A typical ACVP validation session SHALL require multiple tests to be performed for every supported permutation of EDDSA capabilities. This section describes the design of the tests used to validate implementations of the EDDSA algorithms.

3.1. Test Coverage

TBD...

3.1.1. Requirements Covered

3.1.2. Requirements Not Covered

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

4.1. Required Prerequisite Algorithms for EDDSA Validations

Each EDDSA implementation relies on other cryptographic primitives. For example, EDDSA 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 EDDSA Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value DRBG, DRBG_OPT2, SHA, SHA_OPT2, SHA_OPT3 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

4.2. EDDSA Algorithm Capabilities Registration

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

EDDSA Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm The algorithm under test value "EDDSA" No
mode The EDDSA mode to be validated value "keyGen", "keyVer", "sigGen", or "sigVer" No
revision The algorithm testing revision to use. value "1.0" No
prereqVals prerequistie algorithm validations array of prereqAlgVal objects See Section 4.1 No
capabilities array of JSON objects, each with fields pertaining to the global EDDSA mode indicated above and identified uniquely by the combination of the EDDSA "mode" and indicated properties Array of JSON objects See Section 4.3

4.3. Supported EDDSA Modes Capabilities

The EDDSA 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 EDDSA 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 EDDSA mode's capabilities are advertised as JSON objects.

4.3.1. The keyGen Mode Capabilities

The EDDSA keyGen mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message.

Each EDDSA keyGen mode capability set is advertised as a self-contained JSON object.

4.3.1.1. keyGen Full Set of Capabilities

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

EDDSA keyGen Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
curve The curve names supported for the IUT in keyGen. array Any non-empty subset of {"ED-25519", "ED-448"} No
secretGenerationMode The method used to generate the randomness incoporated in the key. array Any non-empty subset of {"extra bits", "testing candidates"} No

4.3.2. The keyVer Mode Capabilities

The EDDSA keyVer mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message.

Each EDDSA keyVer mode capability set is advertised as a self-contained JSON object.

4.3.2.1. keyVer Full Set of Capabilities

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

EDDSA keyVer Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
curve The curve names supported for the IUT in keyVer. array Any non-empty subset of {"ED-25519", "ED-448"} No

4.3.3. The sigGen Mode Capabilities

The EDDSA sigGen mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message.

Each EDDSA sigGen mode capability set is advertised as a self-contained JSON object.

4.3.3.1. sigGen Full Set of Capabilities

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

EDDSA sigGen Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
curve The curve names supported for the IUT in sigGen. array Any non-empty subset of {"ED-25519", "ED-448"} No
pure If the IUT supports normal 'pure' sigGen functionality bool true/false No
preHash If the IUT supports accepting a preHashed message to sign bool true/false No

4.3.4. The sigVer Mode Capabilities

The EDDSA sigVer mode capabilities are advertised as JSON objects, which are elements of the 'capabilities' array in the ACVP registration message. See the ACVP specification for details on the registration message.

Each EDDSA sigVer mode capability set is advertised as a self-contained JSON object.

4.3.4.1. sigVer Full Set of Capabilities

The complete list of EDDSA signature verification capabilities may be advertised by the ACVP compliant crypto module:

EDDSA sigVer Capabilities JSON Values
JSON Value Description JSON type Valid Values Optional
curve The curve names supported for the IUT in sigVer. array Any non-empty subset of {"ED-25519", "ED-448"} No
pure If the IUT supports normal 'pure' sigGen functionality bool true/false No
preHash If the IUT supports accepting a preHashed message to sign bool true/false No

5. 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 EDDSA function. This section describes the JSON schema for a test vector set used with EDDSA 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 EDDSA value
mode The EDDSA mode 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.1 array

5.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 test group for EDDSA is as follows:

Vector Group JSON Object
JSON Value Description JSON type Optional
curve The curve type used for the test vectors. value No
secretGenerationMode The method of generating a secret used for key generation in the test vectors. value Yes
testType The testType for the group. Either AFT or BFT. value No
q The encoded public key point value Yes
preHash Denotes whether or not the IUT should accept the message as a preHashed message before signing bool Yes
tests Array of individual test vector JSON objects, which are defined in Section 5.2 array No

5.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 EDDSA 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
q The encoded public key curve point value Yes
signature The signature value Yes
message The message used to generate signature or verify signature value Yes
context The context used to generate signature or verify signature value Yes

6. 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 group of results, as defined by the tables below array

The following table describes the JSON object that represents a test group response for EDDSA.

Test Group Response JSON Object
JSON Value Description JSON type
tgId Unique numeric identifier for the test group value
q Optional encoded public key for the group value
tests Array of JSON objects that represent each result, as defined by the table below array

The following table describes the JSON object that represents a test case response for EDDSA.

Test Case Response JSON Object
JSON Value Description JSON type Optional
d The encoded private key point value Yes
q The encoded public key point value Yes
signature The signature component S value Yes
testPassed The pass or fail result of the verify or validation true/false Yes

7. Acknowledgements

TBD...

8. IANA Considerations

This memo includes no request to IANA.

9. Security Considerations

Security considerations are addressed by the ACVP specification.

10. 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 Capabilities JSON Object

A.1. Example EDDSA Capabilities JSON Object

The following sections contain example JSON for the various EDDSA modes: keyGen, keyVer, sigGen, and sigVer. Note that all binary HEX representations are in big-endian byte order but little-endian bit format.

                        
[{
		"algorithm": "EDDSA",
		"mode": "keyGen",
		"revision": "1.0",
		"prereqVals": [{
				"algorithm": "SHA",
				"valValue": "123456"
			},
			{
				"algorithm": "DRBG",
				"valValue": "123456"
			}
		],
		"curve": [
			"ED-25519",
			"ED-448"
		],
		"secretGenerationMode": [
			"extra bits",
			"testing candidates"
		]
	},
	{
		"algorithm": "EDDSA",
		"mode": "keyVer",
		"revision": "1.0",
		"prereqVals": [{
				"algorithm": "SHA",
				"valValue": "123456"
			},
			{
				"algorithm": "DRBG",
				"valValue": "123456"
			}
		],
		"curve": [
			"ED-25519",
			"ED-448"
		]
	},
	{
		"algorithm": "EDDSA",
		"mode": "sigGen",
		"revision": "1.0",
		"prereqVals": [{
				"algorithm": "SHA",
				"valValue": "123456"
			},
			{
				"algorithm": "DRBG",
				"valValue": "123456"
			}
		],
		"pure": true,
		"preHash": true,
		"curve": [
			"ED-25519",
			"ED-448"
		]
	},
	{
		"algorithm": "EDDSA",
		"mode": "sigVer",
		"revision": "1.0",
		"prereqVals": [{
				"algorithm": "SHA",
				"valValue": "123456"
			},
			{
				"algorithm": "DRBG",
				"valValue": "123456"
			}
		],
		"pure": true,
		"preHash": true,
		"curve": [
			"ED-25519",
			"ED-448"
		]
	}

]
            
                    

Appendix B. Example Vector Set Request/Responses JSON Object

B.1. Example Test EDDSA KeyGen JSON Object

The following is a example JSON object for EDDSA KeyGen, test vectors sent from the ACVP server to the crypto module and the response.

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "algorithm": "EDDSA",
        "mode": "keyGen",
        "revision": "1.0",
        "testGroups": [
            {
                "curve": "ED-25519",
                "secretGenerationMode": "extra bits",
				"testType": "AFT",
                "tests": [
                    {
                        "tcId": 1
                    }
                ]
            }
        ]
    }
]
            
                    

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

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "testGroups": [
            {
				"tgId": 1,
				"tests": [
					{
						"tcId": 1,
						"q": "D51FB3D405A636227833A0950A2F4EDAF547F50448D7F371D0E9353F207B2B09",
						"d": "147BA261D11CD323331D87C22E215724E9CD5E6B6BEAC85A9808241D9E80781F"
					}
				]
            }
        ]
    }
]
            
                    

B.2. Example Test EDDSA KeyVer JSON Object

The following is a example JSON object for EDDSA KeyVer, test vectors sent from the ACVP server to the crypto module and the response.

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "algorithm": "EDDSA",
        "mode": "keyVer",
        "revision": "1.0",
        "testGroups": [
            {
				"tgId": 1,
                "curve": "ED-25519",
				"testType": "AFT",
                "tests": [
                    {
                        "tcId": 1,
                        "q": "227093C50F7D04A41121CEFDF076CC8B21D44E7506F341F8BFAB269CE06F2B7E",
                    }
                ]
            }
        ]
    }
]
            
                    

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

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
		"testGroups": [
			{
				"tgId": 1,
				"tests": [
					{
						"tcId": 1,
						"testPassed": true
					}
				]
            }
        ]
    }
]
            
                    

B.3. Example Test EDDSA Signature Generation JSON Object

The following is a example JSON object for EDDSA SigGen, test vectors sent from the ACVP server to the crypto module and the response.

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "algorithm": "EDDSA",
        "mode": "sigGen",
        "revision": "1.0",
        "testGroups": [
            {
				"tgId": 1,
				"testType": "AFT",
                "curve": "ED-25519",
				"preHash": false,
                "tests": [
                    {
                        "tcId": 1,
                        "message": "A81C8A22735A260CB1A8105A2964646097D8A9B110701AB0D49C9071836CAD39E31F5020D24B2C841FAC58F44F3F3F814495B063A686F6F93C5C6D9FDF45B9099C609A69E6A9F6483C5038066A560D413C6FB73D76499A7D8836C9C89368D557B2C24A5D817CF1FBD226AC41037E3005250007B49C6CCCE7BD1BE5D7A5C96EE8"
                    }
                ]
            },
			{
				"tgId": 5,
				"testType": "bft",
				"curve": "ED-25519",
				"preHash": false,
				"tests": [
					{
						"tcId": 41,
						"message": "F27E9F9D"
					},
					{
						"tcId": 42,
						"message": "F27E9F9C"
					},
					{
						"tcId": 43,
						"message": "F27E9F9F"
					}
				]
			}
        ]
    }
]
            
                    

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

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "testGroups": [
            {
				"tgId": 1,
				"q": "4BA34FE699DBDC89750FF006AA35E282BF71C180B53C2DE620676C8707A14E48",
				"tests": [
					{
						"tcId": 1,
						"signature": "772990B0E53B3E21DC8BD139CECB39892D75BD70DAFFDC73E241E29515E67CC642CB2A6B479FFEF4F3F16B5BC3DDF06AB25A92028F2DC0464B3CFDFD3B8F4D08"
					}
				]
            },
			{
				"tgId": 5,
				"q": "ADD51513B67540E3A392721742C7E81F1BAE77DEFC16314E32A06976BA9BBFF7",
				"tests": [
					{
						"tcId": 41,
						"signature": "6EA857E68CEC0825EAD378A2F445BB17993D151CF9A168A44F47E13D356F6DC9AA67517DE4A2FB22BA24E1732DA0234427A2572CBE80294277F2141498E7F50E"
					},
					{
						"tcId": 42,
						"signature": "883B0336036509FC44CD2E507C5E916696213F9CF2429796E248516EFBDFAFE5C98EE6DBF82314B6FB5403383BC2E4ECCC89C7D686FE3A630B74866A0126740C"
					},
					{
						"tcId": 43,
						"signature": "E402705AC2EFC216EB7FA1AC5461A8451CE6F72B0AFA63D75BFBD5C4DD98A07207168CC6A542F01AAC6C31EC1C09062B053A54F6C93B801460FE33348B87DD03"
					}
				]
			}
        ]
    }
]
          
                    

B.4. Example Test EDDSA SigVer JSON Object

The following is a example JSON object for EDDSA SigVer, test vectors sent from the ACVP server to the crypto module and the response.

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "algorithm": "EDDSA",
        "mode": "sigVer",
        "revision": "1.0",
        "testGroups": [
            {
				"tgId": 1,
				"testType": "AFT"
                "curve": "ED-25519",
                "preHash": false,
				"q": "502A28FAF736CBCF1B51A3816CADC61D6B46699149A442BA741B378386B7120C",
                "tests": [
                    {
                        "tcId": 1,
                        "message": "BED1D245D569D5C10693F408A195D0404D3F27DFD0C670034A99AFD5F33E84690812516F4335ED6B2D5FD824075B061D7BA5731DCA4EF01040167AC2D40320DEB7FC63A8B34CE5C05CF22EC0D7B11AC55C84D8131D3C656CBA05BB29F64A5D5C20AFD5212163A254B9915A30BBAB15FB3F710C325F408E8D1E840B55A09F52B7",
                        "signature": "9C09C0FF50B61E4443DBA5D1262B7CE6DDD3742BCAF288B0A17078F78ECB2480976448A177FFBB6E39FC9C02ABFA63806D664248C67803E4023A681E9930550F"
                    }
                ]
            }
        ]
    }
]
            
                    

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

                        
[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1564,
        "testGroups": [
            {
				"tgId": 1,
				"tests": [
					{
                		"tcId": 1,
                		"testPassed": false
					}
				]
            }
        ]
    }
]
          
                    

Author's Address

Christopher Celi (editor) National Institute of Standards and Technology 100 Bureau Dr. Gaithersburg, MD 20850 USA EMail: christopher.celi@nist.gov