Trait InvMod

Source
pub trait InvMod<Rhs = Self>: Sized {
    type Output;

    // Required method
    fn inv_mod(&self, p: &Rhs) -> CtOption<Self::Output>;
}
Expand description

Compute 1 / self mod p.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn inv_mod(&self, p: &Rhs) -> CtOption<Self::Output>

Compute 1 / self mod p.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl InvMod for BoxedUint

Available on crate feature alloc only.
Source§

impl<const LIMBS: usize> InvMod<NonZero<Uint<LIMBS>>> for Int<LIMBS>
where Uint<LIMBS>: InvMod<Output = Uint<LIMBS>>,

Source§

type Output = Uint<LIMBS>

Source§

impl<const LIMBS: usize, const UNSAT_LIMBS: usize> InvMod for Uint<LIMBS>
where Odd<Self>: PrecomputeInverter<Inverter = SafeGcdInverter<LIMBS, UNSAT_LIMBS>>,

Source§

type Output = Uint<LIMBS>