Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor feature request: unify JWK representations in JSON test vectors #85

Open
NeilMadden opened this issue May 5, 2022 · 0 comments
Open

Comments

@NeilMadden
Copy link

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?

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

No branches or pull requests

1 participant