Skip to content

Commit a7eda25

Browse files
authored
Make wycheproof x25519 and x448 tests more flexible (#12676)
* Update test_x448.py * Update test_x25519.py * Update test_x25519.py * Update test_x448.py
1 parent 64c0999 commit a7eda25

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

tests/wycheproof/test_x25519.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
)
2121
@wycheproof_tests("x25519_test.json")
2222
def test_x25519(backend, wycheproof):
23-
assert set(wycheproof.testgroup.items()) == {
24-
("curve", "curve25519"),
25-
("type", "XdhComp"),
26-
}
23+
assert wycheproof.testgroup["curve"] == "curve25519"
24+
assert wycheproof.testgroup["type"] == "XdhComp"
2725

2826
private_key = X25519PrivateKey.from_private_bytes(
2927
binascii.unhexlify(wycheproof.testcase["private"])

tests/wycheproof/test_x448.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
)
2121
@wycheproof_tests("x448_test.json")
2222
def test_x448(backend, wycheproof):
23-
assert set(wycheproof.testgroup.items()) == {
24-
("curve", "curve448"),
25-
("type", "XdhComp"),
26-
}
23+
assert wycheproof.testgroup["curve"] == "curve448"
24+
assert wycheproof.testgroup["type"] == "XdhComp"
2725

2826
private_key = X448PrivateKey.from_private_bytes(
2927
binascii.unhexlify(wycheproof.testcase["private"])

0 commit comments

Comments
 (0)