Skip to content

Add missing schemas, source attribution - #269

Open
cpu wants to merge 15 commits into
C2SP:mainfrom
cpu:cpu-missing-schemas
Open

Add missing schemas, source attribution#269
cpu wants to merge 15 commits into
C2SP:mainfrom
cpu:cpu-missing-schemas

Conversation

@cpu

@cpu cpu commented Aug 11, 2026

Copy link
Copy Markdown
Member

This PR adds JSON schemas that were referenced from testvectors_v1/ but didn't exist. These were an artifact from the original Google version of the project that we've been ignoring in the vector lint tooling. Having complete schemas is helpful for catching errors when we extend the vectors, and also allows consumers to do code generation for loading the vector data.

I've made a best effort to match up what exists in the test vectors, the original Python generator code from the tag w/ generator source, and new schema content. There's likely room for further improvement down the road but for now I've limited myself to a first pass.

This will conflict with #268 (and I had to cherry-pick the line-ending fix in here). I'll resolve in whichever direction makes sense based on merge order.

cpu added 15 commits August 11, 2026 16:42
Adds a schema for the FpeStrTest vectors in testvectors_v1/aes_ff1_base*,
and removes the vectorlint missing-schema exception now that the files
validate.
Adds a schema for the FpeListTest vectors in testvectors_v1/aes_ff1_radix*,
and removes the vectorlint missing-schema exception now that the files
validate. Digit list items are deliberately unconstrained integers. The
InvalidPlaintext test cases contain out-of-range digits (e.g. -1, radix).
Adds a schema for the EcdsaBitcoinVerify vectors in
testvectors_v1/ecdsa_secp256k1_sha256_bitcoin_test.json, and removes the
vectorlint missing-schema exception now that the file validates. Modeled
on ecdsa_verify_schema_v1.json, reusing the shared EcPublicKey and
AsnSignatureTestVector definitions. The sha property is constrained to
SHA-256, matching the original Python generator's EcdsaBitcoinTestGroup.
Adds a schema for the PbeTest vectors in testvectors_v1/pbes2_*, and
removes the vectorlint missing-schema exception now that the files
validate. Modeled on pbkdf_test_schema.json, with field descriptions
adapted from the original Python generator's PbeTestVector.
Adds a schema for the RsassaPssWithParametersVerify vectors in
testvectors_v1/rsa_pss_*_params_test.json, modeled on
rsassa_pss_verify_schema_v1.json. These vectors differ from the plain
verify vectors in that publicKeyDer/publicKeyPem embed the RSASSA-PSS
parameters (RFC 8017, Appendix A) in the key's algorithm identifier.

This was the last missing schema, so the vectorlint missing-schema
exception mechanism is removed entirely. Every vector file now
references a schema and validates against it.
This was the one file in repo with windows line endings.
Replaces the deprecated top-level generatorVersion in the aes_ff1_base*
vectors with a per-group source element, and requires source in the
schema, matching the other _v1 vector files.
Replaces the deprecated top-level generatorVersion in the aes_ff1_radix*
vectors with a per-group source element, and requires source in the
schema, matching the other _v1 vector files.
Replaces the deprecated top-level generatorVersion in
ecdsa_secp256k1_sha256_bitcoin_test.json with a per-group source
element, and requires source in the schema, matching the other _v1
vector files.
Replaces the deprecated top-level generatorVersion in the pbes2_*
vectors with a per-group source element, and requires source in the
schema, matching the other _v1 vector files.
Replaces the deprecated top-level generatorVersion in the
rsa_pss_*_params vectors with a per-group source element, and requires
source in the schema, matching the other _v1 vector files.
Replaces the deprecated top-level generatorVersion in the pbkdf2_*
vectors with a per-group source element, and requires source in the
schema. The vectors are unchanged from google-wycheproof 0.9 (99ad8da).
The test group already carries an equivalent source element
(google-wycheproof/0.9rc5) required by ec_curve_test_schema.json.
Replaces the deprecated top-level generatorVersion in the mldsa_*_verify
vectors with a per-group source element on the groups that lacked one,
and requires source in the schema.

Git history shows every sourceless group (and all of its tests)
originates from the initial FIPS 204 vector import by github/gendx, so
they are attributed to github/gendx 0.1, matching how the mldsa sign
vectors attribute the same import. Later contributions already carry
their own sources.
@cpu cpu self-assigned this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant