-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Implement faster RSA key check #97827
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
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones Issue DetailsThis improves RSA key loading performance by using a lighter-weight RSA key checking mechanism instead of OpenSSL's. For private keys, this represents a 25x speed up for RSA 2048, and 250x for RSA 4096. Public keys also see a decent improvement. This is accomplished by reducing the amount of work that the key check is doing. The consistency of the key is still checked, but the quality of it is not.
|
src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
Outdated
Show resolved
Hide resolved
src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
Outdated
Show resolved
Hide resolved
Test failures as known. I checked the portable / non-portable build against OpenSSL 1.0.2g. Merging. |
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7792389191 |
@stephentoub this perf improvement is blog-post worthy! |
Not for a 9 post; this was backported to 8. |
This improves RSA key loading performance by using a lighter-weight RSA key checking mechanism instead of OpenSSL's.
For private keys, this represents a 60x speed up for RSA 2048, and 270x for RSA 4096. Public keys also see a decent improvement.
This is accomplished by reducing the amount of work that the key check is doing. The consistency of the key is still checked, but the quality of it is not.
Fixes #97727