generic_ec_core::coords

Trait AlwaysHasAffineYAndSign

Source
pub trait AlwaysHasAffineYAndSign: Curve + AlwaysHasAffineY {
    // Required methods
    fn y_and_sign(point: &Self::Point) -> (Sign, Self::CoordinateArray);
    fn from_y_and_sign(
        x_sign: Sign,
        y: &Self::CoordinateArray,
    ) -> Option<Self::Point>;
}
Expand description

A point that always has affine y coordinate and sign of x coordinate

Required Methods§

Source

fn y_and_sign(point: &Self::Point) -> (Sign, Self::CoordinateArray)

Returns y coordinate and sign of x coordinate

Source

fn from_y_and_sign( x_sign: Sign, y: &Self::CoordinateArray, ) -> Option<Self::Point>

Constructs a point from y coordinate and sign of x coordinate

Returns None if input does not correspond to a valid point (but you still need to check that the point is on curve and has no small component)

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.

Implementors§