Skip to content
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

Generate RSA keys #278

Closed
kpcyrd opened this issue Jun 12, 2024 · 2 comments
Closed

Generate RSA keys #278

kpcyrd opened this issue Jun 12, 2024 · 2 comments

Comments

@kpcyrd
Copy link

kpcyrd commented Jun 12, 2024

I'm personally not that keen about RSA, but SAML explicitly requires RSA or DSA.

With the recent rcgen 0.13.0 release it's possible to select a SignatureAlgorithm (yey!) and I was hoping I could now generate RSA keys too, but this is currently not supported, since it's not implemented in ring.

// This currently fails
let keypair = KeyPair::generate_for(&PKCS_RSA_SHA256)?;

Opening this issue to request this feature, but I also understand if this doesn't have priority. :)

Also note with this api design it's not clear if a 2048bit or 4096bit RSA key should be generated.

Thanks!

@cpu
Copy link
Member

cpu commented Jun 12, 2024

👋 hey kpcyrd,

I'm on mobile so my answer isn't as detailed as it should be. RSA key generation is supported w/ the aws-lc-rs backend, but might need better documentation/discoverability. There's an example in the Rustls repo using rcgen to create RSA 2048, 3072 and 4096 key pairs as a ref. point: https://github.com/rustls/rustls/blob/main/rustls/examples/internal/test_ca.rs

@kpcyrd
Copy link
Author

kpcyrd commented Jun 12, 2024

image

Got it to work, thank you very much! :)

@kpcyrd kpcyrd closed this as completed Jun 12, 2024
@djc djc reopened this Jun 13, 2024
@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants