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

Left pad signatures when encoding #325

Merged
merged 1 commit into from
May 4, 2023

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented May 3, 2023

The SignatureEncoding impl added in rsa v0.9 (or more specifically, the From<Signature> impl for Box<[u8]> failed to properly left pad the signatures so they matched the modulus size.

This adds the appropriate padding to the signature encoder.

The `SignatureEncoding` impl added in `rsa` v0.9 (or more specifically,
the `From<Signature>` impl for `Box<[u8]>` failed to properly left pad
the signatures so they matched the modulus size.

This adds the appropriate padding to the signature encoder.
@baloo
Copy link
Member

baloo commented May 3, 2023

Thanks!

@tarcieri tarcieri mentioned this pull request May 4, 2023
@tarcieri
Copy link
Member Author

tarcieri commented May 4, 2023

I confirmed this fixes RSASSA-PKCS1-v1_5 signatures when rebasing #326.

RSASSA-PSS signatures are still failing proptests, and I'm not sure why.

Anyway, going to go ahead and merge this.

@tarcieri tarcieri merged commit 53bb256 into master May 4, 2023
9 checks passed
@tarcieri tarcieri deleted the left-pad-signatures-when-encoding branch May 4, 2023 00:34
@tarcieri tarcieri mentioned this pull request May 4, 2023
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