-
Notifications
You must be signed in to change notification settings - Fork 156
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
Should PaddingScheme
be a trait instead of an enum?
#226
Comments
Maybe it's better to completely remove |
@newpavlov both the public and private key need padding-related functionality. The public key needs to generate a padded message for encryption, and verify the padding with a signature, with the inverse true for private keys. As it were the padding is already largely implemented as crate-private free functions. The real question is how to expose it in the public API. |
I'd second @newpavlov here. I'd drop the |
As I mentioned in #244, I'd like to get rid of the I still think #244 is a reasonable first step towards splitting up the relevant functionality. |
@tarcieri well, I branched off the trunk on purpose. IMHO there is no point in having |
@tarcieri @newpavlov @dignifiedquire Also I think that we should make encryption/decryption follow the |
I implemented my ideas as #246 |
Resolved by #244 |
Looking at issues like #215 it seems like requirements of certain variants are making the others somewhat harder to use.
The
PKCS1v15Encrypt
andPKCS1v15Sign
have relatively minimal requirements withPKCS1v15Encrypt
having no members whatsoever, whereasOAEP
andPSS
both needBox<dyn DynDigest + Send + Sync>
.Having a trait would allow the impls to live in e.g.
pkcs1v15
andpss
modules as well, whereas right now thepkcs1v15
module only exposes encryption-related functionality.The text was updated successfully, but these errors were encountered: