Internet-Draft ACVP XECDH April 2026
Vandersmissen Expires 18 October 2026 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-vandersmissen-acvp-xecdh-01
:
Published:
Intended Status:
Informational
Expires:
Author:
J. Vandersmissen, Ed.

ACVP XECDH JSON 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 18 October 2026.

Table of Contents

1. Acknowledgements

There are no acknowledgements.

2. Abstract

This document defines the JSON schema for testing Elliptic Curve Diffie-Hellman using Curve25519 and Curve448 (XECDH) 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 Elliptic Curve Diffie-Hellman using Curve25519 and Curve448 (XECDH) implementations using ACVP.

This document is a work-product of the NIST Cryptographic Algorithm Validation Program (CAVP). Please communicate questions and feedback concerning this document to the CAVP by opening an issue on the usnistgov/ACVP GitHub repository at https://github.com/usnistgov/ACVP/issues.

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 XECDH Algorithms

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

6. Test Types and Test Coverage

6.1. Test Types

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

  • XECDH / keyGen / RFC7748 "AFT" - Algorithm Functional Test. The IUT is REQUIRED for each test case provided, to generate a key pair based on a curve. This information is then communicated to the ACVP server and validated.
  • XECDH / keyVer / RFC7748 "AFT" - Algorithm Functional Test. The ACVP server is REQUIRED to generate a series of public keys based on the IUT provided curve(s). The public keys generated by the server MAY or MAY NOT be valid, the IUT is REQUIRED to determine if the public keys provided in the test cases are valid or invalid keys as they relate to the curve.
  • XECDH / SSC / RFC7748 "AFT" - Algorithm Functional Test. The IUT SHALL act as a party in the Shared Secret Computation with the ACVP server. The server SHALL generate and provide all necessary information for the IUT to successfully compute a secret shared with the server.

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 XECDH 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. Required Prerequisite Algorithms for XECDH Validations

Each XECDH implementation relies on other cryptographic primitives. For example, XECDH uses an underlying DRBG 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: Required XECDH Prerequisite Algorithms JSON Values
JSON Value Description JSON type Valid Values
algorithm a prerequisite algorithm string DRBG
valValue algorithm validation number string actual number or "same"
prereqAlgVal prerequisite algorithm validation object with algorithm and valValue properties see above
prereqVals prerequisite algorithm validations array of prereqAlgVal objects see above

7.3. XECDH Algorithm Capabilities Registration

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

Table 3: XECDH Algorithm Capabilities JSON Values
JSON Value Description JSON type Valid Values
algorithm The algorithm under test string "XECDH"
mode The XECDH mode to be validated string "keyGen", "keyVer", or "SSC"
revision The algorithm testing revision to use string "RFC7748"
prereqVals prerequisite algorithm validations array of prereqAlgVal objects See Section 7.2

The follwing sections offer additional REQUIRED JSON properties for each algorithm / mode / revision.

7.3.1. The XECDH keyGen Mode Capabilities

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

7.3.1.1. XECDH keyGen Full Set of Capabilities

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

Table 4: XECDH keyGen Capabilities JSON Values
JSON Value Description JSON type Valid Values
curve The curve names supported for the IUT in keyGen array Any non-empty subset of {"Curve25519", "Curve448"}

An example of this is the following

{
    "algorithm": "XECDH",
    "mode": "keyGen",
    "revision": "RFC7748",
    "prereqVals": [{
            "algorithm": "DRBG",
            "valValue": "123456"
        }
    ],
    "curve": [
        "Curve25519",
        "Curve448"
    ]
}

7.3.2. The XECDH keyVer Mode Capabilities

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

7.3.2.1. XECDH keyVer Full Set of Capabilities

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

Table 5: XECDH keyVer Capabilities JSON Values
JSON Value Description JSON type Valid Values
curve The curve names supported for the IUT in keyVer array Any non-empty subset of {"Curve25519", "Curve448"}

An example of this is the following

{
    "algorithm": "XECDH",
    "mode": "keyVer",
    "revision": "RFC7748",
    "prereqVals": [{
            "algorithm": "DRBG",
            "valValue": "123456"
        }
    ],
    "curve": [
        "Curve25519",
        "Curve448"
    ]
}

