Function discrete_logarithm::discrete_log_with_factors
source · pub fn discrete_log_with_factors(
n: &Integer,
a: &Integer,
b: &Integer,
n_factors: &HashMap<Integer, usize>
) -> Result<Integer, Error>Expand description
Compute the discrete logarithm of a in base b modulo n (smallest non-negative integer x where b**x = a (mod n)).
If the prime factorization of n is known, it can be passed as n_factors to speed up the computation.