Test vector types

October 25, 2025 ยท View on GitHub

Version: 0.8rc21

[TOC]

AeadTestGroup

A test group for authenticated encryption with additional data.

Fields in AeadTestGroup are:

nametypedescenum
ivSizeintThe IV size in bits. All IV sizes are multiple of 8 bits.
keySizeintthe keySize in bits
tagSizeintThe expected size of the tag in bits. This is the size that should be used to initialize instance of the cipher. The actual tag in the test vector may have a different size. Such a test vector is always invalid and an implementation is expected to reject such tags. All tag sizes are multiples of 8 bits.
typestrthe type of the test'AeadTest'
testsList of AeadTestVectora list of test vectors

AeadTestVector

A test vector for authenticated encryption with additional data.

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe key
ivHexBytesthe nonce
aadHexBytesadditional authenticated data
msgHexBytesthe plaintext
ctHexBytesthe ciphertext (without iv and tag)
tagHexBytesThe authenticatian tag. Most encryption append the tag to the ciphertext. Encryption results in the concatenation ct || tag and decryption expects ct || tag as input. There are however some exceptions. For example AEAD-AES-SIV-CMAC (RFC 5297) computes a synthetic IV (SIV), which is used to initialize the counter for AES. The typical encoding here is to prepend the SIV. I.e. implementations would expect ciphertext of the form tag || ct or iv || tag || ct.

Used in AeadTestGroup.

AsnSignatureTestVector

A test vector with an ASN.1 encoded public key signature. For example, ECDSA and DSA signatures are a pair of integers (r,s). These integers can be encoded in different ways. A popular encoding is to represent the integers as an ASN Sequence. The expectation is that any library generates only DER encoded signatures. Some libraries are also strict in the sense that only DER encoded signautes are accepted. Other libraries accept some signatures where the pair (r,s) uses an alternative BER encoding assuming of course that the encoded (r,s) is valid.

Fields additional to the fields in TestVector are:

nametypedesc
msgHexBytesThe message to sign
sigAsnAn ASN encoded signature for msg

Used in DsaTestGroup, EcdsaBitcoinTestGroup, EcdsaTestGroup.

DaeadTestGroup

Fields in DaeadTestGroup are:

nametypedescenum
keySizeintthe keySize in bits
typestrthe type of the test'DaeadTest'
testsList of DaeadTestVectora list of test vectors

DaeadTestVector

A test vector used for authenticated deterministic encryption with additional data.

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe key
aadHexBytesadditional authenticated data
msgHexBytesthe plaintext
ctHexBytesthe ciphertext including tag

Used in DaeadTestGroup.

DsaP1363TestGroup

A test group for DSA signatures using IEEE P1363 encoding. The test vectors in this group are meant for signature verification. The test group contains the same public key for the signatures in multiple representations. The public keys are valid with the sole exception that they may use short keys and weak hash functions such as SHA-1.

Fields in DsaP1363TestGroup are:

nametypedescenum
keyDsaPublicKeyunencoded EC public key
keyDerDerDER encoded public key
keyPemPemPem encoded public key
shaMdNamethe hash function used for DSA
typestrthe type of the test'DsaP1363Verify'
testsList of SignatureTestVectora list of test vectors

DsaPrivateKey

A DSA private key. This implementation of DSA must only be used for testing rsp. for generating test vectors. It has not been checked for flaws and in some cases may even avoid necessary checks so that it can be used for flawed test vectors.

nametypedescenum
gBigIntthe generator of the multiplicative subgroup
keySizeintthe key size in bits
pBigIntthe modulus p
qBigIntthe order of the generator g
typestrthe key type'DsaPrivateKey'
xBigIntthe private key value
yBigIntthe public key value

DsaPublicKey

The public key for DSA.

nametypedescenum
gBigIntthe generator of the multiplicative subgroup
keySizeintthe key size in bits
pBigIntthe modulus p
qBigIntthe order of the generator g
typestrthe key type'DsaPublicKey'
yBigIntthe public key value

DsaTestGroup

Fields in DsaTestGroup are:

