From f6d0fb89b23a1cc6c65a6d28f4c0f62be4690c35 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 23 Feb 2020 11:41:04 +0100 Subject: [PATCH] Elligator script: remove redundant test --- tests/gen/elligator.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/gen/elligator.py b/tests/gen/elligator.py index 14194a6..ae91e9d 100755 --- a/tests/gen/elligator.py +++ b/tests/gen/elligator.py @@ -124,15 +124,6 @@ def curve_to_hash(point): if v.is_positive(): return sq1 else : return sq2 -# round trip test -for i in range(50): - h = fe(1234567890 * i).invert() # "random" hash - pp = hash_to_curve(h) - hh = curve_to_hash(pp) - ppp = hash_to_curve(hh) - if hh != h.abs() : raise ValueError('h != hh') - if pp != ppp : raise ValueError('pp != ppp') - # Edwards (Edwards25519) # -x^2 + y^2 = 1 + d*x^2*y^2 d = fe(-121665) / fe(121666) -- 2.47.3