You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-40223: Implement algorithm=generic_small and algorithm=hybrid for elliptic curve points
The main purpose of this is to be able to do the following (from
doctest)
sage: # needs sage.rings.finite_rings
sage: p = next_prime(2^256)
sage: q = next_prime(p)
sage: E = EllipticCurve(GF(660*p*q-1), [1, 0])
sage: P = E.lift_x(11) * p * q
sage: P.order() # not tested (pari will try to factor p*q
which takes forever)
sage: P.order(algorithm='generic_small')
330
sage: P.order() # works due to caching
330
Also fix some minor issues.
It might be preferable to upstream this to pari as well.
Also, this improvement idea can be applied more generally, namely to
`order_from_multiple`. However, that complicate the implementation
somewhat. I decide to leave that for later, if there is interest.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] 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: #40223
Reported by: user202729
Reviewer(s): John Cremona, Sahil Jain, user202729
0 commit comments