-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata_structures.rs
More file actions
19 lines (16 loc) · 870 Bytes
/
data_structures.rs
File metadata and controls
19 lines (16 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use ark_ec::PairingEngine;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, SerializationError};
use ark_std::io::{Read, Write};
#[derive(CanonicalSerialize, CanonicalDeserialize, PartialEq, Eq)]
pub struct CommitmentKey<E: PairingEngine> {
/// The powers [beta^0 * G, beta^1 * G, ..., beta^n * G]
pub powers_of_beta_g_first: Vec<E::G1Affine>,
/// The powers [beta^{n + 2} * G, ..., beta^{2n} * G]
pub powers_of_beta_g_second: Vec<E::G1Affine>,
/// The powers [beta^0 * H, beta^1 * H, ..., beta^n * H]
pub powers_of_beta_h: Vec<E::G2Affine>,
}
#[derive(CanonicalSerialize, CanonicalDeserialize, PartialEq, Eq, Debug, Copy, Clone)]
pub struct Commitment<E: PairingEngine>(pub E::G1Affine);
#[derive(CanonicalSerialize, CanonicalDeserialize, PartialEq, Eq, Debug, Copy, Clone)]
pub struct Proof<E: PairingEngine>(pub E::G1Affine);