1#![cfg_attr(not(feature = "std"), no_std)]
2
3#![cfg_attr(not(test), no_std)]
23
24mod add;
25mod exp;
26mod mul;
27mod sub;
28
29mod inv;
30mod montgomery;
31
32pub use add::{basic_mod_add, constrained_mod_add, strict_mod_add};
33pub use exp::{basic_mod_exp, constrained_mod_exp, strict_mod_exp};
34pub use inv::{basic_mod_inv, constrained_mod_inv, strict_mod_inv};
35pub use montgomery::{
36 NPrimeMethod, basic_compute_montgomery_params, basic_compute_montgomery_params_with_method,
37 basic_from_montgomery, basic_montgomery_mod_exp, basic_montgomery_mod_mul,
38 basic_montgomery_mul, basic_to_montgomery, constrained_compute_montgomery_params,
39 constrained_compute_montgomery_params_with_method, constrained_from_montgomery,
40 constrained_montgomery_mod_exp, constrained_montgomery_mod_mul, constrained_montgomery_mul,
41 constrained_to_montgomery, strict_compute_montgomery_params,
42 strict_compute_montgomery_params_with_method, strict_from_montgomery,
43 strict_montgomery_mod_exp, strict_montgomery_mod_mul, strict_to_montgomery,
44};
45pub use mul::{basic_mod_mul, constrained_mod_mul, strict_mod_mul};
46pub use sub::{basic_mod_sub, constrained_mod_sub, strict_mod_sub};
47
48#[cfg(test)]
49#[macro_export]
50macro_rules! maybe_test {
51 (on, $e:expr) => {
52 $e
53 };
54 (off, $e:expr) => {
55 ()
56 };
57}