Add missing schemas, source attribution - #269
Open
cpu wants to merge 15 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.