Skip to content

Conversation

@yyyyx4
Copy link
Member

@yyyyx4 yyyyx4 commented Jan 27, 2026

This patch adds an implementation of the method for general fields (including number fields), as well as adding new algorithms for the method over finite fields. With this, we address the comment

        # TODO: In many cases this is not the fastest algorithm.
        # Alternatives include factoring division polynomials and
        # random sampling (like PARI's ellgroup, but with a milder
        # termination condition). We should implement these too
        # and figure out when to use which.

in src/sage/schemes/elliptic_curves/ell_finite_field.py.

The purpose of the "random" algorithm is to address the issue that the current implementation often wastes a lot of time (sometimes exponential) on computing the entire structure of the group of rational points, when in reality only a small subgroup is needed. Here's an example that showcases this problem:

sage: F.<t> = GF((2^127-1, 4))
sage: E = EllipticCurve(F, [1,0])
sage: %time _ = E.torsion_basis(2^128, algorithm='random')
sage: %time _ = E.torsion_basis(2^128, algorithm='structure')

Output:

CPU times: user 133 ms, sys: 0 ns, total: 133 ms
Wall time: 134 ms
CPU times: user 6.72 s, sys: 0 ns, total: 6.72 s
Wall time: 6.73 s

@yyyyx4 yyyyx4 force-pushed the public/more_algorithms_for_elliptic_curve_torsion_basis branch from e9e1e9e to fc3d03a Compare January 27, 2026 00:43
@github-actions
Copy link

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

@yyyyx4 yyyyx4 marked this pull request as ready for review January 27, 2026 02:13
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.

1 participant