Struct fullcodec_bls12_381::G2Affine [−][src]
pub struct G2Affine { /* fields omitted */ }
Expand description
This is an element of $\mathbb{G}_2$ represented in the affine coordinate space. It is ideal to keep elements in this representation to reduce memory usage and improve performance through the use of mixed curve model arithmetic.
Values of G2Affine
are guaranteed to be in the $q$-order subgroup unless an
“unchecked” API was misused.
Implementations
Returns a fixed generator of the group. See notes::design
for how this generator is chosen.
Raw bytes representation
The intended usage of this function is for trusted sets of data where performance is critical.
For secure serialization, check to_bytes
Create a G2Affine
from a set of bytes created by G2Affine::to_raw_bytes
.
No check is performed and no constant time is granted. The expected usage of this function is for trusted bytes where performance is critical.
For secure serialization, check from_bytes
After generating the point, you can check is_on_curve
and is_torsion_free
to grant its
security
Returns true if this element is the identity (the point at infinity).
Returns true if this point is free of an $h$-torsion component, and so it exists within the $q$-order subgroup $\mathbb{G}_2$. This should always return true unless an “unchecked” API was used.
Returns true if this point is on the curve. This should always return true unless an “unchecked” API was used.
Trait Implementations
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the *
operator.
Performs the *
operation. Read more
Serializes this element into compressed form. See notes::serialization
for details about how group elements are serialized.
Attempts to deserialize a compressed element. See notes::serialization
for details about how group elements are serialized.
type Error = BytesError
type Error = BytesError
The type returned in the event of a conversion error.
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = G2Projective
type Output = G2Projective
The resulting type after applying the -
operator.
Performs the -
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for G2Affine
impl UnwindSafe for G2Affine
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
impl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
Negate self
if choice == Choice(1)
; otherwise, leave it
unchanged. Read more
fn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
fn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
Parse a string slice as bytes hex representation and returns `