yali 0.1.1

Yet Another LargeInt Library
Documentation
1
2
3
4
5
6
7
8
9
use crate::Number;

impl<const N: usize> Number<N> {
    /// Performs Modular exponentiation
    /// `mod_exponentiation(a, b, n) = (a ^ b) % n`
    pub fn mod_exponentiation(self, rhs: Self, modulus: Self) -> Self {
        self.pow(rhs, &|a, b| (a * b) % modulus.clone(), 1u64.into(), false)
    }
}