Create a homomorphism for each commitment
(
g: G,
Ps: Vec<G>,
n: usize,
k: usize,
)
| 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}..`, ... |