Module algorithms

Source
Expand description

⚠️ Collection of bignum algorithms.

Warning. Most functions in this module are currently not considered part of the stable API and may be changed or removed in future minor releases.

Re-exports§

pub use self::div::div;

Modules§

div
⚠️ Collection of division algorithms.

Structs§

LehmerMatrix
⚠️ Lehmer update matrix

Functions§

addmul
⚠️ Computes result += a * b and checks for overflow.
addmul_n
Computes wrapping lhs += a * b when all arguments are the same length.
addmul_nx1
Computes lhs += a * b and returns the borrow.
gcd
⚠️ Lehmer’s GCD algorithms.
gcd_extended
⚠️ Lehmer’s extended GCD.
inv_mod
⚠️ Modular inversion using extended GCD.
mul_redc
See Handbook of Applied Cryptography, Algorithm 14.32, p. 601.
shift_left_small
shift_right_small
submul_nx1
Computes lhs -= a * b and returns the borrow.