Skip to main content

Module boxed

Module boxed 

Source
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ยง

BoxedSafeGcdInverter ๐Ÿ”’
Modular multiplicative inverter based on the Bernstein-Yang method.
SignedBoxedInt ๐Ÿ”’
A Uint which carries a separate sign in order to maintain the same range.

Functionsยง

gcd
Calculate the greatest common denominator of f and g.
gcd_nz
Calculate the greatest common denominator of nonzero f, and g.
gcd_odd
Calculate the greatest common denominator of odd f, and g.
invert_odd_mod
invert_odd_mod_precomp ๐Ÿ”’
Calculate the multiplicative inverse of a modulo m.
update_de ๐Ÿ”’
update_fg ๐Ÿ”’