From 50856e744e38a13b36e5757678360936024ea631 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Fri, 21 Feb 2020 00:06:40 +0100 Subject: [PATCH] Elligator script: readability nitpick The can_curve_to_hash() test takes a Montgomery point as input, whose coordinates are generally called (u, v), not (x, y). --- tests/gen/elligator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gen/elligator.py b/tests/gen/elligator.py index f5ef516..fa59588 100755 --- a/tests/gen/elligator.py +++ b/tests/gen/elligator.py @@ -111,8 +111,8 @@ def hash_to_curve(r): return (u, v) def can_curve_to_hash(point): - x = point[0] - return x != -A and is_square(-fe(2) * x * (x + A)) + u = point[0] + return u != -A and is_square(-fe(2) * u * (u + A)) def curve_to_hash(point): if not can_curve_to_hash(point): -- 2.47.3