-
Notifications
You must be signed in to change notification settings - Fork 149
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
New API Proposal: RSA Key Support #26
Comments
Thanks for this feature request! We'll circulate it with the team and get back to you. |
Would be really great to see the support of RSA inside |
I've hit the lack of RSA support in this project today - adding my voice: it'd be great to see RSA key support ❤️ |
I guess the requested feature has been implemented here: Does that solve your problem? |
Ooh it could well do |
@0xTim : Can you confirm this addresses your request? |
@FredericJacobs sure, give me a few days to see if it offers everything we need for JWTKit |
Would it be possible to include a way to extract the data representations of the modulus, exponent and private exponent for the public and private keys? an initialiser using those would be amazing as well! |
What's the intended use-case? |
@FredericJacobs I was taking a look at the JWTKit API in order to see what was needed to move to swift-crypto's RSA implementation. There's this initializer that's part of the public API https://github.com/vapor/jwt-kit/blob/449850f0db4769c630d90ff09ee1be2a5a382bd8/Sources/JWTKit/RSA/RSAKey.swift#L145, @Lukasa I'm working on an OpenSSH private key parser currently used along with swift-nio-ssh where I'm reading the modulus etc from the openssh format itself to then create an RSAKey with (using BoringSSL currently). I would like to move to swift-crypto's RSA implementation instead (if possible). |
I think we can probably add a "from numbers" interface to RSA. |
New API Proposal: RSA Key Support
Motivation:
RSA is a widely used and popular public key system used for key exchange and popular with JWTs and older TLS versions among other uses. Although relatively old and slow, it is still widely supported and heavily used, justifying its inclusion in Swift Crypto. BoringSSL has the code in it required, so those APIs would need to be exposed.
Importance:
A lot of systems still use RSA to public key encryption and validation. Apple's own Sign in With Apple service provides a JWT that is signed using an RSA key, provided as a JWK. Without RSA support in Swift Crypto, we are unable to use that library to verify JWTs from Apple on the server-side.
The text was updated successfully, but these errors were encountered: