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

Fix public bit size in RSA PSS signature check #286

Closed
wants to merge 1 commit into from

Conversation

onesk
Copy link

@onesk onesk commented Jan 4, 2021

Adjusts the PSS padding to correct length in case modulus bit length is less than 4096 - the byte size should be rounded up, not down.

A test case for this is evidenced in #283. Arweave-js would succesfully verify said signature via crypto.subtle, but Erlang implementation fails to do so. Not only it rejects the perfectly valid signature, it also crashes the verification process.

Adjusts the PSS padding to correct length in case modulus bit length is less than 4096. Previously such signatures would crash the verification process.
@ldmberman
Copy link
Member

Hi @onesk, great catch, thank you very much! 👏 We need to include it in the next hard fork.

@ldmberman
Copy link
Member

Added here, thank you!

@ldmberman ldmberman closed this Feb 10, 2021
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