Adding JSON schemas for the test vectors.

Requires test vectors with version 0.7 or higher.

NOKEYCHECK=True
PiperOrigin-RevId: 228853889
GitOrigin-RevId: d669cb263964511c7c95cb32f83e1f07f4bf6b51
This commit is contained in:
bleichen
2019-01-11 02:36:33 -08:00
committed by Tink Team
parent 7c9c6db85c
commit 18175b38da
24 changed files with 3011 additions and 0 deletions
+128
View File
@@ -0,0 +1,128 @@
{
"type": "object",
"definitions": {
"AeadTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"AeadTest"
]
},
"ivSize": {
"type": "integer",
"description": "the IV size in bits"
},
"keySize": {
"type": "integer",
"description": "the keySize in bits"
},
"tagSize": {
"type": "integer",
"description": "the expected size of the tag in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/AeadTestVector"
}
}
}
},
"AeadTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"key": {
"type": "string",
"format": "HexBytes",
"description": "the key"
},
"iv": {
"type": "string",
"format": "HexBytes",
"description": "the nonce"
},
"aad": {
"type": "string",
"format": "HexBytes",
"description": "additional authenticated data"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "the plaintext"
},
"ct": {
"type": "string",
"format": "HexBytes",
"description": "the ciphertext (without iv and tag)"
},
"tag": {
"type": "string",
"format": "HexBytes",
"description": "the authentication tag"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"aead_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/AeadTestGroup"
}
}
}
}
+110
View File
@@ -0,0 +1,110 @@
{
"type": "object",
"definitions": {
"DaeadTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"DaeadTest"
]
},
"keySize": {
"type": "integer",
"description": "the keySize in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/DaeadTestVector"
}
}
}
},
"DaeadTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"key": {
"type": "string",
"format": "HexBytes",
"description": "the key"
},
"aad": {
"type": "string",
"format": "HexBytes",
"description": "additional authenticated data"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "the plaintext"
},
"ct": {
"type": "string",
"format": "HexBytes",
"description": "the ciphertext including tag"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"daead_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/DaeadTestGroup"
}
}
}
}
+150
View File
@@ -0,0 +1,150 @@
{
"type": "object",
"definitions": {
"DsaTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"DsaVerify"
]
},
"key": {
"$ref": "#/definitions/DsaPublicKey",
"description": "unenocded DSA public key"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "DER encoded public key"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"sha": {
"type": "string",
"description": "the hash function used for DSA"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/AsnSignatureTestVector"
}
}
}
},
"DsaPublicKey": {
"type": "object",
"properties": {
"g": {
"type": "string",
"format": "BigInt",
"description": "the generator of the multiplicative subgroup"
},
"keySize": {
"type": "integer",
"description": "the key size in bits"
},
"p": {
"type": "string",
"format": "BigInt",
"description": "the modulus p"
},
"q": {
"type": "string",
"format": "BigInt",
"description": "the order of the generator g"
},
"type": {
"type": "string",
"description": "the key type",
"enum": [
"DsaPublicKey"
]
},
"y": {
"type": "string",
"format": "BigInt",
"description": "the public key value"
}
}
},
"AsnSignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "Asn",
"description": "An ASN encoded signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"dsa_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/DsaTestGroup"
}
}
}
}
+113
View File
@@ -0,0 +1,113 @@
{
"type": "object",
"definitions": {
"EcPointTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcPointTest"
]
},
"curve": {
"type": "string",
"description": "the name of the elliptic curve"
},
"encoding": {
"type": "string",
"description": "the encoding used",
"enum": [
"compressed",
"uncompressed"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcPointTestVector"
}
}
}
},
"EcPointTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"encoded": {
"type": "string",
"format": "HexBytes",
"description": "X509 encoded point on the curve"
},
"x": {
"type": "string",
"format": "BigInt",
"description": "x-coordinate of the point"
},
"y": {
"type": "string",
"format": "BigInt",
"description": "y-coordiante of the point"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ec_point_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcPointTestGroup"
}
}
}
}
+152
View File
@@ -0,0 +1,152 @@
{
"type": "object",
"definitions": {
"EcPublicKeyTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcPublicKeyVerify"
]
},
"encoding": {
"type": "string",
"format": "Der",
"description": "the encoding of the encoded keys",
"enum": [
"asn",
"pem",
"webcrypto"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcPublicKeyTestVector"
}
}
}
},
"EcPublicKeyTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"encoded": {
"type": "string",
"format": "Asn",
"description": "Encoded EC public key over a prime order field"
},
"p": {
"type": "string",
"format": "BigInt",
"description": "The order of underlying field"
},
"n": {
"type": "string",
"format": "BigInt",
"description": "The order of the generator"
},
"a": {
"type": "string",
"format": "BigInt",
"description": "The value a of the Weierstrass equation"
},
"b": {
"type": "string",
"format": "BigInt",
"description": "The value b of the Weierstrass equation"
},
"gx": {
"type": "string",
"format": "BigInt",
"description": "x-coordinate of the generator"
},
"gy": {
"type": "string",
"format": "BigInt",
"description": "y-coordinate of the generator"
},
"h": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "the cofactor"
},
"wx": {
"type": "string",
"format": "BigInt",
"description": "x-coordinate of the public point"
},
"wy": {
"type": "string",
"format": "BigInt",
"description": "y-coordinate of the public point"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ec_public_key_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcPublicKeyTestGroup"
}
}
}
}
+101
View File
@@ -0,0 +1,101 @@
{
"type": "object",
"definitions": {
"EcdhEcpointTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdhEcpointTest"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhEcpointTestVector"
}
}
}
},
"EcdhEcpointTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "Asn",
"description": "ASN encoded public point"
},
"private": {
"type": "string",
"format": "BigInt",
"description": "The private exponent"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "The shared secret key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdh_ecpoint_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhEcpointTestGroup"
}
}
}
}
+101
View File
@@ -0,0 +1,101 @@
{
"type": "object",
"definitions": {
"EcdhPemTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdhPemTest"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhPemTestVector"
}
}
}
},
"EcdhPemTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"private": {
"type": "string",
"format": "BigInt",
"description": "the private key"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "The shared secret key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdh_pem_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhPemTestGroup"
}
}
}
}
+101
View File
@@ -0,0 +1,101 @@
{
"type": "object",
"definitions": {
"EcdhTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdhTest"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhTestVector"
}
}
}
},
"EcdhTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "Asn",
"description": "Encoded public key"
},
"private": {
"type": "string",
"format": "BigInt",
"description": "the private key"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "The shared secret key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdh_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhTestGroup"
}
}
}
}
+99
View File
@@ -0,0 +1,99 @@
{
"type": "object",
"definitions": {
"EcdhWebcryptoTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdhWebcryptoTest"
]
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhWebcryptoTestVector"
}
}
}
},
"EcdhWebcryptoTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "object",
"description": "Public key in webcrypto format"
},
"private": {
"type": "object",
"description": "Private key in webcrypto format"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "The shared secret key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdh_webcrypto_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdhWebcryptoTestGroup"
}
}
}
}
+207
View File
@@ -0,0 +1,207 @@
{
"type": "object",
"definitions": {
"EcdsaP1363TestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdsaP1363Verify"
]
},
"jwk": {
"type": "object",
"description": "[optional] the public key in webcrypto format"
},
"key": {
"$ref": "#/definitions/EcPublicKey",
"description": "unenocded EC public key"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "DER encoded public key"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"sha": {
"type": "string",
"description": "the hash function used for ECDSA"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/SignatureTestVector"
}
}
}
},
"EcPublicKey": {
"type": "object",
"properties": {
"curve": {
"anyOf": [
{
"$ref": "#/definitions/EcUnnamedGroup"
},
{
"type": "string",
"description": "the name of the EC group"
}
],
"description": "the EC group used by this public key"
},
"keySize": {
"type": "integer",
"description": "the key size in bits"
},
"type": {
"type": "string",
"description": "the key type",
"enum": [
"EcPublicKey"
]
},
"uncompressed": {
"type": "string",
"format": "HexBytes",
"description": "encoded public key point"
},
"wx": {
"type": "string",
"format": "BigInt",
"description": "the x-coordinate of the public key point"
},
"wy": {
"type": "string",
"format": "BigInt",
"description": "the y-coordinate of the public key point"
}
}
},
"EcUnnamedGroup": {
"type": "object",
"properties": {
"a": {
"type": "string",
"format": "BigInt",
"description": "coefficient a of the elliptic curve equation"
},
"b": {
"type": "string",
"format": "BigInt",
"description": "coefficient b of the elliptic curve equation"
},
"gx": {
"type": "string",
"format": "BigInt",
"description": "the x-coordinate of the generator"
},
"gy": {
"type": "string",
"format": "BigInt",
"description": "the y-coordinate of the generator"
},
"h": {
"type": "integer",
"description": "the cofactor"
},
"n": {
"type": "string",
"format": "BigInt",
"description": "the order of the generator"
},
"p": {
"type": "string",
"format": "BigInt",
"description": "the order of the underlying field"
},
"type": {
"type": "string",
"description": "an unnamed EC group over a prime field in Weierstrass form",
"enum": [
"PrimeOrderCurve"
]
}
}
},
"SignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "HexBytes",
"description": "A signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdsa_p1363_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdsaP1363TestGroup"
}
}
}
}
+203
View File
@@ -0,0 +1,203 @@
{
"type": "object",
"definitions": {
"EcdsaTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EcdsaVerify"
]
},
"key": {
"$ref": "#/definitions/EcPublicKey",
"description": "unenocded EC public key"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "DER encoded public key"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"sha": {
"type": "string",
"description": "the hash function used for ECDSA"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/AsnSignatureTestVector"
}
}
}
},
"EcPublicKey": {
"type": "object",
"properties": {
"curve": {
"anyOf": [
{
"$ref": "#/definitions/EcUnnamedGroup"
},
{
"type": "string",
"description": "the name of the EC group"
}
],
"description": "the EC group used by this public key"
},
"keySize": {
"type": "integer",
"description": "the key size in bits"
},
"type": {
"type": "string",
"description": "the key type",
"enum": [
"EcPublicKey"
]
},
"uncompressed": {
"type": "string",
"format": "HexBytes",
"description": "encoded public key point"
},
"wx": {
"type": "string",
"format": "BigInt",
"description": "the x-coordinate of the public key point"
},
"wy": {
"type": "string",
"format": "BigInt",
"description": "the y-coordinate of the public key point"
}
}
},
"EcUnnamedGroup": {
"type": "object",
"properties": {
"a": {
"type": "string",
"format": "BigInt",
"description": "coefficient a of the elliptic curve equation"
},
"b": {
"type": "string",
"format": "BigInt",
"description": "coefficient b of the elliptic curve equation"
},
"gx": {
"type": "string",
"format": "BigInt",
"description": "the x-coordinate of the generator"
},
"gy": {
"type": "string",
"format": "BigInt",
"description": "the y-coordinate of the generator"
},
"h": {
"type": "integer",
"description": "the cofactor"
},
"n": {
"type": "string",
"format": "BigInt",
"description": "the order of the generator"
},
"p": {
"type": "string",
"format": "BigInt",
"description": "the order of the underlying field"
},
"type": {
"type": "string",
"description": "an unnamed EC group over a prime field in Weierstrass form",
"enum": [
"PrimeOrderCurve"
]
}
}
},
"AsnSignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "Asn",
"description": "An ASN encoded signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ecdsa_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EcdsaTestGroup"
}
}
}
}
+114
View File
@@ -0,0 +1,114 @@
{
"type": "object",
"definitions": {
"EddsaTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"EddsaVerify"
]
},
"jwk": {
"type": "object",
"description": "the private key in webcrypto format"
},
"key": {
"type": "object",
"description": "unencoded key pair"
},
"keyDer": {
"type": "string",
"format": "Asn",
"description": "Asn encoded public key"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/SignatureTestVector"
}
}
}
},
"SignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "HexBytes",
"description": "A signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"eddsa_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/EddsaTestGroup"
}
}
}
}
+114
View File
@@ -0,0 +1,114 @@
{
"type": "object",
"definitions": {
"HkdfTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"HkdfTest"
]
},
"keySize": {
"type": "integer",
"description": "the size of the ikm in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/HkdfTestVector"
}
}
}
},
"HkdfTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"ikm": {
"type": "string",
"format": "HexBytes",
"description": "the key (input key material)"
},
"salt": {
"type": "string",
"format": "HexBytes",
"description": "the salt for the key derivation"
},
"info": {
"type": "string",
"format": "HexBytes",
"description": "additional information used in the key derivation"
},
"size": {
"type": "integer",
"description": "the size of the output in bytes"
},
"okm": {
"type": "string",
"format": "HexBytes",
"description": "the generated bytes (output key material)"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"hkdf_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/HkdfTestGroup"
}
}
}
}
+118
View File
@@ -0,0 +1,118 @@
{
"type": "object",
"definitions": {
"IndCpaTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"IndCpaTest"
]
},
"ivSize": {
"type": "integer",
"description": "the IV size in bits"
},
"keySize": {
"type": "integer",
"description": "the keySize in bits"
},
"tagSize": {
"type": "integer",
"description": "the expected size of the tag in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/IndCpaTestVector"
}
}
}
},
"IndCpaTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"key": {
"type": "string",
"format": "HexBytes",
"description": "the key"
},
"iv": {
"type": "string",
"format": "HexBytes",
"description": "the initialization vector"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "the plaintext"
},
"ct": {
"type": "string",
"format": "HexBytes",
"description": "the raw ciphertext (without IV)"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"ind_cpa_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/IndCpaTestGroup"
}
}
}
}
+105
View File
@@ -0,0 +1,105 @@
{
"type": "object",
"definitions": {
"KeywrapTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"KeywrapTest"
]
},
"keySize": {
"type": "integer",
"description": "the keySize in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/KeywrapTestVector"
}
}
}
},
"KeywrapTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"key": {
"type": "string",
"format": "HexBytes",
"description": "the wrapping key"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "the key bytes to wrap"
},
"ct": {
"type": "string",
"format": "HexBytes",
"description": "the wrapped key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"keywrap_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/KeywrapTestGroup"
}
}
}
}
+109
View File
@@ -0,0 +1,109 @@
{
"type": "object",
"definitions": {
"MacTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"MacTest"
]
},
"keySize": {
"type": "integer",
"description": "the keySize in bits"
},
"tagSize": {
"type": "integer",
"description": "the expected size of the tag in bits"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/MacTestVector"
}
}
}
},
"MacTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"key": {
"type": "string",
"format": "HexBytes",
"description": "the key"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "the plaintext"
},
"tag": {
"type": "string",
"format": "HexBytes",
"description": "the authentication tag"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"mac_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/MacTestGroup"
}
}
}
}
+103
View File
@@ -0,0 +1,103 @@
{
"type": "object",
"definitions": {
"RsaKeyTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"RsaKeyTest"
]
},
"encoding": {
"type": "string",
"description": "the encoding of the public key in the test vectors.",
"enum": [
"asn",
"pem"
]
},
"private": {
"type": "object",
"description": "the private key"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/RsaKeyTestVector"
}
}
}
},
"RsaKeyTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "HexBytes",
"description": "the encoded public key"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"rsa_key_test_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/RsaKeyTestGroup"
}
}
}
}
+138
View File
@@ -0,0 +1,138 @@
{
"type": "object",
"definitions": {
"RsaesOaepTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"RsaesOaepDecrypt"
]
},
"d": {
"type": "string",
"format": "BigInt",
"description": "The private exponent"
},
"e": {
"type": "string",
"format": "BigInt",
"description": "The public exponent"
},
"mgf": {
"type": "string",
"description": "the message generating function (e.g. MGF1)"
},
"mgfSha": {
"type": "string",
"description": "The hash function used for the message generating function."
},
"n": {
"type": "string",
"format": "BigInt",
"description": "The modulus of the key"
},
"privateKeyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded private key"
},
"privateKeyPkcs8": {
"type": "string",
"format": "Der",
"description": "Pkcs 8 encoded private key."
},
"sha": {
"type": "string",
"description": "The hash function for hashing the label."
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/RsaesOaepTestVector"
}
}
}
},
"RsaesOaepTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The encrypted message"
},
"ct": {
"type": "string",
"format": "HexBytes",
"description": "An encryption of msg"
},
"label": {
"type": "string",
"format": "HexBytes",
"description": "The label used for the encryption"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"rsaes_oaep_decrypt_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/RsaesOaepTestGroup"
}
}
}
}
+152
View File
@@ -0,0 +1,152 @@
{
"type": "object",
"definitions": {
"RsassaPkcs1GenTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"RsassaPkcs1Generate"
]
},
"d": {
"type": "string",
"format": "BigInt",
"description": "The private exponent"
},
"e": {
"type": "string",
"format": "BigInt",
"description": "The public exponent"
},
"keyAsn": {
"type": "string",
"format": "Der",
"description": "DER encoding of the sequence [n, e]"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "DER encoding of the public key"
},
"keyJwk": {
"type": "object",
"description": "[Optional] Private key in JWK format"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"keySize": {
"type": "integer",
"description": "the size of the modulus in bits"
},
"n": {
"type": "string",
"format": "BigInt",
"description": "The modulus of the key"
},
"privateKeyDer": {
"type": "string",
"format": "Der",
"description": "DER encoding of the private key"
},
"privateKeyJwk": {
"type": "object",
"description": "[Optional] Private key in JWK format"
},
"privateKeyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded private key"
},
"sha": {
"type": "string",
"description": "the hash function used for the message"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/SignatureTestVector"
}
}
}
},
"SignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "HexBytes",
"description": "A signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"rsassa_pkcs1_generate_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/RsassaPkcs1GenTestGroup"
}
}
}
}
+138
View File
@@ -0,0 +1,138 @@
{
"type": "object",
"definitions": {
"RsassaPkcs1TestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"RsassaPkcs1Verify"
]
},
"d": {
"type": "string",
"format": "BigInt",
"description": "The private exponent"
},
"e": {
"type": "string",
"format": "BigInt",
"description": "The public exponent"
},
"keyAsn": {
"type": "string",
"format": "Der",
"description": "ASN encoding of the sequence [n, e]"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "ASN encoding of the public key"
},
"keyJwk": {
"type": "object",
"description": "Public key in JWK format"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"keySize": {
"type": "integer",
"description": "the size of the modulus in bits"
},
"n": {
"type": "string",
"format": "BigInt",
"description": "The modulus of the key"
},
"sha": {
"type": "string",
"description": "the hash function used for the message"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/SignatureTestVector"
}
}
}
},
"SignatureTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "HexBytes",
"description": "A signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"rsassa_pkcs1_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/RsassaPkcs1TestGroup"
}
}
}
}
+142
View File
@@ -0,0 +1,142 @@
{
"type": "object",
"definitions": {
"RsassaPssTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"RsassaPssVerify"
]
},
"d": {
"type": "string",
"format": "BigInt",
"description": "The private exponent"
},
"e": {
"type": "string",
"format": "BigInt",
"description": "The public exponent"
},
"keyAsn": {
"type": "string",
"format": "Der",
"description": "ASN encoding of the sequence [n, e]"
},
"keyDer": {
"type": "string",
"format": "Der",
"description": "ASN encoding of the public key"
},
"keyPem": {
"type": "string",
"format": "Pem",
"description": "Pem encoded public key"
},
"keySize": {
"type": "integer",
"description": "the size of the modulus in bits"
},
"mgf": {
"type": "string",
"description": "the message generating function (e.g. MGF1)"
},
"mgfSha": {
"type": "string",
"description": "The hash function used for the message generating function."
},
"n": {
"type": "string",
"format": "BigInt",
"description": "The modulus of the key"
},
"sha": {
"type": "string",
"description": "The hash function for hasing the message."
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/RsassaPssTestVector"
}
}
}
},
"RsassaPssTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"msg": {
"type": "string",
"format": "HexBytes",
"description": "The message to sign"
},
"sig": {
"type": "string",
"format": "HexBytes",
"description": "a signature for msg"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"rsassa_pss_verify_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/RsassaPssTestGroup"
}
}
}
}
+105
View File
@@ -0,0 +1,105 @@
{
"type": "object",
"definitions": {
"XdhAsnTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"XdhAsnComp"
]
},
"curve": {
"type": "string",
"description": "the name of the curve"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhAsnTestVector"
}
}
}
},
"XdhAsnTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "Asn",
"description": "X.509 encoded the public key"
},
"private": {
"type": "string",
"format": "Der",
"description": "PKCS #8 encoded private key"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "the shared secret"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"xdh_asn_comp_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhAsnTestGroup"
}
}
}
}
+105
View File
@@ -0,0 +1,105 @@
{
"type": "object",
"definitions": {
"XdhTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"XdhComp"
]
},
"curve": {
"type": "string",
"description": "the name of the curve"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhTestVector"
}
}
}
},
"XdhTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "string",
"format": "HexBytes",
"description": "the raw bytes of the public key"
},
"private": {
"type": "string",
"format": "HexBytes",
"description": "the raw bytes of private key"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "the shared secret"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"xdh_comp_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhTestGroup"
}
}
}
}
+103
View File
@@ -0,0 +1,103 @@
{
"type": "object",
"definitions": {
"XdhJwkTestGroup": {
"type": "object",
"properties": {
"type": {
"enum": [
"XdhJwkComp"
]
},
"curve": {
"type": "string",
"description": "the name of the curve"
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhJwkTestVector"
}
}
}
},
"XdhJwkTestVector": {
"type": "object",
"properties": {
"tcId": {
"type": "integer",
"description": "Identifier of the test case"
},
"comment": {
"type": "string",
"description": "A brief description of the test case"
},
"public": {
"type": "object",
"description": "the public key in jwk format"
},
"private": {
"type": "object",
"description": "the private key in jwk format"
},
"shared": {
"type": "string",
"format": "HexBytes",
"description": "the shared secret"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
},
"flags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of flags"
}
}
}
},
"properties": {
"algorithm": {
"type": "string",
"description": "the primitive tested in the test file"
},
"generatorVersion": {
"type": "string",
"description": "the version of the test vectors."
},
"header": {
"type": "array",
"items": {
"type": "string"
},
"description": "additional documentation"
},
"notes": {
"type": "object",
"description": "a description of the labels used in the test vectors"
},
"numberOfTests": {
"type": "integer",
"description": "the number of test vectors in this test"
},
"schema": {
"enum": [
"xdh_jwk_comp_schema.json"
]
},
"testGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/XdhJwkTestGroup"
}
}
}
}