pub fn generate_positive_ephemeral_key_pair( ) -> (EmbeddedCurveScalar, EmbeddedCurvePoint)
Generates a random ephemeral key pair with a positive y-coordinate.
Unlike generate_ephemeral_key_pair, the y-coordinate of the public key is guaranteed to be a positive value (i.e. crate::utils::point::get_sign_of_point will return true).
generate_ephemeral_key_pair
crate::utils::point::get_sign_of_point
true
This is useful as it means it is possible to just broadcast the x-coordinate as a single Field and then reconstruct the original public key using crate::utils::point::point_from_x_coord_and_sign with sign: true.
Field
crate::utils::point::point_from_x_coord_and_sign
sign: true
Generates a random ephemeral key pair with a positive y-coordinate.
Unlike
generate_ephemeral_key_pair, the y-coordinate of the public key is guaranteed to be a positive value (i.e.crate::utils::point::get_sign_of_pointwill returntrue).This is useful as it means it is possible to just broadcast the x-coordinate as a single
Fieldand then reconstruct the original public key usingcrate::utils::point::point_from_x_coord_and_signwithsign: true.