Expand description
Implementation of Bernstein-Yang modular inversion and GCD algorithm (a.k.a. safegcd) as described in: https://eprint.iacr.org/2019/266.
See parent module for more information.
Structsยง
- Boxed
Safe ๐GcdInverter - Modular multiplicative inverter based on the Bernstein-Yang method.
- Signed
Boxed ๐Int - A
Uintwhich carries a separate sign in order to maintain the same range.
Functionsยง
- gcd
- Calculate the greatest common denominator of
fandg. - gcd_nz
- Calculate the greatest common denominator of nonzero
f, andg. - gcd_odd
- Calculate the greatest common denominator of odd
f, andg. - invert_
odd_ mod - invert_
odd_ ๐mod_ precomp - Calculate the multiplicative inverse of
amodulom. - update_
de ๐ - update_
fg ๐