def test_streaming(self): for _ in range(1, 128): p0 = bls12_381_generator * _ blob_clvm = bls12_381_to_bytes(p0) q0 = BLSPrivateKey.from_secret_exponent(_).public_key() blob_blspy = bytes(q0) assert blob_clvm.hex() == blob_blspy.hex() p1 = bls12_381_from_bytes(blob_clvm) assert p0 == p1 q1 = BLSPublicKey.from_bytes(blob_blspy) assert q0 == q1
def add_secret_exponents(self, secret_exponents): for _ in secret_exponents: bls_private_key = BLSPrivateKey.from_secret_exponent(_) self[bls_private_key.public_key()] = bls_private_key