BLS12Param

Struct BLS12Param 

Source
pub struct BLS12Param;

Trait Implementations§

Source§

impl FpParams<LIMBS_256> for BLS12Param

Source§

const GENERATOR: Fp256<BLS12Param>

A multiplicative generator of the field. Self::GENERATOR is an element having multiplicative order MODULUS - 1.
Source§

const MODULUS: U256

The modulus of the field.
Source§

const HAS_MODULUS_SPARE_BIT: bool = _

MODULUS has a spare bit in the most significant limb.
Source§

const INV: u64 = _

INV = -MODULUS^{-1} mod 2^64
Source§

const R: Uint<N> = _

Let M be the power of 2^64 nearest to Self::MODULUS size. Read more
Source§

const R2: Uint<N> = _

R2 = R^2 % MODULUS or R2 = (R^2 - 1) % MODULUS + 1 for convenience of multiplication.
Source§

fn add_assign(a: &mut Fp<Self, N>, b: &Fp<Self, N>)

Set a += b.
Source§

fn sub_assign(a: &mut Fp<Self, N>, b: &Fp<Self, N>)

Set a -= b.
Source§

fn double_in_place(a: &mut Fp<Self, N>)

Set a = a + a.
Source§

fn neg_in_place(a: &mut Fp<Self, N>)

Set a = -a;
Source§

fn mul_assign(a: &mut Fp<Self, N>, b: &Fp<Self, N>)

Set a *= b. Read more
Source§

fn square_in_place(a: &mut Fp<Self, N>)

Set a *= a.
Source§

fn inverse(a: &Fp<Self, N>) -> Option<Fp<Self, N>>

Compute a^{-1} if a is not zero. Read more
Source§

fn from_bigint(num: Uint<N>) -> Fp<Self, N>

Construct a field element from an integer. Read more
Source§

fn into_bigint(elem: Fp<Self, N>) -> Uint<N>

Convert a field element to an integer less than Self::MODULUS.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.