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

Why not RSA? #56

Closed
JonathanWilbur opened this issue Nov 26, 2023 · 3 comments
Closed

Why not RSA? #56

JonathanWilbur opened this issue Nov 26, 2023 · 3 comments

Comments

@JonathanWilbur
Copy link

Forgive my ignorance. I am not a cryptographer by trade. But I believe RSA could be used as a KEM in the abstract. I noticed that RFC 9180 does not list it as a registered KEM. I thought this was weird, since RSA is by far the most common public key type in X.509 PKI. Just wondering if this could be implemented at all.

@tarcieri
Copy link

Speaking as a maintainer of the rsa crate, it's very, very difficult to implement RSA in constant-time. See the recent Marvin Attack (which the rsa crate is still vulnerable to, see RustCrypto/RSA#19).

Elliptic curves, especially with modern complete formulas, are significantly easier to implement in constant-time.

@rozbb
Copy link
Owner

rozbb commented Nov 26, 2023

Totally valid question. Indeed, RSA would be a perfectly fine key encapsulation mechanism for HPKE (barring some of the implementation difficulties Tony brings up). The reason it's not implemented here is simply because nobody (to my knowledge) has drafted a proposal for a protocol extension.

If someone did, we could reasonably implement it and keep it in an unstable branch (like the current k256 and xyber branches) until it's finalized. Does that answer the question?

@JonathanWilbur
Copy link
Author

Yes it does. Thank you! Closing.

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