Skip to content

Montgomery model for elliptic curves #33707

@yyyyx4

Description

@yyyyx4

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions