-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Secured RSA key generation against side-channel attacks #5170
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
Conversation
…nnel attacks on RSA key generation
|
Ready ? or this PR needs more than two approvals ;) |
| goto err; | ||
| if (BN_is_one(r1)) | ||
| ERR_set_mark(); | ||
| if (BN_mod_inverse(r1, r2, rsa->e, ctx) != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5161 calls BN_set_flags(r2, BN_FLG_CONSTTIME).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does this - before the "for"
|
@kroeckx - are you ok for us to push this one too (I just pushed the master version)? |
|
@mattcaswell: Will you merge this? |
…nnel attacks on RSA key generation Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #5170)
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #5170)
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #5170)
|
Pushed to 1.1.0 and 1.0.2. |
Replaced variable-time GCD with consttime inversion to avoid side-channel attacks on RSA key generation