Skip to main content

CurveArithmetic

Trait CurveArithmetic 

pub trait CurveArithmetic: Curve {
    type AffinePoint: 'static + AffineCoordinates<FieldRepr = GenericArray<u8, Self::FieldBytesSize>> + Copy + ConditionallySelectable + ConstantTimeEq + Debug + Default + DefaultIsZeroes + Eq + PartialEq + Send + Sync;
    type ProjectivePoint: ConditionallySelectable + ConstantTimeEq + Default + DefaultIsZeroes + From<Self::AffinePoint> + Into<Self::AffinePoint> + LinearCombination<Scalar = Self::Scalar> + MulByGenerator + Curve<AffineRepr = Self::AffinePoint> + Group;
    type Scalar: AsRef<Self::Scalar> + DefaultIsZeroes + From<ScalarPrimitive<Self>> + FromUintUnchecked<Uint = Self::Uint> + Into<GenericArray<u8, Self::FieldBytesSize>> + Into<ScalarPrimitive<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + IsHigh + PartialOrd + Reduce<Self::Uint, Bytes = GenericArray<u8, Self::FieldBytesSize>> + ShrAssign<usize> + Field + PrimeField<Repr = GenericArray<u8, Self::FieldBytesSize>>;
}
Expand description

Elliptic curve with an arithmetic implementation.

Required Associated Types§

type AffinePoint: 'static + AffineCoordinates<FieldRepr = GenericArray<u8, Self::FieldBytesSize>> + Copy + ConditionallySelectable + ConstantTimeEq + Debug + Default + DefaultIsZeroes + Eq + PartialEq + Send + Sync

Elliptic curve point in affine coordinates.

type ProjectivePoint: ConditionallySelectable + ConstantTimeEq + Default + DefaultIsZeroes + From<Self::AffinePoint> + Into<Self::AffinePoint> + LinearCombination<Scalar = Self::Scalar> + MulByGenerator + Curve<AffineRepr = Self::AffinePoint> + Group

Elliptic curve point in projective coordinates.

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

type Scalar: AsRef<Self::Scalar> + DefaultIsZeroes + From<ScalarPrimitive<Self>> + FromUintUnchecked<Uint = Self::Uint> + Into<GenericArray<u8, Self::FieldBytesSize>> + Into<ScalarPrimitive<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + IsHigh + PartialOrd + Reduce<Self::Uint, Bytes = GenericArray<u8, Self::FieldBytesSize>> + ShrAssign<usize> + Field + PrimeField<Repr = GenericArray<u8, Self::FieldBytesSize>>

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§