bspk/mkjwk.org

Alg field for encryption keys doesn't appear to give correct options

chadlwilson opened this issue ยท 3 comments

Firstly, great little tool here! Thanks!

One observation I have is that if you choose to generate an encryption-usage key, the alg choices and generated key appears to be incorrect, and populates with JWS algs (RS256, ES256 etc)

While alg is optional in general, for encryption keys, believe these should be RSA-OAEP-256, ECDH-ES, ECDH-ES+A256KW etc per https://tools.ietf.org/html/rfc7518#section-4.1

Good observation, right now the tool doesn't take into account the "use" field when making values available for the other fields, and the alg field pulls from a list of JWS values. we can look at adding that, or a pull request would be appreciated if you can!

I put in a fix for this and it's been pushed to the website. If there are any issues like missing or miscategorized algorithms, just file another issue or PR. Thanks!

Wow, thanks! Hadn't got around to looking at it yet ๐Ÿ‘