Closed panva closed 2 years ago
Yeah, I definitely agree we should add the alg
field, thanks for catching that.
The use
attribute I don't think we should set, as the Web Crypto spec currently doesn't do so either for any of the algorithms (while it does check them on import; I assume the intention was to have the key_ops
field fulfill the same role for exported keys).
I'll remove the use commits from my PR
Since Ed keys can only be used for signatures (and have one dedicated JWS "alg" identifier) and X can only be used for ECDH (meaning not the WebCrypto algorithm identifier here) the following operation steps should be added. The
alg
ones I think for sure, theuse
ones I'll leave to a discussion.Ed25519 JWK importKey operation
Add a step
Ed448 JWK importKey operation
Add a step
Ed25519 JWK exportKey operation
Add steps
Ed448 JWK exportKey operation
Add steps
X25519 JWK exportKey operation
Add a step
X448 JWK exportKey operation
Add a step