openvm_pairing_guest::affine_point

Trait AffineCoords

Source
pub trait AffineCoords<F>: Clone {
    // Required methods
    fn new(x: F, y: F) -> Self;
    fn x(&self) -> F;
    fn y(&self) -> F;
    fn neg(&self) -> Self;
    fn random(rng: &mut impl Rng) -> Self;
    fn generator() -> Self;
    fn is_infinity(&self) -> bool;
}

Required Methods§

Source

fn new(x: F, y: F) -> Self

Creates a new elliptic curve point from its affine coordinates.

Source

fn x(&self) -> F

Returns the affine representation x-coordinate of the elliptic curve point.

Source

fn y(&self) -> F

Returns the affine representation y-coordinate of the elliptic curve point.

Source

fn neg(&self) -> Self

Negates the elliptic curve point (reflection on the x-axis).

Source

fn random(rng: &mut impl Rng) -> Self

Generates a random elliptic curve point.

Source

fn generator() -> Self

Returns the generator point of the elliptic curve.

Source

fn is_infinity(&self) -> bool

Returns whether the point is the point at infinity or not.

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 AffineCoords<Fp2> for G2Affine

Source§

fn new(x: Fq2, y: Fq2) -> Self

Source§

fn x(&self) -> Fq2

Source§

fn y(&self) -> Fq2

Source§

fn neg(&self) -> Self

Source§

fn random(rng: &mut impl Rng) -> Self

Source§

fn generator() -> Self

Source§

fn is_infinity(&self) -> bool

Source§

impl AffineCoords<Fp> for G1Affine

Source§

fn new(x: Fq, y: Fq) -> Self

Source§

fn x(&self) -> Fq

Source§

fn y(&self) -> Fq

Source§

fn neg(&self) -> Self

Source§

fn random(rng: &mut impl Rng) -> Self

Source§

fn generator() -> Self

Source§

fn is_infinity(&self) -> bool

Source§

impl AffineCoords<Fq2> for G2Affine

Source§

fn new(x: Fq2, y: Fq2) -> Self

Source§

fn x(&self) -> Fq2

Source§

fn y(&self) -> Fq2

Source§

fn neg(&self) -> Self

Source§

fn random(rng: &mut impl Rng) -> Self

Source§

fn generator() -> Self

Source§

fn is_infinity(&self) -> bool

Source§

impl AffineCoords<Fq> for G1Affine

Source§

fn new(x: Fq, y: Fq) -> Self

Source§

fn x(&self) -> Fq

Source§

fn y(&self) -> Fq

Source§

fn neg(&self) -> Self

Source§

fn random(rng: &mut impl Rng) -> Self

Source§

fn generator() -> Self

Source§

fn is_infinity(&self) -> bool

Implementors§