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

Method add_multiple_sources

utils/src/randomized_pairing_check.rs:92–100  ·  view source on GitHub ↗

Add a sequence of group elements whose pairing product must be equal to the another given sequence of group elements, i.e. `\prod_{i}(e(a_i, b_i)) = \prod_{i}(e(c_i, d_i))`

(
        &mut self,
        a: &[E::G1Affine],
        b: impl IntoIterator<Item = impl Into<E::G2Prepared>>,
        c: &[E::G1Affine],
        d: impl IntoIterator<Item = impl Into<E::G2Prepared>>,

Source from the content-addressed store, hash-verified

90 /// Add a sequence of group elements whose pairing product must be equal to the another given sequence
91 /// of group elements, i.e. `\prod_{i}(e(a_i, b_i)) = \prod_{i}(e(c_i, d_i))`
92 pub fn add_multiple_sources(
93 &mut self,
94 a: &[E::G1Affine],
95 b: impl IntoIterator<Item = impl Into<E::G2Prepared>>,
96 c: &[E::G1Affine],
97 d: impl IntoIterator<Item = impl Into<E::G2Prepared>>,
98 ) {
99 self.add_multiple_sources_with_laziness_choice(a, b, c, d, self.lazy)
100 }
101
102 /// Add 2 group elements whose pairing should be equal to the pairing of another 2 given group
103 /// elements, i.e. `e(a, b) = e(c, d)`

Callers 1

test_pairing_randomizeFunction · 0.80

Tested by 1

test_pairing_randomizeFunction · 0.64