From 2c98aa0e2eaede3cdaf18f659c735f5efd1ecf1c Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Tue, 9 Jan 2018 10:41:20 +1100 Subject: [PATCH] Fermat's Little Theorem --- 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..d1063dd 100644 --- a/py_ecc/bn128/bn128_field_elements.py +++ b/py_ecc/bn128/bn128_field_elements.py @@ -9,7 +9,7 @@ # The prime modulus of the field field_modulus = 21888242871839275222246405745257275088696311157297823662689037894645226208583 -# See, it's prime! +# See, it's prime, by Fermat's Little Theorem! assert pow(2, field_modulus, field_modulus) == 2 # The modulus of the polynomial in this representation of FQ12