This is an automated email from the ASF dual-hosted git repository.

kmccusker pushed a commit to branch develop
in repository 
https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-rust.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7e1f9ba  Update to rust 2018 update modules, fix fp512bn_32 bug
     new 439acbd  Merge pull request #38 from sigp/rust-edition
7e1f9ba is described below

commit 7e1f9ba21a15456aa6a4c8942d4a4b746a8bc5ed
Author: Kirk Baird <[email protected]>
AuthorDate: Fri May 22 11:28:11 2020 +1000

    Update to rust 2018 update modules, fix fp512bn_32 bug
    
    Signed-off-by: Kirk Baird <[email protected]>
---
 Cargo.lock                         |  2 +-
 Cargo.toml                         | 14 +++++++-------
 readme.md                          | 38 +++++++++++++++++++++++---------------
 src/big.rs                         | 13 +++++--------
 src/bls.rs                         |  8 ++++----
 src/bls192.rs                      | 13 ++++++-------
 src/bls256.rs                      |  8 ++++----
 src/bls381/basic.rs                |  5 ++---
 src/bls381/core.rs                 |  7 +++----
 src/bls381/message_augmentation.rs |  5 ++---
 src/bls381/proof_of_possession.rs  |  5 ++---
 src/dbig.rs                        |  4 ++--
 src/ecdh.rs                        | 12 ++++++------
 src/ecp.rs                         |  5 +++--
 src/ecp2.rs                        |  3 ++-
 src/ecp4.rs                        |  2 +-
 src/ecp8.rs                        |  2 +-
 src/ff.rs                          |  7 ++-----
 src/fp.rs                          |  8 ++++----
 src/fp12.rs                        |  5 +++--
 src/fp16.rs                        |  1 -
 src/fp2.rs                         |  5 +++--
 src/fp24.rs                        |  3 +--
 src/fp4.rs                         |  3 ++-
 src/fp48.rs                        |  3 +--
 src/fp8.rs                         |  1 -
 src/hash_to_curve.rs               |  9 ++++-----
 src/mpin.rs                        |  9 ++++-----
 src/mpin192.rs                     |  9 ++++-----
 src/mpin256.rs                     |  9 ++++-----
 src/pair.rs                        |  2 +-
 src/pair192.rs                     |  2 +-
 src/pair256.rs                     |  2 +-
 src/roms/rom_anssi_32.rs           |  6 +++---
 src/roms/rom_anssi_64.rs           |  6 +++---
 src/roms/rom_bls24_32.rs           |  6 +++---
 src/roms/rom_bls24_64.rs           |  6 +++---
 src/roms/rom_bls381_32.rs          |  6 +++---
 src/roms/rom_bls381_64.rs          |  6 +++---
 src/roms/rom_bls383_32.rs          |  4 ++--
 src/roms/rom_bls383_64.rs          |  6 +++---
 src/roms/rom_bls461_32.rs          |  6 +++---
 src/roms/rom_bls461_64.rs          |  6 +++---
 src/roms/rom_bls48_32.rs           |  6 +++---
 src/roms/rom_bls48_64.rs           |  6 +++---
 src/roms/rom_bn254_32.rs           |  6 +++---
 src/roms/rom_bn254_64.rs           |  6 +++---
 src/roms/rom_bn254cx_32.rs         |  6 +++---
 src/roms/rom_bn254cx_64.rs         |  6 +++---
 src/roms/rom_brainpool_32.rs       |  6 +++---
 src/roms/rom_brainpool_64.rs       |  6 +++---
 src/roms/rom_c25519_32.rs          |  6 +++---
 src/roms/rom_c25519_64.rs          |  6 +++---
 src/roms/rom_c41417_32.rs          |  6 +++---
 src/roms/rom_c41417_64.rs          |  6 +++---
 src/roms/rom_ed25519_32.rs         |  6 +++---
 src/roms/rom_ed25519_64.rs         |  6 +++---
 src/roms/rom_fp256bn_32.rs         |  6 +++---
 src/roms/rom_fp256bn_64.rs         |  6 +++---
 src/roms/rom_fp512bn_32.rs         | 10 +++++-----
 src/roms/rom_fp512bn_64.rs         |  6 +++---
 src/roms/rom_goldilocks_32.rs      |  6 +++---
 src/roms/rom_goldilocks_64.rs      |  6 +++---
 src/roms/rom_hifive_32.rs          |  6 +++---
 src/roms/rom_hifive_64.rs          |  6 +++---
 src/roms/rom_nist256_32.rs         |  6 +++---
 src/roms/rom_nist256_64.rs         |  6 +++---
 src/roms/rom_nist384_32.rs         |  6 +++---
 src/roms/rom_nist384_64.rs         |  6 +++---
 src/roms/rom_nist521_32.rs         |  6 +++---
 src/roms/rom_nist521_64.rs         |  6 +++---
 src/roms/rom_nums256e_32.rs        |  6 +++---
 src/roms/rom_nums256e_64.rs        |  6 +++---
 src/roms/rom_nums256w_32.rs        |  6 +++---
 src/roms/rom_nums256w_64.rs        |  6 +++---
 src/roms/rom_nums384e_32.rs        |  6 +++---
 src/roms/rom_nums384e_64.rs        |  6 +++---
 src/roms/rom_nums384w_32.rs        |  6 +++---
 src/roms/rom_nums384w_64.rs        |  6 +++---
 src/roms/rom_nums512e_32.rs        |  6 +++---
 src/roms/rom_nums512e_64.rs        |  6 +++---
 src/roms/rom_nums512w_32.rs        |  6 +++---
 src/roms/rom_nums512w_64.rs        |  6 +++---
 src/roms/rom_secp256k1_32.rs       |  6 +++---
 src/roms/rom_secp256k1_64.rs       |  6 +++---
 85 files changed, 266 insertions(+), 272 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 6f9d42d..a8061a4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
 # It is not intended for manual editing.
 [[package]]
 name = "amcl"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index d272a85..8ce40c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,11 +1,11 @@
 [package]
 name = "amcl"
