snark_verifier::util::arithmetic

Trait PrimeCurveAffine

Source
pub trait PrimeCurveAffine:
    Sized
    + GroupEncoding
    + Copy
    + Clone
    + Send
    + Sync
    + Debug
    + PartialEq
    + Eq
    + 'static
    + Neg<Output = Self>
    + Mul<Self::Scalar, Output = Self::Curve, Output = Self::Curve>
    + for<'r> Mul<&'r Self::Scalar> {
    type Scalar: PrimeField;
    type Curve: PrimeCurve<Affine = Self, Scalar = Self::Scalar>;

    // Required methods
    fn identity() -> Self;
    fn generator() -> Self;
    fn is_identity(&self) -> Choice;
    fn to_curve(&self) -> Self::Curve;
}
Expand description

Affine representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.

Required Associated Types§

Source

type Scalar: PrimeField

Source

type Curve: PrimeCurve<Affine = Self, Scalar = Self::Scalar>

Required Methods§

Source

fn identity() -> Self

Returns the additive identity.

Source

fn generator() -> Self

Returns a fixed generator of unknown exponent.

Source

fn is_identity(&self) -> Choice

Determines if this point represents the point at infinity; the additive identity.

Source

fn to_curve(&self) -> Self::Curve

Converts this element to its curve representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PrimeCurveAffine for G1Affine

Source§

impl PrimeCurveAffine for G2Affine

Source§

impl PrimeCurveAffine for G1Affine

Source§

impl PrimeCurveAffine for G2Affine

Source§

impl PrimeCurveAffine for Ed25519Affine

Source§

impl PrimeCurveAffine for G1Affine

Source§

impl PrimeCurveAffine for ErisAffine

Source§

impl PrimeCurveAffine for G1Affine

Source§

impl PrimeCurveAffine for G2Affine

Source§

impl PrimeCurveAffine for Secp256k1Affine

Source§

impl PrimeCurveAffine for Secp256r1Affine

Source§

impl PrimeCurveAffine for Secq256k1Affine

Source§

impl PrimeCurveAffine for AffinePoint

Source§

fn identity() -> AffinePoint

Returns the identity of the group: the point at infinity.

Source§

fn generator() -> AffinePoint

Returns the base point of secp256k1.

Source§

fn is_identity(&self) -> Choice

Is this point the identity point?

Source§

fn to_curve(&self) -> ProjectivePoint

Convert to curve representation.

Source§

type Scalar = Scalar

Source§

type Curve = ProjectivePoint

Source§

impl PrimeCurveAffine for EpAffine

Source§

impl PrimeCurveAffine for EqAffine

Implementors§