Update compact benchmarks

This commit is contained in:
aniampio
2022-08-31 11:55:15 +03:00
committed by durch
parent cd2f7a30d2
commit d7f4590239
2 changed files with 9 additions and 5 deletions
@@ -159,21 +159,23 @@ fn bench_compact_ecash(c: &mut Criterion) {
num_authorities: 100,
threshold_p: 0.7,
L: 100,
spend_vv: 10,
spend_vv: 1,
case_nr_pub_keys: 50,
};
let params = setup(case.L);
let grp = params.grp();
let user_keypair = generate_keypair_user(&grp);
let authorities_keypairs = ttp_keygen(&grp, 2, 3).unwrap();
let threshold = (case.threshold_p * case.num_authorities as f32).round() as u64;
let authorities_keypairs = ttp_keygen(&grp, threshold, case.num_authorities).unwrap();
let verification_keys_auth: Vec<VerificationKeyAuth> = authorities_keypairs
.iter()
.map(|keypair| keypair.verification_key())
.collect();
let indices: Vec<u64> = (1..case.num_authorities + 1).collect();
let verification_key =
aggregate_verification_keys(&verification_keys_auth, Some(&[1, 2, 3])).unwrap();
aggregate_verification_keys(&verification_keys_auth, Some(&indices)).unwrap();
// ISSUANCE PHASE
let (req, req_info) = withdrawal_request(grp, &user_keypair.secret_key()).unwrap();
@@ -165,14 +165,16 @@ fn bench_divisible_ecash(c: &mut Criterion) {
let params = Parameters::new(grp.clone());
// KEY GENERATION FOR THE AUTHORITIES
let authorities_keypairs = ttp_keygen_authorities(&params, 2, 3).unwrap();
let threshold = (case.threshold_p * case.num_authorities as f32).round() as u64;
let authorities_keypairs = ttp_keygen_authorities(&params, threshold, case.num_authorities).unwrap();
let verification_keys_auth: Vec<VerificationKeyAuth> = authorities_keypairs
.iter()
.map(|keypair| keypair.verification_key())
.collect();
let indices: Vec<u64> = (1..case.num_authorities + 1).collect();
let verification_key =
aggregate_verification_keys(&verification_keys_auth, Some(&[1, 2, 3])).unwrap();
aggregate_verification_keys(&verification_keys_auth, Some(&indices)).unwrap();
// KEY GENERATION FOR THE USER
let sk = grp.random_scalar();