pub fn multiplicative_order(a: &BigInt, n: &BigInt, bound: u64) -> Option<u64>Expand description
The multiplicative order of a modulo n — the least r > 0 with aʳ ≡ 1 (mod n) — by
baby-step-giant-step, searching orders up to bound. None if gcd(a, n) ≠ 1 (no order) or the order
exceeds bound. Runs in O(√bound) field multiplications.