def test_hkdf_mod_r(test) -> None: seed = bytes.fromhex(test['seed']) assert bls.KeyGen(seed) == _HKDF_mod_r(IKM=seed)
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)
def test_HKDF_mod_r(test_vector) -> None: test_0 = (bytes.fromhex(test_vector['seed']), test_vector['master_SK']) test_1 = (bytes.fromhex(test_vector['compressed_lamport_PK']), test_vector['child_SK']) for test in (test_0, test_1): assert _HKDF_mod_r(IKM=test[0]) == test[1]