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

Method new

coconut/src/signature/message_commitment.rs:39–46  ·  view source on GitHub ↗

`g * o + h * m`.

(
        &g: &E::G1Affine,
        &o: &E::ScalarField,
        &h: &E::G1Affine,
        &m: &E::ScalarField,
    )

Source from the content-addressed store, hash-verified

37impl<E: Pairing> MessageCommitment<E> {
38 /// `g * o + h * m`.
39 pub fn new(
40 &g: &E::G1Affine,
41 &o: &E::ScalarField,
42 &h: &E::G1Affine,
43 &m: &E::ScalarField,
44 ) -> Self {
45 Self(pairs!([g, h], [o, m]).msm().into_affine())
46 }
47
48 /// Produces an iterator of `g * o_{j} + h * m_{j}`.
49 pub fn new_iter<'iter>(

Callers

nothing calls this directly

Calls 1

msmMethod · 0.45

Tested by

no test coverage detected