macro_rules! const_prime_monty_params {
($name:ident, $uint_type:ty, $value:expr, $generator:literal) => { ... };
($name:ident, $uint_type:ty, $value:expr, $generator:literal, $doc:expr) => { ... };
}Expand description
Create a type representing a prime modulus which impls the ConstPrimeMontyParams
trait with the given name, type, value (in big endian hex), multiplicative generator,
and optional documentation string.
ยงUsage
use crypto_bigint::{U256, const_prime_monty_params};
const_prime_monty_params!(
MyModulus,
U256,
"73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",
7,
"Docs for my modulus"
);The modulus must be odd and prime, or this will panic.