Struct blstrs::G2Projective [−][src]
This is an element of $\mathbb{G}_2$ represented in the projective coordinate space.
Implementations
impl G2Projective
[src]
pub fn to_compressed(&self) -> [u8; 48]
[src]
Serializes this element into compressed form.
pub fn to_uncompressed(&self) -> [u8; 96]
[src]
Serializes this element into uncompressed form.
pub fn from_uncompressed(bytes: &[u8; 192]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element.
pub fn from_uncompressed_unchecked(bytes: &[u8; 192]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element, not checking if the element is on the curve and not checking if it is in the correct subgroup.
This is dangerous to call unless you trust the bytes you are reading; otherwise,
API invariants may be broken. Please consider using from_uncompressed()
instead.
pub fn from_compressed(bytes: &[u8; 96]) -> Option<Self>
[src]
Attempts to deserialize a compressed element.
pub fn from_compressed_unchecked(bytes: &[u8; 96]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element, not checking if the element is in the correct subgroup.
This is dangerous to call unless you trust the bytes you are reading; otherwise,
API invariants may be broken. Please consider using from_compressed()
instead.
pub fn add(&self, rhs: &G2Projective) -> G2Projective
[src]
Adds this point to another point.
pub fn add_mixed(&self, rhs: &G2Affine) -> G2Projective
[src]
Adds this point to another point in the affine model.
pub fn is_on_curve(&self) -> bool
[src]
Returns true if this point is on the curve. This should always return true unless an “unchecked” API was used.
pub fn from_raw_unchecked(x: Fp2, y: Fp2, z: Fp2) -> Self
[src]
pub fn x(&self) -> Fp2
[src]
Returns the x coordinate.
pub fn y(&self) -> Fp2
[src]
Returns the y coordinate.
pub fn z(&self) -> Fp2
[src]
Returns the z coordinate.
pub fn hash_to_curve(msg: &[u8], dst: &[u8], aug: &[u8]) -> Self
[src]
Hash to curve algorithm.
Trait Implementations
impl<'a, 'b> Add<&'b G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'b> Add<&'b G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'a, 'b> Add<&'b G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Add<&'b G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a, 'b> Add<&'b G2Projective> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Add<&'b G2Projective> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a> Add<G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Affine) -> G2Projective
[src]
impl Add<G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Affine) -> G2Projective
[src]
impl<'a> Add<G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl Add<G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl<'a> Add<G2Projective> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl Add<G2Projective> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl<'b> AddAssign<&'b G2Affine> for G2Projective
[src]
fn add_assign(&mut self, rhs: &'b G2Affine)
[src]
impl<'b> AddAssign<&'b G2Projective> for G2Projective
[src]
fn add_assign(&mut self, rhs: &'b G2Projective)
[src]
impl AddAssign<G2Affine> for G2Projective
[src]
fn add_assign(&mut self, rhs: G2Affine)
[src]
impl AddAssign<G2Projective> for G2Projective
[src]
fn add_assign(&mut self, rhs: G2Projective)
[src]
impl AsMut<blst_p2> for G2Projective
[src]
impl AsRef<blst_p2> for G2Projective
[src]
impl Clone for G2Projective
[src]
fn clone(&self) -> G2Projective
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for G2Projective
[src]
impl CurveProjective for G2Projective
[src]
type Engine = Bls12
type Scalar = Scalar
type Base = Fp2
type Affine = G2Affine
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization<S: BorrowMut<Self>>(v: &mut [S])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> Self::Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn hash(_msg: &[u8]) -> Self
[src]
pub fn sub_assign(&mut self, other: &Self)
[src]
impl Debug for G2Projective
[src]
impl Display for G2Projective
[src]
impl Eq for G2Projective
[src]
impl From<&'_ G2Affine> for G2Projective
[src]
fn from(p: &G2Affine) -> G2Projective
[src]
impl From<&'_ G2Projective> for G2Affine
[src]
fn from(p: &G2Projective) -> G2Affine
[src]
impl From<G2Affine> for G2Projective
[src]
fn from(p: G2Affine) -> G2Projective
[src]
impl From<G2Projective> for G2Affine
[src]
fn from(p: G2Projective) -> G2Affine
[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, other: &'b Scalar) -> Self::Output
[src]
impl<'b> Mul<&'b Scalar> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> G2Projective
[src]
impl<'a> Mul<Scalar> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G2Projective
[src]
impl Mul<Scalar> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G2Projective
[src]
impl<'b> MulAssign<&'b Scalar> for G2Projective
[src]
fn mul_assign(&mut self, rhs: &'b Scalar)
[src]
impl MulAssign<Scalar> for G2Projective
[src]
fn mul_assign(&mut self, rhs: Scalar)
[src]
impl<'a> Neg for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn neg(self) -> G2Projective
[src]
impl Neg for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn neg(self) -> G2Projective
[src]
impl PartialEq<G2Projective> for G2Projective
[src]
impl<'a, 'b> Sub<&'b G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'b> Sub<&'b G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'a, 'b> Sub<&'b G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Sub<&'b G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a, 'b> Sub<&'b G2Projective> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Sub<&'b G2Projective> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a> Sub<G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Affine) -> G2Projective
[src]
impl Sub<G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Affine) -> G2Projective
[src]
impl<'a> Sub<G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl Sub<G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl<'a> Sub<G2Projective> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl Sub<G2Projective> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl<'b> SubAssign<&'b G2Affine> for G2Projective
[src]
fn sub_assign(&mut self, rhs: &'b G2Affine)
[src]
impl<'b> SubAssign<&'b G2Projective> for G2Projective
[src]
fn sub_assign(&mut self, rhs: &'b G2Projective)
[src]
impl SubAssign<G2Affine> for G2Projective
[src]
fn sub_assign(&mut self, rhs: G2Affine)
[src]
impl SubAssign<G2Projective> for G2Projective
[src]
fn sub_assign(&mut self, rhs: G2Projective)
[src]
impl<T> Sum<T> for G2Projective where
T: Borrow<G2Projective>,
[src]
T: Borrow<G2Projective>,
Auto Trait Implementations
impl RefUnwindSafe for G2Projective
impl Send for G2Projective
impl Sync for G2Projective
impl Unpin for G2Projective
impl UnwindSafe for G2Projective
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,