Remove isogenous curve from public API.

This commit is contained in:
Sean Bowe 2021-02-02 12:53:28 -07:00 committed by Daira Hopwood
parent b488355e13
commit d14d2314a1
3 changed files with 9 additions and 17 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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;