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

jsrsasign generates weak RSA keys, eventually #546

Closed
augjoh opened this issue Mar 9, 2022 · 1 comment
Closed

jsrsasign generates weak RSA keys, eventually #546

augjoh opened this issue Mar 9, 2022 · 1 comment

Comments

@augjoh
Copy link
Contributor

augjoh commented Mar 9, 2022

When generating RSA keys |p - q| must not be small. The Digital Signature Standard (DSS) specifies in B 3.2.2 that it should be smaller than 2^(bits(n)/2-100) meaning that the first 100 bits of p and q should differ. jsrsasign does not check this, when generating RSA keys. This makes it hard to prove compliance.

@kjur
Copy link
Owner

kjur commented Mar 18, 2022

Thank you for your report. The |p - q| check have been added in the 10.5.13 release today. Theoretically, a weak RSA key has only a 1 in 2^100 chance of being generated before the fix.

@kjur kjur closed this as completed Mar 18, 2022
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