From 71111e88b799142d55450a3f91e5b614be7ede2e Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 12 Nov 2020 21:45:56 +0000 Subject: [PATCH] Type aliases for the tweedle groups --- src/tweedle.rs | 3 +++ src/tweedle/dee.rs | 13 +++++++++++++ src/tweedle/dum.rs | 13 +++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 src/tweedle/dee.rs create mode 100644 src/tweedle/dum.rs diff --git a/src/tweedle.rs b/src/tweedle.rs index f8f9be9..417071e 100644 --- a/src/tweedle.rs +++ b/src/tweedle.rs @@ -6,5 +6,8 @@ mod macros; mod curves; mod fields; +pub mod dee; +pub mod dum; + pub use curves::*; pub use fields::*; diff --git a/src/tweedle/dee.rs b/src/tweedle/dee.rs new file mode 100644 index 0000000..a900ada --- /dev/null +++ b/src/tweedle/dee.rs @@ -0,0 +1,13 @@ +//! The Tweedledee elliptic curve group. + +/// A Tweedledee point in the projective coordinate space. +pub type Point = super::Eq; + +/// A Tweedledee point in the affine coordinate space (or the point at infinity). +pub type Affine = super::EqAffine; + +/// The base field of the Tweedledee group. +pub type Base = super::Fq; + +/// The scalar field of the Tweedledee group. +pub type Scalar = super::Fp; diff --git a/src/tweedle/dum.rs b/src/tweedle/dum.rs new file mode 100644 index 0000000..9f9b1b2 --- /dev/null +++ b/src/tweedle/dum.rs @@ -0,0 +1,13 @@ +//! The Tweedledum elliptic curve group. + +/// A Tweedledum point in the projective coordinate space. +pub type Point = super::Ep; + +/// A Tweedledum point in the affine coordinate space (or the point at infinity). +pub type Affine = super::EpAffine; + +/// The base field of the Tweedledum group. +pub type Base = super::Fp; + +/// The scalar field of the Tweedledum group. +pub type Scalar = super::Fq;