lambdaworks_math/field/fields/
secp256r1_field.rs

1use crate::{
2    field::fields::montgomery_backed_prime_fields::{IsModulus, MontgomeryBackendPrimeField},
3    unsigned_integer::element::U256,
4};
5
6type Secp256r1MontgomeryBackendPrimeField<T> = MontgomeryBackendPrimeField<T, 4>;
7
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct MontgomeryConfigSecp256r1PrimeField;
10impl IsModulus<U256> for MontgomeryConfigSecp256r1PrimeField {
11    const MODULUS: U256 = U256::from_hex_unchecked(
12        "0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
13    );
14}
15
16pub type Secp256r1PrimeField =
17    Secp256r1MontgomeryBackendPrimeField<MontgomeryConfigSecp256r1PrimeField>;