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
8 changes: 6 additions & 2 deletions elliptic-curve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ pub trait Curve: Clone + Debug + Default + Eq + Ord + Send + Sync {

/// Elliptic curve with curve arithmetic support
pub trait Arithmetic: Curve {
/// Scalar type for a given curve
type Scalar: ConditionallySelectable
/// Scalar type for a given curve.
type Scalar: ff::PrimeField
+ ConstantTimeEq
+ Default
+ FromBytes<Size = Self::FieldSize>
+ Into<ElementBytes<Self>>;

/// Elliptic curve point in projective coordinates.
type ProjectivePoint: group::Curve<AffineRepr = Self::AffinePoint>
+ group::Group<Scalar = Self::Scalar>;

/// Affine point type for a given curve
type AffinePoint: ConditionallySelectable
+ Mul<scalar::NonZeroScalar<Self>, Output = Self::AffinePoint>
Expand Down