-
Notifications
You must be signed in to change notification settings - Fork 171
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
JWK to RSA key translation #551
Comments
This is a TODO item. We need a wrapper around EVP_PKEY_fromdata() (available in OpenSSL 3.0+ only) for this purpose. Linking related issues: #498 (for EC) and #369 (OpenSSL 3.0 support in general) |
I like the direction @anakinj is taking in #555 - thank you for working on this! The API there looks a lot like what we're currently do manually with ASN.1 in in
|
Hey there :)
We were having a bit of trouble generating RSA keys from JSON Web Keys (JWK, RFC 7517).
Linking the original issue: jwt/ruby-jwt#523
We had this working fine with earlier versions of OpenSSL, where we were able to use functions like
set_key
on a new instance ofOpenSSL::PKey::RSA
.With OpenSSL 3 the API has changed though, so this is no longer an option.
We are looking for guidance on how to implement parsing an (especially private) RSA key from the parameters alone.
A temporary solution we had consisted of parsing the key into ASN.1, then have it exported as DER and read by this gem, but the problem we are facing with this solution is that a private RSA JWK may in some cases only include the modulus and both exponents, rather than all CRT values present in the RFC 3447 ASN.1 description of a private key.
I apologize in advance, should I have overlooked some obvious API functionality. If you have some pointers for us, please let us know :)
The text was updated successfully, but these errors were encountered: