1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use ark_ec::PairingEngine;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Read, SerializationError, Write};
use ark_std::vec::Vec;
#[allow(type_alias_bounds)]
pub type EvaluationHyperCubeOnG1<E: PairingEngine> = Vec<E::G1Affine>;
#[allow(type_alias_bounds)]
pub type EvaluationHyperCubeOnG2<E: PairingEngine> = Vec<E::G2Affine>;
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug)]
pub struct UniversalParams<E: PairingEngine> {
pub num_vars: usize,
pub powers_of_g: Vec<EvaluationHyperCubeOnG1<E>>,
pub powers_of_h: Vec<EvaluationHyperCubeOnG2<E>>,
pub g: E::G1Affine,
pub h: E::G2Affine,
pub g_mask: Vec<E::G1Affine>,
}
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug)]
pub struct CommitterKey<E: PairingEngine> {
pub nv: usize,
pub powers_of_g: Vec<EvaluationHyperCubeOnG1<E>>,
pub powers_of_h: Vec<EvaluationHyperCubeOnG2<E>>,
pub g: E::G1Affine,
pub h: E::G2Affine,
}
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug)]
pub struct VerifierKey<E: PairingEngine> {
pub nv: usize,
pub g: E::G1Affine,
pub h: E::G2Affine,
pub g_mask_random: Vec<E::G1Affine>,
}
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug)]
pub struct Commitment<E: PairingEngine> {
pub nv: usize,
pub g_product: E::G1Affine,
}
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug)]
pub struct Proof<E: PairingEngine> {
pub proofs: Vec<E::G2Affine>,
}