aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <est31@users.noreply.github.com>2019-11-06 13:31:52 +0100
committerArtyom Pavlov <newpavlov@gmail.com>2019-11-06 12:31:52 +0000
commitbdacf51e2cfaea8bec44417b7b3d7ace7b8ab79c (patch)
treeb4ee8fb63f99d698c2f951acd5877bb673a6eec0
parenteb14c16ea1c6f722940bebe6dfce26138324ae37 (diff)
downloadPAKEs-bdacf51e2cfaea8bec44417b7b3d7ace7b8ab79c.tar.xz
Switch from num to num-traits and num-bigint (#31)
-rw-r--r--srp/Cargo.toml3
-rw-r--r--srp/src/client.rs3
-rw-r--r--srp/src/groups.rs2
-rw-r--r--srp/src/server.rs3
-rw-r--r--srp/src/tools.rs2
-rw-r--r--srp/src/types.rs2
6 files changed, 9 insertions, 6 deletions
diff --git a/srp/Cargo.toml b/srp/Cargo.toml
index fa6ee77..3ade1b0 100644
--- a/srp/Cargo.toml
+++ b/srp/Cargo.toml
@@ -11,7 +11,8 @@ keywords = ["crypto", "pake", "authentication"]
categories = ["cryptography", "authentication"]
[dependencies]
-num = "0.2"
+num-bigint = "0.2"
+num-traits = "0.2"
generic-array = "0.12"
digest = "0.8"
lazy_static = "1.2"
diff --git a/srp/src/client.rs b/srp/src/client.rs
index 78be566..db4c576 100644
--- a/srp/src/client.rs
+++ b/srp/src/client.rs
@@ -60,7 +60,8 @@ use std::marker::PhantomData;
use digest::Digest;
use generic_array::GenericArray;
-use num::{BigUint, Zero};
+use num_bigint::BigUint;
+use num_traits::Zero;
use crate::tools::powm;
use crate::types::{SrpAuthError, SrpGroup};
diff --git a/srp/src/groups.rs b/srp/src/groups.rs
index d5c5fb9..86bc681 100644
--- a/srp/src/groups.rs
+++ b/srp/src/groups.rs
@@ -5,7 +5,7 @@
//! they are provided only for compatibility with the legacy software.
use crate::types::SrpGroup;
use lazy_static::lazy_static;
-use num::BigUint;
+use num_bigint::BigUint;
lazy_static! {
pub static ref G_1024: SrpGroup = SrpGroup {
diff --git a/srp/src/server.rs b/srp/src/server.rs
index a4764d3..6e41404 100644
--- a/srp/src/server.rs
+++ b/srp/src/server.rs
@@ -38,7 +38,8 @@ use std::marker::PhantomData;
use digest::Digest;
use generic_array::GenericArray;
-use num::{BigUint, Zero};
+use num_bigint::BigUint;
+use num_traits::Zero;
use crate::tools::powm;
use crate::types::{SrpAuthError, SrpGroup};
diff --git a/srp/src/tools.rs b/srp/src/tools.rs
index 4fc5db9..f761dca 100644
--- a/srp/src/tools.rs
+++ b/srp/src/tools.rs
@@ -1,4 +1,4 @@
-use num::BigUint;
+use num_bigint::BigUint;
pub fn powm(base: &BigUint, exp: &BigUint, modulus: &BigUint) -> BigUint {
let zero = BigUint::new(vec![0]);
diff --git a/srp/src/types.rs b/srp/src/types.rs
index 692421f..5dca858 100644
--- a/srp/src/types.rs
+++ b/srp/src/types.rs
@@ -1,7 +1,7 @@
//! Additional SRP types.
use crate::tools::powm;
use digest::Digest;
-use num::BigUint;
+use num_bigint::BigUint;
use std::{error, fmt};
/// SRP authentication error.