Struct blstrs::Fp[][src]

pub struct Fp(_);

Fp values are always in Montgomery form; i.e., Scalar(a) = aR mod p, with R = 2^384.

Implementations

impl Fp[src]

pub fn from_bytes_le(bytes: &[u8; 48]) -> Option<Fp>[src]

Attempts to convert a little-endian byte representation of a scalar into an Fp, failing if the input is not canonical.

pub fn from_bytes_be(bytes: &[u8; 48]) -> Option<Fp>[src]

Attempts to convert a big-endian byte representation of a scalar into an Fp, failing if the input is not canonical.

pub fn to_bytes_le(&self) -> [u8; 48][src]

Converts an element of Fp into a byte representation in little-endian byte order.

pub fn to_bytes_be(&self) -> [u8; 48][src]

Converts an element of Fp into a byte representation in big-endian byte order.

pub fn from_raw_unchecked(v: [u64; 6]) -> Fp[src]

Constructs an element of Fp without checking that it is canonical.

pub fn add(&self, rhs: &Fp) -> Fp[src]

pub fn neg(&self) -> Fp[src]

pub fn sub(&self, rhs: &Fp) -> Fp[src]

pub fn mul(&self, rhs: &Fp) -> Fp[src]

pub fn mul3(&self) -> Self[src]

Multiplies self with 3, returning the result.

pub fn mul8(&self) -> Self[src]

Multiplies self with 8, returning the result.

pub fn shl(&self, count: usize) -> Self[src]

Left shift self by count, returning the result.

Trait Implementations

impl<'a, 'b> Add<&'b Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the + operator.

impl<'b> Add<&'b Fp> for Fp[src]

type Output = Fp

The resulting type after applying the + operator.

impl<'a> Add<Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the + operator.

impl Add<Fp> for Fp[src]

type Output = Fp

The resulting type after applying the + operator.

impl<'b> AddAssign<&'b Fp> for Fp[src]

impl AddAssign<Fp> for Fp[src]

impl Clone for Fp[src]

impl Copy for Fp[src]

impl Debug for Fp[src]

impl Default for Fp[src]

impl Display for Fp[src]

impl Eq for Fp[src]

impl Field for Fp[src]

impl From<Fp> for FpRepr[src]

impl From<Fp> for Fp12[src]

impl From<Fp> for Fp2[src]

impl From<Fp> for Fp6[src]

impl From<blst_fp> for Fp[src]

impl From<u64> for Fp[src]

impl<'a, 'b> Mul<&'b Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the * operator.

impl<'b> Mul<&'b Fp> for Fp[src]

type Output = Fp

The resulting type after applying the * operator.

impl<'a> Mul<Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the * operator.

impl Mul<Fp> for Fp[src]

type Output = Fp

The resulting type after applying the * operator.

impl<'b> MulAssign<&'b Fp> for Fp[src]

impl MulAssign<Fp> for Fp[src]

impl<'a> Neg for &'a Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl Neg for Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl Ord for Fp[src]

Elements are ordered lexicographically.

impl PartialEq<Fp> for Fp[src]

impl PartialOrd<Fp> for Fp[src]

impl PrimeField for Fp[src]

type Repr = FpRepr

The prime field can be converted back and forth into this biginteger representation. Read more

fn into_repr(&self) -> Self::Repr[src]

Convert a biginteger representation into a prime field element, if the number is an element of the field.

impl SqrtField for Fp[src]

impl<'a, 'b> Sub<&'b Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl<'b> Sub<&'b Fp> for Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl<'a> Sub<Fp> for &'a Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl Sub<Fp> for Fp[src]

type Output = Fp

The resulting type after applying the - operator.

impl<'b> SubAssign<&'b Fp> for Fp[src]

impl SubAssign<Fp> for Fp[src]

Auto Trait Implementations

impl RefUnwindSafe for Fp

impl Send for Fp

impl Sync for Fp

impl Unpin for Fp

impl UnwindSafe for Fp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,