Don't run testvectors checks on KEMs (#161)
This commit is contained in:
parent
8d7c327e1e
commit
6e1f66d047
@ -30,7 +30,8 @@ See the section [API](#API) below.
|
|||||||
length-ciphertext: <N> # KEM only
|
length-ciphertext: <N> # KEM only
|
||||||
length-shared-secret: <N> # KEM only
|
length-shared-secret: <N> # KEM only
|
||||||
length-signature: <N> # Signature only
|
length-signature: <N> # 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
|
principal-submitter: Eve
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
- Alice
|
- Alice
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 21520
|
|||||||
length-secret-key: 43088
|
length-secret-key: 43088
|
||||||
length-ciphertext: 21632
|
length-ciphertext: 21632
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 91dce2e12200afc88f951aff9349b72d1dda6e53e305135a891aa1a67ef88352
|
|
||||||
nistkat-sha256: 2f4f1c352c1b343cce386c54234ca39fe29b48e45c66300f7311f5d3060d82b3
|
nistkat-sha256: 2f4f1c352c1b343cce386c54234ca39fe29b48e45c66300f7311f5d3060d82b3
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 21520
|
|||||||
length-secret-key: 43088
|
length-secret-key: 43088
|
||||||
length-ciphertext: 21632
|
length-ciphertext: 21632
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 8b62fc01fc1e4b4e336776b09b37aaf55d161b7c815b3298f39d4444b011e10c
|
|
||||||
nistkat-sha256: 6e54e319cc590c3f136af81990a04cd0009ef78dec92825d2eb834adfec661dc
|
nistkat-sha256: 6e54e319cc590c3f136af81990a04cd0009ef78dec92825d2eb834adfec661dc
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 9616
|
|||||||
length-secret-key: 19888
|
length-secret-key: 19888
|
||||||
length-ciphertext: 9720
|
length-ciphertext: 9720
|
||||||
length-shared-secret: 16
|
length-shared-secret: 16
|
||||||
testvectors-sha256: d4c7d30254a8cac8ad73b742b31813e47dcae6532a4dcbe13c04d72a2920a086
|
|
||||||
nistkat-sha256: c1f006531583896c47416e10707d1c8e487fe549df304d7a9c43155d5e47b8b6
|
nistkat-sha256: c1f006531583896c47416e10707d1c8e487fe549df304d7a9c43155d5e47b8b6
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 9616
|
|||||||
length-secret-key: 19888
|
length-secret-key: 19888
|
||||||
length-ciphertext: 9720
|
length-ciphertext: 9720
|
||||||
length-shared-secret: 16
|
length-shared-secret: 16
|
||||||
testvectors-sha256: 8f922de02d41005fcc3c4164b2ab74c4c7b588ed69e34e22607d1ae4ab13d2c5
|
|
||||||
nistkat-sha256: df2b77b8e108c61d16c78a99e79f3351ab15840a690f25c1f87a8e89295e9219
|
nistkat-sha256: df2b77b8e108c61d16c78a99e79f3351ab15840a690f25c1f87a8e89295e9219
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 15632
|
|||||||
length-secret-key: 31296
|
length-secret-key: 31296
|
||||||
length-ciphertext: 15744
|
length-ciphertext: 15744
|
||||||
length-shared-secret: 24
|
length-shared-secret: 24
|
||||||
testvectors-sha256: 30a2a3f2d834b5d90cd10241f53c4a4379abeea0dbd4eb65b260749b2ba81391
|
|
||||||
nistkat-sha256: 7e415ab659d0d08d8f43135e1e9d75a8b342f52b65e8326ebf8135521b987615
|
nistkat-sha256: 7e415ab659d0d08d8f43135e1e9d75a8b342f52b65e8326ebf8135521b987615
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 15632
|
|||||||
length-secret-key: 31296
|
length-secret-key: 31296
|
||||||
length-ciphertext: 15744
|
length-ciphertext: 15744
|
||||||
length-shared-secret: 24
|
length-shared-secret: 24
|
||||||
testvectors-sha256: 00707dc8158c6e51e70e9a7b23a87054c5f2167b77a2e5940b8e82519834717b
|
|
||||||
nistkat-sha256: 0d3d3a3ad11b69a93e72f1233b310884e97be8d16c9981bf1eb1321880cd0658
|
nistkat-sha256: 0d3d3a3ad11b69a93e72f1233b310884e97be8d16c9981bf1eb1321880cd0658
|
||||||
principal-submitter: Michael Naehrig, Microsoft Research
|
principal-submitter: Michael Naehrig, Microsoft Research
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 1088
|
|||||||
length-secret-key: 2400
|
length-secret-key: 2400
|
||||||
length-ciphertext: 1152
|
length-ciphertext: 1152
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 2f5cf9937959eb4a3bc910f71e830e9e0de029b28093c6192d2c3e915913016f
|
|
||||||
nistkat-sha256: d6dbb9399d1ba4ee2d986de3e54a461256b91d6c2f9b90ad2410cf41e09b64d1
|
nistkat-sha256: d6dbb9399d1ba4ee2d986de3e54a461256b91d6c2f9b90ad2410cf41e09b64d1
|
||||||
principal-submitter: Peter Schwabe
|
principal-submitter: Peter Schwabe
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 699
|
|||||||
length-secret-key: 935
|
length-secret-key: 935
|
||||||
length-ciphertext: 699
|
length-ciphertext: 699
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 1a7c207b96f29043fad3e31e69a806aacd98e035ec0128fdf97350ec833f3b83
|
|
||||||
nistkat-sha256: 7ecb93dbc7a588878691f2b2d656ebc42192779f335e3a96197f4ce2134f72c6
|
nistkat-sha256: 7ecb93dbc7a588878691f2b2d656ebc42192779f335e3a96197f4ce2134f72c6
|
||||||
principal-submitter: John M. Schanck
|
principal-submitter: John M. Schanck
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 930
|
|||||||
length-secret-key: 1234
|
length-secret-key: 1234
|
||||||
length-ciphertext: 930
|
length-ciphertext: 930
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 949f3ff44551abe3efd08e3527dd72a0bfba1df50deb49f619becf8b19ac283b
|
|
||||||
nistkat-sha256: 715a5caf1ee22bb4b75ff6b10f911fec77e0d63378ea359c0773ee0a4c6cbb97
|
nistkat-sha256: 715a5caf1ee22bb4b75ff6b10f911fec77e0d63378ea359c0773ee0a4c6cbb97
|
||||||
principal-submitter: John M. Schanck
|
principal-submitter: John M. Schanck
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 1230
|
|||||||
length-secret-key: 1590
|
length-secret-key: 1590
|
||||||
length-ciphertext: 1230
|
length-ciphertext: 1230
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: 099c3d9b6700608f9c7c95b89efbda75841a1e620a0d3bb0b6e7d403ca249e3f
|
|
||||||
nistkat-sha256: 0c5b6b159fab6eb677da469ec35aaa7e6b16162b315dcdb55a3b5da857e10519
|
nistkat-sha256: 0c5b6b159fab6eb677da469ec35aaa7e6b16162b315dcdb55a3b5da857e10519
|
||||||
principal-submitter: John M. Schanck
|
principal-submitter: John M. Schanck
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -5,7 +5,6 @@ length-public-key: 1138
|
|||||||
length-secret-key: 1450
|
length-secret-key: 1450
|
||||||
length-ciphertext: 1138
|
length-ciphertext: 1138
|
||||||
length-shared-secret: 32
|
length-shared-secret: 32
|
||||||
testvectors-sha256: a0082a6607ab054c296a02e1bea1b5d7ee8465077ee7989ab4295f9e464d0558
|
|
||||||
nistkat-sha256: 501e000c3eb374ffbfb81b0f16673a6282116465936608d7d164b05635e769e8
|
nistkat-sha256: 501e000c3eb374ffbfb81b0f16673a6282116465936608d7d164b05635e769e8
|
||||||
principal-submitter: John M. Schanck
|
principal-submitter: John M. Schanck
|
||||||
auxiliary-submitters:
|
auxiliary-submitters:
|
||||||
|
@ -47,7 +47,6 @@ EXPECTED_FIELDS = {
|
|||||||
'claimed-nist-level': {'type': int, 'min': 1, 'max': 5},
|
'claimed-nist-level': {'type': int, 'min': 1, 'max': 5},
|
||||||
'length-public-key': {'type': int, 'min': 1},
|
'length-public-key': {'type': int, 'min': 1},
|
||||||
'length-secret-key': {'type': int, 'min': 1},
|
'length-secret-key': {'type': int, 'min': 1},
|
||||||
'testvectors-sha256': {'type': str, 'length': 64},
|
|
||||||
'principal-submitter': {'type': str},
|
'principal-submitter': {'type': str},
|
||||||
'auxiliary-submitters': {'type': list, 'elements': {'type': str}},
|
'auxiliary-submitters': {'type': list, 'elements': {'type': str}},
|
||||||
'implementations': {
|
'implementations': {
|
||||||
@ -70,6 +69,7 @@ KEM_FIELDS = {
|
|||||||
|
|
||||||
SIGNATURE_FIELDS = {
|
SIGNATURE_FIELDS = {
|
||||||
'length-signature': {'type': int, 'min': 1},
|
'length-signature': {'type': int, 'min': 1},
|
||||||
|
'testvectors-sha256': {'type': str, 'length': 64},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ def test_testvectors():
|
|||||||
assert(implementation.scheme.metadata()['testvectors-sha256'].lower()
|
assert(implementation.scheme.metadata()['testvectors-sha256'].lower()
|
||||||
== hashlib.sha256(out.encode('utf-8')).hexdigest().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:
|
for implementation in scheme.implementations:
|
||||||
yield check_testvectors, implementation
|
yield check_testvectors, implementation
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user