gojwk icon indicating copy to clipboard operation
gojwk copied to clipboard

P value missing from RSA key

Open aeneasr opened this issue 7 years ago • 2 comments

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.

aeneasr avatar Jul 08 '18 12:07 aeneasr

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 ?

m90 avatar Jun 01 '19 11:06 m90

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.

m90 avatar Jun 03 '19 07:06 m90