nametypedescenum
keyDsaPublicKeyunencoded DSA public key
keyDerDerDER encoded public key
keyPemPemPem encoded public key
shaMdNamethe hash function used for DSA
typestrthe type of the test'DsaVerify'
testsList of AsnSignatureTestVectora list of test vectors

EcPointTestGroup

Fields in EcPointTestGroup are:

nametypedescenum
curveEcCurvethe name of the elliptic curve
encodingstrthe encoding used'compressed', 'uncompressed'
typestrthe type of the test'EcPointTest'
testsList of EcPointTestVectora list of test vectors

EcPointTestVector

Fields additional to the fields in TestVector are:

nametypedesc
encodedHexBytesX509 encoded point on the curve
xBigIntx-coordinate of the point
yBigInty-coordinate of the point

Used in EcPointTestGroup.

EcPublicKey

An EC public key. The EC public key can specify the underlying curve parameters in two ways. (1) as a named curve (2) as a structure containing the curve parameters generator, order and cofactor.

nametypedescenum
curve(EcUnnamedGroup or EcNamedGroup)the EC group used by this public key
keySizeintthe key size in bits
typestrthe key type'EcPublicKey'
uncompressedHexBytesX509 encoded public key point in hexadecimal format
wxBigIntthe x-coordinate of the public key point
wyBigIntthe y-coordinate of the public key point

EcPublicKeyOnNamedCurve

An EC public key. This data type allows only named curves to specify the underlying EC parameters.

nametypedescenum
curveEcNamedGroupthe EC group used by this public key
keySizeintthe key size in bits
typestrthe key type'EcPublicKey'
uncompressedHexBytesX509 encoded public key point in hexadecimal format
wxBigIntthe x-coordinate of the public key point
wyBigIntthe y-coordinate of the public key point

EcPublicKeyTestGroup

Fields in EcPublicKeyTestGroup are:

nametypedescenum
encodingstrthe encoding of the encoded keys'asn', 'pem', 'webcrypto'
typestrthe type of the test'EcPublicKeyVerify'
testsList of EcPublicKeyTestVectora list of test vectors

EcPublicKeyTestVector

Draft version for test vectors that test importing of EC public keys. The test vectors contain modified EC public keys. The goal of the test is to recognize if importing the EC public keys notices inconsistencies and bad formatting.

Fields additional to the fields in TestVector are:

nametypedesc
encodedAsnEncoded EC public key over a prime order field
pBigIntThe order of underlying field
nBigIntThe order of the generator
aBigIntThe value a of the Weierstrass equation
bBigIntThe value b of the Weierstrass equation
gxBigIntx-coordinate of the generator
gyBigInty-coordinate of the generator
h(int or null)[optional] the cofactor
wxBigIntx-coordinate of the public point
wyBigInty-coordinate of the public point

Used in EcPublicKeyTestGroup.

EcUnnamedGroup

An unnamed EC group

nametypedescenum
aBigIntcoefficient a of the elliptic curve equation
bBigIntcoefficient b of the elliptic curve equation
gxBigIntthe x-coordinate of the generator
gyBigIntthe y-coordinate of the generator
hintthe cofactor
nBigIntthe order of the generator
pBigIntthe order of the underlying field
typestran unnamed EC group over a prime field in Weierstrass form'PrimeOrderCurve'

EcdhEcpointTestGroup

Fields in EcdhEcpointTestGroup are:

nametypedescenumoptional
curveEcCurvethe curve of the private key
encodingstrthe encoding of the public key'ecpoint'True
typestrthe type of the test'EcdhEcpointTest'
testsList of EcdhEcpointTestVectora list of test vectors

EcdhEcpointTestVector

Fields additional to the fields in TestVector are:

nametypedescref
publicAsnASN encoded public pointX9.62, Section 4.3.6
privateBigIntThe private exponent
sharedHexBytesThe shared secret key

Used in EcdhEcpointTestGroup.

EcdhPemTestGroup

Fields in EcdhPemTestGroup are:

nametypedescenumoptional
curveEcCurvethe curve of the private key
encodingstrthe encoding of the keys'pem'True
typestrthe type of the test'EcdhPemTest'
testsList of EcdhPemTestVectora list of test vectors

EcdhPemTestVector

Fields additional to the fields in TestVector are:

nametypedesc
publicPemPem encoded public key. The test vectors check against invalid curve attacks. Hence some test vectors contain keys that are not on the curve, test vectors that use different curve or even public keys from different primitives.
privatePemPem encoded private key. The key is always valid.
sharedHexBytesThe shared secret key

Used in EcdhPemTestGroup.

EcdhTestGroup

Fields in EcdhTestGroup are:

nametypedescenumoptional
curveEcCurvethe curve of the private key
encodingstrthe encoding of the keys. There are test vector files for a number of encodings (raw, asn, pem, ...) to simplify testing libraries that only allow keys with certain encodings. This field however, has become somewhat redundant, since the schema defines the format.'asn'True
typestrthe type of the test'EcdhTest'
testsList of EcdhTestVectora list of test vectors

EcdhTestVector

Fields additional to the fields in TestVector are:

nametypedesc
publicAsnX509 encoded public key. The encoding of the public key contains the type of the public key, the curve and possibly the curve parameters. The test vectors contain cases where these fields do not match the curve in the testGroup.
privateBigIntthe private key
sharedHexBytesThe shared secret key. Some invalid test vectors contain a shared secret, which is computed using the curve of the private key. This allows to distinguish between implementations ignoring public key info and implementations using the curve of the public key.

Used in EcdhTestGroup.

EcdhWebcryptoTestGroup

Fields in EcdhWebcryptoTestGroup are:

nametypedescenumoptional
curveEcCurvethe curve of the private key
encodingstrthe encoding of the keys'webcrypto'True
typestrthe type of the test'EcdhWebcryptoTest'
testsList of EcdhWebcryptoTestVectora list of test vectors

EcdhWebcryptoTestVector

Fields additional to the fields in TestVector are:

nametypedesc
publicJsonValid or invalid public key in webcrypto format
privateJwkEcPrivateKeyPrivate key in webcrypto format
sharedHexBytesThe shared secret key

Used in EcdhWebcryptoTestGroup.

EcdsaBitcoinTestGroup

A test group for the bitcoin variant of ECDSA signatures. The test vectors in this group are meant for signature verification. The test group contains the same public key for the signatures in multiple representations. The public keys are valid.

Fields in EcdsaBitcoinTestGroup are:

nametypedescenum
keyEcPublicKeyunencoded EC public key
keyDerDerDER encoded public key
keyPemPemPem encoded public key
shaMdNamethe hash function used for ECDSA'SHA-256'
typestrthe type of the test'EcdsaBitcoinVerify'
testsList of AsnSignatureTestVectora list of test vectors

EcdsaP1363TestGroup

A test group for ECDSA signatures using IEEE P1363 encoding. The test vectors in this group are meant for signature verification. The test group contains the same public key for the signatures in multiple representations. The public keys are valid with the sole exception that they may use short keys and weak hash functions such as SHA-1.

Fields in EcdsaP1363TestGroup are:

nametypedescoptionalenum
jwkJwkEcPublicKeythe public key in webcrypto formatTrue
keyEcPublicKeyunencoded EC public key
keyDerDerDER encoded public key
keyPemPemPem encoded public key
shaMdNamethe hash function used for ECDSA
typestrthe type of the test'EcdsaP1363Verify'
testsList of SignatureTestVectora list of test vectors

EcdsaTestGroup

A test group for ECDSA signatures. The test vectors in this group are meant for signature verification. The test group contains the same public key for the signatures in multiple representations. The public keys are valid with the sole exception that they may use short keys and weak hash functions such as SHA-1.

Fields in EcdsaTestGroup are:

nametypedescenum
keyEcPublicKeyunencoded EC public key
keyDerDerDER encoded public key
keyPemPemPem encoded public key
shaMdNamethe hash function used for ECDSA
typestrthe type of the test'EcdsaVerify'
testsList of AsnSignatureTestVectora list of test vectors

EddsaTestGroup

Fields in EddsaTestGroup are:

nametypedescsincerefenum
jwkJsonthe private key in webcrypto format0.7RFC 8037 Section 2
keyJsonunencoded key pair
keyDerDerAsn encoded public key
keyPemPemPem encoded public key
typestrthe type of the test'EddsaVerify'
testsList of SignatureTestVectora list of test vectors

HkdfTestGroup

A test group for key derivation functions that take 4 arguments (ikm, salt, info, size) as input.

Fields in HkdfTestGroup are:

nametypedescenum
keySizeintthe size of the ikm in bits
typestrthe type of the test'HkdfTest'
testsList of HkdfTestVectora list of test vectors

HkdfTestVector

A test vector for HKDF (or any other key derivation function with input ikm, salt, info, size

Fields additional to the fields in TestVector are:

nametypedesc
ikmHexBytesthe key (input key material)
saltHexBytesthe salt for the key derivation
infoHexBytesadditional information used in the key derivation
sizeintthe size of the output in bytes
okmHexBytesthe generated bytes (output key material)

Used in HkdfTestGroup.

IndCpaTestGroup

Fields in IndCpaTestGroup are:

nametypedescenum
ivSizeintthe IV size in bits
keySizeintthe keySize in bits
typestrthe type of the test'IndCpaTest'
testsList of IndCpaTestVectora list of test vectors

IndCpaTestVector

A test vector that is used for symmetric primitives that are indistinguishable under chosen plaintext attacks. These primitives are without an integrity check and hence without additional authenticated data. For example AES using cipher block chaining (CBC) is tested using this format.

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe key
ivHexBytesthe initialization vector
msgHexBytesthe plaintext
ctHexBytesthe raw ciphertext (without IV)

Used in IndCpaTestGroup.

JwkEcPrivateKey

nametypedescenum
crvstrthe curve'P-256', 'P-384', 'P-521', 'P-256K'
dBase64UrlThe private multiplier
kidstrthe key id
ktystrthe algorithm'EC'
usestrthe purpose of the key
xBase64UrlThe x-coordinate of the public point
yBase64UrlThe y-coordinate of the public point

JwkEcPublicKey

nametypedescenum
crvstrthe curve'P-256', 'P-384', 'P-521', 'P-256K'
kidstrthe key id
ktystrthe algorithm'EC'
usestrthe purpose of the key
xBase64UrlThe x-coordinate of the public point
yBase64UrlThe y-coordinate of the public point

JwkRsaPrivateKey

nametypedescenum
dBase64Urlthe private exponent
dpBase64Urlthe value d % (p-1)
dqBase64Urlthe value d % (q-1)
eBase64Urlthe public exponent
kidstrthe key identifier
ktystrthe algorithm'RSA'
nBase64Urlthe modulus of the key
pBase64Urla prime factor of the modulus
qBase64Urla prime factor of the modulus
qiBase64Urlthe CRT value q^(-1) % p
usestrthe purpose of the key'sig', 'enc'

JwkRsaPublicKey

nametypedescenum
eBase64Urlthe public exponent
kidstrthe key identifier
ktystrthe algorithm'RSA'
nBase64Urlthe modulus of the key
usestrthe purpose of the key'sig', 'enc'

JwkXdhPrivateKey

nametypedescenum
crvstrthe DH function'X25519', 'X448'
dBase64Urlthe private key value
kidstrthe key identifier
ktystrthe key type'OKP'
xBase64Urlthe public key value

JwkXdhPublicKey

nametypedescenum
crvstrthe DH function'X25519', 'X448'
kidstrthe key identifier
ktystrthe key type'OKP'
xBase64Urlthe public key value

KdfTestGroup

A test group for key derivation functions that take 2 arguments (seed, size) as input.

Fields in KdfTestGroup are:

nametypedescenum
keySizeintthe size of the seed in bits
typestrthe type of the test'KdfTest'
testsList of KdfTestVectora list of test vectors

KdfTestVector

A test vector for key derivation functions. I.e., these are deterministic functions that take a seed and a size as input and generate a pseudorandom output depending on the seed. (The size may simply determine the length of the pseudorandom output or may change the pseudorandom stream).

Fields additional to the fields in TestVector are:

nametypedesc
seedHexBytesthe seed
sizeintthe size of the output in bytes
okmHexBytesthe generated bytes (output key material)

Used in KdfTestGroup.

KeywrapTestGroup

Fields in KeywrapTestGroup are:

nametypedescenum
keySizeintthe keySize in bits
typestrthe type of the test'KeywrapTest'
testsList of KeywrapTestVectora list of test vectors

KeywrapTestVector

A test vector for key wrap primitives. Key wrap primitives are typically symmetric encryptions that were specifically desigend for encrypting key material. In some cases the input size is restricted to typical key sizes e.g. a multiple of 8 bytes. The encryption may assume that the wrapped bytes have high entropy. Hence some of the key wrap primitives are deterministic.

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe wrapping key
msgHexBytesthe key bytes to wrap
ctHexBytesthe wrapped key

Used in KeywrapTestGroup.

MacTestGroup

Fields in MacTestGroup are:

nametypedescenum
keySizeintthe keySize in bits
tagSizeintthe expected size of the tag in bits
typestrthe type of the test'MacTest'
testsList of MacTestVectora list of test vectors

MacTestVector

A test vector for message authentication codes (MAC).

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe key
msgHexBytesthe plaintext
tagHexBytesthe authentication tag

Used in MacTestGroup.

MacWithIvTestGroup

Fields in MacWithIvTestGroup are:

nametypedescenum
ivSizeintthe IV size in bits
keySizeintthe key size in bits
tagSizeintthe expected size of the tag in bits
typestrthe type of the test'MacWithIvTest'
testsList of MacWithIvTestVectora list of test vectors

MacWithIvTestVector

A test vector for message authentication codes (MAC) that use an IV.

Fields additional to the fields in TestVector are:

nametypedesc
keyHexBytesthe key
ivHexBytesthe initialization vector
msgHexBytesthe plaintext
tagHexBytesthe authentication tag

Used in MacWithIvTestGroup.

PbkdfTestGroup

A test group for key derivation functions that take 4 arguments (password, salt, iteration count and output size) as input.

Fields in PbkdfTestGroup are:

nametypedescenum
typestrthe type of the test'PbkdfTest'
testsList of PbkdfTestVectora list of test vectors

PbkdfTestVector

A test vector for PBKDF (or any other key derivation function with input password, salt, iteration count, size.

Fields additional to the fields in TestVector are:

nametypedesc
passwordHexBytesthe password
saltHexBytesthe salt
iterationCountintthe iteration count
dkLenintthe intended length of the output in bytes
dkHexBytesthe derived key

Used in PbkdfTestGroup.

PrimalityTestGroup

A test group for primality tests.

Fields in PrimalityTestGroup are:

nametypedescenum
typestrthe type of the test'PrimalityTest'
testsList of PrimalityTestVectora list of test vectors

PrimalityTestVector

A test vector for a primality test. The result is valid if value is prime and invalid if it is 0, 1, -1 or composite. The status of the negative of a prime is somewhat unlclear. Some libraries accept them as primes. Because of this the negative of a prime has result "acceptable".

Fields additional to the fields in TestVector are:

nametypedesc
valueBigIntthe integer to test

Used in PrimalityTestGroup.

RsaPrivateKey

Describes an RSA private key. The data type is based on the RSAPrivateKey type defined in Section A.1.2 of RFC 8017.

nametypedescenum
coefficientBigIntthe CRT value q^(-1) % p
exponent1BigIntthe value d % (p-1)
exponent2BigIntthe value d % (q-1)
modulusBigIntthe modulus of the key
otherPrimeInfoslist of list of BigIntlist of triples [prime, exponent, coefficient]
prime1BigIntp: a prime factor of the modulus
prime2BigIntq: a prime factor of the modulus
privateExponentBigIntthe private exponent
publicExponentBigIntthe public exponent
versionintThe version of the private key. This is 0 for keys with no otherPrimeInfos and 1 for keys with otherPrimeInfos, i.e. multiprime keys.0, 1

RsaPublicKey

Describes an RSA private key. The data type is based on the RSAPublicKey type defined in Appendix C of RFC 8017.

nametypedescenum
modulusBigIntthe modulus of the key
publicExponentBigIntthe public exponent
versionintThe version of the private key. This is 0 for keys with no otherPrimeInfos and 1 for keys with otherPrimeInfos, i.e. multiprime keys.0, 1

RsaPublicKeyAsnTestGroup

Fields in RsaPublicKeyAsnTestGroup are:

nametypedescenum
privateKeyRsaPrivateKeythe private key
privateKeyPkcs8DerPKCS #8 encoded private key
publicKeyAsnDerthe X509 encoded public key
typestrthe type of the test'RsaPublicKeyAsnTest'
testsList of RsaPublicKeyAsnTestVectora list of test vectors

RsaPublicKeyAsnTestVector

Fields additional to the fields in TestVector are:

nametypedesc
encodedAsna modified X509 encoded public key

Used in RsaPublicKeyAsnTestGroup.

RsaPublicKeyPemTestGroup

Fields in RsaPublicKeyPemTestGroup are:

nametypedescenum
privateKeyRsaPrivateKeythe private key
privateKeyPemPemPEM encoded private key
publicKeyPemPemthe corresponding PEM encoded public key
typestrthe type of the test'RsaPublicKeyPemTest'
testsList of RsaPublicKeyPemTestVectora list of test vectors

RsaPublicKeyPemTestVector

Fields additional to the fields in TestVector are:

nametypedesc
encodedPema modified PEM encoded public key

Used in RsaPublicKeyPemTestGroup.

RsaesOaepTestGroup

Fields in RsaesOaepTestGroup are:

nametypedescsinceoptionalenum
dBigIntThe private exponent
eBigIntThe public exponent
keySizeintkey size in bits
mgfstrthe message generating function (e.g. MGF1)
mgfShaMdNameThe hash function used for the message generating function.
nBigIntThe modulus of the key
privateKeyJwkJwkRsaPrivateKeyJSON encoded private key0.7True
privateKeyPemPemPem encoded private key
privateKeyPkcs8DerPkcs 8 encoded private key
shaMdNameThe hash function for hashing the label.
typestrthe type of the test'RsaesOaepDecrypt'
testsList of RsaesOaepTestVectora list of test vectors

RsaesOaepTestVector

Fields additional to the fields in TestVector are:

nametypedesc
msgHexBytesThe encrypted message
ctHexBytesAn encryption of msg
labelHexBytesThe label used for the encryption

Used in RsaesOaepTestGroup.

RsaesPkcs1TestGroup

Fields in RsaesPkcs1TestGroup are:

nametypedescsinceoptionalenum
dBigIntThe private exponent
eBigIntThe public exponent
keySizeintThe key size in bits
nBigIntThe modulus of the key
privateKeyJwkJwkRsaPrivateKeyJWK encoded private key0.7True
privateKeyPemPemPem encoded private key
privateKeyPkcs8DerPkcs 8 encoded private key.
typestrthe type of the test'RsaesPkcs1Decrypt'
testsList of RsaesPkcs1TestVectora list of test vectors

RsaesPkcs1TestVector

Fields additional to the fields in TestVector are:

nametypedesc
msgHexBytesThe encrypted message
ctHexBytesAn encryption of msg

Used in RsaesPkcs1TestGroup.

RsassaPkcs1GenTestGroup

Fields in RsassaPkcs1GenTestGroup are:

nametypedescrefsinceoptionalenum
dBigIntThe private exponent
eBigIntThe public exponent
keyAsnDerDER encoding of the sequence [n, e]
keyDerDerDER encoding of the public key
keyJwkJwkRsaPublicKey[Optional] public key in JWK formatRFC 75170.7True
keyPemPemPem encoded public key
keySizeintthe size of the modulus in bits
nBigIntThe modulus of the key
privateKeyJwkJwkRsaPrivateKey[Optional] Private key in JWK formatRFC 75170.7True
privateKeyPemPemPem encoded private key
privateKeyPkcs8DerPKCS8 encoded private key
shaMdNamethe hash function used for the message
typestrthe type of the test'RsassaPkcs1Generate'
testsList of SignatureTestVectora list of test vectors

RsassaPkcs1TestGroup

Fields in RsassaPkcs1TestGroup are:

nametypedescrefsinceoptionalenum
eBigIntThe public exponent
keyAsnDerASN encoding of the sequence [n, e]
keyDerDerASN encoding of the public key
keyJwkJwkRsaPublicKeyThe public key in JWK format. The key is missing if the signature algorithm for the given hash is not defined.RFC 75170.7True
keyPemPemPem encoded public key
keySizeintthe size of the modulus in bits
nBigIntThe modulus of the key
shaMdNamethe hash function used for the message
typestrthe type of the test'RsassaPkcs1Verify'
testsList of SignatureTestVectora list of test vectors

RsassaPssTestGroup

Fields in RsassaPssTestGroup are:

nametypedescenum
eBigIntThe public exponent
keyAsnDerASN encoding of the sequence [n, e]
keyDerDerASN encoding of the public key
keyPemPemPem encoded public key
keySizeintthe size of the modulus in bits
mgfstrthe message generating function (e.g. MGF1)
mgfShaMdNameThe hash function used for the message generating function.
nBigIntThe modulus of the key
sLenintThe length of the salt in bytes
shaMdNameThe hash function for hashing the message.
typestrthe type of the test'RsassaPssVerify'
testsList of RsassaPssTestVectora list of test vectors

RsassaPssTestVector

Fields additional to the fields in TestVector are:

nametypedesc
msgHexBytesThe message to sign
sigHexBytesa signature for msg

Used in RsassaPssTestGroup.

SignatureTestVector

A test vector with a public key signature. This structure is used for public key signatures where the primitive specifies the encoding as an array of bytes (e.g. P1363 encoded ECDSA signatures.) Public key signatures with additional formatting (e.g. ASN.1 encoded ECDSA signatures) have their separate types.

Fields additional to the fields in TestVector are:

nametypedesc
msgHexBytesThe message to sign
sigHexBytesA signature for msg

Used in DsaP1363TestGroup, EcdsaP1363TestGroup, EddsaTestGroup, RsassaPkcs1GenTestGroup, RsassaPkcs1TestGroup.

Test

The root type of each JSON file with tests. Each file contains one or more test groups. Each test group contains one or more test vectors. All test vectors in the same file have the same type and test the same cryptographic primitive.

nametypedescsince
algorithmstrThe primitive tested in the test file. This is mainly a brief description of the algorithm used. So far there is no formal definition of this field and its description may change.
generatorVersionstrThe version of the test vectors. The version number has the format major.minor (or major.minor[release candidate]). The plan is to change the format of the test vectors in major versions only, once version 1.0 has been reached. Conversely, version 1.0 will be published once we think the format for the test vectors are sufficiently stable.
headerlist of stradditional documentation
notesJSONA description of the labels used in the test vectors. Some test vectors contain labels that formally describe the test vector. It can be helpful to make test more precise. For example libraries differ in whether they accept ASN encodings different from DER. Hence many of the test vectors with alternative BER encoding are rated as acceptable. Labels allow to decide whether tests with alternative BER encoding should be rejected or accepted when testing a particular library.
numberOfTestsintThe number of test vectors in this test. Each test vector has a unique tcId in the range 1 .. tcId.
schemastrThe filename of the JSON schema that defines the format of the test vectors in this file. If the format of the test vectors changes then a new schema will be generate, so that comparing the name of the schema with an expected name can be used to check for compatibility between test vectors and test code.0.7
testGroupslist of JSONa list of test groups

TestGroup

TestGroup is a base class for all test groups. Each test group contains a list of test vectors of the same type. The test group describes parameters that are common for all the test vectors. Often some parameters are given in multiple formats to simplify testing. For example, asymmetric private key are typically given in a raw format, PKCS #8 encoded and in PEM format. All fields in a test group are correctly formatted. Incorrectly formatted inputs are always in the test vectors. The list below describes the fields that are common to all test groups, though generally a test group contains additional fields depending on the test for which the test vectors are intended for.

Fields in TestGroup are:

nametypedesc
testsLista list of test vectors
typestrthe type of the test

TestVector

nametypedescenum
commentstrA brief description of the test case
flagslist of strA list of flags for a test case. Flags are described in the header of the test file.
resultstrThe test result. The value determines whether the test case is valid, invalid or undefined. The value "acceptable" is typically used for legacy cases, weak parameters (such as key sizes not reaching 112-bit security) or BER encoding that are frequent. Eventually, all test vectors with "result" : "acceptable" will have flags describing the reason and allowing testers to decide how to treat these test vectors.'valid', 'invalid', 'acceptable'
tcIdintA unique identifier of the test case in a test file. The identifiers are continuous integers. The identifiers of test vectors change between versions of the test file. Hence, the triple (filename, version, tcId) uniquely identifies a test vector.

XdhAsnTestGroup

Fields in XdhAsnTestGroup are:

nametypedescenum
curveEcCurveThe name of the curve. If test vectors encode the curve as part of the public and private key then this field describes the curve of the private key. Test vectors with such encoding can contain distinct curves. Such test vectors are of course invalid and an attempt to compute a shared secret is expected to fail.
typestrthe type of the test'XdhAsnComp'
testsList of XdhAsnTestVectora list of test vectors

XdhAsnTestVector

A test vector for a key exchange using XDH. Public and private keys are ASN encoded.

Fields additional to the fields in TestVector are:

nametypedesc
publicAsnX.509 encoded the public key
privateDerPKCS #8 encoded private key
sharedHexBytesthe shared secret

Used in XdhAsnTestGroup.

XdhJwkTestGroup

Fields in XdhJwkTestGroup are:

nametypedescenum
curveEcCurveThe name of the curve. If test vectors encode the curve as part of the public and private key then this field describes the curve of the private key. Test vectors with such encoding can contain distinct curves. Such test vectors are of course invalid and an attempt to compute a shared secret is expected to fail.
typestrthe type of the test'XdhJwkComp'
testsList of XdhJwkTestVectora list of test vectors

XdhJwkTestVector

A test vector for a key exchange using XDH. XDH is a Diffie-Hellman key exchange defined in RFC 7748. Both public and private key in this test vector are using the jwk format.

Fields additional to the fields in TestVector are:

nametypedescref
publicJSONvalid or invalid public key in jwk formatRFC 8037
privateJwkXdhPrivateKeythe private key in jwk formatRFC 8037
sharedHexBytesthe shared secret

Used in XdhJwkTestGroup.

XdhPemTestGroup

Fields in XdhPemTestGroup are:

nametypedescenum
curveEcCurveThe name of the curve. If test vectors encode the curve as part of the public and private key then this field describes the curve of the private key. Test vectors with such encoding can contain distinct curves. Such test vectors are of course invalid and an attempt to compute a shared secret is expected to fail.
typestrthe type of the test'XdhPemComp'
testsList of XdhPemTestVectora list of test vectors

XdhPemTestVector

A test vector for a key exchange using XDH. Public and private keys are pem encoded.

Fields additional to the fields in TestVector are:

nametypedesc
publicPemPEM encoded public key
privatePemPEM encoded private key
sharedHexBytesthe shared secret

Used in XdhPemTestGroup.

XdhTestGroup

Fields in XdhTestGroup are:

nametypedescenum
curveEcCurveThe name of the curve. If test vectors encode the curve as part of the public and private key then this field describes the curve of the private key. Test vectors with such encoding can contain distinct curves. Such test vectors are of course invalid and an attempt to compute a shared secret is expected to fail.
typestrthe type of the test'XdhComp'
testsList of XdhTestVectora list of test vectors

XdhTestVector

A test vector for a key exchange using XDH. XDH is a Diffie-Hellman key exchange defined in RFC 7748. Both public and private key in this test vector are just raw bytes. That is valid public keys and valid private keys are 32 bytes each for X25519 and 56 bytes for X448.

Fields additional to the fields in TestVector are:

nametypedesc
publicHexBytesthe raw bytes of the public key
privateHexBytesthe raw bytes of private key
sharedHexBytesthe shared secret

Used in XdhTestGroup.