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

RSA PSS doesn't support non power of 2 public keys #1423

Closed
masterzen opened this issue Oct 19, 2019 · 1 comment
Closed

RSA PSS doesn't support non power of 2 public keys #1423

masterzen opened this issue Oct 19, 2019 · 1 comment

Comments

@masterzen
Copy link
Contributor

The RFC3447 doesn't mention that public keys modulus size should be a power of 2.
Though, the RSA PSS verification code only supports keys whose modulus has a size that is a power of 2.

I discovered this while trying to validate the JWS PS256 signature of a token that had been signed with a public key of 522 bits.

masterzen pushed a commit to masterzen/phpseclib that referenced this issue Oct 19, 2019
RFC3447 doesn't require RSA public keys to be power of 2 keys.
The actual validation code doesn't work when trying to verify
a PSS signature generated with a non power of two key.
This small patch adds support for such keys.
terrafrost pushed a commit to terrafrost/phpseclib that referenced this issue Oct 20, 2019
RFC3447 doesn't require RSA public keys to be power of 2 keys.
The actual validation code doesn't work when trying to verify
a PSS signature generated with a non power of two key.
This small patch adds support for such keys.
@terrafrost
Copy link
Member

Your fix has been merged.

Thanks!

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

No branches or pull requests

2 participants