Skip to content

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

Merged
reaperhulk merged 1 commit intopyca:mainfrom
alex:dh-validity
Jun 17, 2023
Merged

Only check DH key validity when loading a private key.#9071
reaperhulk merged 1 commit intopyca:mainfrom
alex:dh-validity

Conversation

@alex
Copy link
Copy Markdown
Member

@alex alex commented Jun 13, 2023

Fixes #9063

Copy link
Copy Markdown
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

key exchange performance degradation

2 participants