-version = "0.2.0"
-authors = ["Nikita Khateev <[email protected]>"]
-
+version = "0.3.0"
+authors = ["Nikita Khateev <[email protected]>", "Kirk Baird 
<[email protected]>"]
 description = "The Apache Milagro Cryptographic Library (version 3)"
 license = "Apache-2.0"
-repository = "https://github.com/milagro-crypto/amcl";
+repository = "https://github.com/apache/incubator-milagro-crypto-rust";
+edition = "2018"
 
 [dependencies]
 hex = "0.3"
@@ -22,7 +22,7 @@ rand = "0.7.2"
 default = ["bn254"]
 all = [
   "anssi","bls24","bls48","bls381","bls383","bls461","bn254","bn254cx",
-  
"brainpool","c25519","c41417","ed25519","fp256BN","fp512BN","goldilocks","hifive",
+  
"brainpool","c25519","c41417","ed25519","fp256bn","fp512bn","goldilocks","hifive",
   
"nist256","nist384","nist521","nums256e","nums256w","nums384e","nums384w","nums512e",
   "nums512w","rsa2048","rsa3072","rsa4096","secp256k1",
 ]
@@ -38,8 +38,8 @@ brainpool = []
 c25519 = []
 c41417 = []
 ed25519 = []
-fp256BN = []
-fp512BN = []
+fp256bn = []
+fp512bn = []
 goldilocks = []
 hifive = []
 nist256 = []
diff --git a/readme.md b/readme.md
index b739d74..f702385 100644
--- a/readme.md
+++ b/readme.md
@@ -2,21 +2,22 @@
 
 ## Updates
 
-NOTE: Updated to Rust 2018
+BLS12-381 has been updated to the the most recent standards being 
[bls-signatures-02](https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-02)
 and 
[hash-to-curve-07](https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-07).
 
-NOTE: This version of the library requires Version 1.31+ of Rust for 64-bit
+Updated to Rust 2018.
+
+This version of the library requires Version 1.31+ of Rust for 64-bit
 integer support and for Rust 2018.
 
-Now AMCL version 3 is distributed as a cargo crate.
+AMCL version 2 is distributed as a cargo crate.
 
-Namespaces are used to separate different curves.
+Modulues (namespaces) are used to separate different curves.
 
 ## Testing
 
-Unit testing can be done using cargo testing framework. it is recommended to
-run these in release mode as some tests especially `mpin` tests are very slow.
+Unit testing can be done using cargo testing framework.
 
-Additional `--all-features` can be replaced by `--features xx` where `xx` is
+Note: `--all-features` may be replaced by `--features xx` where `xx` is
 the desired feature e.g. `bls381`.
 
 ```
@@ -64,7 +65,7 @@ And to use primitives of the needed curve in your source code:
 use amcl::bls48::{ECP, ECP8}; // any primitive you need
 ```
 
-## Features
+## Features and Protocol
 
 * Elliptic Curves
   * ed25519
@@ -87,10 +88,10 @@ use amcl::bls48::{ECP, ECP8}; // any primitive you need
 * Pairing-Friendly Elliptic Curves
   * bn254
   * bn254cx
+  * fp256bn
+  * fp512bn
   * bls383
   * bls381
-  * fp256BN
-  * fp512BN
   * bls461
   * bls24
   * bls48
@@ -99,9 +100,16 @@ use amcl::bls48::{ECP, ECP8}; // any primitive you need
   * rsa3072
   * rsa4096
 * SHA-2
-  * SHA256
-  * SHA384
-  * SHA512
-
-Note `SHA-2` features will always be compiled however all other features 
require
+  * SHA2-256
+  * SHA2-384
+  * SHA2-512
+* SHA-3
+  * SHA3-224
+  * SHA3-256
+  * SHA3-384
+  * SHA3-512
+  * SHAKE-128
+  * SHAKE-256
+
+Note `SHA-2` and `SHA-3` features will always be compiled however all other 
features require
 the feature flag `--features xx`
diff --git a/src/big.rs b/src/big.rs
index 9db932f..1ebbd13 100644
--- a/src/big.rs
+++ b/src/big.rs
@@ -17,19 +17,16 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch;
-use super::super::arch::Chunk;
-
-use super::super::arch::DChunk;
-
 use super::dbig::DBig;
-use rand::RAND;
+use crate::arch::{self, Chunk, DChunk};
+use crate::rand::RAND;
 
-pub use super::rom::BASEBITS;
-pub use super::rom::MODBYTES;
 use std::cmp::Ordering;
 use std::fmt;
 
+pub use super::rom::BASEBITS;
+pub use super::rom::MODBYTES;
+
 pub const NLEN: usize = 1 + (8 * MODBYTES - 1) / BASEBITS;
 pub const DNLEN: usize = 2 * NLEN;
 pub const BMASK: Chunk = (1 << BASEBITS) - 1;
diff --git a/src/bls.rs b/src/bls.rs
index c956441..5ed2e14 100644
--- a/src/bls.rs
+++ b/src/bls.rs
@@ -23,11 +23,11 @@ use super::ecp::ECP;
 use super::ecp2::ECP2;
 use super::pair;
 use super::rom;
-use std::str;
+use crate::rand::RAND;
+use crate::sha3::SHA3;
+use crate::sha3::SHAKE256;
 
-use rand::RAND;
-use sha3::SHA3;
-use sha3::SHAKE256;
+use std::str;
 
 // BLS API Functions
 pub const BFS: usize = big::MODBYTES as usize;
diff --git a/src/bls192.rs b/src/bls192.rs
index 3381106..4c54223 100644
--- a/src/bls192.rs
+++ b/src/bls192.rs
@@ -17,18 +17,17 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::ecp::ECP;
-use super::ecp4::ECP4;
-use std::str;
-//use super::fp24::FP24;
 use super::big;
 use super::big::Big;
+use super::ecp::ECP;
+use super::ecp4::ECP4;
 use super::pair192;
 use super::rom;
+use crate::rand::RAND;
+use crate::sha3::SHA3;
+use crate::sha3::SHAKE256;
 
-use rand::RAND;
-use sha3::SHA3;
-use sha3::SHAKE256;
+use std::str;
 
 // BLS API Functions
 
diff --git a/src/bls256.rs b/src/bls256.rs
index 785ad2d..372f35c 100644
--- a/src/bls256.rs
+++ b/src/bls256.rs
@@ -23,11 +23,11 @@ use super::ecp::ECP;
 use super::ecp8::ECP8;
 use super::pair256;
 use super::rom;
-use std::str;
+use crate::rand::RAND;
+use crate::sha3::SHA3;
+use crate::sha3::SHAKE256;
 
-use rand::RAND;
-use sha3::SHA3;
-use sha3::SHAKE256;
+use std::str;
 
 // BLS API Functions
 pub const BFS: usize = big::MODBYTES as usize;
diff --git a/src/bls381/basic.rs b/src/bls381/basic.rs
index d283e62..b84f654 100644
--- a/src/bls381/basic.rs
+++ b/src/bls381/basic.rs
@@ -1,7 +1,6 @@
 use super::core;
-
-use errors::AmclError;
-use rand::RAND;
+use crate::errors::AmclError;
+use crate::rand::RAND;
 
 // Re-export constants from core.
 pub use super::core::{G1_BYTES, G2_BYTES, SECRET_KEY_BYTES};
diff --git a/src/bls381/core.rs b/src/bls381/core.rs
index 03a2eb1..0a791be 100644
--- a/src/bls381/core.rs
+++ b/src/bls381/core.rs
@@ -26,10 +26,9 @@ use super::super::hash_to_curve::*;
 use super::super::pair;
 use super::super::rom::*;
 use super::iso::{iso11_to_ecp, iso3_to_ecp2};
-
-use errors::AmclError;
-use hash256::HASH256;
-use rand::RAND;
+use crate::errors::AmclError;
+use crate::hash256::HASH256;
+use crate::rand::RAND;
 
 // Key Generation Constants
 /// Domain for key generation.
diff --git a/src/bls381/message_augmentation.rs 
b/src/bls381/message_augmentation.rs
index e2c7c6f..a642cec 100644
--- a/src/bls381/message_augmentation.rs
+++ b/src/bls381/message_augmentation.rs
@@ -1,7 +1,6 @@
 use super::core;
-
-use errors::AmclError;
-use rand::RAND;
+use crate::errors::AmclError;
+use crate::rand::RAND;
 
 // Re-export constants from core.
 pub use super::core::{G1_BYTES, G2_BYTES, SECRET_KEY_BYTES};
diff --git a/src/bls381/proof_of_possession.rs 
b/src/bls381/proof_of_possession.rs
index 0c1d05f..3553669 100644
--- a/src/bls381/proof_of_possession.rs
+++ b/src/bls381/proof_of_possession.rs
@@ -5,9 +5,8 @@ use super::core::{
     self, deserialize_g1, deserialize_g2, hash_to_curve_g1, hash_to_curve_g2,
     secret_key_from_bytes, serialize_g1, serialize_g2, subgroup_check_g1, 
subgroup_check_g2,
 };
-
-use errors::AmclError;
-use rand::RAND;
+use crate::errors::AmclError;
+use crate::rand::RAND;
 
 // Re-export constants from core.
 pub use super::core::{G1_BYTES, G2_BYTES, SECRET_KEY_BYTES};
diff --git a/src/dbig.rs b/src/dbig.rs
index 4fb5f64..b4b48c1 100644
--- a/src/dbig.rs
+++ b/src/dbig.rs
@@ -17,10 +17,10 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch;
-use super::super::arch::Chunk;
 use super::big;
 use super::big::{Big, MODBYTES};
+use crate::arch;
+use crate::arch::Chunk;
 
 #[derive(Clone)]
 pub struct DBig {
diff --git a/src/ecdh.rs b/src/ecdh.rs
index 0772ee7..23f2c91 100644
--- a/src/ecdh.rs
+++ b/src/ecdh.rs
@@ -23,12 +23,12 @@ use super::ecp;
 use super::ecp::ECP;
 use super::rom;
 
-use aes;
-use aes::AES;
-use hash256::HASH256;
-use hash384::HASH384;
-use hash512::HASH512;
-use rand::RAND;
+use crate::aes;
+use crate::aes::AES;
+use crate::hash256::HASH256;
+use crate::hash384::HASH384;
+use crate::hash512::HASH512;
+use crate::rand::RAND;
 
 pub const INVALID_PUBLIC_KEY: isize = -2;
 pub const ERROR: isize = -3;
diff --git a/src/ecp.rs b/src/ecp.rs
index 91e22d2..b10f408 100644
--- a/src/ecp.rs
+++ b/src/ecp.rs
@@ -22,10 +22,11 @@ use super::big::Big;
 use super::fp::FP;
 use super::rom;
 
-pub use super::rom::{AESKEY, CURVETYPE, CURVE_PAIRING_TYPE, HASH_TYPE, 
SEXTIC_TWIST, SIGN_OF_X};
 use std::fmt;
 use std::str::SplitWhitespace;
-pub use types::CurveType;
+
+pub use super::rom::{AESKEY, CURVETYPE, CURVE_PAIRING_TYPE, HASH_TYPE, 
SEXTIC_TWIST, SIGN_OF_X};
+pub use crate::types::CurveType;
 
 #[derive(Clone)]
 pub struct ECP {
diff --git a/src/ecp2.rs b/src/ecp2.rs
index f5f0ed7..e0e2073 100644
--- a/src/ecp2.rs
+++ b/src/ecp2.rs
@@ -22,9 +22,10 @@ use super::big::Big;
 use super::ecp;
 use super::fp2::FP2;
 use super::rom;
+use crate::types::{CurvePairingType, SexticTwist, SignOfX};
+
 use std::fmt;
 use std::str::SplitWhitespace;
-use types::{CurvePairingType, SexticTwist, SignOfX};
 
 #[derive(Clone)]
 pub struct ECP2 {
diff --git a/src/ecp4.rs b/src/ecp4.rs
index d7311b7..c988ee9 100644
--- a/src/ecp4.rs
+++ b/src/ecp4.rs
@@ -23,7 +23,7 @@ use super::ecp;
 use super::fp2::FP2;
 use super::fp4::FP4;
 use super::rom;
-use types::{SexticTwist, SignOfX};
+use crate::types::{SexticTwist, SignOfX};
 
 #[derive(Clone)]
 pub struct ECP4 {
diff --git a/src/ecp8.rs b/src/ecp8.rs
index 0261ce2..7625fc1 100644
--- a/src/ecp8.rs
+++ b/src/ecp8.rs
@@ -24,7 +24,7 @@ use super::fp2::FP2;
 use super::fp4::FP4;
 use super::fp8::FP8;
 use super::rom;
-use types::{SexticTwist, SignOfX};
+use crate::types::{SexticTwist, SignOfX};
 
 #[derive(Clone)]
 pub struct ECP8 {
diff --git a/src/ff.rs b/src/ff.rs
index c2b12cf..47324c6 100644
--- a/src/ff.rs
+++ b/src/ff.rs
@@ -17,19 +17,16 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
 use super::big;
 use super::big::Big;
 use super::dbig::DBig;
-use rand::RAND;
-
-use super::super::arch::DChunk;
+use crate::arch::{Chunk, DChunk};
+use crate::rand::RAND;
 
 /* Finite field support - for RSA, DH etc. */
 /* RSA/DH modulus length as multiple of BIGBITS */
 
 pub use super::rom::FFLEN;
-//use std::str::SplitWhitespace;
 
 pub const FF_BITS: usize = big::BIGBITS * FFLEN; /* Finite Field Size in bits 
- must be 256.2^n */
 pub const HFLEN: usize = FFLEN / 2; /* Useful for half-size RSA private key 
operations */
diff --git a/src/fp.rs b/src/fp.rs
index f4a9ccb..a5c6974 100644
--- a/src/fp.rs
+++ b/src/fp.rs
@@ -17,14 +17,14 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch;
-use super::super::arch::Chunk;
+use std::str::FromStr;
+
 use super::big;
 use super::big::Big;
 use super::dbig::DBig;
 use super::rom;
-use std::str::FromStr;
-use types::ModType;
+use crate::arch::{self, Chunk};
+use crate::types::ModType;
 
 #[derive(Clone)]
 pub struct FP {
diff --git a/src/fp12.rs b/src/fp12.rs
index 238da9b..8952ada 100644
--- a/src/fp12.rs
+++ b/src/fp12.rs
@@ -17,14 +17,15 @@ specific language governing permissions and limitations
 under the License.
 */
 
+use std::str::SplitWhitespace;
+
 use super::big;
 use super::big::Big;
 use super::ecp;
 use super::fp2::FP2;
 use super::fp4::FP4;
 use super::rom;
-use std::str::SplitWhitespace;
-use types::SexticTwist;
+use crate::types::SexticTwist;
 
 pub const ZERO: usize = 0;
 pub const ONE: usize = 1;
diff --git a/src/fp16.rs b/src/fp16.rs
index be9e12d..124e7df 100644
--- a/src/fp16.rs
+++ b/src/fp16.rs
@@ -20,7 +20,6 @@ under the License.
 use super::big::Big;
 use super::fp2::FP2;
 use super::fp8::FP8;
-//use std::str::SplitWhitespace;
 
 #[derive(Clone)]
 pub struct FP16 {
diff --git a/src/fp2.rs b/src/fp2.rs
index 52f7ed4..29b51cc 100644
--- a/src/fp2.rs
+++ b/src/fp2.rs
@@ -17,13 +17,14 @@ specific language governing permissions and limitations
 under the License.
 */
 
+use std::fmt;
+use std::str::SplitWhitespace;
+
 use super::big::Big;
 use super::dbig::DBig;
 use super::fp;
 use super::fp::FP;
 use super::rom;
-use std::fmt;
-use std::str::SplitWhitespace;
 
 #[derive(Clone)]
 pub struct FP2 {
diff --git a/src/fp24.rs b/src/fp24.rs
index 5a74ac1..db0b7da 100644
--- a/src/fp24.rs
+++ b/src/fp24.rs
@@ -24,8 +24,7 @@ use super::fp2::FP2;
 use super::fp4::FP4;
 use super::fp8::FP8;
 use super::rom;
-use types::SexticTwist;
-//use std::str::SplitWhitespace;
+use crate::types::SexticTwist;
 
 pub const ZERO: usize = 0;
 pub const ONE: usize = 1;
diff --git a/src/fp4.rs b/src/fp4.rs
index 42a459b..6bd18b3 100644
--- a/src/fp4.rs
+++ b/src/fp4.rs
@@ -17,10 +17,11 @@ specific language governing permissions and limitations
 under the License.
 */
 
+use std::str::SplitWhitespace;
+
 use super::big::Big;
 use super::fp::FP;
 use super::fp2::FP2;
-use std::str::SplitWhitespace;
 
 #[derive(Clone)]
 pub struct FP4 {
diff --git a/src/fp48.rs b/src/fp48.rs
index fd8b412..134f63a 100644
--- a/src/fp48.rs
+++ b/src/fp48.rs
@@ -25,8 +25,7 @@ use super::fp2::FP2;
 use super::fp4::FP4;
 use super::fp8::FP8;
 use super::rom;
-use types::SexticTwist;
-//use std::str::SplitWhitespace;
+use crate::types::SexticTwist;
 
 pub const ZERO: usize = 0;
 pub const ONE: usize = 1;
diff --git a/src/fp8.rs b/src/fp8.rs
index b8cac70..ada4a01 100644
--- a/src/fp8.rs
+++ b/src/fp8.rs
@@ -21,7 +21,6 @@ use super::big::Big;
 use super::fp::FP;
 use super::fp2::FP2;
 use super::fp4::FP4;
-//use std::str::SplitWhitespace;
 
 #[derive(Clone)]
 pub struct FP8 {
diff --git a/src/hash_to_curve.rs b/src/hash_to_curve.rs
index 8ca94b9..2db5d09 100644
--- a/src/hash_to_curve.rs
+++ b/src/hash_to_curve.rs
@@ -5,11 +5,10 @@ use super::fp2::FP2;
 use super::rom::{
     H2C_L, HASH_ALGORITHM, MODULUS, SSWU_A1, SSWU_A2, SSWU_B1, SSWU_B2, 
SSWU_Z1, SSWU_Z2,
 };
-
-use errors::AmclError;
-use hash256::{BLOCK_SIZE as SHA256_BLOCK_SIZE, HASH256, HASH_BYTES as 
SHA256_HASH_BYTES};
-use hash384::{BLOCK_SIZE as SHA384_BLOCK_SIZE, HASH384, HASH_BYTES as 
SHA384_HASH_BYTES};
-use hash512::{BLOCK_SIZE as SHA512_BLOCK_SIZE, HASH512, HASH_BYTES as 
SHA512_HASH_BYTES};
+use crate::errors::AmclError;
+use crate::hash256::{BLOCK_SIZE as SHA256_BLOCK_SIZE, HASH256, HASH_BYTES as 
SHA256_HASH_BYTES};
+use crate::hash384::{BLOCK_SIZE as SHA384_BLOCK_SIZE, HASH384, HASH_BYTES as 
SHA384_HASH_BYTES};
+use crate::hash512::{BLOCK_SIZE as SHA512_BLOCK_SIZE, HASH512, HASH_BYTES as 
SHA512_HASH_BYTES};
 
 /// Oversized DST padding
 pub const OVERSIZED_DST: &[u8] = b"H2C-OVERSIZE-DST-";
diff --git a/src/mpin.rs b/src/mpin.rs
index 5d5a3da..7b86603 100644
--- a/src/mpin.rs
+++ b/src/mpin.rs
@@ -29,11 +29,10 @@ use super::fp12::FP12;
 use super::fp4::FP4;
 use super::pair;
 use super::rom;
-
-use hash256::HASH256;
-use hash384::HASH384;
-use hash512::HASH512;
-use rand::RAND;
+use crate::hash256::HASH256;
+use crate::hash384::HASH384;
+use crate::hash512::HASH512;
+use crate::rand::RAND;
 
 // MPIN API Functions
 
diff --git a/src/mpin192.rs b/src/mpin192.rs
index 43758a7..143b483 100644
--- a/src/mpin192.rs
+++ b/src/mpin192.rs
@@ -29,11 +29,10 @@ use super::fp24::FP24;
 use super::fp8::FP8;
 use super::pair192;
 use super::rom;
-
-use hash256::HASH256;
-use hash384::HASH384;
-use hash512::HASH512;
-use rand::RAND;
+use crate::hash256::HASH256;
+use crate::hash384::HASH384;
+use crate::hash512::HASH512;
+use crate::rand::RAND;
 
 // MPIN API Functions
 
diff --git a/src/mpin256.rs b/src/mpin256.rs
index 0e5e960..298b18f 100644
--- a/src/mpin256.rs
+++ b/src/mpin256.rs
@@ -29,11 +29,10 @@ use super::fp16::FP16;
 use super::fp48::FP48;
 use super::pair256;
 use super::rom;
-
-use hash256::HASH256;
-use hash384::HASH384;
-use hash512::HASH512;
-use rand::RAND;
+use crate::hash256::HASH256;
+use crate::hash384::HASH384;
+use crate::hash512::HASH512;
+use crate::rand::RAND;
 
 // MPIN API Functions
 
diff --git a/src/pair.rs b/src/pair.rs
index b6d865a..59610c5 100644
--- a/src/pair.rs
+++ b/src/pair.rs
@@ -28,7 +28,7 @@ use super::fp12::FP12;
 use super::fp2::FP2;
 use super::fp4::FP4;
 use super::rom;
-use types::{CurvePairingType, SexticTwist, SignOfX};
+use crate::types::{CurvePairingType, SexticTwist, SignOfX};
 
 #[allow(non_snake_case)]
 fn linedbl(A: &mut ECP2, qx: &FP, qy: &FP) -> FP12 {
diff --git a/src/pair192.rs b/src/pair192.rs
index 595592f..37b9297 100644
--- a/src/pair192.rs
+++ b/src/pair192.rs
@@ -27,7 +27,7 @@ use super::fp24;
 use super::fp24::FP24;
 use super::fp8::FP8;
 use super::rom;
-use types::{SexticTwist, SignOfX};
+use crate::types::{SexticTwist, SignOfX};
 
 #[allow(non_snake_case)]
 fn linedbl(A: &mut ECP4, qx: &FP, qy: &FP) -> FP24 {
diff --git a/src/pair256.rs b/src/pair256.rs
index 28b61b5..e442be7 100644
--- a/src/pair256.rs
+++ b/src/pair256.rs
@@ -27,7 +27,7 @@ use super::fp2::FP2;
 use super::fp48;
 use super::fp48::FP48;
 use super::rom;
-use types::{SexticTwist, SignOfX};
+use crate::types::{SexticTwist, SignOfX};
 
 #[allow(non_snake_case)]
 fn linedbl(A: &mut ECP8, qx: &FP, qy: &FP) -> FP48 {
diff --git a/src/roms/rom_anssi_32.rs b/src/roms/rom_anssi_32.rs
index 3523fa4..5097232 100644
--- a/src/roms/rom_anssi_32.rs
+++ b/src/roms/rom_anssi_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use anssi::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // anssi Modulus
diff --git a/src/roms/rom_anssi_64.rs b/src/roms/rom_anssi_64.rs
index 1c32ea1..0dc8c7b 100644
--- a/src/roms/rom_anssi_64.rs
+++ b/src/roms/rom_anssi_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use anssi::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // anssi Modulus
diff --git a/src/roms/rom_bls24_32.rs b/src/roms/rom_bls24_32.rs
index c04ac38..5edd8cb 100644
--- a/src/roms/rom_bls24_32.rs
+++ b/src/roms/rom_bls24_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls24::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // bls24 Modulus
diff --git a/src/roms/rom_bls24_64.rs b/src/roms/rom_bls24_64.rs
index ae4c19e..db75460 100644
--- a/src/roms/rom_bls24_64.rs
+++ b/src/roms/rom_bls24_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls24::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // bls24 Modulus
diff --git a/src/roms/rom_bls381_32.rs b/src/roms/rom_bls381_32.rs
index 2abf6b8..2eff2ce 100644
--- a/src/roms/rom_bls381_32.rs
+++ b/src/roms/rom_bls381_32.rs
@@ -17,12 +17,12 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
+use super::big::{Big, NLEN};
 use super::fp::FP;
 use super::fp2::FP2;
 use super::hash_to_curve::HashAlgorithm;
-use bls381::big::{Big, NLEN};
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // bls381 Modulus
diff --git a/src/roms/rom_bls381_64.rs b/src/roms/rom_bls381_64.rs
index 971fab5..f12cccf 100644
--- a/src/roms/rom_bls381_64.rs
+++ b/src/roms/rom_bls381_64.rs
@@ -17,12 +17,12 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
+use super::big::{Big, NLEN};
 use super::fp::FP;
 use super::fp2::FP2;
 use super::hash_to_curve::HashAlgorithm;
-use bls381::big::{Big, NLEN};
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 58
 // bls381 Modulus
diff --git a/src/roms/rom_bls383_32.rs b/src/roms/rom_bls383_32.rs
index 72614af..e08f928 100644
--- a/src/roms/rom_bls383_32.rs
+++ b/src/roms/rom_bls383_32.rs
@@ -18,8 +18,8 @@ under the License.
 */
 
 use super::super::arch::Chunk;
-use bls383::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 pub const MODULUS: [Chunk; NLEN] = [
diff --git a/src/roms/rom_bls383_64.rs b/src/roms/rom_bls383_64.rs
index 5235cb0..7c89303 100644
--- a/src/roms/rom_bls383_64.rs
+++ b/src/roms/rom_bls383_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls383::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 58
 pub const MODULUS: [Chunk; NLEN] = [
diff --git a/src/roms/rom_bls461_32.rs b/src/roms/rom_bls461_32.rs
index 7096e7d..deae903 100644
--- a/src/roms/rom_bls461_32.rs
+++ b/src/roms/rom_bls461_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls461::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // bls461 Modulus
diff --git a/src/roms/rom_bls461_64.rs b/src/roms/rom_bls461_64.rs
index 53d1422..45bc2a5 100644
--- a/src/roms/rom_bls461_64.rs
+++ b/src/roms/rom_bls461_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls461::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 // bls461 Modulus
diff --git a/src/roms/rom_bls48_32.rs b/src/roms/rom_bls48_32.rs
index e999b0e..a1bec6d 100644
--- a/src/roms/rom_bls48_32.rs
+++ b/src/roms/rom_bls48_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls48::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use crate::arch::Chunk;
+use crate::bls48::big::NLEN;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // bls48 Modulus
diff --git a/src/roms/rom_bls48_64.rs b/src/roms/rom_bls48_64.rs
index f5663f2..8ab61ee 100644
--- a/src/roms/rom_bls48_64.rs
+++ b/src/roms/rom_bls48_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bls48::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use crate::arch::Chunk;
+use crate::bls48::big::NLEN;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 58
 // bls48 Modulus
diff --git a/src/roms/rom_bn254_32.rs b/src/roms/rom_bn254_32.rs
index 1899c4a..0781973 100644
--- a/src/roms/rom_bn254_32.rs
+++ b/src/roms/rom_bn254_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bn254::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 pub const MODULUS: [Chunk; NLEN] = [
diff --git a/src/roms/rom_bn254_64.rs b/src/roms/rom_bn254_64.rs
index 08502f3..35fb15a 100644
--- a/src/roms/rom_bn254_64.rs
+++ b/src/roms/rom_bn254_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bn254::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // BN254 Modulus
 // Base Bits= 56
diff --git a/src/roms/rom_bn254cx_32.rs b/src/roms/rom_bn254cx_32.rs
index 8884db3..ca563d0 100644
--- a/src/roms/rom_bn254cx_32.rs
+++ b/src/roms/rom_bn254cx_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bn254cx::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // bn254cx Modulus
diff --git a/src/roms/rom_bn254cx_64.rs b/src/roms/rom_bn254cx_64.rs
index 8aa4f06..d5480bb 100644
--- a/src/roms/rom_bn254cx_64.rs
+++ b/src/roms/rom_bn254cx_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use bn254cx::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // bn254cx Modulus
diff --git a/src/roms/rom_brainpool_32.rs b/src/roms/rom_brainpool_32.rs
index 17b1268..96fdbb8 100644
--- a/src/roms/rom_brainpool_32.rs
+++ b/src/roms/rom_brainpool_32.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Note that the original curve has been transformed to an isomorphic curve 
with A=-3 */
 
-use super::super::arch::Chunk;
-use brainpool::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // brainpool Modulus
diff --git a/src/roms/rom_brainpool_64.rs b/src/roms/rom_brainpool_64.rs
index 89a445e..5896ac4 100644
--- a/src/roms/rom_brainpool_64.rs
+++ b/src/roms/rom_brainpool_64.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Note that the original curve has been transformed to an isomorphic curve 
with A=-3 */
 
-use super::super::arch::Chunk;
-use brainpool::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // brainpool Modulus
diff --git a/src/roms/rom_c25519_32.rs b/src/roms/rom_c25519_32.rs
index d07207e..ec023de 100644
--- a/src/roms/rom_c25519_32.rs
+++ b/src/roms/rom_c25519_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use c25519::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // Curve25519 Modulus
diff --git a/src/roms/rom_c25519_64.rs b/src/roms/rom_c25519_64.rs
index 42b1d70..c18332c 100644
--- a/src/roms/rom_c25519_64.rs
+++ b/src/roms/rom_c25519_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use c25519::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // Curve25519 Modulus
diff --git a/src/roms/rom_c41417_32.rs b/src/roms/rom_c41417_32.rs
index c471f76..2fab5b7 100644
--- a/src/roms/rom_c41417_32.rs
+++ b/src/roms/rom_c41417_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use c41417::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // c41417 Modulus
diff --git a/src/roms/rom_c41417_64.rs b/src/roms/rom_c41417_64.rs
index 3a2ef58..d3047ad 100644
--- a/src/roms/rom_c41417_64.rs
+++ b/src/roms/rom_c41417_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use c41417::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 // c41417 Modulus
diff --git a/src/roms/rom_ed25519_32.rs b/src/roms/rom_ed25519_32.rs
index c866d50..d455fce 100644
--- a/src/roms/rom_ed25519_32.rs
+++ b/src/roms/rom_ed25519_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use ed25519::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // Curve25519 Modulus
diff --git a/src/roms/rom_ed25519_64.rs b/src/roms/rom_ed25519_64.rs
index a26461b..3c4849d 100644
--- a/src/roms/rom_ed25519_64.rs
+++ b/src/roms/rom_ed25519_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use ed25519::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // Curve25519 Modulus
diff --git a/src/roms/rom_fp256bn_32.rs b/src/roms/rom_fp256bn_32.rs
index 0f196b0..9967663 100644
--- a/src/roms/rom_fp256bn_32.rs
+++ b/src/roms/rom_fp256bn_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use fp256bn::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 pub const MODULUS: [Chunk; NLEN] = [
diff --git a/src/roms/rom_fp256bn_64.rs b/src/roms/rom_fp256bn_64.rs
index d1a38b9..f93e3ec 100644
--- a/src/roms/rom_fp256bn_64.rs
+++ b/src/roms/rom_fp256bn_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use fp256bn::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // fp256bn Modulus
 // Base Bits= 56
diff --git a/src/roms/rom_fp512bn_32.rs b/src/roms/rom_fp512bn_32.rs
index e18646b..97d6432 100644
--- a/src/roms/rom_fp512bn_32.rs
+++ b/src/roms/rom_fp512bn_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use fp512bn::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 pub const MODULUS: [Chunk; NLEN] = [
@@ -232,8 +232,8 @@ pub const USE_GS_G2: bool = true;
 pub const USE_GS_GT: bool = true;
 pub const GT_STRONG: bool = false;
 
-pub const MODBYTES: usize = 32;
-pub const BASEBITS: usize = 28;
+pub const MODBYTES: usize = 64;
+pub const BASEBITS: usize = 29;
 
 pub const MODBITS: usize = 512;
 pub const MOD8: usize = 3;
diff --git a/src/roms/rom_fp512bn_64.rs b/src/roms/rom_fp512bn_64.rs
index a3e5f57..54a262a 100644
--- a/src/roms/rom_fp512bn_64.rs
+++ b/src/roms/rom_fp512bn_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use fp512bn::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 pub const MODULUS: [Chunk; NLEN] = [
diff --git a/src/roms/rom_goldilocks_32.rs b/src/roms/rom_goldilocks_32.rs
index 096ff30..023d20a 100644
--- a/src/roms/rom_goldilocks_32.rs
+++ b/src/roms/rom_goldilocks_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use goldilocks::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // Goldilocks modulus
diff --git a/src/roms/rom_goldilocks_64.rs b/src/roms/rom_goldilocks_64.rs
index 6547052..fdd44b3 100644
--- a/src/roms/rom_goldilocks_64.rs
+++ b/src/roms/rom_goldilocks_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use goldilocks::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 58
 // Goldilocks modulus
diff --git a/src/roms/rom_hifive_32.rs b/src/roms/rom_hifive_32.rs
index 01dcb03..96abf19 100644
--- a/src/roms/rom_hifive_32.rs
+++ b/src/roms/rom_hifive_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use hifive::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 
diff --git a/src/roms/rom_hifive_64.rs b/src/roms/rom_hifive_64.rs
index f7b5621..23b993a 100644
--- a/src/roms/rom_hifive_64.rs
+++ b/src/roms/rom_hifive_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use hifive::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 
diff --git a/src/roms/rom_nist256_32.rs b/src/roms/rom_nist256_32.rs
index 12c47f9..5620c40 100644
--- a/src/roms/rom_nist256_32.rs
+++ b/src/roms/rom_nist256_32.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Fixed Data in ROM - Field and Curve parameters */
 
-use super::super::arch::Chunk;
-use nist256::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 
diff --git a/src/roms/rom_nist256_64.rs b/src/roms/rom_nist256_64.rs
index 5da758c..8cb95d2 100644
--- a/src/roms/rom_nist256_64.rs
+++ b/src/roms/rom_nist256_64.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Fixed Data in ROM - Field and Curve parameters */
 
-use super::super::arch::Chunk;
-use nist256::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // nist256 modulus
diff --git a/src/roms/rom_nist384_32.rs b/src/roms/rom_nist384_32.rs
index 2939f30..282f136 100644
--- a/src/roms/rom_nist384_32.rs
+++ b/src/roms/rom_nist384_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nist384::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 
diff --git a/src/roms/rom_nist384_64.rs b/src/roms/rom_nist384_64.rs
index 4654ec6..321b3ec 100644
--- a/src/roms/rom_nist384_64.rs
+++ b/src/roms/rom_nist384_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nist384::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 
diff --git a/src/roms/rom_nist521_32.rs b/src/roms/rom_nist521_32.rs
index 7a74956..b529fd2 100644
--- a/src/roms/rom_nist521_32.rs
+++ b/src/roms/rom_nist521_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nist521::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // nist521 Modulus
diff --git a/src/roms/rom_nist521_64.rs b/src/roms/rom_nist521_64.rs
index dec3c9c..ab77372 100644
--- a/src/roms/rom_nist521_64.rs
+++ b/src/roms/rom_nist521_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nist521::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 // nist521 Modulus
diff --git a/src/roms/rom_nums256e_32.rs b/src/roms/rom_nums256e_32.rs
index b1d20c3..108c283 100644
--- a/src/roms/rom_nums256e_32.rs
+++ b/src/roms/rom_nums256e_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums256e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 
diff --git a/src/roms/rom_nums256e_64.rs b/src/roms/rom_nums256e_64.rs
index b8ac09e..a7fcf19 100644
--- a/src/roms/rom_nums256e_64.rs
+++ b/src/roms/rom_nums256e_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums256e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // nums256 Modulus
diff --git a/src/roms/rom_nums256w_32.rs b/src/roms/rom_nums256w_32.rs
index 4ffb798..75785df 100644
--- a/src/roms/rom_nums256w_32.rs
+++ b/src/roms/rom_nums256w_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums256w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // nums256 modulus
diff --git a/src/roms/rom_nums256w_64.rs b/src/roms/rom_nums256w_64.rs
index be3b7ff..6c552da 100644
--- a/src/roms/rom_nums256w_64.rs
+++ b/src/roms/rom_nums256w_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums256w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // nums256 Modulus
diff --git a/src/roms/rom_nums384e_32.rs b/src/roms/rom_nums384e_32.rs
index 787f4c1..b909907 100644
--- a/src/roms/rom_nums384e_32.rs
+++ b/src/roms/rom_nums384e_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums384e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // nums384 Modulus
diff --git a/src/roms/rom_nums384e_64.rs b/src/roms/rom_nums384e_64.rs
index a1a4318..6a8df5c 100644
--- a/src/roms/rom_nums384e_64.rs
+++ b/src/roms/rom_nums384e_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums384e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 // nums384 Modulus
diff --git a/src/roms/rom_nums384w_32.rs b/src/roms/rom_nums384w_32.rs
index 74d5216..93ba646 100644
--- a/src/roms/rom_nums384w_32.rs
+++ b/src/roms/rom_nums384w_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums384w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // nums384 Modulus
diff --git a/src/roms/rom_nums384w_64.rs b/src/roms/rom_nums384w_64.rs
index bd057e2..916e2bf 100644
--- a/src/roms/rom_nums384w_64.rs
+++ b/src/roms/rom_nums384w_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums384w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 58
 // nums384 Modulus
diff --git a/src/roms/rom_nums512e_32.rs b/src/roms/rom_nums512e_32.rs
index 48ca9ea..604369a 100644
--- a/src/roms/rom_nums512e_32.rs
+++ b/src/roms/rom_nums512e_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums512e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // nums512 Modulus
diff --git a/src/roms/rom_nums512e_64.rs b/src/roms/rom_nums512e_64.rs
index f645d85..86d53b2 100644
--- a/src/roms/rom_nums512e_64.rs
+++ b/src/roms/rom_nums512e_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums512e::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 // nums512 Modulus
diff --git a/src/roms/rom_nums512w_32.rs b/src/roms/rom_nums512w_32.rs
index c787795..1c19582 100644
--- a/src/roms/rom_nums512w_32.rs
+++ b/src/roms/rom_nums512w_32.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums512w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 29
 // nums512 Modulus
diff --git a/src/roms/rom_nums512w_64.rs b/src/roms/rom_nums512w_64.rs
index 79ed127..4ac38a4 100644
--- a/src/roms/rom_nums512w_64.rs
+++ b/src/roms/rom_nums512w_64.rs
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
 under the License.
 */
 
-use super::super::arch::Chunk;
-use nums512w::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 60
 // nums512 Modulus
diff --git a/src/roms/rom_secp256k1_32.rs b/src/roms/rom_secp256k1_32.rs
index cb9b32b..4167ba7 100644
--- a/src/roms/rom_secp256k1_32.rs
+++ b/src/roms/rom_secp256k1_32.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Fixed Data in ROM - Field and Curve parameters */
 
-use super::super::arch::Chunk;
-use secp256k1::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 28
 // secp256k1 modulus
diff --git a/src/roms/rom_secp256k1_64.rs b/src/roms/rom_secp256k1_64.rs
index 0b100b6..0b5c38a 100644
--- a/src/roms/rom_secp256k1_64.rs
+++ b/src/roms/rom_secp256k1_64.rs
@@ -19,9 +19,9 @@ under the License.
 
 /* Fixed Data in ROM - Field and Curve parameters */
 
-use super::super::arch::Chunk;
-use secp256k1::big::NLEN;
-use types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
+use super::big::NLEN;
+use crate::arch::Chunk;
+use crate::types::{CurvePairingType, CurveType, ModType, SexticTwist, SignOfX};
 
 // Base Bits= 56
 

Reply via email to