Internet-Draft ACVP KAS SSC ECC SP800-56Ar3 April 2024
Hammett Expires 5 October 2024 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-ietf-acvp-sub-kas-ssc-ecc-sp800-56ar3
:
Published:
Intended Status:
Informational
Expires:
Author:
R. Hammett, Ed.

ACVP KAS SSC ECC 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 5 October 2024.

Table of Contents

1. Acknowledgements

There are no acknowledgements.

2. Abstract

This document defines the JSON schema for testing KAS-SSC-ECC SP800-56Ar3 implementations with the ACVP specification.

3. 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 KAS-SSC-ECC SP800-56Ar3 implementations using ACVP.

4. Conventions

4.1. Notation conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 of [RFC2119] and [RFC8174] when, and only when, they appear in all capitals, as shown here.

4.2. Terms and Definitions

4.2.1. Prompt

JSON sent from the server to the client describing the tests the client performs

4.2.2. Registration

The initial request from the client to the server describing the capabilities of one or several algorithm, mode and revision combinations

4.2.3. Response

JSON sent from the client to the server in response to the prompt

4.2.4. Test Case

An individual unit of work within a prompt or response

4.2.5. Test Group

A collection of test cases that share similar properties within a prompt or response

4.2.6. Test Vector Set

A collection of test groups under a specific algorithm, mode, and revision

4.2.7. Validation

JSON sent from the server to the client that specifies the correctness of the response

5. Supported KAS SSC ECC

The following KAS algorithms MAY be advertised by this ACVP compliant crypto module:

Other KAS algorithms MAY be advertised by the ACVP module elsewhere.

6. Test Types and Test Coverage

This section describes the design of the tests used to validate KAS-SSC-ECC SP800-56Ar3 implementations.

