Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Only check DH key validity when loading a private key. #9071

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

alex
Copy link
Member

@alex alex commented Jun 13, 2023

Fixes #9063

Copy link
Member

@reaperhulk reaperhulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns us to pre-rust behavior. Checking the key is safer but check cost is very high (two Miller-Rabin primality checks + a modexp). Future folks should consider whether we want to do an unsafe load kwarg like we do for RSA.

@reaperhulk reaperhulk merged commit b0e31ed into pyca:main Jun 17, 2023
@alex alex deleted the dh-validity branch June 17, 2023 12:57
reaperhulk pushed a commit that referenced this pull request Jul 31, 2023
Fixes #9063

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

key exchange performance degradation
2 participants