Modulo

Trait Modulo 

Source
pub trait Modulo {
    // Required methods
    fn mod_pow(base: &Self, exponent: &Self, modulus: &Self) -> Self;
    fn mod_mul(a: &Self, b: &Self, modulus: &Self) -> Self;
    fn mod_sub(a: &Self, b: &Self, modulus: &Self) -> Self;
    fn mod_add(a: &Self, b: &Self, modulus: &Self) -> Self;
    fn mod_inv(a: &Self, modulus: &Self) -> Self;
}
Expand description

Mod operations for BigInt

Required Methods§

Source

fn mod_pow(base: &Self, exponent: &Self, modulus: &Self) -> Self

Source

fn mod_mul(a: &Self, b: &Self, modulus: &Self) -> Self

Source

fn mod_sub(a: &Self, b: &Self, modulus: &Self) -> Self

Source

fn mod_add(a: &Self, b: &Self, modulus: &Self) -> Self

Source

fn mod_inv(a: &Self, modulus: &Self) -> Self

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.

Implementations on Foreign Types§

Source§

impl Modulo for Mpz

Source§

fn mod_pow(base: &Self, exponent: &Self, modulus: &Self) -> Self

Source§

fn mod_mul(a: &Self, b: &Self, modulus: &Self) -> Self

Source§

fn mod_sub(a: &Self, b: &Self, modulus: &Self) -> Self

Source§

fn mod_add(a: &Self, b: &Self, modulus: &Self) -> Self

Source§

fn mod_inv(a: &Self, modulus: &Self) -> Self

Implementors§