pub trait FromCompressed<Coordinate> {
// Required method
fn decompress(x: Coordinate, rec_id: &u8) -> Option<Self>
where Self: Sized;
}
Required Methods§
Sourcefn decompress(x: Coordinate, rec_id: &u8) -> Option<Self>where
Self: Sized,
fn decompress(x: Coordinate, rec_id: &u8) -> Option<Self>where
Self: Sized,
Given x
-coordinate,
Decompresses a point from its x-coordinate and a recovery identifier which indicates the parity of the y-coordinate. Given the x-coordinate, this function attempts to find the corresponding y-coordinate that satisfies the elliptic curve equation. If successful, it returns the point as an instance of Self. If the point cannot be decompressed, it returns None.