Skip to content
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

fast path for Vélu isogenies with a single kernel generator #36805

Conversation

yyyyx4
Copy link
Member

@yyyyx4 yyyyx4 commented Dec 3, 2023

The current implementation of Vélu's formulas always assumes that the kernel subgroup is given by an arbitrary set of generators: The important special case of a single generator is handled using the same code as the general case.
In this patch we add a fast path to handle a single generator, which can yield big speedups. Example:

sage: E = EllipticCurve(GF(2^127-1), [1,1,1,1,1])
sage: P = E.lift_x(73833238617088645877502541346296796686)
sage: P.set_order(2543)
sage: %timeit E.isogeny(P)

Sage 10.2:

63.6 ms ± 588 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

With this patch:

33.3 ms ± 98.8 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

@yyyyx4 yyyyx4 force-pushed the public/faster_velu_with_single_kernel_generator branch from 66c24f2 to 05d2451 Compare January 1, 2024 21:44
@yyyyx4 yyyyx4 force-pushed the public/faster_velu_with_single_kernel_generator branch from 05d2451 to 5d6983b Compare January 15, 2024 15:36
@yyyyx4 yyyyx4 force-pushed the public/faster_velu_with_single_kernel_generator branch 2 times, most recently from 4fe6c43 to fa10e3e Compare January 31, 2024 10:28
@yyyyx4 yyyyx4 force-pushed the public/faster_velu_with_single_kernel_generator branch from fa10e3e to 81eb2c3 Compare January 31, 2024 10:35
Copy link

Documentation preview for this PR (built with commit 81eb2c3; changes) is ready! 🎉

Copy link
Contributor

@GiacomoPope GiacomoPope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to find something to suggest to change, but the PR is good and clean.

This is an obvious thing to implement as most calls only include a single point rather than a list so this will be a "free speed boost" for most people.

Good addition to the isogeny code.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 7, 2024
…enerator

    
The current implementation of Vélu's formulas always assumes that the
kernel subgroup is given by an arbitrary set of generators: The
important special case of a single generator is handled using the same
code as the general case.
In this patch we add a fast path to handle a single generator, which can
yield big speedups. Example:
```sage
sage: E = EllipticCurve(GF(2^127-1), [1,1,1,1,1])
sage: P = E.lift_x(73833238617088645877502541346296796686)
sage: P.set_order(2543)
sage: %timeit E.isogeny(P)
```

Sage 10.2:
```
63.6 ms ± 588 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

With this patch:
```
33.3 ms ± 98.8 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```
    
URL: sagemath#36805
Reported by: Lorenz Panny
Reviewer(s): Giacomo Pope
@vbraun vbraun merged commit bbe70e7 into sagemath:develop Feb 13, 2024
21 of 22 checks passed
@yyyyx4 yyyyx4 deleted the public/faster_velu_with_single_kernel_generator branch February 14, 2024 02:55
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
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.

4 participants