Merge both h2c tests and add tests for deterministic blinding factor generation (#466)

This commit is contained in:
callebtc
2024-03-04 15:34:51 +01:00
committed by GitHub
parent 72573865ad
commit ff1e7597d1
3 changed files with 39 additions and 11 deletions

View File

@@ -23,9 +23,6 @@ def test_hash_to_curve():
result.serialize().hex()
== "024cce997d3b518f739663b757deaec95bcd9473c30a14ac2fd04023a739d1a725"
)
def test_hash_to_curve_iteration():
result = hash_to_curve(
bytes.fromhex(
"0000000000000000000000000000000000000000000000000000000000000001"
@@ -35,6 +32,15 @@ def test_hash_to_curve_iteration():
result.serialize().hex()
== "022e7158e11c9506f1aa4248bf531298daa7febd6194f003edcd9b93ade6253acf"
)
result = hash_to_curve(
bytes.fromhex(
"0000000000000000000000000000000000000000000000000000000000000002"
)
)
assert (
result.serialize().hex()
== "026cdbe15362df59cd1dd3c9c11de8aedac2106eca69236ecd9fbe117af897be4f"
)
def test_step1():