aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wycheproof/test_ecdsa.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wycheproof/test_ecdsa.py')
-rw-r--r--tests/wycheproof/test_ecdsa.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/wycheproof/test_ecdsa.py b/tests/wycheproof/test_ecdsa.py
index 5214052e..14542ed7 100644
--- a/tests/wycheproof/test_ecdsa.py
+++ b/tests/wycheproof/test_ecdsa.py
@@ -20,6 +20,10 @@ _DIGESTS = {
"SHA-256": hashes.SHA256(),
"SHA-384": hashes.SHA384(),
"SHA-512": hashes.SHA512(),
+ "SHA3-224": hashes.SHA3_224(),
+ "SHA3-256": hashes.SHA3_256(),
+ "SHA3-384": hashes.SHA3_384(),
+ "SHA3-512": hashes.SHA3_512(),
}
@@ -34,13 +38,23 @@ _DIGESTS = {
"ecdsa_secp224r1_sha224_test.json",
"ecdsa_secp224r1_sha256_test.json",
"ecdsa_secp224r1_sha512_test.json",
+ "ecdsa_secp224r1_sha3_224_test.json",
+ "ecdsa_secp224r1_sha3_256_test.json",
+ "ecdsa_secp224r1_sha3_512_test.json",
"ecdsa_secp256k1_sha256_test.json",
"ecdsa_secp256k1_sha512_test.json",
+ "ecdsa_secp256k1_sha3_256_test.json",
+ "ecdsa_secp256k1_sha3_512_test.json",
"ecdsa_secp256r1_sha256_test.json",
"ecdsa_secp256r1_sha512_test.json",
+ "ecdsa_secp256r1_sha3_256_test.json",
+ "ecdsa_secp256r1_sha3_512_test.json",
"ecdsa_secp384r1_sha384_test.json",
"ecdsa_secp384r1_sha512_test.json",
+ "ecdsa_secp384r1_sha3_384_test.json",
+ "ecdsa_secp384r1_sha3_512_test.json",
"ecdsa_secp521r1_sha512_test.json",
+ "ecdsa_secp521r1_sha3_512_test.json",
)
def test_ecdsa_signature(backend, wycheproof):
try:
@@ -58,6 +72,9 @@ def test_ecdsa_signature(backend, wycheproof):
)
digest = _DIGESTS[wycheproof.testgroup["sha"]]
+ if not backend.hash_supported(digest):
+ pytest.skip("Hash {} not supported".format(digest))
+
if (
wycheproof.valid or
(wycheproof.acceptable and not wycheproof.has_flag("MissingZero"))