diff --git a/Cargo.toml b/Cargo.toml index 14d5462..4f802b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,8 @@ license = "MIT License" [dependencies] rand = "0.6" rand_core = "0.4.0" -ff = { git = "https://github.com/boltlabs-inc/ff", branch = "master" } -pairing = { git = "https://github.com/boltlabs-inc/pairing", branch = "master", features = ["serde"] } +ff_bl = { git = "https://github.com/boltlabs-inc/ff", branch = "master" } +pairing_bl = { git = "https://github.com/boltlabs-inc/pairing", branch = "master", features = ["serde"] } libc = "*" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/README.md b/README.md index f238585..9153baa 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,7 @@ We will switch to the stable release channel once libbolt (and dependencies) are # Build & Install -Please ensure you have installed the libsodium library for your platform. See install instructions [here](https://download.libsodium.org/doc/installation/index.html). - -To build the library and execute basic examples, run `make` +To build the library in debug, execute tests and basic examples, run `make` # Tests diff --git a/examples/bolt_test.rs b/examples/bolt_test.rs index e61b602..acf99f4 100644 --- a/examples/bolt_test.rs +++ b/examples/bolt_test.rs @@ -1,8 +1,8 @@ extern crate rand; extern crate rand_core; extern crate bolt; -extern crate ff; -extern crate pairing; +extern crate ff_bl as ff; +extern crate pairing_bl as pairing; extern crate time; extern crate secp256k1; diff --git a/src/ccs08.rs b/src/ccs08.rs index 9942610..7bc6ed6 100644 --- a/src/ccs08.rs +++ b/src/ccs08.rs @@ -4,11 +4,9 @@ Efficient Protocols for Set Membership and Range Proofs Jan Camenisch, Rafik Chaabouni, and abhi shelat Asiacrypt 2008 */ -extern crate pairing; -extern crate rand; -use rand::Rng; use super::*; +use rand::Rng; use cl::{Signature, PublicParams, setup, BlindKeyPair, ProofState, SignatureProof, BlindPublicKey}; use ped92::{Commitment, CSMultiParams}; use pairing::{Engine, CurveProjective}; diff --git a/src/channels.rs b/src/channels.rs index 0ab312a..e3f3352 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -1,14 +1,3 @@ -/* - * Implement for Bolt protocols: - * - initializing channel state and generating cust/merch wallets - * - establish protocol - * - pay protocol - * - channel close algorithms (WIP) - */ - -extern crate pairing; -extern crate rand; - use super::*; use pairing::Engine; use cl::{BlindKeyPair, Signature}; @@ -134,8 +123,6 @@ impl ChannelToken { // add a method to compute hash on chain: SHA256 + RIPEMD160? } -// add methods to check if channel token is initialized -// (only if /// /// Channel state for generating/loading channel parameters and generating keypairs diff --git a/src/cl.rs b/src/cl.rs index 2afee5d..4c7e3da 100644 --- a/src/cl.rs +++ b/src/cl.rs @@ -1,8 +1,5 @@ // cl.rs // CL Sigs - Pointcheval Sanders ('06) -extern crate pairing; -extern crate rand; - use super::*; use pairing::{CurveProjective, Engine}; use ff::PrimeField; diff --git a/src/lib.rs b/src/lib.rs index c58820c..b800cd3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,8 +19,8 @@ #[cfg(all(test, feature = "unstable"))] extern crate test; -extern crate ff; -extern crate pairing; +extern crate ff_bl as ff; +extern crate pairing_bl as pairing; extern crate rand; extern crate rand_core; @@ -159,10 +159,6 @@ pub mod bidirectional { pub signature: secp256k1::Signature, } - pub fn init() { - //sodiumoxide::init(); - } - /// /// init_merchant - takes as input the public params, merchant balance and keypair. /// Generates merchant data which consists of channel token and merchant state. diff --git a/src/nizk.rs b/src/nizk.rs index ec9729d..a95ac40 100644 --- a/src/nizk.rs +++ b/src/nizk.rs @@ -1,6 +1,3 @@ -extern crate pairing; -extern crate rand; - use super::*; use rand::Rng; use cl::{Signature, PublicParams, setup, BlindKeyPair, SignatureProof, BlindPublicKey}; diff --git a/src/wallet.rs b/src/wallet.rs index 67228b4..1f881cc 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -1,5 +1,3 @@ -extern crate pairing; - use super::*; use pairing::Engine; use ff::PrimeField;