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

Method new

equality_across_groups/src/ec/commitments.rs:51–59  ·  view source on GitHub ↗
(
        rng: &mut R,
        point: &Affine<P>,
        comm_key: &PedersenCommitmentKey<Affine<C>>,
    )

Source from the content-addressed store, hash-verified

49
50impl<C: SWPoint> PointCommitmentWithOpening<C> {
51 pub fn new<R: RngCore, P: SWPoint>(
52 rng: &mut R,
53 point: &Affine<P>,
54 comm_key: &PedersenCommitmentKey<Affine<C>>,
55 ) -> Result<Self, Error> {
56 let r_x = C::ScalarField::rand(rng);
57 let r_y = C::ScalarField::rand(rng);
58 Self::new_given_randomness(point, r_x, r_y, comm_key)
59 }
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>(

Callers

nothing calls this directly

Calls 2

randFunction · 0.85
commitMethod · 0.45

Tested by

no test coverage detected