Crates.io | rabe-bn |
lib.rs | rabe-bn |
version | 0.4.23 |
source | src |
created_at | 2020-08-06 14:35:41.542974 |
updated_at | 2024-05-22 14:05:56.060501 |
description | Pairing cryptography with the Barreto-Naehrig curve. Update to use latest rand and serde crates. |
homepage | https://github.com/georgbramm/rabe-bn |
repository | https://github.com/georgbramm/rabe-bn |
max_upload_size | |
id | 273678 |
size | 198,151 |
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
This library, like other pairing cryptography libraries implementing this construction, is not resistant to side-channel attacks.
Add the bn
crate to your dependencies in Cargo.toml
...
[dependencies]
rabe-bn = "0.4.22"
If you prefer borsh instead of serde
, you may use the borsh
feature.
Afterwards add an extern crate
declaration to your crate root:
extern crate rabe_bn;
Fr
is an element of FrG1
is a point on the BN curve E/Fq : y^2 = x^3 + bG2
is a point on the twisted BN curve E'/Fq2 : y^2 = x^3 + b/xiGt
is a group element (written multiplicatively) obtained with the pairing
function over G1
and G2
.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.
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.