Struct blstrs::G1Affine [−][src]
pub struct G1Affine(_);
Expand description
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.
Implementations
impl G1Affine
[src]
impl G1Affine
[src]pub fn to_compressed(&self) -> [u8; 48]
[src]
pub fn to_compressed(&self) -> [u8; 48]
[src]Serializes this element into compressed form.
pub fn to_uncompressed(&self) -> [u8; 96]
[src]
pub fn to_uncompressed(&self) -> [u8; 96]
[src]Serializes this element into uncompressed form.
pub fn from_uncompressed(bytes: &[u8; 96]) -> Option<Self>
[src]
pub fn from_uncompressed(bytes: &[u8; 96]) -> Option<Self>
[src]Attempts to deserialize an uncompressed element.
pub fn from_uncompressed_unchecked(bytes: &[u8; 96]) -> Option<Self>
[src]
pub fn from_uncompressed_unchecked(bytes: &[u8; 96]) -> 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; 48]) -> Option<Self>
[src]
pub fn from_compressed(bytes: &[u8; 48]) -> Option<Self>
[src]Attempts to deserialize a compressed element.
pub fn from_compressed_unchecked(bytes: &[u8; 48]) -> Option<Self>
[src]
pub fn from_compressed_unchecked(bytes: &[u8; 48]) -> 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 is_torsion_free(&self) -> bool
[src]
pub fn is_torsion_free(&self) -> bool
[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) -> bool
[src]
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: Fp, y: Fp, _infinity: bool) -> Self
[src]
pub const fn uncompressed_size() -> usize
[src]
pub const fn compressed_size() -> usize
[src]
pub fn raw_fmt_size() -> usize
[src]
pub fn write_raw<W: Write>(&self, writer: W) -> Result<usize, Error>
[src]
pub fn read_raw<R: Read>(reader: R) -> Result<Self, Error>
[src]
pub fn read_raw_checked<R: Read>(reader: R) -> Result<Self, Error>
[src]
Trait Implementations
impl<'a, 'b> Add<&'b G1Affine> for &'a G1Projective
[src]
impl<'a, 'b> Add<&'b G1Affine> for &'a G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]Performs the +
operation. Read more
impl<'b> Add<&'b G1Affine> for G1Projective
[src]
impl<'b> Add<&'b G1Affine> for G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]
fn add(self, rhs: &'b G1Affine) -> G1Projective
[src]Performs the +
operation. Read more
impl<'a, 'b> Add<&'b G1Projective> for &'a G1Affine
[src]
impl<'a, 'b> Add<&'b G1Projective> for &'a G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]Performs the +
operation. Read more
impl<'b> Add<&'b G1Projective> for G1Affine
[src]
impl<'b> Add<&'b G1Projective> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]
fn add(self, rhs: &'b G1Projective) -> G1Projective
[src]Performs the +
operation. Read more
impl<'a> Add<G1Affine> for &'a G1Projective
[src]
impl<'a> Add<G1Affine> for &'a G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Affine) -> G1Projective
[src]
fn add(self, rhs: G1Affine) -> G1Projective
[src]Performs the +
operation. Read more
impl Add<G1Affine> for G1Projective
[src]
impl Add<G1Affine> for G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Affine) -> G1Projective
[src]
fn add(self, rhs: G1Affine) -> G1Projective
[src]Performs the +
operation. Read more
impl<'a> Add<G1Projective> for &'a G1Affine
[src]
impl<'a> Add<G1Projective> for &'a G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Projective) -> G1Projective
[src]
fn add(self, rhs: G1Projective) -> G1Projective
[src]Performs the +
operation. Read more
impl Add<G1Projective> for G1Affine
[src]
impl Add<G1Projective> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G1Projective) -> G1Projective
[src]
fn add(self, rhs: G1Projective) -> G1Projective
[src]Performs the +
operation. Read more
impl<'b> AddAssign<&'b G1Affine> for G1Projective
[src]
impl<'b> AddAssign<&'b G1Affine> for G1Projective
[src]fn add_assign(&mut self, rhs: &'b G1Affine)
[src]
fn add_assign(&mut self, rhs: &'b G1Affine)
[src]Performs the +=
operation. Read more
impl AddAssign<G1Affine> for G1Projective
[src]
impl AddAssign<G1Affine> for G1Projective
[src]fn add_assign(&mut self, rhs: G1Affine)
[src]
fn add_assign(&mut self, rhs: G1Affine)
[src]Performs the +=
operation. Read more
impl AsMut<blst_p1_affine> for G1Affine
[src]
impl AsMut<blst_p1_affine> for G1Affine
[src]fn as_mut(&mut self) -> &mut blst_p1_affine
[src]
fn as_mut(&mut self) -> &mut blst_p1_affine
[src]Performs the conversion.
impl AsRef<blst_p1_affine> for G1Affine
[src]
impl AsRef<blst_p1_affine> for G1Affine
[src]fn as_ref(&self) -> &blst_p1_affine
[src]
fn as_ref(&self) -> &blst_p1_affine
[src]Performs the conversion.
impl CurveAffine for G1Affine
[src]
impl CurveAffine for G1Affine
[src]type Engine = Bls12
type Scalar = Scalar
type Base = Fp
type Projective = G1Projective
type Uncompressed = G1Uncompressed
type Compressed = G1Compressed
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
[src]Determines if this point represents the point at infinity; the additive identity. Read more
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
by: S
) -> Self::Projective
[src]
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
by: S
) -> Self::Projective
[src]Performs scalar multiplication of this element with mixed addition.
fn into_projective(&self) -> Self::Projective
[src]
fn into_projective(&self) -> Self::Projective
[src]Converts this element into its affine representation.
fn into_compressed(&self) -> Self::Compressed
[src]
fn into_compressed(&self) -> Self::Compressed
[src]Converts this element into its compressed encoding, so long as it’s not the point at infinity. Read more
fn into_uncompressed(&self) -> Self::Uncompressed
[src]
fn into_uncompressed(&self) -> Self::Uncompressed
[src]Converts this element into its uncompressed encoding, so long as it’s not the point at infinity. Read more
impl<'de> Deserialize<'de> for G1Affine
[src]
impl<'de> Deserialize<'de> for G1Affine
[src]fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl From<&'_ G1Affine> for G1Projective
[src]
impl From<&'_ G1Affine> for G1Projective
[src]fn from(p: &G1Affine) -> G1Projective
[src]
fn from(p: &G1Affine) -> G1Projective
[src]Performs the conversion.
impl From<&'_ G1Projective> for G1Affine
[src]
impl From<&'_ G1Projective> for G1Affine
[src]fn from(p: &G1Projective) -> G1Affine
[src]
fn from(p: &G1Projective) -> G1Affine
[src]Performs the conversion.
impl From<G1Affine> for G1Projective
[src]
impl From<G1Affine> for G1Projective
[src]fn from(p: G1Affine) -> G1Projective
[src]
fn from(p: G1Affine) -> G1Projective
[src]Performs the conversion.
impl From<G1Projective> for G1Affine
[src]
impl From<G1Projective> for G1Affine
[src]fn from(p: G1Projective) -> G1Affine
[src]
fn from(p: G1Projective) -> G1Affine
[src]Performs the conversion.
impl<'b> Mul<&'b Scalar> for G1Affine
[src]
impl<'b> Mul<&'b Scalar> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> G1Projective
[src]
fn mul(self, rhs: &'b Scalar) -> G1Projective
[src]Performs the *
operation. Read more
impl<'a> Mul<Scalar> for &'a G1Affine
[src]
impl<'a> Mul<Scalar> for &'a G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G1Projective
[src]
fn mul(self, rhs: Scalar) -> G1Projective
[src]Performs the *
operation. Read more
impl Mul<Scalar> for G1Affine
[src]
impl Mul<Scalar> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G1Projective
[src]
fn mul(self, rhs: Scalar) -> G1Projective
[src]Performs the *
operation. Read more
impl PairingCurveAffine for G1Affine
[src]
impl PairingCurveAffine for G1Affine
[src]type Prepared = G1Affine
type Pair = G2Affine
type PairingResult = Fp12
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
[src]
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
[src]Perform a pairing
impl<'a, 'b> Sub<&'b G1Affine> for &'a G1Projective
[src]
impl<'a, 'b> Sub<&'b G1Affine> for &'a G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]Performs the -
operation. Read more
impl<'b> Sub<&'b G1Affine> for G1Projective
[src]
impl<'b> Sub<&'b G1Affine> for G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]
fn sub(self, rhs: &'b G1Affine) -> G1Projective
[src]Performs the -
operation. Read more
impl<'a, 'b> Sub<&'b G1Projective> for &'a G1Affine
[src]
impl<'a, 'b> Sub<&'b G1Projective> for &'a G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]Performs the -
operation. Read more
impl<'b> Sub<&'b G1Projective> for G1Affine
[src]
impl<'b> Sub<&'b G1Projective> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]
fn sub(self, rhs: &'b G1Projective) -> G1Projective
[src]Performs the -
operation. Read more
impl<'a> Sub<G1Affine> for &'a G1Projective
[src]
impl<'a> Sub<G1Affine> for &'a G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Affine) -> G1Projective
[src]
fn sub(self, rhs: G1Affine) -> G1Projective
[src]Performs the -
operation. Read more
impl Sub<G1Affine> for G1Projective
[src]
impl Sub<G1Affine> for G1Projective
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Affine) -> G1Projective
[src]
fn sub(self, rhs: G1Affine) -> G1Projective
[src]Performs the -
operation. Read more
impl<'a> Sub<G1Projective> for &'a G1Affine
[src]
impl<'a> Sub<G1Projective> for &'a G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Projective) -> G1Projective
[src]
fn sub(self, rhs: G1Projective) -> G1Projective
[src]Performs the -
operation. Read more
impl Sub<G1Projective> for G1Affine
[src]
impl Sub<G1Projective> for G1Affine
[src]type Output = G1Projective
type Output = G1Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G1Projective) -> G1Projective
[src]
fn sub(self, rhs: G1Projective) -> G1Projective
[src]Performs the -
operation. Read more
impl<'b> SubAssign<&'b G1Affine> for G1Projective
[src]
impl<'b> SubAssign<&'b G1Affine> for G1Projective
[src]fn sub_assign(&mut self, rhs: &'b G1Affine)
[src]
fn sub_assign(&mut self, rhs: &'b G1Affine)
[src]Performs the -=
operation. Read more
impl SubAssign<G1Affine> for G1Projective
[src]
impl SubAssign<G1Affine> for G1Projective
[src]fn sub_assign(&mut self, rhs: G1Affine)
[src]
fn sub_assign(&mut self, rhs: G1Affine)
[src]Performs the -=
operation. Read more
impl Copy for G1Affine
[src]
impl Eq for G1Affine
[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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,