Minor feature request: unify JWK representations in JSON test vectors
I have recently been importing a subset of the Wycheproof test vectors into the test suite for our in-house JWT library. In doing so, the JWK key format has been the most useful for me as we already have utilities to parse these and we can then obtain the relevant JWA algorithm identifiers from them (thank you so much for that!). However, a really very minor grumble is that there is some inconsistency across the test suites around the names used for these JWK format keys that makes it just very slightly harder to write generic code to extract them:
- Some tests don't have a JWK version of the key at all
- When there is one key, some tests use the field name
"jwk", others use"keyJwk", and others again use"privateKeyJwk" - When a public key is also present, then the naming switches to
"public"and"private", but the format of these could be a JWK or could be a hex-encoded ASN.1 key or a PEM. This seems to depend on the naming of the test vector file.
I appreciate this is some seriously pedantic nitpicking, but I wonder if you'd be open to a pull request that attempts to unify the use of JWKs across the test suites?