Skip to main content

CurveArithmetic

Trait CurveArithmetic 

Source
pub trait CurveArithmetic: Curve {
    type AffinePoint: 'static + AffineCoordinates<FieldRepr = FieldBytes<Self>> + Copy + ConditionallySelectable + ConstantTimeEq + CtEq + CtSelect + CurveAffine<Curve = Self::ProjectivePoint, Scalar = Self::Scalar> + Debug + Default + DefaultIsZeroes + Eq + From<NonIdentity<Self::AffinePoint>> + Generate + MulVartime<Self::Scalar> + for<'a> MulVartime<&'a Self::Scalar> + PartialEq + Sized + Send + Sync + TryInto<NonIdentity<Self::AffinePoint>, Error = Error>;
    type ProjectivePoint: ConditionallySelectable + ConstantTimeEq + CtEq + CtSelect + Default + DefaultIsZeroes + From<Self::AffinePoint> + From<NonIdentity<Self::ProjectivePoint>> + Generate + Into<Self::AffinePoint> + LinearCombination<[(Self::ProjectivePoint, Self::Scalar)]> + LinearCombination<[(Self::ProjectivePoint, Self::Scalar); 2]> + MulByGeneratorVartime + MulVartime<Self::Scalar> + for<'a> MulVartime<&'a Self::Scalar> + TryInto<NonIdentity<Self::ProjectivePoint>, Error = Error> + CurveGroup<Affine = Self::AffinePoint> + Group<Scalar = Self::Scalar>;
    type Scalar: AsRef<Self::Scalar> + CtEq + CtSelect + DefaultIsZeroes + From<NonZeroScalar<Self>> + From<ScalarValue<Self>> + FromUintUnchecked<Uint = Self::Uint> + Generate + Into<FieldBytes<Self>> + Into<ScalarValue<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + IsHigh + Mul<Self::AffinePoint, Output = Self::ProjectivePoint> + MulVartime<Self::AffinePoint> + for<'a> Mul<&'a Self::AffinePoint, Output = Self::ProjectivePoint> + for<'a> MulVartime<&'a Self::AffinePoint> + Mul<Self::ProjectivePoint, Output = Self::ProjectivePoint> + MulVartime<Self::ProjectivePoint> + for<'a> Mul<&'a Self::ProjectivePoint, Output = Self::ProjectivePoint> + for<'a> MulVartime<&'a Self::ProjectivePoint> + PartialOrd + Reduce<Self::Uint> + Reduce<FieldBytes<Self>> + Retrieve<Output = Self::Uint> + TryInto<NonZeroScalar<Self>, Error = Error> + PrimeField<Repr = FieldBytes<Self>>;
}
Expand description

Elliptic curve with an arithmetic implementation.

Required Associated Types§

Source

type AffinePoint: 'static + AffineCoordinates<FieldRepr = FieldBytes<Self>> + Copy + ConditionallySelectable + ConstantTimeEq + CtEq + CtSelect + CurveAffine<Curve = Self::ProjectivePoint, Scalar = Self::Scalar> + Debug + Default + DefaultIsZeroes + Eq + From<NonIdentity<Self::AffinePoint>> + Generate + MulVartime<Self::Scalar> + for<'a> MulVartime<&'a Self::Scalar> + PartialEq + Sized + Send + Sync + TryInto<NonIdentity<Self::AffinePoint>, Error = Error>

Elliptic curve point in affine coordinates.

Source

type ProjectivePoint: ConditionallySelectable + ConstantTimeEq + CtEq + CtSelect + Default + DefaultIsZeroes + From<Self::AffinePoint> + From<NonIdentity<Self::ProjectivePoint>> + Generate + Into<Self::AffinePoint> + LinearCombination<[(Self::ProjectivePoint, Self::Scalar)]> + LinearCombination<[(Self::ProjectivePoint, Self::Scalar); 2]> + MulByGeneratorVartime + MulVartime<Self::Scalar> + for<'a> MulVartime<&'a Self::Scalar> + TryInto<NonIdentity<Self::ProjectivePoint>, Error = Error> + CurveGroup<Affine = Self::AffinePoint> + Group<Scalar = Self::Scalar>

Elliptic curve point in projective coordinates.

Note: the following bounds are provided by group::Group:

Source

type Scalar: AsRef<Self::Scalar> + CtEq + CtSelect + DefaultIsZeroes + From<NonZeroScalar<Self>> + From<ScalarValue<Self>> + FromUintUnchecked<Uint = Self::Uint> + Generate + Into<FieldBytes<Self>> + Into<ScalarValue<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + IsHigh + Mul<Self::AffinePoint, Output = Self::ProjectivePoint> + MulVartime<Self::AffinePoint> + for<'a> Mul<&'a Self::AffinePoint, Output = Self::ProjectivePoint> + for<'a> MulVartime<&'a Self::AffinePoint> + Mul<Self::ProjectivePoint, Output = Self::ProjectivePoint> + MulVartime<Self::ProjectivePoint> + for<'a> Mul<&'a Self::ProjectivePoint, Output = Self::ProjectivePoint> + for<'a> MulVartime<&'a Self::ProjectivePoint> + PartialOrd + Reduce<Self::Uint> + Reduce<FieldBytes<Self>> + Retrieve<Output = Self::Uint> + TryInto<NonZeroScalar<Self>, Error = Error> + PrimeField<Repr = FieldBytes<Self>>

Scalar field modulo this curve’s order.

Note: the following bounds are provided by ff::Field:

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§