diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2023-03-10 23:14:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-11 12:14:27 +0800 |
| commit | 5e3061c05ed2e2dca55f1c395df4d6f7c1e101a6 (patch) | |
| tree | e11a4d20548f4c774a2f28b52eaf5d74481fcd37 /tests | |
| parent | dd43b5588279042592813bd71b68afec11b9e196 (diff) | |
| download | cryptography-5e3061c05ed2e2dca55f1c395df4d6f7c1e101a6.tar.gz | |
Stop validating keys in ECDH exchange (#8490)
The theory here is that we're already doing sufficient validation key loading, and this is purely duplicative.
Note that there's at least _some_ validationg that was previously occurring only ECDH, the LowOrderPublic check that can be seen in wycheproof.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/wycheproof/test_ecdh.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/wycheproof/test_ecdh.py b/tests/wycheproof/test_ecdh.py index a797c224f..e2624a45a 100644 --- a/tests/wycheproof/test_ecdh.py +++ b/tests/wycheproof/test_ecdh.py @@ -86,13 +86,7 @@ def test_ecdh(backend, wycheproof): except UnsupportedAlgorithm: return - if wycheproof.valid or ( - wycheproof.acceptable - and not ( - wycheproof.has_flag("LowOrderPublic") - and backend._lib.CRYPTOGRAPHY_OPENSSL_300_OR_GREATER - ) - ): + if wycheproof.valid or wycheproof.acceptable: computed_shared = private_key.exchange(ec.ECDH(), public_key) expected_shared = binascii.unhexlify(wycheproof.testcase["shared"]) assert computed_shared == expected_shared |
