diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db06abcc..64f29fe7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,8 @@ See the section [API](#API) below. length-ciphertext: # KEM only length-shared-secret: # KEM only length-signature: # Signature only - testvectors-sha256: sha256sum of output of testvectors + nistkat-sha256: sha256sum of 1st NIST KAT test case # KEM only + testvectors-sha256: sha256sum of output of testvectors # Signature only principal-submitter: Eve auxiliary-submitters: - Alice diff --git a/crypto_kem/frodokem1344aes/META.yml b/crypto_kem/frodokem1344aes/META.yml index d14a89f4..42d24a2c 100644 --- a/crypto_kem/frodokem1344aes/META.yml +++ b/crypto_kem/frodokem1344aes/META.yml @@ -5,7 +5,6 @@ length-public-key: 21520 length-secret-key: 43088 length-ciphertext: 21632 length-shared-secret: 32 -testvectors-sha256: 91dce2e12200afc88f951aff9349b72d1dda6e53e305135a891aa1a67ef88352 nistkat-sha256: 2f4f1c352c1b343cce386c54234ca39fe29b48e45c66300f7311f5d3060d82b3 principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/frodokem1344shake/META.yml b/crypto_kem/frodokem1344shake/META.yml index c440d8eb..b047dc51 100644 --- a/crypto_kem/frodokem1344shake/META.yml +++ b/crypto_kem/frodokem1344shake/META.yml @@ -5,7 +5,6 @@ length-public-key: 21520 length-secret-key: 43088 length-ciphertext: 21632 length-shared-secret: 32 -testvectors-sha256: 8b62fc01fc1e4b4e336776b09b37aaf55d161b7c815b3298f39d4444b011e10c nistkat-sha256: 6e54e319cc590c3f136af81990a04cd0009ef78dec92825d2eb834adfec661dc principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/frodokem640aes/META.yml b/crypto_kem/frodokem640aes/META.yml index 82a4591d..154cb2eb 100644 --- a/crypto_kem/frodokem640aes/META.yml +++ b/crypto_kem/frodokem640aes/META.yml @@ -5,7 +5,6 @@ length-public-key: 9616 length-secret-key: 19888 length-ciphertext: 9720 length-shared-secret: 16 -testvectors-sha256: d4c7d30254a8cac8ad73b742b31813e47dcae6532a4dcbe13c04d72a2920a086 nistkat-sha256: c1f006531583896c47416e10707d1c8e487fe549df304d7a9c43155d5e47b8b6 principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/frodokem640shake/META.yml b/crypto_kem/frodokem640shake/META.yml index 468fd11a..6a3c7b40 100644 --- a/crypto_kem/frodokem640shake/META.yml +++ b/crypto_kem/frodokem640shake/META.yml @@ -5,7 +5,6 @@ length-public-key: 9616 length-secret-key: 19888 length-ciphertext: 9720 length-shared-secret: 16 -testvectors-sha256: 8f922de02d41005fcc3c4164b2ab74c4c7b588ed69e34e22607d1ae4ab13d2c5 nistkat-sha256: df2b77b8e108c61d16c78a99e79f3351ab15840a690f25c1f87a8e89295e9219 principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/frodokem976aes/META.yml b/crypto_kem/frodokem976aes/META.yml index 41031e9f..f1eede08 100644 --- a/crypto_kem/frodokem976aes/META.yml +++ b/crypto_kem/frodokem976aes/META.yml @@ -5,7 +5,6 @@ length-public-key: 15632 length-secret-key: 31296 length-ciphertext: 15744 length-shared-secret: 24 -testvectors-sha256: 30a2a3f2d834b5d90cd10241f53c4a4379abeea0dbd4eb65b260749b2ba81391 nistkat-sha256: 7e415ab659d0d08d8f43135e1e9d75a8b342f52b65e8326ebf8135521b987615 principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/frodokem976shake/META.yml b/crypto_kem/frodokem976shake/META.yml index cd41a223..11f8acce 100644 --- a/crypto_kem/frodokem976shake/META.yml +++ b/crypto_kem/frodokem976shake/META.yml @@ -5,7 +5,6 @@ length-public-key: 15632 length-secret-key: 31296 length-ciphertext: 15744 length-shared-secret: 24 -testvectors-sha256: 00707dc8158c6e51e70e9a7b23a87054c5f2167b77a2e5940b8e82519834717b nistkat-sha256: 0d3d3a3ad11b69a93e72f1233b310884e97be8d16c9981bf1eb1321880cd0658 principal-submitter: Michael Naehrig, Microsoft Research auxiliary-submitters: diff --git a/crypto_kem/kyber768/META.yml b/crypto_kem/kyber768/META.yml index 217dcd69..8a183ecc 100644 --- a/crypto_kem/kyber768/META.yml +++ b/crypto_kem/kyber768/META.yml @@ -5,7 +5,6 @@ length-public-key: 1088 length-secret-key: 2400 length-ciphertext: 1152 length-shared-secret: 32 -testvectors-sha256: 2f5cf9937959eb4a3bc910f71e830e9e0de029b28093c6192d2c3e915913016f nistkat-sha256: d6dbb9399d1ba4ee2d986de3e54a461256b91d6c2f9b90ad2410cf41e09b64d1 principal-submitter: Peter Schwabe auxiliary-submitters: diff --git a/crypto_kem/ntruhps2048509/META.yml b/crypto_kem/ntruhps2048509/META.yml index a9ece88a..a3a4c1ba 100644 --- a/crypto_kem/ntruhps2048509/META.yml +++ b/crypto_kem/ntruhps2048509/META.yml @@ -5,7 +5,6 @@ length-public-key: 699 length-secret-key: 935 length-ciphertext: 699 length-shared-secret: 32 -testvectors-sha256: 1a7c207b96f29043fad3e31e69a806aacd98e035ec0128fdf97350ec833f3b83 nistkat-sha256: 7ecb93dbc7a588878691f2b2d656ebc42192779f335e3a96197f4ce2134f72c6 principal-submitter: John M. Schanck auxiliary-submitters: diff --git a/crypto_kem/ntruhps2048677/META.yml b/crypto_kem/ntruhps2048677/META.yml index f46ca086..d80ff7b8 100644 --- a/crypto_kem/ntruhps2048677/META.yml +++ b/crypto_kem/ntruhps2048677/META.yml @@ -5,7 +5,6 @@ length-public-key: 930 length-secret-key: 1234 length-ciphertext: 930 length-shared-secret: 32 -testvectors-sha256: 949f3ff44551abe3efd08e3527dd72a0bfba1df50deb49f619becf8b19ac283b nistkat-sha256: 715a5caf1ee22bb4b75ff6b10f911fec77e0d63378ea359c0773ee0a4c6cbb97 principal-submitter: John M. Schanck auxiliary-submitters: diff --git a/crypto_kem/ntruhps4096821/META.yml b/crypto_kem/ntruhps4096821/META.yml index a3e76c34..308b7cd0 100644 --- a/crypto_kem/ntruhps4096821/META.yml +++ b/crypto_kem/ntruhps4096821/META.yml @@ -5,7 +5,6 @@ length-public-key: 1230 length-secret-key: 1590 length-ciphertext: 1230 length-shared-secret: 32 -testvectors-sha256: 099c3d9b6700608f9c7c95b89efbda75841a1e620a0d3bb0b6e7d403ca249e3f nistkat-sha256: 0c5b6b159fab6eb677da469ec35aaa7e6b16162b315dcdb55a3b5da857e10519 principal-submitter: John M. Schanck auxiliary-submitters: diff --git a/crypto_kem/ntruhrss701/META.yml b/crypto_kem/ntruhrss701/META.yml index a18286fc..e5b53e09 100644 --- a/crypto_kem/ntruhrss701/META.yml +++ b/crypto_kem/ntruhrss701/META.yml @@ -5,7 +5,6 @@ length-public-key: 1138 length-secret-key: 1450 length-ciphertext: 1138 length-shared-secret: 32 -testvectors-sha256: a0082a6607ab054c296a02e1bea1b5d7ee8465077ee7989ab4295f9e464d0558 nistkat-sha256: 501e000c3eb374ffbfb81b0f16673a6282116465936608d7d164b05635e769e8 principal-submitter: John M. Schanck auxiliary-submitters: diff --git a/test/test_metadata.py b/test/test_metadata.py index 7f7a92fd..a19a6148 100644 --- a/test/test_metadata.py +++ b/test/test_metadata.py @@ -47,7 +47,6 @@ EXPECTED_FIELDS = { 'claimed-nist-level': {'type': int, 'min': 1, 'max': 5}, 'length-public-key': {'type': int, 'min': 1}, 'length-secret-key': {'type': int, 'min': 1}, - 'testvectors-sha256': {'type': str, 'length': 64}, 'principal-submitter': {'type': str}, 'auxiliary-submitters': {'type': list, 'elements': {'type': str}}, 'implementations': { @@ -70,6 +69,7 @@ KEM_FIELDS = { SIGNATURE_FIELDS = { 'length-signature': {'type': int, 'min': 1}, + 'testvectors-sha256': {'type': str, 'length': 64}, } diff --git a/test/test_testvectors.py b/test/test_testvectors.py index c4834c31..d838905b 100644 --- a/test/test_testvectors.py +++ b/test/test_testvectors.py @@ -28,7 +28,7 @@ def test_testvectors(): assert(implementation.scheme.metadata()['testvectors-sha256'].lower() == hashlib.sha256(out.encode('utf-8')).hexdigest().lower()) - for scheme in pqclean.Scheme.all_schemes(): + for scheme in pqclean.Scheme.all_schemes_of_type('sign'): for implementation in scheme.implementations: yield check_testvectors, implementation