From 47d6e4f91918db51a65fb428e4c3d39de4a96d11 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 21 Apr 2021 14:52:44 +0200 Subject: [PATCH] merge substrate-bn branch into master (#21) * fix edition and prepare publish * Publish for substrate branch * fix edition 2018 * add Parity as authors Co-authored-by: NikVolf --- Cargo.toml | 11 ++++++----- benches/api.rs | 6 +----- examples/dh.rs | 5 +---- examples/joux.rs | 4 +--- tests/serialization.rs | 7 +------ 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ffa09b1..d3eef04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,14 @@ [package] -name = "bn" -version = "0.4.4" -authors = ["Sean Bowe "] +name = "substrate-bn" +version = "0.5.0" +authors = ["Sean Bowe ", "Parity Technologies "] description = "Pairing cryptography with the Barreto-Naehrig curve" keywords = ["pairing","crypto","cryptography"] readme = "README.md" -homepage = "https://github.com/zcash/bn" -repository = "https://github.com/zcash/bn" +homepage = "https://github.com/paritytech/bn" +repository = "https://github.com/paritytech/bn" license = "MIT OR Apache-2.0" +edition = "2018" [features] default = ["rustc-serialize"] diff --git a/benches/api.rs b/benches/api.rs index de5b5b0..1653610 100644 --- a/benches/api.rs +++ b/benches/api.rs @@ -1,10 +1,6 @@ #![feature(test)] -extern crate bincode; -extern crate bn; -extern crate rand; -extern crate test; -use bn::*; +use substrate_bn::*; use bincode::SizeLimit::Infinite; use bincode::rustc_serialize::{decode, encode}; diff --git a/examples/dh.rs b/examples/dh.rs index c0f89b9..8f3cdeb 100644 --- a/examples/dh.rs +++ b/examples/dh.rs @@ -1,10 +1,7 @@ // This is an example of three-party Diffie-Hellman key exchange // Requires two rounds -extern crate bn; -extern crate rand; - -use bn::*; +use substrate_bn::*; fn main() { let rng = &mut rand::thread_rng(); diff --git a/examples/joux.rs b/examples/joux.rs index 88cb53b..ce0fec4 100644 --- a/examples/joux.rs +++ b/examples/joux.rs @@ -1,6 +1,4 @@ -extern crate bn; -extern crate rand; -use bn::{Group, Fr, G1, G2, pairing}; +use substrate_bn::{Group, Fr, G1, G2, pairing}; fn main() { let rng = &mut rand::thread_rng(); diff --git a/tests/serialization.rs b/tests/serialization.rs index 801306e..7cfee88 100644 --- a/tests/serialization.rs +++ b/tests/serialization.rs @@ -1,11 +1,6 @@ #![cfg(feature = "rustc-serialize")] -extern crate rand; -extern crate bn; -extern crate bincode; -extern crate rustc_serialize; - -use bn::*; +use substrate_bn::*; use bincode::SizeLimit::Infinite; use bincode::rustc_serialize::{encode, decode};