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

Implement verify-only PSS PaddingScheme #173

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

lumag
Copy link
Contributor

@lumag lumag commented Jul 31, 2022

A fix for #172 , implementation of verify-only PSS padding schema

@tarcieri
Copy link
Member

Instead of introducing a DummyRng, it seems to me like it would make more sense to remove salt_rng from PaddingScheme::PSS.

Its only use is to pass it to pss::sign, and in that regard it can be passed as an explicit parameter rather than embedding it into the padding scheme. An RNG is already an explicit parameter to sign_blinded (in which case it receives two RNGs. I'm not sure why one would want to use two RNGs?)

Really it'd be nice to implement the traits from the signature crate, where the "sign" vs "sign with RNG" cases are concretely handled as Signer versus RandomizedSigner, but that's a lot more work.

@lumag
Copy link
Contributor Author

lumag commented Jul 31, 2022

@tarcieri done

@lumag
Copy link
Contributor Author

lumag commented Aug 17, 2022

gracious ping

The passed rng is not necessary for PSS signature verification. Instead
of passing artificial unused RNG through the PaddingScheme, add new
sign_with_rng() API and pass rng directly. In the sign_blinded() use the
passed rng both for salt generation and for the blinding process.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
@lumag
Copy link
Contributor Author

lumag commented Aug 23, 2022

Refreshed to remove conflict.

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.

Looks a lot better!

Copy link
Member

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

lgtm thanks

@tarcieri tarcieri merged commit 2ffd3ae into RustCrypto:master Aug 29, 2022
@lumag lumag deleted the pss-verify branch August 30, 2022 08:30
@Kriskras99
Copy link

@tarcieri could this be included in the upcoming 0.7.0 release? It would save me a dependency and make it clearer what is going on in my code.

@tarcieri
Copy link
Member

Yep, that's the plan

@Kriskras99
Copy link

Yep, that's the plan

Great! I look forward to testing 0.7.0-pre2😁

@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

4 participants