Skip to content

Left pad signatures when encoding#325

Merged
tarcieri merged 1 commit intomasterfrom
left-pad-signatures-when-encoding
May 4, 2023
Merged

Left pad signatures when encoding#325
tarcieri merged 1 commit intomasterfrom
left-pad-signatures-when-encoding

Conversation

@tarcieri
Copy link
Copy Markdown
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
Copy Markdown
Member

baloo commented May 3, 2023

Thanks!

@tarcieri tarcieri mentioned this pull request May 4, 2023
@tarcieri
Copy link
Copy Markdown
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
@tarcieri tarcieri deleted the left-pad-signatures-when-encoding branch May 4, 2023 00:34
@tarcieri tarcieri mentioned this pull request May 4, 2023
takumi-earth pushed a commit to earthlings-dev/RSA that referenced this pull request Jan 27, 2026
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.
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.

2 participants