pub fn basic_mod_exp<T>(base: T, exponent: T, modulus: T) -> Twhere
T: PartialOrd + One + Zero + BitAnd<Output = T> + Rem<Output = T> + Shr<usize, Output = T> + WrappingAdd + WrappingSub + ShrAssign<usize> + RemAssign<T> + Copy,
Expand description
ยงModular Exponentiation (Basic)
Simple version that operates on values and copies them. Requires
WrappingAdd
and WrappingSub
traits to be implemented.