Bump version and integrate pairing 0.14.
This commit is contained in:
parent
f5370057bd
commit
c9cacc7467
@ -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]
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ fn multiexp_inner<Q, D, G, S>(
|
||||
}
|
||||
} else {
|
||||
let mut exp = exp;
|
||||
exp.divn(skip);
|
||||
exp.shr(skip);
|
||||
let exp = exp.as_ref()[0] % (1 << c);
|
||||
|
||||
if exp != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user