From: Loup Vaillant Date: Sun, 23 Feb 2020 10:46:27 +0000 (+0100) Subject: Elligator script: test explicit_hash_to_curve X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c9151968bc4ea685e93586c1cf5c7cd0a68f29c2;p=Monocypher.git Elligator script: test explicit_hash_to_curve --- 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