commit
5dc0252a1c
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "bn"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
authors = ["Sean Bowe <ewillbefull@gmail.com>"]
|
||||
description = "Pairing cryptography with the Barreto-Naehrig curve"
|
||||
keywords = ["pairing","crypto","cryptography"]
|
||||
|
|
|
@ -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:
|
||||
|
|
16
src/lib.rs
16
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: Copy + Clone + PartialEq + Eq + Sized + Add<Self> + Sub<Self> + Neg + Mul<Fr> {
|
||||
pub trait Group:
|
||||
rustc_serialize::Encodable +
|
||||
rustc_serialize::Decodable +
|
||||
'static +
|
||||
Send +
|
||||
Copy +
|
||||
Clone +
|
||||
PartialEq +
|
||||
Eq +
|
||||
Sized +
|
||||
Add<Self, Output=Self> +
|
||||
Sub<Self, Output=Self> +
|
||||
Neg<Output=Self> +
|
||||
Mul<Fr, Output=Self>
|
||||
{
|
||||
fn zero() -> Self;
|
||||
fn one() -> Self;
|
||||
fn random<R: Rng>(rng: &mut R) -> Self;
|
||||
|
|
Loading…
Reference in New Issue