pub type G1Affine = Bls12_381G1Affine;
Expand description
Affine point representation of Fp
points of BLS12-381.
Note: an instance of this type may be constructed that lies
on the curve but not necessarily in the prime order subgroup
because the group has cofactors.
Aliased Type§
struct G1Affine { /* private fields */ }
Implementations
Source§impl Bls12_381G1Affine
impl Bls12_381G1Affine
pub fn get_non_qr() -> &'static Bls12_381Fp
Trait Implementations§
Source§impl CyclicGroup for G1Affine
impl CyclicGroup for G1Affine
Source§impl Add<&Bls12_381G1Affine> for Bls12_381G1Affine
impl Add<&Bls12_381G1Affine> for Bls12_381G1Affine
Source§type Output = Bls12_381G1Affine
type Output = Bls12_381G1Affine
The resulting type after applying the
+
operator.Source§impl Add for Bls12_381G1Affine
impl Add for Bls12_381G1Affine
Source§impl AddAssign<&Bls12_381G1Affine> for Bls12_381G1Affine
impl AddAssign<&Bls12_381G1Affine> for Bls12_381G1Affine
Source§fn add_assign(&mut self, p2: &Bls12_381G1Affine)
fn add_assign(&mut self, p2: &Bls12_381G1Affine)
Performs the
+=
operation. Read moreSource§impl AddAssign for Bls12_381G1Affine
impl AddAssign for Bls12_381G1Affine
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for Bls12_381G1Affine
impl Clone for Bls12_381G1Affine
Source§fn clone(&self) -> Bls12_381G1Affine
fn clone(&self) -> Bls12_381G1Affine
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Bls12_381G1Affine
impl Debug for Bls12_381G1Affine
Source§impl<'de> Deserialize<'de> for Bls12_381G1Affine
impl<'de> Deserialize<'de> for Bls12_381G1Affine
Source§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
Source§impl FromCompressed<Bls12_381Fp> for Bls12_381G1Affine
impl FromCompressed<Bls12_381Fp> for Bls12_381G1Affine
Source§fn decompress(x: Bls12_381Fp, rec_id: &u8) -> Option<Self>
fn decompress(x: Bls12_381Fp, rec_id: &u8) -> Option<Self>
Given
x
-coordinate, Read moreSource§fn hint_decompress(
x: &Bls12_381Fp,
rec_id: &u8,
) -> Option<DecompressionHint<Bls12_381Fp>>
fn hint_decompress( x: &Bls12_381Fp, rec_id: &u8, ) -> Option<DecompressionHint<Bls12_381Fp>>
If it exists, hints the unique
y
coordinate that is less than Coordinate::MODULUS
such that (x, y)
is a point on the curve and y
has parity equal to rec_id
.
If such y
does not exist, hints a coordinate sqrt
such that sqrt^2 = rhs * non_qr
where rhs
is the rhs of the curve equation and non_qr
is the non-quadratic residue
for this curve that was initialized in the setup function. Read moreSource§impl Group for Bls12_381G1Affine
impl Group for Bls12_381G1Affine
Source§impl Neg for Bls12_381G1Affine
impl Neg for Bls12_381G1Affine
Source§impl PartialEq for Bls12_381G1Affine
impl PartialEq for Bls12_381G1Affine
Source§impl Serialize for Bls12_381G1Affine
impl Serialize for Bls12_381G1Affine
Source§impl Sub<&Bls12_381G1Affine> for Bls12_381G1Affine
impl Sub<&Bls12_381G1Affine> for Bls12_381G1Affine
Source§type Output = Bls12_381G1Affine
type Output = Bls12_381G1Affine
The resulting type after applying the
-
operator.Source§impl Sub for Bls12_381G1Affine
impl Sub for Bls12_381G1Affine
Source§impl SubAssign<&Bls12_381G1Affine> for Bls12_381G1Affine
impl SubAssign<&Bls12_381G1Affine> for Bls12_381G1Affine
Source§fn sub_assign(&mut self, p2: &Bls12_381G1Affine)
fn sub_assign(&mut self, p2: &Bls12_381G1Affine)
Performs the
-=
operation. Read moreSource§impl SubAssign for Bls12_381G1Affine
impl SubAssign for Bls12_381G1Affine
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreSource§impl WeierstrassPoint for Bls12_381G1Affine
impl WeierstrassPoint for Bls12_381G1Affine
Source§fn as_le_bytes(&self) -> &[u8] ⓘ
fn as_le_bytes(&self) -> &[u8] ⓘ
SAFETY: assumes that #intmod_type has a memory representation such that with repr(C), two coordinates are packed contiguously.
Source§const CURVE_A: Bls12_381Fp = <Bls12_381Fp as openvm_algebra_guest::IntMod>::ZERO
const CURVE_A: Bls12_381Fp = <Bls12_381Fp as openvm_algebra_guest::IntMod>::ZERO
The
a
coefficient in the Weierstrass curve equation y^2 = x^3 + a x + b
.Source§const CURVE_B: Bls12_381Fp = CURVE_B
const CURVE_B: Bls12_381Fp = CURVE_B
The
b
coefficient in the Weierstrass curve equation y^2 = x^3 + a x + b
.const IDENTITY: Self
type Coordinate = Bls12_381Fp
Source§fn from_xy_unchecked(x: Self::Coordinate, y: Self::Coordinate) -> Self
fn from_xy_unchecked(x: Self::Coordinate, y: Self::Coordinate) -> Self
Raw constructor without asserting point is on the curve.
fn x(&self) -> &Self::Coordinate
fn y(&self) -> &Self::Coordinate
fn x_mut(&mut self) -> &mut Self::Coordinate
fn y_mut(&mut self) -> &mut Self::Coordinate
fn into_coords(self) -> (Self::Coordinate, Self::Coordinate)
Source§fn add_ne_nonidentity(&self, p2: &Self) -> Self
fn add_ne_nonidentity(&self, p2: &Self) -> Self
Hazmat: Assumes self != +- p2 and self != identity and p2 != identity.
Source§fn add_ne_assign_nonidentity(&mut self, p2: &Self)
fn add_ne_assign_nonidentity(&mut self, p2: &Self)
Hazmat: Assumes self != +- p2 and self != identity and p2 != identity.
Source§fn sub_ne_nonidentity(&self, p2: &Self) -> Self
fn sub_ne_nonidentity(&self, p2: &Self) -> Self
Hazmat: Assumes self != +- p2 and self != identity and p2 != identity.
Source§fn sub_ne_assign_nonidentity(&mut self, p2: &Self)
fn sub_ne_assign_nonidentity(&mut self, p2: &Self)
Hazmat: Assumes self != +- p2 and self != identity and p2 != identity.
Source§fn double_nonidentity(&self) -> Self
fn double_nonidentity(&self) -> Self
Hazmat: Assumes self != identity and 2 * self != identity.
Source§fn double_assign_nonidentity(&mut self)
fn double_assign_nonidentity(&mut self)
Hazmat: Assumes self != identity and 2 * self != identity.