`r_x` and `r_y` are randomness in the Pedersen commitments to x and y coordinates respectively
(
point: &Affine<P>,
r_x: C::ScalarField,
r_y: C::ScalarField,
comm_key: &PedersenCommitmentKey<Affine<C>>,
)
| 60 | |
| 61 | /// `r_x` and `r_y` are randomness in the Pedersen commitments to x and y coordinates respectively |
| 62 | pub fn new_given_randomness<P: SWPoint>( |
| 63 | point: &Affine<P>, |
| 64 | r_x: C::ScalarField, |
| 65 | r_y: C::ScalarField, |
| 66 | comm_key: &PedersenCommitmentKey<Affine<C>>, |
| 67 | ) -> Result<Self, Error> { |
| 68 | let (x, y) = point_coords_as_scalar_field_elements::<P, C>(point)?; |
| 69 | Ok(Self::new_given_randomness_and_coords( |
| 70 | x, y, r_x, r_y, comm_key, |
| 71 | )) |
| 72 | } |
| 73 | |
| 74 | pub fn new_given_randomness_and_coords( |
| 75 | x: C::ScalarField, |