zkhash/fields/
bn256.rs

1use ark_ff::fields::{Fp256, MontBackend, MontConfig};
2use std::convert::TryInto;
3
4cfg_if::cfg_if! {
5    if #[cfg(feature = "asm")] {
6        #[derive(MontConfig)]
7        #[modulus = "21888242871839275222246405745257275088548364400416034343698204186575808495617"]
8        #[generator = "7"]
9        pub struct FqConfig;
10        pub type FpBN256 = Fp256<MontBackend<FqConfig, 4>>;
11    } else {
12        #[derive(MontConfig)]
13        #[modulus = "21888242871839275222246405745257275088548364400416034343698204186575808495617"]
14        #[generator = "7"]
15        pub struct FqConfig;
16        pub type FpBN256 = Fp256<MontBackend<FqConfig, 4>>;
17    }
18}