gojwk
gojwk copied to clipboard
P value missing from RSA key
I tried transforming an *rsa.PrivateKey using gojwk.PrivateKey(key), which works fine. However, the P value of the resulting key is missing (P is not defined in gojwk.Key) which is required for (un-)marshalling using go-jose.
I am hitting the same issue when trying to import a key generated using gojwk using window.crypto.subtle.importKey in browsers.
Did you find a solution to this @aeneasr ?
For anyone ending up here as well, I switched to github.com/lestrrat-go/jwx which does seem to serialize the keys in a way browsers can import them just fine.