Skip to main content

const_monty_params

Macro const_monty_params 

Source
macro_rules! const_monty_params {
    ($name:ident, $uint_type:ty, $value:expr) => { ... };
    ($name:ident, $uint_type:ty, $value:expr, $doc:expr) => { ... };
}
Expand description

Create a type representing a modulus which impls the ConstMontyParams trait with the given name, type, value (in big endian hex), and optional documentation string.

ยงUsage

use crypto_bigint::{U256, const_monty_params};

const_monty_params!(
    MyModulus,
    U256,
    "73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",
    "Docs for my modulus"
);

The modulus must be odd, or this will panic.