Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions ed448-goldilocks/src/curve.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
pub mod edwards;
pub mod montgomery;
mod scalar;
pub(crate) mod scalar_mul;
pub(crate) mod twedwards;

pub use edwards::{AffinePoint, CompressedEdwardsY, EdwardsPoint};
pub use montgomery::{MontgomeryPoint, ProjectiveMontgomeryPoint};
pub use scalar::{EdwardsScalar, EdwardsScalarBytes, WideEdwardsScalarBytes};
2 changes: 1 addition & 1 deletion ed448-goldilocks/src/curve/twedwards/extended.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#![allow(non_snake_case)]
#![allow(dead_code)]

use crate::curve::edwards::EdwardsPoint as EdwardsExtendedPoint;
use crate::curve::twedwards::affine::AffinePoint;
use crate::curve::twedwards::extensible::ExtensiblePoint;
use crate::edwards::EdwardsPoint as EdwardsExtendedPoint;
use crate::field::FieldElement;
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
/// If this is a problem, one can use a different isogeny strategy (Decaf/Ristretto)
pub(crate) mod affine;
pub(crate) mod extended;
mod scalar;
pub use affine::AffinePoint;
pub use extended::{CompressedEdwardsY, EdwardsPoint};
pub use scalar::{EdwardsScalar, EdwardsScalarBytes, WideEdwardsScalarBytes};
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::curve::edwards::EdwardsPoint;
use crate::field::FieldElement;
use crate::*;
use core::ops::Mul;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use core::iter::Sum;
use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign};

use crate::constants::EDWARDS_BASEPOINT_ORDER;
use crate::curve::edwards::affine::AffinePoint;
use crate::curve::montgomery::MontgomeryPoint; // XXX: need to fix this path
use crate::curve::scalar_mul::variable_base;
use crate::curve::twedwards::extended::ExtendedPoint as TwistedExtendedPoint;
use crate::field::FieldElement;
Expand Down
2 changes: 1 addition & 1 deletion ed448-goldilocks/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub use scalar::{
MODULUS_LIMBS, NZ_ORDER, ORDER, Scalar, ScalarBytes, WIDE_ORDER, WideScalarBytes,
};

use crate::curve::edwards::EdwardsPoint;
use crate::curve::twedwards::extended::ExtendedPoint as TwExtendedPoint;
use crate::edwards::EdwardsPoint;

use elliptic_curve::bigint::{
U448, const_monty_params,
Expand Down
11 changes: 7 additions & 4 deletions ed448-goldilocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,25 @@ pub use subtle;
pub(crate) mod constants;
pub(crate) mod curve;
pub(crate) mod decaf;
pub(crate) mod edwards;
pub(crate) mod field;
pub(crate) mod montgomery;
pub(crate) mod ristretto;
#[cfg(feature = "signing")]
pub(crate) mod sign;

pub(crate) use field::{GOLDILOCKS_BASE_POINT, TWISTED_EDWARDS_BASE_POINT};

pub use curve::{
AffinePoint, CompressedEdwardsY, EdwardsPoint, EdwardsScalar, EdwardsScalarBytes,
MontgomeryPoint, ProjectiveMontgomeryPoint, WideEdwardsScalarBytes,
};
pub use decaf::{
AffinePoint as DecafAffinePoint, CompressedDecaf, DecafPoint, DecafScalar, DecafScalarBytes,
WideDecafScalarBytes,
};
pub use edwards::{
AffinePoint, CompressedEdwardsY, EdwardsPoint, EdwardsScalar, EdwardsScalarBytes,
WideEdwardsScalarBytes,
};
pub use field::{MODULUS_LIMBS, ORDER, Scalar, WIDE_ORDER};
pub use montgomery::{MontgomeryPoint, ProjectiveMontgomeryPoint};
pub use ristretto::{CompressedRistretto, RistrettoPoint};
#[cfg(feature = "signing")]
pub use sign::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// use crate::constants::A_PLUS_TWO_OVER_FOUR;
use crate::EdwardsScalar;
use crate::curve::edwards::extended::EdwardsPoint;
use crate::edwards::extended::EdwardsPoint;
use crate::field::FieldElement;
use core::fmt;
use core::ops::Mul;
Expand Down
2 changes: 1 addition & 1 deletion ed448-goldilocks/src/sign/signing_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use signature::Error;
use subtle::{Choice, ConstantTimeEq};

#[cfg(feature = "pkcs8")]
use crate::{PUBLIC_KEY_LENGTH, curve::edwards::extended::PointBytes};
use crate::{PUBLIC_KEY_LENGTH, edwards::extended::PointBytes};

/// Ed448 secret key as defined in [RFC8032 § 5.2.5]
///
Expand Down
2 changes: 1 addition & 1 deletion ed448-goldilocks/src/sign/verifying_key.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Much of this code is borrowed from Thomas Pornin's [CRRL Project](https://github.com/pornin/crrl/blob/main/src/ed448.rs)
//! and adapted to mirror `ed25519-dalek`'s API.

use crate::curve::edwards::extended::PointBytes;
use crate::edwards::extended::PointBytes;
use crate::sign::{HASH_HEAD, InnerSignature};
use crate::{
CompressedEdwardsY, Context, EdwardsPoint, EdwardsScalar, PreHash, Signature, SigningError,
Expand Down