crypto_bigint

Trait MulMod

Source
pub trait MulMod<Rhs = Self> {
    type Output;

    // Required method
    fn mul_mod(&self, rhs: &Rhs, p: &Self, p_inv: Limb) -> Self::Output;
}
Expand description

Compute self * rhs mod p.

Requires p_inv = -(p^{-1} mod 2^{BITS}) mod 2^{BITS} to be provided for efficiency.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn mul_mod(&self, rhs: &Rhs, p: &Self, p_inv: Limb) -> Self::Output

Compute self * rhs mod p.

Requires p_inv = -(p^{-1} mod 2^{BITS}) mod 2^{BITS} to be provided for efficiency.

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§