use typenum::{U32, U63};
use num::{BigUint, One};
use serde::{Deserialize, Serialize};
use crate::operations::field::params::{FieldParameters, NumLimbs};
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct U256Field;
impl FieldParameters for U256Field {
const MODULUS: &'static [u8] = &[
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1,
];
const WITNESS_OFFSET: usize = 1usize << 14;
fn modulus() -> BigUint {
BigUint::one() << 256
}
}
impl NumLimbs for U256Field {
type Limbs = U32;
type Witness = U63;
}