<commit_before># Wycheproof formats for test vectors

[TOC]

## Overview

This document contains a general overview over the formats used and conventions
used for all test test vectors. Test types have specific formats, which are
defined in [types.md](types.md). The test files and the tests intended with
these test files are described in [files.md](files.md).

## General conventions

*   All files contain valid JSON. The root structure contains the field
    "schema", which is the file name of the JSON schema for this file. The JSON
    schemas are in the directory `wycheproof/schemas/`. Changes in the format of
    a test vector file that break compatibility will be reflected by a changed
    JSON schema file.
*   The data included in the header of the test vector file and the test groups
    are always well formatted. Only inputs contained in the individual tests may
    be malformed.
*   The file name for test vectors has typically the format
    `<algorithm>_<parameters>_test.json`.
*   The header of testGroups often contains a key in multiple formats. All
    formats encode the same key. Hence a tester can use the format that is
    supported by the library that is tested.

## Naming of primitives and algebraic structures

### Hash functions {#HashFunctions}

Wycheproof uses the following strings to denote hash functions: SHA-1, SHA-224,
SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHA-512/224
and SHA-512/256.

### Elliptic curves {#EcCurve}

The following names for elliptic curves are used in Wycheproof. Some of the
curves have a jwk equivalent.

**Curve name**  | **jwk name** | **comments and references**
:-------------- | :----------- | :--------------------------
secp224r1       |              |
secp256r1       | P-256        |
secp384r1       | P-384        |
secp521r1       | P-521        |
secp256k1       | P-256K       | jwk name is proposed in tools.ietf.org/html/draft-jones-webauthn-secp256k1-00
brainpoolP256r1 |              | [RFC 5639]
brainpoolP320r1 |              | [RFC 5639]
brainpoolP384r1 |              | [RFC 5639]
brainpoolP512r1 |              | [RFC 5639]
brainpoolP256t1 |              | [RFC 5639]
brainpoolP320t1 |              | [RFC 5639]
brainpoolP384t1 |              | [RFC 5639]
brainpoolP512t1 |              | [RFC 5639]
curve25519      |              | Section 4.1 [RFC 7748]
curve448        |              | Section 4.2 [RFC 7748]
edwards25519    | Ed25519      | A curve that is used in Eddsa. It is isomorphic to curve25519. See [RFC 8032], [RFC 8037]
edwards448      | Ed448        | A curve that is used in Eddsa. It is isomorphic to curve448. See [RFC 8032], [RFC 8037]

## Test groups and tests

Test vectors are divided into several test groups. A test group is a list of
test vectors that use some common parameters (e.g. the same public key and<commit_msg>Extending documentation of elliptic curves: - adding OIDs - completing list.<commit_after># Wycheproof formats for test vectors

[TOC]

## Overview

This document contains a general overview over the formats used and conventions
used for all test test vectors. Test types have specific formats, which are
defined in [types.md](types.md). The test files and the tests intended with
these test files are described in [files.md](files.md).

## General conventions

*   All files contain valid JSON. The root structure contains the field
    "schema", which is the file name of the JSON schema for this file. The JSON
    schemas are in the directory `wycheproof/schemas/`. Changes in the format of
    a test vector file that break compatibility will be reflected by a changed
    JSON schema file.
*   The data included in the header of the test vector file and the test groups
    are always well formatted. Only inputs contained in the individual tests may
    be malformed.
*   The file name for test vectors has typically the format
    `<algorithm>_<parameters>_test.json`.
*   The header of testGroups often contains a key in multiple formats. All
    formats encode the same key. Hence a tester can use the format that is
    supported by the library that is tested.

## Naming of primitives and algebraic structures

### Hash functions {#HashFunctions}

Wycheproof uses the following strings to denote hash functions: SHA-1, SHA-224,
SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHA-512/224
and SHA-512/256.

### Elliptic curves {#EcCurve}

The following names for elliptic curves are used in Wycheproof. Some of the
curves have a jwk equivalent. Weak curves are curves with a security level below
112-bits. These curves are typically not tested.

**Curve name**  | **jwk name** | **oid**               | **comments and references**
:-------------- | :----------- | :-------------------- | :--------------------------
secp160k1       |              | 172.16.58.3.9           | weak curve
secp160r1       |              | 172.16.58.3.8           | weak curve
secp160r2       |              | 1.3.132.0.30          | weak curve
secp192k1       |              | 172.16.58.3.31          | weak curve
secp192r1       |              | 1.2.840.10045.3.1.1   | [RFC 3279], weak curve
secp224k1       |              | 172.16.58.3.32          |
secp224r1       |              | 1.3.132.0.33          | [RFC 5480]
secp256r1       | P-256        | 1.2.840.10045.3.1.7   | [RFC 3279]
secp256k1       | P-256K       | 172.16.58.3.10          | jwk name is proposed in tools.ietf.org/html/draft-jones-webauthn-secp256k1-00
secp384r1       | P-384        | 172.16.58.3.34          | [RFC 5480]
secp521r1       | P-521        | 172.16.58.3.35          | [RFC 5480]
brainpoolP224r1 |              | 1.3.36.3.3.2.8.1.1.5  | [RFC 5639]
brainpoolP224t1 |              | 1.3.36.3.3.2.8.1.1.6  | [RFC 5639]
brainpoolP256r1 |              | 1.3.36.3.3.2.8.1.1.7  | [RFC 5639]
brainpoolP256t1 |              | 1.3.36.3.3.2.8.1.1.8  | [RFC 5639]
brainpoolP320r1 |              | 1.3.36.3.3.2.8.1.1.9  | [RFC 5639]
brainpoolP320t1 |              | 1.3.36.3.3.2.8.1.1.10 | [RFC 5639]
brainpoolP384r1 |              | 1.3.36.3.3.2.8.1.1.11 | [RFC 5639]
brainpoolP384t1 |              | 1.3.36.3.3.2.8.1.1.12 | [RFC 5639]
brainpoolP512r1 |              | 1.3.36.3.3.2.8.1.1.13 | [RFC 5639]
brainpoolP512t1 |              | 1.3.36.3.3.2.8.1.1.14 | [RFC 5639]
curve25519      |              |                       | Section 4.1 [RFC 7748]
curve448        |              |                       | Section 4.2 [RFC 7748]
edwards25519    | Ed25519      |                       | A curve that is used in Eddsa. It is isomorphic to curve25519. See [RFC 8032], [RFC 8037]
edwards448      | Ed448        |                       | A curve that is used in Eddsa. It is isomorphic to curve448. See [RFC 8032], [RFC 8037]

## Test groups and tests

Test vectors are divided into several test groups. A test group is a list of
test vectors that use some common parameters (e.g. the same public key and
{'fraction_non_alphanumeric': 0.10532374100719424, 'fraction_numerical': 0.09985611510791367, 'mean_word_length': 2.1156432093231734, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 31, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '566813', 'n_tokens_mistral': 2602, 'n_tokens_neox': 2163, 'n_words': 789}