-
Notifications
You must be signed in to change notification settings - Fork 157
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
Swappable RSADP for YubiKey support #32
Comments
I like the idea of having this be a trait, and allow code reuse like this, especially as adding yubikey and smart card support is sth I would really like to see. I think if we add a trait like this we could mark it as |
I would strongly recommend against using |
A disabled-by-default feature flag is probably the right way to handle this, along with clear documentation. Another possibility might be to have |
So, was there a preference between exposing I figure that even if we created an |
I generally prefer flags over adding another crate in this case. |
These were added and ultimately removed in #300. The internals now decouple padding from the RSA operation, which makes it potentially possible to reuse the padding implementation for these cases. There are also now traits for both signing and encryption that can be implemented by 3rd party RSA providers like the |
While working on
yubikey-piv
I was testing the RSA logic by implementing OAEP around it. What I ended up doing was copying in all the logic from #18, and replacing:with
It seems like the way to achieve this more generally (across all decryption schemes) would be with a trait of the form:
Then in
yubikey-piv
we could do something like:Thoughts? The part I dislike about the above sketch is that the raw RSA decryption primitive is exposed in the API, but this needs to happen somewhere if this kind of interoperability and code de-duplication were to happen at all.
The text was updated successfully, but these errors were encountered: