MCPcopy Create free account
hub / github.com/docknetwork/crypto / new_given_randomness

Method new_given_randomness

equality_across_groups/src/ec/commitments.rs:62–72  ·  view source on GitHub ↗

`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>>,
    )

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 1

commitMethod · 0.45

Tested by

no test coverage detected