Struct bls12_381_plus::G1Affine [−][src]
This is an element of $\mathbb{G}_1$ 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 G1Affine
are guaranteed to be in the $q$-order subgroup unless an
“unchecked” API was misused.
Implementations
impl G1Affine
[src]
pub fn identity() -> G1Affine
[src]
Returns the identity of the group: the point at infinity.
pub fn generator() -> G1Affine
[src]
Returns a fixed generator of the group. See notes::design
for how this generator is chosen.
pub fn to_compressed(&self) -> [u8; 48]
[src]
Serializes this element into compressed form. See notes::serialization
for details about how group elements are serialized.
pub fn to_uncompressed(&self) -> [u8; 96]
[src]
Serializes this element into uncompressed form. See notes::serialization
for details about how group elements are serialized.
pub fn from_uncompressed(bytes: &[u8; 96]) -> CtOption<Self>
[src]
Attempts to deserialize an uncompressed element. See notes::serialization
for details about how group elements are serialized.
pub fn from_uncompressed_unchecked(bytes: &[u8; 96]) -> CtOption<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; 48]) -> CtOption<Self>
[src]
Attempts to deserialize a compressed element. See notes::serialization
for details about how group elements are serialized.
pub fn from_compressed_unchecked(bytes: &[u8; 48]) -> CtOption<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 is_identity(&self) -> Choice
[src]
Returns true if this element is the identity (the point at infinity).
pub fn is_torsion_free(&self) -> Choice
[src]
Returns true if this point is free of an $h$-torsion component, and so it exists within the $q$-order subgroup $\mathbb{G}_1$. This should always return true unless an “unchecked” API was used.
pub fn is_on_curve(&self) -> Choice
[src]
Returns true if this point is on the curve. This should always return true unless an “unchecked” API was used.
Trait Implementations
impl<'a, 'b> Add<&'b G1Affine> for &'a G1Projective
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]
impl<'b> Add<&'b G1Affine> for G1Projective
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]
impl<'a, 'b> Add<&'b G1Projective> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]
impl<'b> Add<&'b G1Projective> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]
impl<'a> Add<G1Affine> for &'a G1Projective
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Affine) -> G1Projective
[src]
impl Add<G1Affine> for G1Projective
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Affine) -> G1Projective
[src]
impl<'a> Add<G1Projective> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Projective) -> G1Projective
[src]
impl Add<G1Projective> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Projective) -> G1Projective
[src]
impl<'b> AddAssign<&'b G1Affine> for G1Projective
[src]
fn add_assign(&mut self, rhs: &'b G1Affine)
[src]
impl AddAssign<G1Affine> for G1Projective
[src]
fn add_assign(&mut self, rhs: G1Affine)
[src]
impl Clone for G1Affine
[src]
impl ConditionallySelectable for G1Affine
[src]
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
[src]
pub fn conditional_assign(&mut self, other: &Self, choice: Choice)
[src]
pub fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
[src]
impl ConstantTimeEq for G1Affine
[src]
impl Copy for G1Affine
[src]
impl Debug for G1Affine
[src]
impl Default for G1Affine
[src]
impl<'de> Deserialize<'de> for G1Affine
[src]
fn deserialize<D>(deserializer: D) -> Result<G1Affine, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for G1Affine
[src]
impl Eq for G1Affine
[src]
impl<'a> From<&'a G1Affine> for G1Projective
[src]
fn from(p: &'a G1Affine) -> G1Projective
[src]
impl<'a> From<&'a G1Projective> for G1Affine
[src]
fn from(p: &'a G1Projective) -> G1Affine
[src]
impl From<G1Affine> for G1Projective
[src]
fn from(p: G1Affine) -> G1Projective
[src]
impl From<G1Projective> for G1Affine
[src]
fn from(p: G1Projective) -> G1Affine
[src]
impl GroupEncoding for G1Affine
[src]
type Repr = G1Compressed
The encoding of group elements. Read more
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
[src]
fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>
[src]
fn to_bytes(&self) -> Self::Repr
[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, other: &'b Scalar) -> Self::Output
[src]
impl<'b> Mul<&'b Scalar> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> G1Projective
[src]
impl<'a> Mul<Scalar> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G1Projective
[src]
impl Mul<Scalar> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G1Projective
[src]
impl<'a> Neg for &'a G1Affine
[src]
type Output = G1Affine
The resulting type after applying the -
operator.
fn neg(self) -> G1Affine
[src]
impl Neg for G1Affine
[src]
type Output = G1Affine
The resulting type after applying the -
operator.
fn neg(self) -> G1Affine
[src]
impl PairingCurveAffine for G1Affine
[src]
type Pair = G2Affine
type PairingResult = Gt
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
[src]
impl PartialEq<G1Affine> for G1Affine
[src]
impl PrimeCurveAffine for G1Affine
[src]
type Scalar = Scalar
type Curve = G1Projective
fn identity() -> Self
[src]
fn generator() -> Self
[src]
fn is_identity(&self) -> Choice
[src]
fn to_curve(&self) -> Self::Curve
[src]
impl Serialize for G1Affine
[src]
impl<'a, 'b> Sub<&'b G1Affine> for &'a G1Projective
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]
impl<'b> Sub<&'b G1Affine> for G1Projective
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]
impl<'a, 'b> Sub<&'b G1Projective> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]
impl<'b> Sub<&'b G1Projective> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]
impl<'a> Sub<G1Affine> for &'a G1Projective
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Affine) -> G1Projective
[src]
impl Sub<G1Affine> for G1Projective
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Affine) -> G1Projective
[src]
impl<'a> Sub<G1Projective> for &'a G1Affine
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Projective) -> G1Projective
[src]
impl Sub<G1Projective> for G1Affine
[src]
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Projective) -> G1Projective
[src]
impl<'b> SubAssign<&'b G1Affine> for G1Projective
[src]
fn sub_assign(&mut self, rhs: &'b G1Affine)
[src]
impl SubAssign<G1Affine> for G1Projective
[src]
fn sub_assign(&mut self, rhs: G1Affine)
[src]
impl UncompressedEncoding for G1Affine
[src]
type Uncompressed = G1Uncompressed
fn from_uncompressed(bytes: &Self::Uncompressed) -> CtOption<Self>
[src]
fn from_uncompressed_unchecked(bytes: &Self::Uncompressed) -> CtOption<Self>
[src]
fn to_uncompressed(&self) -> Self::Uncompressed
[src]
Auto Trait Implementations
impl RefUnwindSafe for G1Affine
impl Send for G1Affine
impl Sync for G1Affine
impl Unpin for G1Affine
impl UnwindSafe for G1Affine
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> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
[src]
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
pub fn conditional_negate(&mut self, choice: Choice)
[src]
impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> FmtForward for T
pub fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Self: Binary,
pub fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Self: Display,
pub fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Self: LowerExp,
pub fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Self: LowerHex,
pub fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Self: Octal,
pub fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Self: Pointer,
pub fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Self: UpperExp,
pub fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Self: UpperHex,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pipe for T where
T: ?Sized,
T: ?Sized,
pub fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_ref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
pub fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_as_mut<'a, U, R>(
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
R: 'a,
T: 'a + ?Sized,
Self: Deref<Target = T>,
R: 'a,
T: 'a + ?Sized,
pub fn pipe_deref_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
R: 'a,
T: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
R: 'a,
T: 'a + ?Sized,
impl<T> Pipe for T
impl<T> PipeAsRef for T
pub fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
R: 'a,
T: 'a,
Self: AsRef<T>,
R: 'a,
T: 'a,
pub fn pipe_as_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
R: 'a,
T: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
R: 'a,
T: 'a,
impl<T> PipeBorrow for T
pub fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
R: 'a,
T: 'a,
Self: Borrow<T>,
R: 'a,
T: 'a,
pub fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
R: 'a,
T: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
R: 'a,
T: 'a,
impl<T> PipeDeref for T
pub fn pipe_deref<'a, R>(
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
pub fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
impl<T> PipeRef for T
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
R: 'a,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Tap for T
pub fn tap(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
pub fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
impl<T> Tap for T
pub fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
pub fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
impl<T> TapDeref for T
pub fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
pub fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
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> TryConv for T
impl<T> TryConv for T
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>,