Move `Ord` bound from `FieldExt` to `CurveAffine::{Base, Scalar}`

This helps with the `FieldExt` removal while deferring the decision on
whether to add an `Ord` bound to `ff::PrimeField`.
This commit is contained in:
Jack Grigg 2022-11-24 20:20:27 +00:00
parent 9862b247d2
commit 56b73e32ce
2 changed files with 3 additions and 3 deletions

View File

@ -102,9 +102,9 @@ pub trait CurveAffine:
+ From<<Self as PrimeCurveAffine>::Curve>
{
/// The scalar field of this elliptic curve.
type ScalarExt: FieldExt;
type ScalarExt: FieldExt + Ord;
/// The base field over which this elliptic curve is constructed.
type Base: FieldExt;
type Base: FieldExt + Ord;
/// The projective form of the curve
type CurveExt: CurveExt<AffineExt = Self, ScalarExt = <Self as CurveAffine>::ScalarExt>;

View File

@ -30,7 +30,7 @@ pub(crate) trait SqrtTableHelpers: ff::PrimeField {
/// This trait is a common interface for dealing with elements of a finite
/// field.
pub trait FieldExt: ff::WithSmallOrderMulGroup<3> + Ord {}
pub trait FieldExt: ff::WithSmallOrderMulGroup<3> {}
/// Parameters for a perfect hash function used in square root computation.
#[cfg(feature = "sqrt-table")]