7.3.3. The XECDH SSC Mode Capabilities

Each XECDH SSC mode capability set is advertised as a self-contained JSON object.

7.3.3.1. XECDH SSC Full Set of Capabilities

The complete list of XECDH shared secret computation capabilities may be advertised by the ACVP compliant crypto module:

Table 6: XECDH SSC Capabilities JSON Values
JSON Value Description JSON type Valid Values
curve The curve names supported for the IUT in SSC array Any non-empty subset of {"Curve25519", "Curve448"}

An example of this is the following

{
    "algorithm": "XECDH",
    "mode": "SSC",
    "revision": "RFC7748",
    "prereqVals": [{
            "algorithm": "DRBG",
            "valValue": "123456"
        }
    ],
    "curve": [
        "Curve25519",
        "Curve448"
    ]
}

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 session would require multiple test vector sets to be downloaded and processed by the ACVP client. Each test vector set represents an individual XECDH function. This section describes the JSON schema for a test vector set used with XECDH 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 7: Vector Set JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier string
vsId Unique numeric identifier for the vector set string
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 group JSON objects, which are defined in Section 8.1, Section 8.3, and Section 8.5 array

An example of this would look like this

{
  "acvVersion": "version",
  "vsId": 1,
  "algorithm": "Alg1",
  "mode": "Mode1",
  "revision": "RFC7748",
  "testGroups": [ ... ]
}

8.1. XECDH keyGen 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 JSON elements of the Test Group JSON object.

The test group for XECDH / keyGen / RFC7748 is as follows:

Table 8: XECDH keyGen Test Group JSON Object
JSON Value Description JSON type
tgId The test group identifier integer
curve The curve type used for the test vectors string
testType The testType for the group string
tests Array of individual test vector JSON objects, which are defined in Section 8.2 array

8.2. XECDH keyGen 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 XECDH test vector.

Table 9: Test Case JSON Object
JSON Value Description JSON type
tcId Numeric identifier for the test case, unique across the entire vector set integer

The following is an example of a prompt for XECDH / keyGen / RFC7748

[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1234,
        "algorithm": "XECDH",
        "mode": "keyGen",
        "revision": "RFC7748",
        "testGroups": [
            {
                "tgId": 1,
                "curve": "Curve25519",
                "testType": "AFT",
                "tests": [
                    {
                        "tcId": 1
                    }
                ]
            }
        ]
    }
]

8.3. XECDH keyVer 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 JSON elements of the Test Group JSON object.

The test group for XECDH / keyVer / RFC7748 is as follows:

Table 10: XECDH keyVer Test Group JSON Object
JSON Value Description JSON type
tgId The test group identifier integer
curve The curve type used for the test vectors string
testType The testType for the group string
tests Array of individual test vector JSON objects, which are defined in Section 8.4 array

8.4. XECDH keyVer 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 XECDH test vector.

Table 11: Test Case JSON Object
JSON Value Description JSON type
tcId Numeric identifier for the test case, unique across the entire vector set integer
publicKey The (little-endian encoded) XECDH public key hex

The following is an example of a prompt for XECDH / keyVer / RFC7748

[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1234,
        "algorithm": "XECDH",
        "mode": "keyVer",
        "revision": "RFC7748",
        "testGroups": [
            {
                "tgId": 1,
                "curve": "Curve25519",
                "testType": "AFT",
                "tests": [
                    {
                        "tcId": 1,
                        "publicKey": "2DAD64ED8A...",
                    }
                ]
            }
        ]
    }
]

8.5. XECDH SSC 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 curve 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 JSON elements of the Test Group JSON object.

The test group for XECDH / SSC / RFC7748 is as follows:

Table 12: XECDH SSC Test Group JSON Object
JSON Value Description JSON type
tgId The test group identifier integer
curve The curve type used for the test vectors string
testType The testType for the group string
tests Array of individual test vector JSON objects, which are defined in Section 8.6 array

8.6. XECDH SSC 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 XECDH test vector.

