Invert

Trait Invert 

Source
pub trait Invert: Sized {
    type Output;

    // Required methods
    fn invert(&self) -> Self::Output;
    fn invert_vartime(&self) -> Self::Output;
}
Expand description

Constant-time inversion.

Required Associated Types§

Source

type Output

Output of the inversion.

Required Methods§

Source

fn invert(&self) -> Self::Output

Computes the inverse.

Source

fn invert_vartime(&self) -> Self::Output

Computes the inverse in variable-time.

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<MOD: ConstMontyParams<SAT_LIMBS>, const SAT_LIMBS: usize, const UNSAT_LIMBS: usize> Invert for ConstMontyForm<MOD, SAT_LIMBS>
where Odd<Uint<SAT_LIMBS>>: PrecomputeInverter<Inverter = SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>, Output = Uint<SAT_LIMBS>>,

Source§

type Output = CtOption<ConstMontyForm<MOD, SAT_LIMBS>>

Source§

impl<const SAT_LIMBS: usize, const UNSAT_LIMBS: usize> Invert for MontyForm<SAT_LIMBS>
where Odd<Uint<SAT_LIMBS>>: PrecomputeInverter<Inverter = SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>, Output = Uint<SAT_LIMBS>>,

Source§

type Output = CtOption<MontyForm<SAT_LIMBS>>