From 0c6c988e2ee079ed262bae3a802c05d840d9f9f3 Mon Sep 17 00:00:00 2001 From: Taylor Hornby Date: Mon, 26 Apr 2021 18:34:31 -0600 Subject: [PATCH] Call iso_map in map_to_curve_simple_swu --- orchard_group_hash.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/orchard_group_hash.py b/orchard_group_hash.py index c1ea902..a569bd3 100755 --- a/orchard_group_hash.py +++ b/orchard_group_hash.py @@ -121,7 +121,7 @@ def map_to_curve_simple_swu(u): y = y if e3 else -y #y = CMOV(-y, y, e3) - return orchard_iso_pallas.Point(x, y) + return orchard_iso_pallas.Point(x, y).iso_map() def group_hash(d, m): dst = d + b"-" + b"pallas" + b"_XMD:BLAKE2b_SSWU_RO_" @@ -129,6 +129,6 @@ def group_hash(d, m): elems = hash_to_field(m, dst) assert len(elems) == 2 - q = [map_to_curve_simple_swu(elems[0]), map_to_curve_simple_swu(elems[1]) ] + q = [map_to_curve_simple_swu(elems[0]), map_to_curve_simple_swu(elems[1])] - return (q[0] + q[1]).iso_map() \ No newline at end of file + return q[0] + q[1] \ No newline at end of file