From: Loup Vaillant Date: Mon, 17 Feb 2020 23:36:52 +0000 (+0100) Subject: Simplified elligator scripts a bit X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7fa3b80e4707cb2684b08a2c876f74bd7d6321b1;p=Monocypher.git Simplified elligator scripts a bit --- diff --git a/tests/gen/elligator.py b/tests/gen/elligator.py index 22df945..acb13d5 100755 --- a/tests/gen/elligator.py +++ b/tests/gen/elligator.py @@ -67,12 +67,7 @@ def print_little(n): print(':') def binary(b): - l = [] - while b > 0: - l.append(b % 2) - b //= 2 - l.reverse() - return l + return [int(c) for c in list(format(b, 'b'))] def exp(a, b): """