Weierstrass BN254 zero-knowledge trusted setup ceremony.
Go to file
bmerge 36ad8b672c Auto merge of #66 - ebfull:scalar-assoc, r=ebfull
Enforce that Fr of Engine is the scalar for curve points

In bellman, I want to write:

```rust
pub struct Point<C: CurveProjective>(pub C);

impl<C: CurveProjective> Copy for Point<C> { }

impl<C: CurveProjective> Clone for Point<C> {
    fn clone(&self) -> Point<C> {
        *self
    }
}

impl<C: CurveProjective> Group<C::Engine> for Point<C> {
    fn group_zero() -> Self {
        Point(C::zero())
    }
    fn group_mul_assign(&mut self, by: &C::Scalar) {
        self.0.mul_assign(by.into_repr());
    }
    fn group_add_assign(&mut self, other: &Self) {
        self.0.add_assign(&other.0);
    }
    fn group_sub_assign(&mut self, other: &Self) {
        self.0.sub_assign(&other.0);
    }
}
```

However, this doesn't typecheck because the compiler cannot know that the `Engine`'s `Fr` type (as dictated by the `Group` trait) is the same as the `Scalar` type of the `CurveProjective` point. This can be solved with a where bound over the trait (for now), but it is generally a good idea for this to be constrained in `pairing`.
2017-11-20 19:26:16 +00:00
benches Simplify pairing_benches. 2017-09-28 11:31:46 -06:00
src Enforce that Fr of Engine is the scalar for curve points, for simpler downstream abstractions. 2017-11-12 16:19:08 -07:00
.gitignore Initial commit 2017-07-08 10:55:43 -06:00
Cargo.toml Auto merge of #65 - ebfull:byteorder-version, r=ebfull 2017-10-12 17:48:25 +00:00
COPYRIGHT Add COPYRIGHT file to inform of conditions for contributing and license information. 2017-09-28 15:39:29 -06:00
LICENSE-APACHE Modify the LICENSE-APACHE and LICENSE-MIT files. 2017-09-28 15:29:58 -06:00
LICENSE-MIT Modify the LICENSE-APACHE and LICENSE-MIT files. 2017-09-28 15:29:58 -06:00
README.md Bump version to 0.13.0 2017-10-10 01:54:53 -06:00

pairing Crates.io

This is a Rust crate for using pairing-friendly elliptic curves. Currently, only the BLS12-381 construction is implemented.

Documentation

Bring the pairing crate into your project just as you normally would.

If you're using a supported platform and the nightly Rust compiler, you can enable the u128-support feature for faster arithmetic.

[dependencies.pairing]
version = "0.13"
features = ["u128-support"]

Security Warnings

This library does not make any guarantees about constant-time operations, memory access patterns, or resistance to side-channel attacks.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.