Struct rsa_cortex_m4::arithmetic::PrimeModular [−][src]
Implementations
impl<'p, const D: usize, const E: usize> PrimeModular<'p, D, E>
[src]
pub fn as_modular(&self) -> &Modular<'p, D, E>
[src]
pub fn as_modular_mut(&mut self) -> &mut Modular<'p, D, E>
[src]
pub fn zero(p: &'p Prime<D, E>) -> Self
[src]
pub fn inverse(&self) -> Self
[src]
via Fermat's little theorem
Methods from Deref<Target = Modular<'p, D, E>>
pub fn digit_pow(&self, _exponent: Digit) -> Self
[src]
pub fn canonical_lift(&self) -> Unsigned<D, E>
[src]
The canonical representative of this residue class.
This is like [lift
][lift] in GP/PARI
By virtue of our moduli's convenience, this is just a conditional subtraction. [lift]: https://pari.math.u-bordeaux.fr/dochtml/html/Conversions_and_similar_elementary_functions_or_commands.html#se:lift
pub fn residue(&self) -> &Unsigned<D, E>
[src]
Or non-canonical lift
pub fn to_montgomery(&self) -> Montgomery<'n, D, E>
[src]
pub fn power<const F: usize, const G: usize>(
&self,
exponent: &Unsigned<F, G>
) -> Self
[src]
&self,
exponent: &Unsigned<F, G>
) -> Self
Trait Implementations
impl<'p, const D: usize, const E: usize> Clone for PrimeModular<'p, D, E>
[src]
fn clone(&self) -> PrimeModular<'p, D, E>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'p, const D: usize, const E: usize> Debug for PrimeModular<'p, D, E>
[src]
impl<'p, const D: usize, const E: usize> Deref for PrimeModular<'p, D, E>
[src]
type Target = Modular<'p, D, E>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'p, const D: usize, const E: usize> DerefMut for PrimeModular<'p, D, E>
[src]
impl<'p, const D: usize, const E: usize> Neg for &PrimeModular<'p, D, E>
[src]
type Output = PrimeModular<'p, D, E>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<'a, 'p, const D: usize, const E: usize> Sub<&'a PrimeModular<'p, D, E>> for &'a PrimeModular<'p, D, E>
[src]
type Output = PrimeModular<'p, D, E>
The resulting type after applying the -
operator.
fn sub(self, subtrahend: Self) -> Self::Output
[src]
Auto Trait Implementations
impl<'p, const D: usize, const E: usize> Send for PrimeModular<'p, D, E>
[src]
impl<'p, const D: usize, const E: usize> Sync for PrimeModular<'p, D, E>
[src]
impl<'p, const D: usize, const E: usize> Unpin for PrimeModular<'p, D, E>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,