aboutsummaryrefslogtreecommitdiff
path: root/src/secp256k1/sage/secp256k1_params.sage
diff options
context:
space:
mode:
Diffstat (limited to 'src/secp256k1/sage/secp256k1_params.sage')
-rw-r--r--src/secp256k1/sage/secp256k1_params.sage3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/secp256k1/sage/secp256k1_params.sage b/src/secp256k1/sage/secp256k1_params.sage
index 4e000726ed..68f95adec4 100644
--- a/src/secp256k1/sage/secp256k1_params.sage
+++ b/src/secp256k1/sage/secp256k1_params.sage
@@ -9,6 +9,9 @@ C = EllipticCurve([F(0), F(7)])
"""Base point of secp256k1"""
G = C.lift_x(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798)
+if int(G[1]) & 1:
+ # G.y is even
+ G = -G
"""Prime order of secp256k1"""
N = C.order()