Trait pairing::CurveAffine
[−]
[src]
pub trait CurveAffine: Copy + Clone + Sized + Send + Sync + Debug + Display + PartialEq + Eq + 'static { type Engine: Engine<Fr = Self::Scalar>; type Scalar: PrimeField + SqrtField; type Base: SqrtField; type Projective: CurveProjective<Affine = Self, Scalar = Self::Scalar>; type Prepared: Clone + Send + Sync + 'static; type Uncompressed: EncodedPoint<Affine = Self>; type Compressed: EncodedPoint<Affine = Self>; type Pair: CurveAffine<Pair = Self>; type PairingResult: Field; fn zero() -> Self; fn one() -> Self; fn is_zero(&self) -> bool; fn negate(&mut self); fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
other: S
) -> Self::Projective; fn prepare(&self) -> Self::Prepared; fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult; fn into_projective(&self) -> Self::Projective; fn into_compressed(&self) -> Self::Compressed { ... } fn into_uncompressed(&self) -> Self::Uncompressed { ... } }
Affine representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.
Associated Types
type Engine: Engine<Fr = Self::Scalar>
type Scalar: PrimeField + SqrtField
type Base: SqrtField
type Projective: CurveProjective<Affine = Self, Scalar = Self::Scalar>
type Prepared: Clone + Send + Sync + 'static
type Uncompressed: EncodedPoint<Affine = Self>
type Compressed: EncodedPoint<Affine = Self>
type Pair: CurveAffine<Pair = Self>
type PairingResult: Field
Required Methods
fn zero() -> Self
Returns the additive identity.
fn one() -> Self
Returns a fixed generator of unknown exponent.
fn is_zero(&self) -> bool
Determines if this point represents the point at infinity; the additive identity.
fn negate(&mut self)
Negates this element.
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
other: S
) -> Self::Projective
&self,
other: S
) -> Self::Projective
Performs scalar multiplication of this element with mixed addition.
fn prepare(&self) -> Self::Prepared
Prepares this element for pairing purposes.
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
Perform a pairing
fn into_projective(&self) -> Self::Projective
Converts this element into its affine representation.
Provided Methods
fn into_compressed(&self) -> Self::Compressed
Converts this element into its compressed encoding, so long as it's not the point at infinity.
fn into_uncompressed(&self) -> Self::Uncompressed
Converts this element into its uncompressed encoding, so long as it's not the point at infinity.
Implementors
impl CurveAffine for G1Affine type Engine = Bls12; type Scalar = Fr; type Base = Fq; type Prepared = G1Prepared; type Projective = G1; type Uncompressed = G1Uncompressed; type Compressed = G1Compressed; type Pair = G2Affine; type PairingResult = Fq12;
impl CurveAffine for G2Affine type Engine = Bls12; type Scalar = Fr; type Base = Fq2; type Prepared = G2Prepared; type Projective = G2; type Uncompressed = G2Uncompressed; type Compressed = G2Compressed; type Pair = G1Affine; type PairingResult = Fq12;