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

Twice faster Jacobian quotients #13

Merged
merged 9 commits into from Aug 6, 2022

Conversation

remyoudompheng
Copy link
Contributor

@remyoudompheng remyoudompheng commented Aug 5, 2022

This series of changes removes some unnecessary or redundant computations leading to a 2x speedup overall.

Before:
sage SIKE_challenge.sage 281.15s user 0.39s system 99% cpu 4:42.12 total
After:
sage SIKE_challenge.sage 106.24s user 0.25s system 100% cpu 1:46.46 total

This makes FromJacToJac about 50% faster, mostly from
avoiding switching rings and variable substitutions,
and computing manually the expansion as symmetric functions.
The polynomial argument is no longer an element
of the fraction field.
The point is already known to be of order 3 so providing
information to the constructor avoids unnecessary work.
The cost of apply the Richelot isogeny determines how many
precomputed Jacobian point powers are worth keeping between
FromJacToJac iterations.

Since the image computation is now twice faster, we can
pass around a second precomputed power to keep balance.
This allows for minor simplifications and is about 10% faster.
SAGE monic() method on polynomials is very generic and
often slow due to going through many layers of Python objects.

It turns out that all Jacobian doubling formulas are also
compatible with non-monic Mumford coordinates so relaxing that
constraint saves some operations and accelerates computation
by about 10%.
Looking carefully at the coefficients of polynomials H1,H2,H3
they turn out to be almost exactly the coefficients of the inverse
matrix. This removes some redundant computations as the determinant
computation needs very similar operations.
Initialisation of isogenies in SAGE is much faster when using
points as arguments rather than polynomials.

On SIKE_challenge this is a 10%-15% speedup.
@GiacomoPope GiacomoPope merged commit 928da3e into GiacomoPope:main Aug 6, 2022
@remyoudompheng remyoudompheng deleted the richelot-veryfast branch August 10, 2022 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants