pub struct FpParams;Trait Implementations§
Source§impl FpConfig<1> for FpParams
impl FpConfig<1> for FpParams
Source§const GENERATOR: Fp64<Self>
const GENERATOR: Fp64<Self>
A multiplicative generator of the field.
Self::GENERATOR is an element having multiplicative order
Self::MODULUS - 1.Source§const ZERO: Fp64<Self>
const ZERO: Fp64<Self>
Additive identity of the field, i.e. the element
e
such that, for all elements f of the field, e + f = f.Source§const ONE: Fp64<Self>
const ONE: Fp64<Self>
Multiplicative identity of the field, i.e. the element
e
such that, for all elements f of the field, e * f = f.Source§const TWO_ADICITY: u32 = 32u32
const TWO_ADICITY: u32 = 32u32
Let
N be the size of the multiplicative group defined by the field.
Then TWO_ADICITY is the two-adicity of N, i.e. the integer s
such that N = 2^s * t for some odd integer t.Source§const TWO_ADIC_ROOT_OF_UNITY: Fp64<Self>
const TWO_ADIC_ROOT_OF_UNITY: Fp64<Self>
2^s root of unity computed by GENERATOR^t
Source§const SQRT_PRECOMP: Option<SqrtPrecomputation<Fp64<Self>>>
const SQRT_PRECOMP: Option<SqrtPrecomputation<Fp64<Self>>>
Precomputed material for use when computing square roots.
Currently uses the generic Tonelli-Shanks,
which works for every modulus.
Source§fn add_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
fn add_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
Set a += b.
Source§fn sub_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
fn sub_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
Set a -= b.
Source§fn double_in_place(a: &mut Fp64<Self>)
fn double_in_place(a: &mut Fp64<Self>)
Set a = a + a.
Source§fn mul_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
fn mul_assign(a: &mut Fp64<Self>, b: &Fp64<Self>)
Set a *= b.
Source§fn sum_of_products<const T: usize>(
a: &[Fp64<Self>; T],
b: &[Fp64<Self>; T],
) -> Fp64<Self>
fn sum_of_products<const T: usize>( a: &[Fp64<Self>; T], b: &[Fp64<Self>; T], ) -> Fp64<Self>
Compute the inner product
<a, b>.Source§fn square_in_place(a: &mut Fp64<Self>)
fn square_in_place(a: &mut Fp64<Self>)
Set a *= b.
Source§fn from_bigint(other: BigInt<1>) -> Option<Fp64<Self>>
fn from_bigint(other: BigInt<1>) -> Option<Fp64<Self>>
Construct a field element from an integer in the range
0..(Self::MODULUS - 1). Returns None if the integer is outside
this range.Source§fn into_bigint(other: Fp64<Self>) -> BigInt<1>
fn into_bigint(other: Fp64<Self>) -> BigInt<1>
Convert a field element to an integer in the range
0..(Self::MODULUS - 1).Source§fn neg_in_place(a: &mut Fp64<Self>)
fn neg_in_place(a: &mut Fp64<Self>)
Set a = -a;
Source§const SMALL_SUBGROUP_BASE: Option<u32> = None
const SMALL_SUBGROUP_BASE: Option<u32> = None
An integer
b such that there exists a multiplicative subgroup
of size b^k for some integer k.Source§const SMALL_SUBGROUP_BASE_ADICITY: Option<u32> = None
const SMALL_SUBGROUP_BASE_ADICITY: Option<u32> = None
The integer
k such that there exists a multiplicative subgroup
of size Self::SMALL_SUBGROUP_BASE^k.Source§const LARGE_SUBGROUP_ROOT_OF_UNITY: Option<Fp<Self, N>> = None
const LARGE_SUBGROUP_ROOT_OF_UNITY: Option<Fp<Self, N>> = None
GENERATOR^((MODULUS-1) / (2^s *
SMALL_SUBGROUP_BASE^SMALL_SUBGROUP_BASE_ADICITY)) Used for mixed-radix
FFT.
Auto Trait Implementations§
impl Freeze for FpParams
impl RefUnwindSafe for FpParams
impl Send for FpParams
impl Sync for FpParams
impl Unpin for FpParams
impl UnwindSafe for FpParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more