pub fn modulo(number: BigInt, modulus: Option<BigInt>) -> BigInt {
        let modulus = modulus.unwrap_or(Curve::secp256k1().p);

        (number % modulus.clone() + modulus.clone()) % modulus
    }
/*
    If you cannot understand modular arithmetic.
    Here is a useful tutorial from khan academy.
    https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/what-is-modular-arithmetic
     */
If you cannot understand modular arithmetic.
Here is a useful tutorial from khan academy.
If you cannot understand modular arithmetic . Here is a useful tutorial from khan academy .
pub fn modulo(number: BigInt, modulus: Option<BigInt>) -> BigInt {
        let modulus = modulus.unwrap_or(Curve::secp256k1().p);
        (number % modulus.clone() + modulus.clone()) % modulus
    }
pub fn modulo ( number : BigInt , modulus : Option < BigInt > ) -> BigInt { let modulus = modulus . unwrap_or ( Curve :: secp256k1 ( ) . p ) ; ( number % modulus . clone ( ) + modulus . clone ( ) ) % modulus }
If you cannot understand modular arithmetic.
If you cannot understand modular arithmetic .
number
BigInt
modulus
Option<BigInt>