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.

Object Safety§

This trait is not object safe.

Implementors§