diff --git a/Cargo.toml b/Cargo.toml index 676ac26..a0fb442 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://github.com/ebfull/bellman" license = "MIT/Apache-2.0" name = "bellman" repository = "https://github.com/ebfull/bellman" -version = "0.0.8" +version = "0.0.9" [dependencies] rand = "0.3" @@ -15,7 +15,7 @@ futures = "0.1" futures-cpupool = "0.1" num_cpus = "1" crossbeam = "0.3" -pairing = "0.13" +pairing = "0.14" byteorder = "1" [features] diff --git a/src/groth16/tests/dummy_engine.rs b/src/groth16/tests/dummy_engine.rs index 016aa90..26c8996 100644 --- a/src/groth16/tests/dummy_engine.rs +++ b/src/groth16/tests/dummy_engine.rs @@ -196,15 +196,11 @@ impl Default for FrRepr { } impl PrimeFieldRepr for FrRepr { - fn sub_noborrow(&mut self, other: &Self) -> bool { + fn sub_noborrow(&mut self, other: &Self) { self.0[0] = self.0[0].wrapping_sub(other.0[0]); - - false } - fn add_nocarry(&mut self, other: &Self) -> bool { + fn add_nocarry(&mut self, other: &Self) { self.0[0] = self.0[0].wrapping_add(other.0[0]); - - false } fn num_bits(&self) -> u32 { 64 - self.0[0].leading_zeros() @@ -219,15 +215,15 @@ impl PrimeFieldRepr for FrRepr { self.0[0] % 2 == 0 } fn div2(&mut self) { - self.divn(1) + self.shr(1) } - fn divn(&mut self, amt: u32) { + fn shr(&mut self, amt: u32) { self.0[0] >>= amt; } fn mul2(&mut self) { - self.muln(1) + self.shl(1) } - fn muln(&mut self, amt: u32) { + fn shl(&mut self, amt: u32) { self.0[0] <<= amt; } } diff --git a/src/multiexp.rs b/src/multiexp.rs index c23decc..b1dc1f1 100644 --- a/src/multiexp.rs +++ b/src/multiexp.rs @@ -183,7 +183,7 @@ fn multiexp_inner( } } else { let mut exp = exp; - exp.divn(skip); + exp.shr(skip); let exp = exp.as_ref()[0] % (1 << c); if exp != 0 {