Skip to content
Merged
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
9 changes: 9 additions & 0 deletions elliptic-curve/src/weierstrass/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ pub trait Curve: Clone + Debug + Default + Eq + Ord + Send + Sync {
type ScalarSize: ArrayLength<u8> + Add + Add<U1> + Eq + Ord + Unsigned;
}

/// Curve arithmetic support
pub trait Arithmetic: Curve {
/// Scalar type for a given curve
type Scalar;

/// Affine point type for a given curve
type AffinePoint;
}

/// Alias for [`SecretKey`] type for a given Weierstrass curve
pub type SecretKey<C> = crate::secret_key::SecretKey<<C as Curve>::ScalarSize>;