Skip to content
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

pkcs1: implement support for PSS Params structure #698

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

lumag
Copy link
Contributor

@lumag lumag commented Aug 15, 2022

Add support for parsing and generatign RSA PSS params.

Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org

pkcs1/src/params.rs Outdated Show resolved Hide resolved
@lumag lumag force-pushed the pkcs1-params branch 3 times, most recently from 11f81a5 to b9700f9 Compare August 15, 2022 15:56
@lumag
Copy link
Contributor Author

lumag commented Aug 15, 2022

@tarcieri simplified the implementation to use derive[Sequence]. However I still could not simplify the AnyRef part.

Add support for parsing and generatign RSA PSS params.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
///
/// [RFC 8017 Appendix 2.3]: https://datatracker.ietf.org/doc/html/rfc8017#appendix-A.2.3
#[derive(Clone, Debug, Eq, PartialEq, Sequence)]
pub struct RsaPSSParameters<'a> {
Copy link
Member

Choose a reason for hiding this comment

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

Per RFC 430 naming conventions, this should be:

Suggested change
pub struct RsaPSSParameters<'a> {
pub struct RsaPssParameters<'a> {

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

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

One nit otherwise looks good

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

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

I'll go ahead and fix up the name myself

@tarcieri tarcieri merged commit d413ca7 into RustCrypto:master Aug 28, 2022
tarcieri added a commit that referenced this pull request Aug 28, 2022
Followup to #698.

- Renames `RsaPSSParameters` => `RsaPssParams`
- Removes use of the `der` crate's `derive` feature

The `rsa` crate curently doesn't need any custom derive, and adding it
here would make it a hard requirement.

We can consider switching to custom derive in `pkcs1`, but if we do it
then it should be wholesale for all types in the crate, not using custom
derive for some types and handwritten impls for others.
tarcieri added a commit that referenced this pull request Aug 28, 2022
Followup to #698.

- Renames `RsaPSSParameters` => `RsaPssParams`
- Removes use of the `der` crate's `derive` feature

The `rsa` crate curently doesn't need any custom derive, and adding it
here would make it a hard requirement.

We can consider switching to custom derive in `pkcs1`, but if we do it
then it should be wholesale for all types in the crate, not using custom
derive for some types and handwritten impls for others.
@tarcieri tarcieri mentioned this pull request Oct 10, 2022
Sign up for free to 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.

None yet

2 participants