aztec-nr - noir_aztec::utils::point

Function point_from_x_coord_and_sign

pub fn point_from_x_coord_and_sign(x: Field, sign: bool) -> Option<EmbeddedCurvePoint>

Returns a Point in the Grumpkin curve given its x coordinate and sign for the y coordinate.

Because not all values in the field are valid x coordinates of points in the curve (i.e. there is no corresponding y value in the field that satisfies the curve equation), it may not be possible to reconstruct a Point. Option::none() is returned in such cases.

@param x - The x coordinate of the point @param sign - The "sign" of the y coordinate - determines whether y <= (Fr.MODULUS - 1) / 2