pub struct G2Affine { /* private fields */ }
Expand description
G₂ affine point representation.
Implementations§
Source§impl G2Affine
impl G2Affine
Sourcepub fn to_compressed(&self) -> [u8; 96]
pub fn to_compressed(&self) -> [u8; 96]
Compress to 96 bytes.
Sourcepub fn to_uncompressed(&self) -> [u8; 192]
pub fn to_uncompressed(&self) -> [u8; 192]
Serialize to 192 bytes uncompressed.
Sourcepub fn from_uncompressed(bytes: &[u8; 192]) -> CtOption<Self>
pub fn from_uncompressed(bytes: &[u8; 192]) -> CtOption<Self>
Deserialize from uncompressed bytes with validation.
Sourcepub fn from_uncompressed_unchecked(bytes: &[u8; 192]) -> CtOption<Self>
pub fn from_uncompressed_unchecked(bytes: &[u8; 192]) -> CtOption<Self>
Deserialize from uncompressed bytes without validation.
Sourcepub fn from_compressed(bytes: &[u8; 96]) -> CtOption<Self>
pub fn from_compressed(bytes: &[u8; 96]) -> CtOption<Self>
Deserialize from compressed bytes with validation.
Sourcepub fn from_compressed_unchecked(bytes: &[u8; 96]) -> CtOption<Self>
pub fn from_compressed_unchecked(bytes: &[u8; 96]) -> CtOption<Self>
Deserialize from compressed bytes without validation.
Sourcepub fn is_identity(&self) -> Choice
pub fn is_identity(&self) -> Choice
Check if point at infinity.
Sourcepub fn is_on_curve(&self) -> Choice
pub fn is_on_curve(&self) -> Choice
Check if on curve y² = x³ + B.
Sourcepub fn is_torsion_free(&self) -> Choice
pub fn is_torsion_free(&self) -> Choice
Check subgroup membership using psi endomorphism.
Trait Implementations§
Source§impl<'a, 'b> Add<&'b G2Affine> for &'a G2Projective
impl<'a, 'b> Add<&'b G2Affine> for &'a G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§impl<'b> Add<&'b G2Affine> for G2Projective
impl<'b> Add<&'b G2Affine> for G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§impl<'a, 'b> Add<&'b G2Projective> for &'a G2Affine
impl<'a, 'b> Add<&'b G2Projective> for &'a G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§fn add(self, rhs: &'b G2Projective) -> G2Projective
fn add(self, rhs: &'b G2Projective) -> G2Projective
Performs the
+
operation. Read moreSource§impl<'b> Add<&'b G2Projective> for G2Affine
impl<'b> Add<&'b G2Projective> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§fn add(self, rhs: &'b G2Projective) -> G2Projective
fn add(self, rhs: &'b G2Projective) -> G2Projective
Performs the
+
operation. Read moreSource§impl<'a> Add<G2Affine> for &'a G2Projective
impl<'a> Add<G2Affine> for &'a G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§impl Add<G2Affine> for G2Projective
impl Add<G2Affine> for G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§impl<'a> Add<G2Projective> for &'a G2Affine
impl<'a> Add<G2Projective> for &'a G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§fn add(self, rhs: G2Projective) -> G2Projective
fn add(self, rhs: G2Projective) -> G2Projective
Performs the
+
operation. Read moreSource§impl Add<G2Projective> for G2Affine
impl Add<G2Projective> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
+
operator.Source§fn add(self, rhs: G2Projective) -> G2Projective
fn add(self, rhs: G2Projective) -> G2Projective
Performs the
+
operation. Read moreSource§impl<'b> AddAssign<&'b G2Affine> for G2Projective
impl<'b> AddAssign<&'b G2Affine> for G2Projective
Source§fn add_assign(&mut self, rhs: &'b G2Affine)
fn add_assign(&mut self, rhs: &'b G2Affine)
Performs the
+=
operation. Read moreSource§impl AddAssign<G2Affine> for G2Projective
impl AddAssign<G2Affine> for G2Projective
Source§fn add_assign(&mut self, rhs: G2Affine)
fn add_assign(&mut self, rhs: G2Affine)
Performs the
+=
operation. Read moreSource§impl ConditionallySelectable for G2Affine
impl ConditionallySelectable for G2Affine
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self
and other
if choice == 1
; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for G2Affine
impl ConstantTimeEq for G2Affine
Source§impl<'a> From<&'a G2Affine> for G2Projective
impl<'a> From<&'a G2Affine> for G2Projective
Source§fn from(p: &'a G2Affine) -> G2Projective
fn from(p: &'a G2Affine) -> G2Projective
Converts to this type from the input type.
Source§impl<'a> From<&'a G2Projective> for G2Affine
impl<'a> From<&'a G2Projective> for G2Affine
Source§fn from(p: &'a G2Projective) -> G2Affine
fn from(p: &'a G2Projective) -> G2Affine
Converts to this type from the input type.
Source§impl From<G2Affine> for G2Prepared
impl From<G2Affine> for G2Prepared
Source§fn from(q: G2Affine) -> G2Prepared
fn from(q: G2Affine) -> G2Prepared
Converts to this type from the input type.
Source§impl From<G2Affine> for G2Projective
impl From<G2Affine> for G2Projective
Source§fn from(p: G2Affine) -> G2Projective
fn from(p: G2Affine) -> G2Projective
Converts to this type from the input type.
Source§impl From<G2Projective> for G2Affine
impl From<G2Projective> for G2Affine
Source§fn from(p: G2Projective) -> G2Affine
fn from(p: G2Projective) -> G2Affine
Converts to this type from the input type.
Source§impl<'b> Mul<&'b G2Affine> for Scalar
impl<'b> Mul<&'b G2Affine> for Scalar
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl<'b> Mul<&'b Scalar> for G2Affine
impl<'b> Mul<&'b Scalar> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl<'a> Mul<G2Affine> for &'a Scalar
impl<'a> Mul<G2Affine> for &'a Scalar
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl Mul<G2Affine> for Scalar
impl Mul<G2Affine> for Scalar
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl<'a> Mul<Scalar> for &'a G2Affine
impl<'a> Mul<Scalar> for &'a G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl Mul<Scalar> for G2Affine
impl Mul<Scalar> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
*
operator.Source§impl<'a, 'b> Sub<&'b G2Affine> for &'a G2Projective
impl<'a, 'b> Sub<&'b G2Affine> for &'a G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§impl<'b> Sub<&'b G2Affine> for G2Projective
impl<'b> Sub<&'b G2Affine> for G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§impl<'a, 'b> Sub<&'b G2Projective> for &'a G2Affine
impl<'a, 'b> Sub<&'b G2Projective> for &'a G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: &'b G2Projective) -> G2Projective
fn sub(self, rhs: &'b G2Projective) -> G2Projective
Performs the
-
operation. Read moreSource§impl<'b> Sub<&'b G2Projective> for G2Affine
impl<'b> Sub<&'b G2Projective> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: &'b G2Projective) -> G2Projective
fn sub(self, rhs: &'b G2Projective) -> G2Projective
Performs the
-
operation. Read moreSource§impl<'a> Sub<G2Affine> for &'a G2Projective
impl<'a> Sub<G2Affine> for &'a G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§impl Sub<G2Affine> for G2Projective
impl Sub<G2Affine> for G2Projective
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§impl<'a> Sub<G2Projective> for &'a G2Affine
impl<'a> Sub<G2Projective> for &'a G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: G2Projective) -> G2Projective
fn sub(self, rhs: G2Projective) -> G2Projective
Performs the
-
operation. Read moreSource§impl Sub<G2Projective> for G2Affine
impl Sub<G2Projective> for G2Affine
Source§type Output = G2Projective
type Output = G2Projective
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: G2Projective) -> G2Projective
fn sub(self, rhs: G2Projective) -> G2Projective
Performs the
-
operation. Read moreSource§impl<'b> SubAssign<&'b G2Affine> for G2Projective
impl<'b> SubAssign<&'b G2Affine> for G2Projective
Source§fn sub_assign(&mut self, rhs: &'b G2Affine)
fn sub_assign(&mut self, rhs: &'b G2Affine)
Performs the
-=
operation. Read moreSource§impl SubAssign<G2Affine> for G2Projective
impl SubAssign<G2Affine> for G2Projective
Source§fn sub_assign(&mut self, rhs: G2Affine)
fn sub_assign(&mut self, rhs: G2Affine)
Performs the
-=
operation. Read moreimpl Copy for G2Affine
impl DefaultIsZeroes for G2Affine
impl Eq for G2Affine
Auto Trait Implementations§
impl Freeze for G2Affine
impl RefUnwindSafe for G2Affine
impl Send for G2Affine
impl Sync for G2Affine
impl Unpin for G2Affine
impl UnwindSafe for G2Affine
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