JWK to RSA key translation
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 276
- Forks
- 200
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
Hey there :)
We were having a bit of trouble generating RSA keys from JSON Web Keys (JWK, RFC 7517).
Linking the original issue: https://github.com/jwt/ruby-jwt/issues/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 of OpenSSL::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 :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked original issue (#523), the JWK specification in RFC 7517, and the private-key structure in RFC 3447. Then investigate the OpenSSL 3 API for constructing RSA keys from modulus and exponent parameters; done means establishing a supported way to handle private JWKs that omit CRT values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100