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

Function create_homomorphisms

compressed_sigma/src/partial_knowledge.rs:208–219  ·  view source on GitHub ↗

Create a homomorphism for each commitment

(
        g: G,
        Ps: Vec<G>,
        n: usize,
        k: usize,
    )

Source from the content-addressed store, hash-verified

206
207 /// Create a homomorphism for each commitment
208 pub fn create_homomorphisms<G: AffineRepr>(
209 g: G,
210 Ps: Vec<G>,
211 n: usize,
212 k: usize,
213 ) -> Vec<Hom<G>> {
214 assert_eq!(Ps.len(), n);
215 cfg_into_iter!(Ps)
216 .enumerate()
217 .map(|(i, Ps)| Hom::new(g.clone(), Ps, k, n, i).unwrap())
218 .collect()
219 }
220}
221
222/// This module is when witnesses are vectors of field elements and DLs are of for `P_1 = g_1^{x_1}*g_2^{x_2}..`, `P_2 = g_1^{y_1}*g_2^{y_2}..`, ...

Callers 4

check_homFunction · 0.85

Calls 5

check_homFunction · 0.85
mapMethod · 0.80
cloneMethod · 0.80
lenMethod · 0.45
into_iterMethod · 0.45

Tested by 1