From c9151968bc4ea685e93586c1cf5c7cd0a68f29c2 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 23 Feb 2020 11:46:27 +0100 Subject: [PATCH] Elligator script: test explicit_hash_to_curve --- tests/gen/elligator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gen/elligator.py b/tests/gen/elligator.py index ae91e9d..cab8979 100755 --- a/tests/gen/elligator.py +++ b/tests/gen/elligator.py @@ -247,7 +247,9 @@ def full_cycle_check(scalar, u): print('01:') # Success h.print() # actual value for the hash c = hash_to_curve(h) - if c != uv: raise ValueError('Round trip failure') + u = explicit_hash_to_curve(h) + if u != c[0]: raise ValueError('Incorrect explicit_hash_to_curve()') + if c != uv : raise ValueError('Round trip failure') else: print('00:') # Failure print('00:') # dummy value for the hash -- 2.47.3