diff --git a/Cargo.lock b/Cargo.lock index 1cf2a74..38803e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "mpc" version = "0.0.1" dependencies = [ "bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bn 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bn 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -22,7 +22,7 @@ dependencies = [ [[package]] name = "bn" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -77,7 +77,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "snark" version = "0.0.1" dependencies = [ - "bn 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bn 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 4f9f04b..7bb3848 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] snark = { path = "./snark/" } -bn = "0.2.3" +bn = "0.3.0" crossbeam = "0.2.9" rand = "0.3.14" rustc-serialize = "~0.3.19" diff --git a/snark/Cargo.toml b/snark/Cargo.toml index f76cf41..f9e08c1 100644 --- a/snark/Cargo.toml +++ b/snark/Cargo.toml @@ -16,4 +16,4 @@ gcc = "0.3.*" [dependencies] libc = "0.2.*" lazy_static = "0.1.*" -bn = "0.2.3" +bn = "0.3.0" diff --git a/src/bin/coordinator.rs b/src/bin/coordinator.rs index 86af835..8eccce1 100644 --- a/src/bin/coordinator.rs +++ b/src/bin/coordinator.rs @@ -42,7 +42,7 @@ fn main() { println!("\tAll players have connected!"); println!("Constructing constraint system and performing QAP reduction..."); - let cs = CS::dummy(); + let cs = CS::from_file(); println!("\tDone."); let rng = &mut ::rand::thread_rng(); diff --git a/src/bin/player.rs b/src/bin/player.rs index 7674a1a..86b02fa 100644 --- a/src/bin/player.rs +++ b/src/bin/player.rs @@ -35,11 +35,17 @@ fn main() { // Round 2: Powers of tau { + println!("Receiving current tau powers..."); + let mut cur_g1: Vec = decode_from(stream, Infinite).unwrap(); let mut cur_g2: Vec = decode_from(stream, Infinite).unwrap(); + println!("Calculating new tau powers..."); + secrets.taupowers(&mut cur_g1, &mut cur_g2); + println!("Sending new tau powers..."); + // Send spairs, new g1 / g2 encode_into(&spairs, stream, Infinite).unwrap(); encode_into(&cur_g1, stream, Infinite).unwrap(); @@ -48,19 +54,29 @@ fn main() { // Round 3: Random coeffs, part 1. { + println!("Receiving current random coeffs (stage1)..."); let mut cur: Stage1Values = decode_from(stream, Infinite).unwrap(); + println!("Calculating new random coeffs (stage1)..."); + secrets.stage1(&mut cur); + println!("Sending new random coeffs (stage1)..."); + encode_into(&cur, stream, Infinite).unwrap(); } // Round 4: Random coeffs, part 2. { + println!("Receiving current random coeffs (stage2)..."); let mut cur: Stage2Values = decode_from(stream, Infinite).unwrap(); + println!("Calculating new random coeffs (stage2)..."); + secrets.stage2(&mut cur); + println!("Sending new random coeffs (stage2)..."); + encode_into(&cur, stream, Infinite).unwrap(); }