Skip to content

Prefer to use composite isogeny in more cases #40224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

user202729
Copy link
Contributor

@user202729 user202729 commented Jun 8, 2025

Note: make sure to review the dependency before this pull request.

The advantage of this pull request is that .isogeny() finishes quickly when the curve order is highly composite, even if you forget to pass algorithm="factored". Example (from doctest):

sage: E = EllipticCurve(GF((60*2^200-1)^2), [1, 0])
sage: P = E.0+E.1
sage: hasattr(P, '_order')
False
sage: E.isogeny(P)
Composite morphism of degree 964162...

The reason why this is never slower than the existing code is the following. Currently when the kernel generator P has unknown order, it uses EllipticCurveIsogeny, which in turn uses __init_from_kernel_point, as you can see it takes time linear in the order of P.

The new code takes time O(√(order of P)) which is negligible compared to that. (Maybe with some extra log factor.)

📝 Checklist

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

⌛ Dependencies

#40223

Copy link

github-actions bot commented Jun 8, 2025

Documentation preview for this PR (built with commit 2febe78; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants