From add25a27a56495734473b45a7fb6b484eba2f006 Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Tue, 9 Jan 2018 12:47:27 +1100 Subject: [PATCH 1/2] Comment on return value of inv(a, n) --- py_ecc/bn128/bn128_field_elements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py_ecc/bn128/bn128_field_elements.py b/py_ecc/bn128/bn128_field_elements.py index 86d6a82..9e7fc2f 100644 --- a/py_ecc/bn128/bn128_field_elements.py +++ b/py_ecc/bn128/bn128_field_elements.py @@ -26,7 +26,7 @@ def inv(a, n): r = high//low nm, new = hm-lm*r, high-low*r lm, low, hm, high = nm, new, lm, low - return lm % n + return lm % n # The quotient of the first input by the greatest common divisor of the two inputs. # A class for field elements in FQ. Wrap a number in this class, # and it becomes a field element. From c780c92d672fa82ac2296c7eca564cc3f3c76187 Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Tue, 9 Jan 2018 13:28:26 +1100 Subject: [PATCH 2/2] second input --- py_ecc/bn128/bn128_field_elements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py_ecc/bn128/bn128_field_elements.py b/py_ecc/bn128/bn128_field_elements.py index 9e7fc2f..a1526c8 100644 --- a/py_ecc/bn128/bn128_field_elements.py +++ b/py_ecc/bn128/bn128_field_elements.py @@ -26,7 +26,7 @@ def inv(a, n): r = high//low nm, new = hm-lm*r, high-low*r lm, low, hm, high = nm, new, lm, low - return lm % n # The quotient of the first input by the greatest common divisor of the two inputs. + return lm % n # The quotient of the second input by the greatest common divisor of the two inputs. # A class for field elements in FQ. Wrap a number in this class, # and it becomes a field element.