6.1. Test Types

  • "AFT" - Algorithm Function Test. In the AFT test mode, the IUT SHALL act as a party in the Key Agreement with the ACVP server. The server SHALL generate and provide all necessary information for the IUT to compute a shared secret z; both the server and IUT MAY act as party U/V.
  • "VAL" - Validation test. In the VAL test mode, The ACVP server MUST generate a complete (from both party U and party V's perspectives) shared secret z, and expects the IUT to be able to determine if that shared secret is valid. Various types of conditions/errors MUST be introduced in varying portions of the key agreement process (changed Z, Z with leading zero nibble, etc), that the IUT MUST be able to detect and report on.

6.2. Test Coverage

The tests described in this document have the intention of ensuring an implementation is conformant to SP800-56Ar3 KAS Shared Secret Computation (SSC).

6.2.1. Requirements Covered

  • SP 800-56Ar3 - 4.1 Key Establishment Preparations. The ACVP server is responsible for generating domain parameters as per the IUT's capability registration.
  • SP 800-56Ar3 - 4.2 Key-Agreement Process. Both the ACVP server and IUT participate in the shared secret computation. The server and IUT can both take the roles of party U/V, and as such the "performer" of steps depicted in "Figure 2: Key Agreement process" can vary.
  • SP 800-56Ar3 - 5.6 Domain Parameters. Domain Parameter Generation SHALL be performed solely from the ACVP server, with constraints from the IUTs capabilities registration. The same set of domain parameters SHALL generate all keypairs (party U/V, static/ephemeral) for a single test case.
  • SP 800-56Ar3 - 5.6 Key-Pair Generation. While Key-Pairs are used in each KAS scheme, the generation of said key-pairs is out of scope for KAS testing.
  • SP 800-56Ar3 - 4.3 DLC-based Key-Transport Process / 5.7 DLC Primitives. Depending on the scheme used, either Diffie Hellman or MQV SHALL be used to negotiate a shared secret of z. Testing and validation of such key exchanges is covered under their respective schemes.
  • SP 800-56Ar3 - 6 Key Agreement Schemes. All schemes specified in referenced document are supported for validation with the ACVP server.

6.2.2. Requirements Not Covered

  • KAS SSC testing only covers testing of SP800-56Ar3 through the computation of a shared secret z. Additional functions of KAS as a whole such as KDF, KC, etc. MAY be covered within the scope of the full KAS testing; please see that document for further details.

7. 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 KAS-SSC-ECC SP800-56Ar3 algorithms to the ACVP server.

The algorithm capabilities MUST be 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 [ACVP] for more details on the registration message.

7.1. Prerequisites

Each algorithm implementation MAY rely on other cryptographic primitives. For example, RSA Signature algorithms depend on an underlying hash function. 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:

Prerequisites, if applicable, MUST be submitted in the registration as the prereqVals JSON property array inside each element of the algorithms array. Each element in the prereqVals array MUST contain the following properties

Table 1: Prerequisite Properties
JSON Property Description JSON Type
algorithm a prerequisite algorithm string
valValue algorithm validation number string

A "valValue" of "same" SHALL be used to indicate that the prerequisite is being met by a different algorithm in the capability exchange in the same registration.

An example description of prerequisites within a single algorithm capability exchange looks like this

"prereqVals":
[
  {
    "algorithm": "Alg1",
    "valValue": "Val-1234"
  },
  {
    "algorithm": "Alg2",
    "valValue": "same"
  }
]

7.2. Prerequisite Algorithms for KAS FFC Validations

Some algorithm implementations rely on other cryptographic primitives. For example, IKEv2 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:

Table 2: Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values Optional
algorithm a prerequisite algorithm value DRBG, ECDSA No
valValue algorithm validation number value actual number or "same" No
prereqAlgVal prerequisite algorithm validation object with algorithm and valValue properties see above Yes

KAS has conditional prerequisite algorithms, depending on the capabilities registered:

Table 3: Prerequisite requirement conditions
Prerequisite Algorithm Condition
DRBG Always REQUIRED
SHA Always REQUIRED
ECDSA ECDSA KeyGen/KeyVer validation REQUIRED when IUT makes use of the generation/validation of keys within the module boundary.

7.3. Property Registration

The KAS-SSC-ECC SP800-56Ar3 mode capabilities are advertised as JSON objects within a root "algorithm" object.

A registration SHALL use these properties:

Table 4: Registration Properties
JSON Property Description JSON Type Valid Values
algorithm Name of the algorithm to be validated string "KAS-ECC-SSC"
revision ACVP Test version string "Sp800-56Ar3"
prereqVals Prerequisites of the algorithm object See Section 7.1
scheme Array of schemes supported array of objects See Section 7.3.1
domainParameterGenerationMethods Array of strings representing the supported means of generating domain parameters array of strings See Section 7.3.2
hashFunctionZ Optional hash function to apply to the shared secret z in instances where the IUT is unable to return the z in the clear. string See Section 7.3.3

7.3.1. Schemes

Schemes MUST be registered as a dictionary (key/value pairs) where the key is a valid Section 7.3.1.1, and the value is a Section 7.3.1.2.

7.3.1.1. Scheme Identifier
  • ephemeralUnified
  • onePassMqv
  • fullUnified
  • fullMqv
  • onePassUnified
  • onePassDh
  • staticUnified
7.3.1.2. Scheme Object

The scheme object is made up of the following properties:

Table 5: Scheme Properties
JSON Property Description JSON Type Valid Values
kasRole The roles that the IUT can support for the scheme. A value of "initiator" indicates that the IUT can support the role of Party U. A value of "responder" indicates that the IUT can support the role of Party V. "initiator" and "responder" are the legacy terms (pre-SP 800-56Ar2) for Party U and Party V. array of string "initiator", "responder"

7.3.2. Domain Parameter Generation Methods

7.3.3. Hash Function Z

An optional hash function that should be applied to z from both the ACVP server and IUT for comparison purposes. The provided `hashFunctionZ's security strength MUST be at least as strong as the greatest security strength domain parameter selected from Section 7.3.2

The following hash functions MAY be advertised by an ACVP compliant server:

  • SHA2-224
  • SHA2-256
  • SHA2-384
  • SHA2-512
  • SHA2-512/224
  • SHA2-512/256
  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512

7.4. Registration Example

{
  "algorithm": "KAS-ECC-SSC",
  "revision": "Sp800-56Ar3",
  "scheme": {
    "fullMqv": {
      "kasRole": [
        "initiator",
        "responder"
      ]
    },
    "staticUnified": {
      "kasRole": [
        "initiator"
      ]
    }
  },
  "domainParameterGenerationMethods": [
    "K-233"
  ],
  "hashFunctionZ": "SHA3-512"
}

8. 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 test session would require multiple test vector sets to be downloaded and processed by the ACVP client. Each test vector set represents an individual algorithm defined during the capability exchange. This section describes the JSON schema for a test vector set used with KAS-SSC-ECC SP800-56Ar3 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.

Table 6: Top Level Test Vector JSON Elements
JSON Values Description JSON Type
acvVersion Protocol version identifier string
vsId Unique numeric vector set identifier integer
algorithm Algorithm defined in the capability exchange string
mode Mode defined in the capability exchange string
revision Protocol test revision selected string
testGroups Array of test groups containing test data, see Section 8.1 array

An example of this would look like this

[
  {
    "acvVersion": <version>
  },
  {
    "vsId": 1,
    "algorithm": "Alg1",
    "mode": "Mode1",
    "revision": "Revision1.0",
    "testGroups": [ ... ]
  }
]

8.1. Test Groups

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 KAS-SSC-ECC SP800-56Ar3 JSON elements of the Test Group JSON object

Table 7: Test Group Properties
JSON Values Description JSON Type
tgId Test group identifier integer
testType Describes the operation the client should perform on the tests data string
domainParameterGenerationMode The curve in use for key generation for the test group string
scheme KAS scheme under test string
kasRole The role of the IUT for the test group. A value of "initiator" indicates that the IUT will assume the role of Party U. A value of "responder" indicates that the IUT will assume the role of Party V. "initiator" and "responder" are the legacy terms (pre-SP 800-56Ar2) for Party U and Party V. string
hashFunctionZ The hash function applied to z (optional) string
tests Array of individual test cases See Section 8.2

The 'tgId', 'testType' and 'tests' objects MUST appear in every test group element communicated from the server to the client as a part of a prompt. Other properties are dependent on which 'testType' the group is addressing.

8.2. Test Cases

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 KAS-SSC-ECC SP800-56Ar3 test vector.

Table 8: Test Case Properties
JSON Values Description JSON Type
tcId Test case identifier integer
staticPublicServerX The server static public key X. Optional depending on scheme and test type. hex
staticPublicServerY The server static public key Y. Optional depending on scheme and test type. hex
ephemeralPublicServerX The server ephemeral public key X. Optional depending on scheme and test type. hex
ephemeralPublicServerY The server ephemeral public key Y. Optional depending on scheme and test type. hex
staticPrivateIut The IUT static private key. Optional depending on scheme and test type. hex
staticPublicIutX The IUT static public key X. Optional depending on scheme and test type. hex
staticPublicIutY The IUT static public key Y. Optional depending on scheme and test type. hex
ephemeralPrivateIut The IUT ephemeral private key. Optional depending on scheme and test type. hex
ephemeralPublicIutX The IUT ephemeral public key X. Optional depending on scheme and test type. hex
ephemeralPublicIutY The IUT ephemeral public key Y. Optional depending on scheme and test type. hex
z The computed shared secret. Included for VAL tests when registered without a hashFunctionZ hex
hashZ The hashed computed shared secret. Included for VAL tests when registered with a hashFunctionZ hex

Here is an abbreviated yet fully constructed example of the prompt

{
  "vsId": 1,
  "algorithm": "KAS-ECC-SSC",
  "revision": "Sp800-56Ar3",
  "testGroups": [
    {
      "tgId": 1,
      "testType": "AFT",
      "tests": [
        {
          "staticPublicServerX": "009DDB6E0B7488CA9B1C7E90C9EA6415055C2FC692DB320ABCD6247974A6",
          "staticPublicServerY": "003FF7BFDCD30EF76728DE7B788096A099013831EE19362B3E7839D9AFC1",
          "ephemeralPublicServerX": "011A0F740FFCBDD59453181575D3E90948876330F6AB53C9F1D879E5401E",
          "ephemeralPublicServerY": "00A2EF391F38BF071B63900DF1E046A6CABE8AFEEA8EF2D5A2C6FAECB420",
          "tcId": 1
        },
        {
          "staticPublicServerX": "0066EAAC997E1E4AB6DA167BB1D4AC7EDE71A3E31CFDF0246747AE4AD310",
          "staticPublicServerY": "01C099445608C29300F1C0B7B9D1246C3BD53239C893AF196635EE9CADC8",
          "ephemeralPublicServerX": "006E2F044F0BB01A82F25437014322C39943378AC17B67DF5FC03ED8EB8A",
          "ephemeralPublicServerY": "018265FC80EE45EBE0E4703C94C9E3E88AB12313F19E095F872CCA3D9454",
          "tcId": 2
        }
      ],
      "domainParameterGenerationMode": "K-233",
      "scheme": "fullMqv",
      "kasRole": "initiator"
    },
    {
      "tgId": 2,
      "testType": "VAL",
      "tests": [
        {
          "staticPublicServerX": "00099EA32CEF0B847A89359CE0ECA6CD90BCBEFB2E4760FE57C5D33E8AE4",
          "staticPublicServerY": "009736F48E1C165C86398B343CA5E0C4140B1D9A193770504D11DD04D6A6",
          "ephemeralPublicServerX": "00898BC3D22EA3CFF21185557EBEED8741807E4E26796D6C7AC3BAEAA727",
          "ephemeralPublicServerY": "00DE13014770A4E8E2189AD7759BE40158CB88F24C01EF6A93C1AEB69AC0",
          "staticPrivateIut": "002432C57C2FA1BAAD45E0904A26590794EF5607EB2801CF16A50BC37268",
          "staticPublicIutX": "004E3F12349A545F9B7BD5C80C1D02AAF86C59DDA60E7F9365969ED7D3F5",
          "staticPublicIutY": "00F2217558C507B02976293D804BAE9D90AE3AEB29740A7526F03B7E3A7A",
          "ephemeralPrivateIut": "0052448C1E027D3C54A0EF78A2E5AE5147F03EBAFF16CFC62D997B299984",
          "ephemeralPublicIutX": "0000C875EC6B96E960DA28CCA013FD66281F0646DB75042F523AA08B4804",
          "ephemeralPublicIutY": "0088FCD24C2A9DCCFB45A5DBEF59761E9D35B14CFE4AB8D19817A1DEE768",
          "tcId": 6,
          "z": "006DE2AF8A3C44EC58FE36CF89BDD64EA8009029DC9B96D46441159D2166"
        },
        {
          "staticPublicServerX": "01DBD694E146FF567AE27722F9A0D28484A6C73E946136DEE0D53BFA1398",
          "staticPublicServerY": "01EFDBA338166C752858881ADA717B3F3459F65F4D5A8DE1542ED48BD090",
          "ephemeralPublicServerX": "019A288B9BC2424EF2930B093E17BE2E427DB45D571DB25EA307BF5FB042",
          "ephemeralPublicServerY": "019683B12459C385BAC1819AA13778C253CA85BF56825F0EF3E1B8C891CC",
          "staticPrivateIut": "000441DC0EB9061313A3501E346DFBB1E914DA4407388DF54193B0542098",
          "staticPublicIutX": "005F489ECBD43EBF3D02A6514DA99B1DCFDED0E42633405C0D5671920571",
          "staticPublicIutY": "00E75125D3DE971B8DC7CF9D57300E959372616B24131BCBC0EE680CA9AF",
          "ephemeralPrivateIut": "0010938CC688C9036923838EB607A468ADB81A6A8D5544DA3A7BF1774D33",
          "ephemeralPublicIutX": "0151C3AFF22BA9390947FD8C59EC1A77879A1491B369B226961747B50475",
          "ephemeralPublicIutY": "00DD94325FDF311D9056512FB15A5E4AAEAC278E90533698AF9D7A8F4144",
          "tcId": 7,
          "z": "017236827F9EB5498DF3151627AE2F5D6835056F669D6D448EA219AE8E2A"
        }
      ],
      "domainParameterGenerationMode": "K-233",
      "scheme": "fullMqv",
      "kasRole": "initiator"
    }]
}

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

Table 9: Vector Set Response Properties
JSON Property Description JSON Type
acvVersion The version of the protocol string
vsId The vector set identifier integer
testGroups The test group data 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.

Table 10: Test Group Response Properties
JSON Property Description JSON Type
tgId The test group identifier integer
tests The test case data array

The following table describes the JSON object that represents a test case response for a KAS-SSC-ECC SP800-56Ar3.

Table 11: Test Case Response Properties
JSON Property Description JSON Type
tcId The test case identifier integer
testPassed Was the provided z or hashZ valid? Only valid for the "VAL" test type. boolean
staticPublicIutX The IUT static public key X. Optional depending on scheme and test type. hex
staticPublicIutY The IUT static public key Y. Optional depending on scheme and test type. hex
ephemeralPublicIutX The IUT ephemeral public key X. Optional depending on scheme and test type. hex
ephemeralPublicIutY The IUT ephemeral public key Y. Optional depending on scheme and test type. hex
z The shared secret z. Only included for "AFT" test type when a hashFunctionZ is not in use. hex
hashZ The shared secret z run through a hash function. Only included for "AFT" test type when a hashFunctionZ is in use. hex

Here is an abbreviated example of the response

{
  "vsId": 1,
  "algorithm": "KAS-ECC-SSC",
  "revision": "Sp800-56Ar3",
  "testGroups": [
    {
      "tgId": 1,
      "tests": [
        {
          "staticPublicIutX": "01ED7A443C08F1C9BDE87DB3658C10CAA4056E0B333CDEC2D65E2C15A982",
          "staticPublicIutY": "01F81685DFB8444F6EF21D98ECCFA18E368C278DEA95C08CC9D2C68BB701",
          "ephemeralPublicIutX": "001ACA6CE2243C5D3A43FFD0B4AC46997519D53AE7B0D9A5D235A5E1361B",
          "ephemeralPublicIutY": "013A61A2174371DA0DAC4CE323D90F118717B2F7BC58B35F3AEAF22413B2",
          "tcId": 1,
          "z": "0157C230E9CF02BFD5BC8D5113E10C17C9E06187413950120B0BD617BB9B"
        },
        {
          "staticPublicIutX": "00CE26A621F2E6D1B609A378F1E808BF56B6C3693B89624E6913F55B80AF",
          "staticPublicIutY": "01402453E700A4CF284403E2F4137EDBBE82D0462E7EA0AFEC57C65D328E",
          "ephemeralPublicIutX": "01B5A9002B1EDAE4F318068E60F35550C7EDFBA715A5CE3DDAD46ECF156E",
          "ephemeralPublicIutY": "011EBCC4657C8B89243A21984110603BB259B25DC7728414EC53ECE01806",
          "tcId": 2,
          "z": "00A3410290DC37BD32169B3817222D90D4CD644A0EEE44BA9F32EBE71761"
        }
      ]
    },
    {
      "tgId": 2,
      "tests": [
        {
          "tcId": 6,
          "testPassed": true
        },
        {
          "tcId": 7,
          "testPassed": true
        },
        {
          "tcId": 8,
          "testPassed": false
        },
        {
          "tcId": 9,
          "testPassed": true
        },
        {
          "tcId": 10,
          "testPassed": true
        }
      ]
    }
  ]
}

10. Security Considerations

There are no additional security considerations outside of those outlined in the ACVP document.

11. IANA Considerations

This document does not require any action by IANA.

12. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC3526]
Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)", RFC 3526, RFC 3526, DOI 10.17487/RFC3526, , <https://www.rfc-editor.org/info/rfc3526>.
[RFC7919]
Gillmor, D., "Negotiated Finite Field Diffie-Hellman Ephemeral Parameters for Transport Layer Security (TLS)", RFC 7919, RFC 7919, DOI 10.17487/RFC7919, , <https://www.rfc-editor.org/info/rfc7919>.
[RFC7991]
Hoffman, P., "The "xml2rfc" Version 3 Vocabulary", RFC 7991, RFC 7991, DOI 10.17487/RFC7991, , <https://www.rfc-editor.org/info/rfc7991>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[FIPS186-4]
National Institute of Standards and Technology, "Digital Signature Standard (DSS)", NIST FIPS 186-4, , <https://csrc.nist.gov/pubs/fips/186-4/final>.
[SP800-56Ar3]
Barker, E. B., Chen, L., Roginsky, A., Vassilev, A., and R. Davis, "Recommendation for Pair-Wise Key-Establishment Schemes Using Discrete Logarithm Cryptography", NIST SP 800-56A Rev. 3, , <https://csrc.nist.gov/pubs/sp/800/56/a/r3/final>.
[ACVP]
Hammett, R., "Automatic Cryptographic Validation Protocol", ACVP, .

Author's Address

Russell Hammett (editor)