Merged
Conversation
Member
Author
|
cc @lumag |
Member
Author
|
Note that there's various additional refactoring that could probably be performed, like getting rid of the inherent methods for these functionality and using the traits exclusively, or getting rid of the I deliberately didn't make any of those kinds of changes to make code review easier. |
ef9650b to
610d257
Compare
Member
|
I overall very much like this approach, it makes the API clearer to understand and reason about. |
Member
Author
|
@dignifiedquire this should be good to go now |
Splits up the `PaddingScheme` enum into four structs, named after the
previous variants of the struct (adopting capitalization from the Rust
API guidelines):
- `oaep::Oaep`
- `pkcs1v15::{Pkcs1v15Encrypt, Pkcs1v15Sign}`
- `pss::Pss`
All of these are re-exported from the toplevel.
Each of these structs impls one or more of the following traits:
- `PaddingScheme`: used for encryption
- `SignatureScheme`: used for signing
The `PaddingScheme` constructors have been remapped as follows:
- `new_oaep` => `Oaep::new`
- `new_oaep_with_label` => `Oaep::new_with_label`
- `new_oaep_with_mgf_hash` => `Oaep::new_with_mgf_hash`
- `new_oaep_with_mgf_hash_with_label` => `Oaep::new_with_mgf_hash_and_label`
- `new_pkcs1v15_encrypt` => `Pkcs1v15Encrypt`
- `new_pkcs1v15_sign` => `Pkcs1v15Sign::new`
- `new_pkcs1v15_sign_raw` => `Pkcs1v15Sign::new_raw`
- `new_pss` => `Pss::{new, new_blinded}`
- `new_pss_with_salt` => `Pss::{new_with_salt new_blinded_with_salt}`
69c9ba0 to
dc47326
Compare
Merged
sorah
added a commit
to sorah/needroleshere
that referenced
this pull request
Nov 4, 2023
Resolve incompatibilities as follows: - src/certificate.rs: RustCrypto/formats#771 - src/cmd/serve.rs: Move to FromRequestParts and use headers crate - src/ecdsa_sha256.rs: RustCrypto/traits#1196 and RustCrypto/signatures#574 - src/error.rs: Remove Duplicates - src/identity.rs: Remove owned validation logic as it should be done at x509_cert::serial_number::SerialNumber<x509_cert::certificate::Rfc5280> - src/sign.rs: RustCrypto/RSA#244
takumi-earth
pushed a commit
to earthlings-dev/RSA
that referenced
this pull request
Jan 27, 2026
Splits up the `PaddingScheme` enum into four structs, named after the
previous variants of the struct (adopting capitalization from the Rust
API guidelines):
- `oaep::Oaep`
- `pkcs1v15::{Pkcs1v15Encrypt, Pkcs1v15Sign}`
- `pss::Pss`
All of these are re-exported from the toplevel.
Each of these structs impls one or more of the following traits:
- `PaddingScheme`: used for encryption
- `SignatureScheme`: used for signing
The `PaddingScheme` constructors have been remapped as follows:
- `new_oaep` => `Oaep::new`
- `new_oaep_with_label` => `Oaep::new_with_label`
- `new_oaep_with_mgf_hash` => `Oaep::new_with_mgf_hash`
- `new_oaep_with_mgf_hash_with_label` => `Oaep::new_with_mgf_hash_and_label`
- `new_pkcs1v15_encrypt` => `Pkcs1v15Encrypt`
- `new_pkcs1v15_sign` => `Pkcs1v15Sign::new`
- `new_pkcs1v15_sign_raw` => `Pkcs1v15Sign::new_raw`
- `new_pss` => `Pss::{new, new_blinded}`
- `new_pss_with_salt` => `Pss::{new_with_salt new_blinded_with_salt}`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As proposed in #226, splits up the
PaddingSchemeenum into four structs, named after the previous variants of the struct (adopting capitalization from the Rust API guidelines):oaep::Oaeppkcs1v15::{Pkcs1v15Encrypt, Pkcs1v15Sign}pss::PssAll of these are re-exported from the toplevel.
Each of these structs impls one or more of the following traits:
PaddingScheme: used for encryptionSignatureScheme: used for signingThe
PaddingSchemeconstructors have been remapped as follows:new_oaep=>Oaep::newnew_oaep_with_label=>Oaep::new_with_labelnew_oaep_with_mgf_hash=>Oaep::new_with_mgf_hashnew_oaep_with_mgf_hash_with_label=>Oaep::new_with_mgf_hash_and_labelnew_pkcs1v15_encrypt=>Pkcs1v15Encryptnew_pkcs1v15_sign=>Pkcs1v15Sign::newnew_pkcs1v15_sign_raw=>Pkcs1v15Sign::new_rawnew_pss=>Pss::{new, new_blinded}new_pss_with_salt=>Pss::{new_with_salt new_blinded_with_salt}