-
-
Notifications
You must be signed in to change notification settings - Fork 674
Description
Sage implements all its elliptic-curve functionality on long Weierstrass curves. This makes sense, but sometimes we'd like to interface with (or debug) other software, most commonly in cryptography, where other curve models are much more popular.
This patch adds the method EllipticCurve_generic.montgomery_model()
, which computes a Montgomery model
`BY^2 = X^3 + AX^2 + X`
for a given elliptic curve. Both "untwisted" Montgomery curves with B=1
and "twisted" Montgomery curves with arbitrary B
are supported. The latter cannot be represented as an EllipticCurve_generic
, so we return a ProjectivePlaneCurve
instead. Arithmetic on that curve can be emulated by transfering back and forth to the Weierstrass form; a suitable morphism to do so can optionally be returned by the new method.
(In the future, we should also add Edwards curves, but this raises more questions with non-obvious answers: Edwards curves are singular and the correspondence with Weierstrass curves is only a birational equivalence, not an isomorphism.)
CC: @defeo @JohnCremona @categorie
Component: elliptic curves
Author: Lorenz Panny
Branch/Commit: 4e380e2
Reviewer: Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/33707