Skip to content

Add Encryption-related traits - #259

Merged
tarcieri merged 5 commits into
RustCrypto:masterfrom
lumag:encrypt-traits
Feb 13, 2023
Merged

Add Encryption-related traits#259
tarcieri merged 5 commits into
RustCrypto:masterfrom
lumag:encrypt-traits

Conversation

@lumag

@lumaglumag commented Feb 7, 2023

Copy link
Copy Markdown
Contributor

Follow the signing API and add a set of traits to be used for data encryption and decryption.

Dmitry Baryshkov added 2 commits February 8, 2023 00:39
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>
Comment threadsrc/oaep.rs
Comment threadsrc/traits.rs Outdated
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>

@tarcieritarcieri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I really like this API, and the traits that sort of mirror the signature crate

Dmitry Baryshkov added 2 commits February 8, 2023 01:21
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>
@tarcieri
tarcieri merged commit dacabfc into RustCrypto:masterFeb 13, 2023
@tarcieritarcieri mentioned this pull request Mar 2, 2023
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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@lumag@tarcieri