-
Notifications
You must be signed in to change notification settings - Fork 56
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
Constant-time GCD #227
Comments
FWIW, all of the |
See implementation in Rust: privacy-scaling-explorations/halo2curves#83 |
#372 added an initial implementation of Bernstein-Yang, but currently providing modular inversions only (and not fully wired up to the existing inversion APIs yet). Constant-time GCD can be implemented in terms of its "divstep" function. |
#472 implements GCD using Bernstein-Yang |
There is already an item for that in #1, but I would like to make a separate issue to add more info, and to make it more noticeable. It is likely I will have a go at it the next time I have free time available, in which case I will assign myself to the issue; before that it's free for the taking.
So the state of the art seems to be:
Additionally, with the GCD available, it seems straightforward to implement Jacobi symbol and modular inversion based on it. The latter may supersede the existing
inv_odd_mod_bounded()
, which was ported from GMP and therefore lacks any comments or references explaining the algorithm.The text was updated successfully, but these errors were encountered: