ped92: cleanup asserts

This commit is contained in:
Gijs Van Laer 2019-06-14 18:59:33 -04:00
parent 3e516083ae
commit 1f2e56bef2
1 changed files with 12 additions and 12 deletions

View File

@ -18,13 +18,13 @@ use serde::{Serialize, Deserialize};
#[derive(Clone)]
pub struct PublicKey<E: Engine> {
g: E::G2,
h: E::G2
h: E::G2,
}
#[derive(Clone)]
pub struct Commitment<E: Engine> {
pub c: E::G2,
pub r: E::Fr
pub r: E::Fr,
}
#[derive(Clone)]
@ -207,8 +207,8 @@ mod tests {
let r = Fr::rand(rng);
let c = ped92_commit(&pk, m1, Some(r));
assert!(ped92_decommit(&pk, &c, m1) == true);
assert!(ped92_decommit(&pk, &c, m2) == false);
assert_eq!(true, ped92_decommit(&pk, &c, m1));
assert_eq!(false, ped92_decommit(&pk, &c, m2));
}
#[test]
@ -224,6 +224,6 @@ mod tests {
let r = m[0].clone();
let c = commit(&csp, &m, r);
assert!(decommit(&csp, &c, &m) == true);
assert_eq!(true, decommit(&csp, &c, &m));
}
}