Test key_info != b''

This commit is contained in:
Carl Beekhuizen 2020-06-29 16:22:09 +02:00
parent ba585f8b8e
commit dbfbaccca9
No known key found for this signature in database
GPG Key ID: 8F29E54F49E7AAB5

View File

@ -26,6 +26,18 @@ def test_hkdf_mod_r(test) -> None:
assert bls.KeyGen(seed) == _HKDF_mod_r(IKM=seed) assert bls.KeyGen(seed) == _HKDF_mod_r(IKM=seed)
@pytest.mark.parametrize(
'seed',
[b'\x00'*32]
)
@pytest.mark.parametrize(
'key_info',
[b'\x00'*32, b'\x01\x23\x45\x67\x89\xAB\xBC\xDE\xFF', b'\xFF'*16]
)
def test_hkdf_mod_r_key_info(seed: bytes, key_info:bytes) -> None:
assert bls.KeyGen(seed, key_info) == _HKDF_mod_r(IKM=seed, key_info=key_info)
@pytest.mark.parametrize( @pytest.mark.parametrize(
'test', 'test',
test_vectors test_vectors