separate ParameterSelector for non-interactive mp and interactive mp

This commit is contained in:
Janmajaya Mall
2024-06-30 19:11:42 +05:30
parent fef9fa4b6e
commit d260910299
12 changed files with 114 additions and 318 deletions

View File

@@ -35,7 +35,8 @@ fn main() {
// multi-party key gen round 2
let server_key_shares = client_keys
.iter()
.map(|k| gen_mp_keys_phase2(k, &public_key))
.enumerate()
.map(|(user_id, k)| gen_mp_keys_phase2(k, user_id, no_of_parties, &public_key))
.collect_vec();
// server aggregates server key shares and sets it

View File

@@ -47,10 +47,15 @@ fn main() {
server_key.set_server_key();
// extract a and b from client0 inputs
// let now = std::time::Instant::now();
let (ct_c0_a, ct_c0_b) = {
let ct = c0_batched_to_send.unseed::<Vec<Vec<u64>>>().key_switch(0);
(ct.extract(0), ct.extract(1))
};
// println!(
// "Time to unseed, key switch, and extract 2 ciphertexts: {:?}",
// now.elapsed()
// );
// extract a and b from client1 inputs
let (ct_c1_a, ct_c1_b) = {