Skip to content

Pad RSA signatures which have leading zeroes removed - #1855

Open
Rob-Hague wants to merge 1 commit into
sshnet:developfrom
Rob-Hague:rsa-verify
Open

Rob-Hague wants to merge 1 commit into
sshnet:developfrom
Rob-Hague:rsa-verify

Conversation

@Rob-Hague

Copy link
Copy Markdown
Collaborator

The BCL (at least the Windows crypto provider) seems to expect signatures matching the modulus size and fails verification even if the difference is just leading zeroes. So add them if needed. This is basically the same as #1388 in the opposite direction.

I believe this fixes one of the issues reported in #1799 that has roughly 1% or 2% failure rate (lines up with the upper byte of the signature being roughly uniform in [0, 255]).

The BCL (at least the Windows crypto provider) seems to expect signatures matching the
modulus size and fails verification even if the difference is just leading zeroes. So
add them if needed. This is basically the same as sshnet#1388 in the opposite direction.

I believe this fixes one of the issues reported in sshnet#1799 that has roughly 1% or 2%
failure rate (lines up with the upper byte of the signature being roughly uniform
in [0, 255]).

This branch has not been deployed

No deployments
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.

1 participant