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

Halve() instead of Multiplication by 1/2 #81

Merged
merged 4 commits into from
Oct 18, 2021
Merged

Conversation

yelhousni
Copy link
Collaborator

For all curves, at each step in the Miller loop computation, DoubleStep() is invoked. There are two field multiplications by 1/2 which can be implemented as a Montgomery-like Halve(a) function.

if a is even:
  a = a >> 1
else:
  a = a + modulus // no reduction
  a = a >> 1  

@gbotrel gbotrel merged commit a76e11c into develop Oct 18, 2021
@gbotrel gbotrel deleted the ML/DoubleStep-Halve branch October 18, 2021 14:25
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.

2 participants