-
Notifications
You must be signed in to change notification settings - Fork 834
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 private exponentiation: multiply blinding invert in Mont #6955
RSA private exponentiation: multiply blinding invert in Mont #6955
Conversation
d3bc4a7
to
e1d99a8
Compare
Retest this please. |
Testing for this in progress, will take a few days to see results. |
a346f75
to
c1bcd57
Compare
Testing in progress. |
When blinding, multiply result of exponentiation my blinding invert in Montgomery form to make code more constant time.
c1bcd57
to
d3448e2
Compare
New testing in progress. |
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.
Results look good, I am happy with this.
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.
Thanks Sean! Looks like possibly a slight decrease in RSA performance, but that's to be expected.
Before:
------------------------------------------------------------------------------
wolfSSL version 5.6.4
------------------------------------------------------------------------------
Math: Multi-Precision: Wolf(SP) word-size=64 bits=4096 sp_int.c
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RSA 2048 public 32500 ops took 1.002 sec, avg 0.031 ms, 32446.105 ops/sec
RSA 2048 private 600 ops took 1.141 sec, avg 1.902 ms, 525.736 ops/sec
After:
RSA 2048 public 32300 ops took 1.001 sec, avg 0.031 ms, 32269.664 ops/sec
RSA 2048 private 600 ops took 1.126 sec, avg 1.877 ms, 532.791 ops/sec
Description
When blinding, multiply result of exponentiation my blinding invert in Montgomery form to make code more constant time.
Fixes zd#16722
Testing
Normal
Checklist