Table 13: Test Case JSON Object
JSON Value Description JSON type
tcId Numeric identifier for the test case, unique across the entire vector set integer
publicServer The (little-endian encoded) server's XECDH public key hex

The following is an example of a prompt for XECDH / SSC / RFC7748

[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1234,
        "algorithm": "XECDH",
        "mode": "SSC",
        "revision": "RFC7748",
        "testGroups": [
            {
                "tgId": 1,
                "testType": "AFT",
                "curve": "Curve25519",
                "tests": [
                    {
                        "tcId": 1,
                        "publicServer": "47765AC7B6..."
                    },
                    {
                        "tcId": 2,
                        "publicServer": "F00F87E4CC..."
                    },
                    {
                        "tcId": 3,
                        "publicServer": "8DD0547F17..."
                    }
                ]
            }
        ]
    }
]

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

Table 14: Vector Set Response JSON Object
JSON Value Description JSON type
acvVersion Protocol version identifier string
vsId Unique numeric identifier for the vector set integer
testGroups Array of JSON objects that are defined in Section 9.1, Section 9.2 and Section 9.3 array

9.1. XECDH keyGen Test Group Responses

The following table describes the JSON object that represents a test group response for XECDH / keyGen / RFC7748.

Table 15: XECDH keyGen Test Group Response JSON Object
JSON Value Description JSON type
tgId Unique numeric identifier for the test group integer
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 XECDH / keyGen / RFC7748.

Table 16: XECDH keyGen Test Case Response JSON Object
JSON Value Description JSON type
tcId The test case identifier integer
privateKey The (little-endian encoded) private key hex
publicKey The (little-endian encoded) public key hex

The following is an example of the response for XECDH / keyGen / RFC7748

[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1234,
        "testGroups": [
            {
                "tgId": 1,
                "tests": [
                    {
                        "tcId": 1,
                        "privateKey": "9DD56FCF1E...",
                        "publicKey": "9A77B54FE9..."
                    }
                ]
            }
        ]
    }
]

9.2. XECDH keyVer Test Group Responses

The following table describes the JSON object that represents a test group response for XECDH / keyVer / RFC7748.

Table 17: XECDH keyVer Test Group Response JSON Object
JSON Value Description JSON type
tgId Unique numeric identifier for the test group integer
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 XECDH / keyVer / RFC7748.

Table 18: XECDH keyVer Test Case Response JSON Object
JSON Value Description JSON type
tcId The test case identifier integer
testPassed Whether or not the public key provided was valid boolean

The following is an example of the response for XECDH / keyVer / RFC7748

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

9.3. XECDH SSC Test Group Responses

The following table describes the JSON object that represents a test group response for XECDH / SSC / RFC7748.

Table 19: XECDH SSC Test Group Response JSON Object
JSON Value Description JSON type
tgId Unique numeric identifier for the test group integer
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 XECDH / SSC / RFC7748.

Table 20: XECDH SSC Test Case Response JSON Object
JSON Value Description JSON type
tcId The test case identifier integer
publicIut The (little-endian encoded) IUT's XECDH public key hex
z The shared secret Z hex

The following is an example of the response for XECDH / SSC / RFC7748

[
    {
        "acvVersion": <acvp-version>
    },
    {
        "vsId": 1234,
        "testGroups": [
            {
                "tgId": 1,
                "tests": [
                    {
                        "tcId": 1,
                        "publicIut": "A642C3C8E...",
                        "z": "454E7B7320..."
                    },
                    {
                        "tcId": 2,
                        "publicIut": "C7F611263...",
                        "z": "079E3669F4..."
                    },
                    {
                        "tcId": 3,
                        "publicIut": "A642C3C8E...",
                        "z": "454E7B7320..."
                    }
                ]
            }
        ]
    }
]

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>.
[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>.
[RFC7748]
Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, RFC 7748, DOI 10.17487/RFC7748, , <https://www.rfc-editor.org/info/rfc7748>.
[ACVP]
Hammett, R., Fussell, B., Vassilev, A., and H. Booth, "Automatic Cryptographic Validation Protocol", .

Author's Address

Joachim Vandersmissen (editor)