From: Loup Vaillant Date: Sun, 23 Feb 2020 14:23:42 +0000 (+0100) Subject: Elligator script: ordering nitpick X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=a8cdfc7586b8f885d1107122409adffa049e36db;p=Monocypher.git Elligator script: ordering nitpick --- diff --git a/tests/gen/elligator.py b/tests/gen/elligator.py index 23014aa..994f9f1 100755 --- a/tests/gen/elligator.py +++ b/tests/gen/elligator.py @@ -229,9 +229,8 @@ def fast_curve_to_hash(point): return None if fe(2) * (u + A) * sq1**2 + u != fe(0): sq1 = (sq1 * sqrt1) if fe(2) * u * sq2**2 + u + A != fe(0): sq2 = (sq2 * sqrt1) - sq1 = sq1.abs() - sq2 = sq2.abs() - return sq1 if v.is_positive() else sq2 + sq = sq1 if v.is_positive() else sq2 + return sq.abs() # Explicit formula for hash_to_curve # We don't need the v coordinate for X25519, so it is omited