diff --git a/elliptic-curve/src/arithmetic.rs b/elliptic-curve/src/arithmetic.rs index 874321bc8..f09e8d728 100644 --- a/elliptic-curve/src/arithmetic.rs +++ b/elliptic-curve/src/arithmetic.rs @@ -2,8 +2,10 @@ use crate::{ ops::{LinearCombination, MulByGenerator, ShrAssign}, + point::{AffineXCoordinate, AffineYIsOdd}, scalar::FromUintUnchecked, - AffineXCoordinate, AffineYIsOdd, Curve, FieldBytes, IsHigh, PrimeCurve, ScalarPrimitive, + scalar::IsHigh, + Curve, FieldBytes, PrimeCurve, ScalarPrimitive, }; use core::fmt::Debug; use subtle::{ConditionallySelectable, ConstantTimeEq}; diff --git a/elliptic-curve/src/dev.rs b/elliptic-curve/src/dev.rs index 65e62d197..e3bd8f8b0 100644 --- a/elliptic-curve/src/dev.rs +++ b/elliptic-curve/src/dev.rs @@ -9,12 +9,13 @@ use crate::{ generic_array::typenum::U32, ops::{LinearCombination, MulByGenerator, Reduce, ShrAssign}, pkcs8, + point::{AffineXCoordinate, AffineYIsOdd}, rand_core::RngCore, - scalar::FromUintUnchecked, + scalar::{FromUintUnchecked, IsHigh}, sec1::{CompressedPoint, FromEncodedPoint, ToEncodedPoint}, subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}, zeroize::DefaultIsZeroes, - AffineXCoordinate, AffineYIsOdd, Curve, CurveArithmetic, IsHigh, PrimeCurve, + Curve, CurveArithmetic, PrimeCurve, }; use core::{ iter::{Product, Sum}, @@ -55,7 +56,7 @@ pub type ScalarPrimitive = crate::ScalarPrimitive; /// Scalar bits. #[cfg(feature = "bits")] -pub type ScalarBits = crate::ScalarBits; +pub type ScalarBits = crate::scalar::ScalarBits; /// Mock elliptic curve type useful for writing tests which require a concrete /// curve type. diff --git a/elliptic-curve/src/ecdh.rs b/elliptic-curve/src/ecdh.rs index 9a4f8cc51..7bfd4c446 100644 --- a/elliptic-curve/src/ecdh.rs +++ b/elliptic-curve/src/ecdh.rs @@ -27,7 +27,7 @@ //! [SIGMA]: https://webee.technion.ac.il/~hugo/sigma-pdf.pdf use crate::{ - AffinePoint, AffineXCoordinate, Curve, CurveArithmetic, FieldBytes, NonZeroScalar, + point::AffineXCoordinate, AffinePoint, Curve, CurveArithmetic, FieldBytes, NonZeroScalar, ProjectivePoint, PublicKey, }; use core::borrow::Borrow; diff --git a/elliptic-curve/src/lib.rs b/elliptic-curve/src/lib.rs index d719a2a89..fb14e0df7 100644 --- a/elliptic-curve/src/lib.rs +++ b/elliptic-curve/src/lib.rs @@ -105,11 +105,7 @@ mod voprf; pub use crate::{ error::{Error, Result}, field::{FieldBytes, FieldBytesSize}, - point::{ - AffineXCoordinate, AffineYIsOdd, DecompactPoint, DecompressPoint, PointCompaction, - PointCompression, - }, - scalar::{IsHigh, ScalarPrimitive}, + scalar::ScalarPrimitive, secret_key::SecretKey, }; pub use crypto_bigint as bigint; @@ -130,9 +126,6 @@ pub use { group::{self, Group}, }; -#[cfg(feature = "bits")] -pub use crate::scalar::ScalarBits; - #[cfg(feature = "jwk")] pub use crate::jwk::{JwkEcKey, JwkParameters}; diff --git a/elliptic-curve/src/public_key.rs b/elliptic-curve/src/public_key.rs index e5f67edc0..9e8a2ebb2 100644 --- a/elliptic-curve/src/public_key.rs +++ b/elliptic-curve/src/public_key.rs @@ -18,8 +18,9 @@ use core::str::FromStr; #[cfg(feature = "sec1")] use { crate::{ + point::PointCompression, sec1::{EncodedPoint, FromEncodedPoint, ModulusSize, ToEncodedPoint}, - Curve, FieldBytesSize, PointCompression, + Curve, FieldBytesSize, }, core::cmp::Ordering, subtle::CtOption, diff --git a/elliptic-curve/src/scalar/nonzero.rs b/elliptic-curve/src/scalar/nonzero.rs index 6d7164ffc..db88ec56a 100644 --- a/elliptic-curve/src/scalar/nonzero.rs +++ b/elliptic-curve/src/scalar/nonzero.rs @@ -2,7 +2,8 @@ use crate::{ ops::{Invert, Reduce, ReduceNonZero}, - CurveArithmetic, Error, FieldBytes, IsHigh, PrimeCurve, Scalar, ScalarPrimitive, SecretKey, + scalar::IsHigh, + CurveArithmetic, Error, FieldBytes, PrimeCurve, Scalar, ScalarPrimitive, SecretKey, }; use base16ct::HexDisplay; use core::{ diff --git a/elliptic-curve/src/scalar/primitive.rs b/elliptic-curve/src/scalar/primitive.rs index fb5923ca7..d0a78f083 100644 --- a/elliptic-curve/src/scalar/primitive.rs +++ b/elliptic-curve/src/scalar/primitive.rs @@ -4,7 +4,8 @@ use crate::{ bigint::{prelude::*, Limb, NonZero}, ops::{Add, AddAssign, Neg, ShrAssign, Sub, SubAssign}, scalar::FromUintUnchecked, - Curve, Error, FieldBytes, IsHigh, Result, + scalar::IsHigh, + Curve, Error, FieldBytes, Result, }; use base16ct::HexDisplay; use core::{cmp::Ordering, fmt, str};