Skip to main content

Limbs

Trait Limbs 

Source
pub(super) trait Limbs:
    From<u8>
    + CtAssign
    + Zero
    + One
    + Limbs {
    // Required methods
    fn wide_div_rem_thin(
        wide: Self::Wide,
        thin: &NonZero<Self>,
    ) -> (Self::Wide, Self);
    fn coprime(a: Self, b_abs: Self, c: Self::Wide) -> Choice;
}
Expand description

The required view over a collection of limbs to validate a binary quadratic form.

Required Methods§

Source

fn wide_div_rem_thin( wide: Self::Wide, thin: &NonZero<Self>, ) -> (Self::Wide, Self)

Divide a wide value by a thin value, yielding the quotient and remainder.

Source

fn coprime(a: Self, b_abs: Self, c: Self::Wide) -> Choice

Return if the values are coprime.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Limbs for BoxedUint

Available on crate feature alloc only.
Source§

fn wide_div_rem_thin( wide: Self::Wide, thin: &NonZero<Self>, ) -> (Self::Wide, Self)

Source§

fn coprime(a: Self, b_abs: Self, c: Self::Wide) -> Choice

Source§

impl<const LIMBS: usize, const WIDE_LIMBS: usize> Limbs for Uint<LIMBS>
where Self: Concat<LIMBS, Output = Uint<WIDE_LIMBS>>, Uint<WIDE_LIMBS>: SplitEven<Output = Self>,

Source§

fn wide_div_rem_thin( wide: Self::Wide, thin: &NonZero<Self>, ) -> (Self::Wide, Self)

Source§

fn coprime(a: Self, b_abs: Self, c: Self::Wide) -> Choice

Implementors§