Add Encryption-related traits#259
Merged
tarcieri merged 5 commits intoRustCrypto:masterfrom Feb 13, 2023
Merged
Conversation
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
There is little point in having only OAEP test cases in src/key.rs. Move them to proper module, oaep.rs. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
tarcieri
reviewed
Feb 7, 2023
tarcieri
reviewed
Feb 7, 2023
Currently the crate doesn't mark the oaep module as public. Thus it makes little sense to mark top-level functions as public. Drop the modifier. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
tarcieri
approved these changes
Feb 7, 2023
Member
tarcieri
left a comment
There was a problem hiding this comment.
Looks good! I really like this API, and the traits that sort of mirror the signature crate
Add traits following the signature design for encryption and decryption. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Add new EncryptingKey and DecryptingKey structs implementing Encryptor / Decryptor traits. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Merged
takumi-earth
pushed a commit
to earthlings-dev/RSA
that referenced
this pull request
Jan 27, 2026
* feat: relax Sized requirement for random source parameters * oaep: move OAEP test cases to src/oaep.rs There is little point in having only OAEP test cases in src/key.rs. Move them to proper module, oaep.rs. * oaep: mark two functions as private Currently the crate doesn't mark the oaep module as public. Thus it makes little sense to mark top-level functions as public. Drop the modifier. * feat: traits: add traits for encryption and decryption Add traits following the signature design for encryption and decryption. * oaep: add support for new encryption API Add new EncryptingKey and DecryptingKey structs implementing Encryptor / Decryptor traits. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
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.
Follow the signing API and add a set of traits to be used for data encryption and decryption.