pub fn mod_inverse(a: &BigUint, m: &BigUint) -> Option<BigUint>
Compute modular inverse using extended Euclidean algorithm