Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/vectorlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ jobs:

- name: Run twistcheck
run: go run ./tools/twistcheck

- name: Run schemagen
run: go run ./tools/schemagen
13 changes: 11 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
module github.com/c2sp/wycheproof

go 1.23.6
go 1.24.0

require (
filippo.io/edwards25519 v1.1.0
github.com/atombender/go-jsonschema v0.22.0
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
)

require golang.org/x/text v0.14.0 // indirect
require (
dario.cat/mergo v1.0.2 // indirect
github.com/goccy/go-yaml v1.19.2 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/sanity-io/litter v1.5.8 // indirect
github.com/sosodev/duration v1.3.1 // indirect
golang.org/x/text v0.14.0 // indirect
)
25 changes: 25 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/atombender/go-jsonschema v0.22.0 h1:7H48X5fUccsfsacar5UfP6nnOXuQzmnr6lQmH/Fj2pQ=
github.com/atombender/go-jsonschema v0.22.0/go.mod h1:8Q281v0ozTIfvdnbwDoWQDIk0syH6F0Fpoq+Z1cs+rM=
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM=
github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sanity-io/litter v1.5.8 h1:uM/2lKrWdGbRXDrIq08Lh9XtVYoeGtcQxk9rtQ7+rYg=
github.com/sanity-io/litter v1.5.8/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4=
github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
12 changes: 4 additions & 8 deletions schemas/aead_test_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
}
},
"required": ["source"],
"required": ["type", "source", "ivSize", "keySize", "tagSize", "tests"],
"additionalProperties": false
},
"AeadTestVector": {
Expand Down Expand Up @@ -76,13 +76,7 @@
"description": "the authentication tag"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
"$ref": "common.json#/definitions/Result"
},
"flags": {
"type": "array",
Expand All @@ -92,6 +86,7 @@
"description": "A list of flags"
}
},
"required": ["tcId", "comment", "key", "iv", "aad", "msg", "ct", "tag", "result", "flags"],
"additionalProperties": false
}
},
Expand Down Expand Up @@ -131,5 +126,6 @@
}
}
},
"required": ["algorithm", "header", "notes", "numberOfTests", "schema", "testGroups"],
"additionalProperties": false
}
9 changes: 9 additions & 0 deletions schemas/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
},
"required": ["bugType"],
"additionalProperties": false
},
"Result": {
"type": "string",
"description": "Test vector result",
"enum": [
"valid",
"invalid",
"acceptable"
]
}
}
}
18 changes: 7 additions & 11 deletions schemas/daead_test_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
}
},
"required": ["source"],
"required": ["type", "source", "keySize", "tests"],
"additionalProperties": false
},
"DaeadTestVector": {
Expand Down Expand Up @@ -58,13 +58,7 @@
"description": "the ciphertext including tag"
},
"result": {
"type": "string",
"description": "Test result",
"enum": [
"valid",
"invalid",
"acceptable"
]
"$ref": "common.json#/definitions/Result"
},
"flags": {
"type": "array",
Expand All @@ -73,9 +67,10 @@
},
"description": "A list of flags"
}
}
},
"additionalProperties": false
},
"required": ["tcId", "comment", "key", "aad", "msg", "ct", "result"],
"additionalProperties": false
}
},
"properties": {
"algorithm": {
Expand Down Expand Up @@ -113,5 +108,6 @@
}
}
},
"required": ["algorithm", "header", "notes", "numberOfTests", "schema", "testGroups"],
"additionalProperties": false
}
1 change: 1 addition & 0 deletions schemas/dsa_common.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"description": "the public key value"
}
},
"required": ["g", "keySize", "p", "q", "type", "y"],
"additionalProperties": false
}
}
Expand Down
45 changes: 3 additions & 42 deletions schemas/dsa_p1363_verify_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,11 @@
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/SignatureTestVector"
"$ref": "signatures_common.json#/definitions/SignatureTestVector"
}
}
},
"required": ["source"],
"additionalProperties": false
},
"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"
}
},
"required": ["type", "source", "publicKey", "publicKeyDer", "publicKeyPem", "sha", "tests"],
"additionalProperties": false
}
},
Expand Down Expand Up @@ -118,5 +78,6 @@
}
}
},
"required": ["algorithm", "header", "notes", "numberOfTests", "schema", "testGroups"],
"additionalProperties": false
}
122 changes: 0 additions & 122 deletions schemas/dsa_verify_schema.json

This file was deleted.

Loading