pub fn discrete_log_trial_mul(
n: &Integer,
a: &Integer,
b: &Integer,
order: Option<&Integer>,
) -> Result<Integer, Error>
Expand description
Trial multiplication algorithm for computing the discrete logarithm of a
in base b
modulo n
(smallest non-negative integer x
where b**x = a (mod n)
).
The algorithm finds the discrete logarithm using exhaustive search.
This naive method is used as fallback algorithm of discrete_log
when the group order is very small.
If the order of the group is known, it can be passed as order
to speed up the computation.