Skip to main content

Xgcd

Trait Xgcd 

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

    // Required methods
    fn xgcd(&self, rhs: &Rhs) -> Self::Output;
    fn xgcd_vartime(&self, rhs: &Rhs) -> Self::Output;
}
Expand description

Compute the extended greatest common divisor of two integers.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn xgcd(&self, rhs: &Rhs) -> Self::Output

Compute the extended greatest common divisor of self and rhs.

Source

fn xgcd_vartime(&self, rhs: &Rhs) -> Self::Output

Compute the extended greatest common divisor of self and rhs 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<const LIMBS: usize> Xgcd for Int<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, Uint<LIMBS>>

Source§

impl<const LIMBS: usize> Xgcd for Uint<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, Uint<LIMBS>>

Source§

impl<const LIMBS: usize> Xgcd for NonZeroInt<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, NonZero<Uint<LIMBS>>>

Source§

impl<const LIMBS: usize> Xgcd for NonZeroUint<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, NonZero<Uint<LIMBS>>>

Source§

impl<const LIMBS: usize> Xgcd for OddInt<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, Odd<Uint<LIMBS>>>

Source§

impl<const LIMBS: usize> Xgcd for OddUint<LIMBS>

Source§

type Output = XgcdOutput<LIMBS, Odd<Uint<LIMBS>>>