Elliptic curve over Z modulo composite N
It's known, that $$E_{A,B}(Z_p^2) \cong E_{A,B}(Z_p) \oplus Z_p \text{ when } q:=|E_{A,B}(Z_p) | \neq p$$ Therefore $exp (E_{A,B}(Z_p^2) )=lcm(q,p)$. But when it comes to implementing this on sage
p=115792089237316195423570985008687907853269984665640564039457584007913129639747
K = GF(p)
E = EllipticCurve(K, [a, b])
EE = EllipticCurve(IntegerModRing(p^2), [a, b])
q=E.order()
c=12010
P=EE.lift_x(c)
q*P
I keep getting ZeroDivisionError. I looked at the traceback and it seems, that sage just tries to compute $P+Q$ as if the elliptic curve is defined over a field. Can someone explain this and/or find another way to compute $qP$ for arbitrary $P \in (E_{A,B}(Z_p^2) )$ ?
What is
a
andb
in your code?a = -3 b = 2697448053935541741976221051345108825177671050689533270507
Your code works fine in Sagecell: https://sagecell.sagemath.org/?q=ydnjkt Perhaps, it's time to update your Sage version.
Interesting, but I have Sagemath 10.4. Anyway, thanks for the help!
Sagecell runs
SageMath version 10.6, Release Date: 2025-03-31