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

Window method for GLV acceleration #45

Closed
mratsim opened this issue Jun 14, 2020 · 0 comments · Fixed by #74
Closed

Window method for GLV acceleration #45

mratsim opened this issue Jun 14, 2020 · 0 comments · Fixed by #74
Labels
constant time ⏳ Enhancement is suitable for secret data performance 🏁

Comments

@mratsim
Copy link
Owner

mratsim commented Jun 14, 2020

#44 introduced a basic endomorphism accelerated scalar multiplication.

This can be further accelerated by introducing windows to save the following amount of operations:

  • On G1, with a 2 dimensional decomposition, the lookup table is small (2 curve points), we can use a window of 2 or 3 (especially with affine coordinates) with the following estimated speedups:
    • GLV scalarmul on 254-bit scalar --> 127 doubling + 127 additions (from table lookup)
    • With window of size 2 --> 127 doublings + 64 additions (-25% operations)
    • With window of size 3 --> 127 doublings + 43 additions (-33% operations)

On G2 scalar multiplier for pairing curves can already be decomposed ways by combining 2 endomorphisms acceleration (GLV + GLS methods) and adding window methods on top will blow up the stack for few savings

The paper has a in-depth explanation of the window method applied to the custom representation.

  • Efficient and Secure Algorithms for GLV-Based Scalar
    Multiplication and their Implementation on GLV-GLS
    Curves (Extended Version)
    Armando Faz-Hernández, Patrick Longa, Ana H. Sánchez, 2013
    https://eprint.iacr.org/2013/158.pdf

Additionally:

Also Snowshoe (https://github.com/catid/snowshoe) has such an implementation and sems to be the only project with such an implementation in the wild: https://github.com/catid/snowshoe/blob/8ba3f575/src/ecmul.inc#L134-L160

@mratsim mratsim added constant time ⏳ Enhancement is suitable for secret data performance 🏁 labels Jun 14, 2020
@mratsim mratsim linked a pull request Aug 24, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
constant time ⏳ Enhancement is suitable for secret data performance 🏁
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant