From 41ef5fdef058c8b0359c5d6faa9b3307e49b2b7c Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sun, 11 Sep 2016 22:04:37 -0600 Subject: [PATCH 1/3] Add more superclasses to Group. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c28f555..0edaac0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,7 +50,7 @@ impl Mul for Fr { fn mul(self, other: Fr) -> Fr { Fr(self.0 * other.0) } } -pub trait Group: Copy + Clone + PartialEq + Eq + Sized + Add + Sub + Neg + Mul { +pub trait Group: 'static + Send + Copy + Clone + PartialEq + Eq + Sized + Add + Sub + Neg + Mul { fn zero() -> Self; fn one() -> Self; fn random(rng: &mut R) -> Self; From f40abe6dc331d8f2a8dbb41f51e04a7e25758fe9 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 12 Sep 2016 14:02:21 -0600 Subject: [PATCH 2/3] More superclasses. --- src/lib.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0edaac0..02b50f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,7 +50,21 @@ impl Mul for Fr { fn mul(self, other: Fr) -> Fr { Fr(self.0 * other.0) } } -pub trait Group: 'static + Send + Copy + Clone + PartialEq + Eq + Sized + Add + Sub + Neg + Mul { +pub trait Group: + rustc_serialize::Encodable + + rustc_serialize::Decodable + + 'static + + Send + + Copy + + Clone + + PartialEq + + Eq + + Sized + + Add + + Sub + + Neg + + Mul +{ fn zero() -> Self; fn one() -> Self; fn random(rng: &mut R) -> Self; From df2deaa1ffb0cf13298ec6dd9bbdd9daee3b8a87 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 12 Sep 2016 16:02:58 -0600 Subject: [PATCH 3/3] Version bump --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c058720..85f5f85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bn" -version = "0.2.1" +version = "0.2.2" authors = ["Sean Bowe "] description = "Pairing cryptography with the Barreto-Naehrig curve" keywords = ["pairing","crypto","cryptography"] diff --git a/README.md b/README.md index 08c457f..90cd2d1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Add the `bn` crate to your dependencies in `Cargo.toml`... ```toml [dependencies] -bn = "0.2.1" +bn = "0.2.2" ``` ...and add an `extern crate` declaration to your crate root: