Clean up some more uses.

This commit is contained in:
Brian Smith 2018-12-06 10:30:32 -10:00
parent e8dab905d2
commit 58a5b6f2c6
6 changed files with 9 additions and 13 deletions

View File

@ -136,9 +136,8 @@ extern "C" {
#[cfg(test)]
mod tests {
use super::AES_MAX_ROUNDS;
use bits::BitLength;
use crate::{c, test};
use super::*;
use crate::{bits::BitLength, c, test};
#[test]
pub fn test_aes() {
@ -206,11 +205,11 @@ mod tests {
const NIST_SP800_38D_MAX_BITS: u64 = (1u64 << 39) - 256;
assert_eq!(NIST_SP800_38D_MAX_BITS, 549_755_813_632u64);
assert_eq!(
super::AES_128_GCM.max_input_len * 8,
AES_128_GCM.max_input_len * 8,
NIST_SP800_38D_MAX_BITS
);
assert_eq!(
super::AES_256_GCM.max_input_len * 8,
AES_256_GCM.max_input_len * 8,
NIST_SP800_38D_MAX_BITS
);
}

View File

@ -15,8 +15,7 @@
//! Elliptic curve operations on P-256 & P-384.
use self::ops::*;
use arithmetic::montgomery::*;
use crate::{der, ec, error, pkcs8};
use crate::{arithmetic::montgomery::*, der, ec, error, pkcs8};
use untrusted;
// NIST SP 800-56A Step 3: "If q is an odd prime p, verify that

View File

@ -12,9 +12,8 @@
// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
use arithmetic::montgomery::*;
use core::marker::PhantomData;
use crate::{c, error, limb::*};
use crate::{arithmetic::montgomery::*, c, error, limb::*};
use untrusted;
pub use self::elem::*;

View File

@ -16,8 +16,7 @@
//! ECDH agreement).
use super::{ops::*, verify_affine_point_is_on_the_curve};
use arithmetic::montgomery::*;
use crate::error;
use crate::{arithmetic::montgomery::*, error};
use untrusted;
/// Parses a public key encoded in uncompressed form. The key is validated

View File

@ -40,13 +40,13 @@
#![allow(box_pointers)]
use arithmetic::montgomery::*;
use core::{
self,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use crate::{
arithmetic::montgomery::*,
bits, c, error,
limb::{self, Limb, LimbMask, LIMB_BITS, LIMB_BYTES},
untrusted,

View File

@ -16,9 +16,9 @@ use super::{
bigint::{self, Prime},
verification, N,
};
use arithmetic::montgomery::R;
/// RSA PKCS#1 1.5 signatures.
use crate::{
arithmetic::montgomery::R,
bits, der, digest,
error::{self, KeyRejected},
pkcs8, rand,