Skip to content

Commit

Permalink
gh-38341: Implement EllipticCurve_with_prime_order() constructor
Browse files Browse the repository at this point in the history
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->

Me and @grhkm21 suggest this diff against develop that implements the
`EllipticCurve_with_prime_order(N)` constructor. Using the prime order
`N` in input, this method finds another prime `p` and constructs an
elliptic curve `E/Fp` with `#E(Fp) = N`.

It follows Algorithm 2.2 of the paper [Constructing Elliptic Curves of
prime order](https://arxiv.org/abs/0712.2022) by Bröker and Stevenhagen.
The running time is quite random depending on the input parameter but
can turn out to be fast for some larger values (≃ 256 bits primes). It's
also worth noticing that some values will make this function run for a
**very** long time.

There had been a [PR](#37119) by
@grhkm21 and @GiacomoPope that implements the
`EllipticCurve_with_order()` method. This PR would intuitively fit nice
into their work but I felt uncomfortable with it returning an iterator.
I felt like returning a single curve was more handy so I implemented
this method in a separate function that does so but I'm open to
suggestions if this is of any interest to the community.

Fixes #38342

### 📝 Checklist
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
    
URL: #38341
Reported by: grnx
Reviewer(s): grhkm21, grnx, Vincent Macri
  • Loading branch information
Release Manager committed Sep 13, 2024
2 parents 2270e23 + b60e81f commit 76fbb6c
Show file tree
Hide file tree
Showing 3 changed files with 451 additions and 48 deletions.
3 changes: 3 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,9 @@ REFERENCES:
no. 1 (2003): 97-111,
http://www.moi.math.bas.bg/moiuser/~iliya/pdf_site/gf5srev.pdf.
.. [BS2007] \R. Bröker and P. Stevenhagen. *Constructing elliptic curves of
prime order*. [math.NT] (2007), :arXiv:`0712.2022`.
.. [BS2010] \P. Baseilhac and K. Shigechi. *A new current algebra and the
reflection equation*. Lett. Math. Phys. **92** (2010),
pp. 47-65. :arxiv:`0906.1482`.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
lazy_import('sage.schemes.elliptic_curves.jacobian', 'Jacobian')

lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve')

lazy_import('sage.schemes.elliptic_curves.ell_rational_field',
['cremona_curves', 'cremona_optimal_curves'])

from sage.schemes.elliptic_curves.ell_finite_field import EllipticCurve_with_prime_order
from sage.schemes.elliptic_curves.cm import (cm_orders,
cm_j_invariants,
cm_j_invariants_and_orders,
Expand Down
Loading

0 comments on commit 76fbb6c

Please sign in to comment.