#pairing #crypto #cryptography

rabe-bn

Pairing cryptography with the Barreto-Naehrig curve. Update to use latest rand and serde crates.

8 releases

Uses old Rust 2015

0.4.13 Jan 25, 2021
0.4.12 Jan 25, 2021
0.4.11 Dec 7, 2020
0.4.10 Aug 27, 2020

#241 in Cryptography

Download history 4/week @ 2021-06-29 38/week @ 2021-07-06 81/week @ 2021-07-13 28/week @ 2021-07-20 46/week @ 2021-07-27 28/week @ 2021-08-03 34/week @ 2021-08-10 23/week @ 2021-08-17 12/week @ 2021-08-24 9/week @ 2021-08-31 8/week @ 2021-09-07 21/week @ 2021-09-14 27/week @ 2021-09-21 21/week @ 2021-09-28 3/week @ 2021-10-05 39/week @ 2021-10-12

227 downloads per month
Used in rabe

MIT/Apache

165KB
3K SLoC

bn Crates.io Build status

This is a pairing cryptography library written in pure Rust. It makes use of the Barreto-Naehrig (BN) curve construction from [BCTV2015] to provide two cyclic groups G1 and G2, with an efficient bilinear pairing:

e: G1 × G2 → GT

Security warnings

This library, like other pairing cryptography libraries implementing this construction, is not resistant to side-channel attacks.

Usage

Add the bn crate to your dependencies in Cargo.toml...

[dependencies]
rabe-bn = "0.4.10"

...and add an extern crate declaration to your crate root:

extern crate rabe_bn;

API

  • Fr is an element of Fr
  • G1 is a point on the BN curve E/Fq : y^2 = x^3 + b
  • G2 is a point on the twisted BN curve E'/Fq2 : y^2 = x^3 + b/xi
  • Gt is a group element (written multiplicatively) obtained with the pairing function over G1 and G2.

License

Licensed under either of

at your option.

Copyright 2016 Zcash Electric Coin Company. The Zcash Company promises to maintain the "bn" crate on crates.io under this MIT/Apache-2.0 dual license.

Authors

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.

Dependencies

~1–1.6MB
~36K SLoC