diff --git a/src/pasta/curves.rs b/src/pasta/curves.rs index c41610d1..57e5c2c7 100644 --- a/src/pasta/curves.rs +++ b/src/pasta/curves.rs @@ -12,11 +12,11 @@ use super::{Fp, Fq}; use crate::arithmetic::{Curve, CurveAffine, FieldExt, Group}; macro_rules! new_curve_impl { - ($name:ident, $name_affine:ident, $iso_affine:ident, $base:ident, $scalar:ident, $blake2b_personalization:literal, + (($($privacy:tt)*), $name:ident, $name_affine:ident, $iso_affine:ident, $base:ident, $scalar:ident, $blake2b_personalization:literal, $curve_id:literal, $a_raw:expr, $b_raw:expr, $curve_type:ident) => { /// Represents a point in the projective coordinate space. #[derive(Copy, Clone, Debug)] - pub struct $name { + $($privacy)* struct $name { x: $base, y: $base, z: $base, @@ -35,7 +35,7 @@ macro_rules! new_curve_impl { /// Represents a point in the affine coordinate space (or the point at /// infinity). #[derive(Copy, Clone)] - pub struct $name_affine { + $($privacy)* struct $name_affine { x: $base, y: $base, infinity: Choice, @@ -845,6 +845,7 @@ macro_rules! impl_affine_curve_specific { } new_curve_impl!( + (pub), Ep, EpAffine, IsoEpAffine, @@ -857,6 +858,7 @@ new_curve_impl!( special_a0_b5 ); new_curve_impl!( + (pub), Eq, EqAffine, IsoEqAffine, @@ -869,6 +871,7 @@ new_curve_impl!( special_a0_b5 ); new_curve_impl!( + (pub(crate)), IsoEp, IsoEpAffine, EpAffine, @@ -886,6 +889,7 @@ new_curve_impl!( general ); new_curve_impl!( + (pub(crate)), IsoEq, IsoEqAffine, EqAffine, diff --git a/src/pasta/pallas.rs b/src/pasta/pallas.rs index 7cb478a6..4af4ae79 100644 --- a/src/pasta/pallas.rs +++ b/src/pasta/pallas.rs @@ -1,6 +1,6 @@ //! The Pallas and iso-Pallas elliptic curve groups. -use super::{Ep, EpAffine, Fp, Fq, IsoEp, IsoEpAffine}; +use super::{Ep, EpAffine, Fp, Fq}; /// The base field of the Pallas and iso-Pallas curves. pub type Base = Fp; @@ -14,12 +14,6 @@ pub type Point = Ep; /// A Pallas point in the affine coordinate space (or the point at infinity). pub type Affine = EpAffine; -/// An iso-Pallas point in the projective coordinate space. -pub type IsoPoint = IsoEp; - -/// A iso-Pallas point in the affine coordinate space (or the point at infinity). -pub type IsoAffine = IsoEpAffine; - #[test] fn test_map_to_curve_pallas() { use crate::arithmetic::Curve; diff --git a/src/pasta/vesta.rs b/src/pasta/vesta.rs index 05db6f1d..a92956d0 100644 --- a/src/pasta/vesta.rs +++ b/src/pasta/vesta.rs @@ -1,6 +1,6 @@ //! The Vesta and iso-Vesta elliptic curve groups. -use super::{Eq, EqAffine, Fp, Fq, IsoEq, IsoEqAffine}; +use super::{Eq, EqAffine, Fp, Fq}; /// The base field of the Vesta and iso-Vesta curves. pub type Base = Fq; @@ -14,12 +14,6 @@ pub type Point = Eq; /// A Vesta point in the affine coordinate space (or the point at infinity). pub type Affine = EqAffine; -/// An iso-Vesta point in the projective coordinate space. -pub type IsoPoint = IsoEq; - -/// A iso-Vesta point in the affine coordinate space (or the point at infinity). -pub type IsoAffine = IsoEqAffine; - #[test] fn test_map_to_curve_vesta() { use crate::arithmetic::Curve;