Trait generic_ec::Curve

source ·
pub trait Curve: Debug + Copy + Eq + Ord + Hash + Default + Sync + Send + 'static {
    type Point: Additive + From<CurveGenerator> + Zero + Zeroize + OnCurve + SmallFactor + Copy + Eq + ConstantTimeEq + ConditionallySelectable + Default + CompressedEncoding<Bytes = Self::CompressedPointArray> + UncompressedEncoding<Bytes = Self::UncompressedPointArray> + Decode + Unpin + Sync + Send;
    type Scalar: Additive + Multiplicative<Self::Scalar, Output = Self::Scalar, Output = Self::Point, Output = Self::Point> + Multiplicative<CurveGenerator> + Multiplicative<Self::Point> + Invertible + Zero + One + Samplable + Zeroize + Copy + Eq + ConstantTimeEq + ConditionallySelectable + Default + IntegerEncoding<Bytes = Self::ScalarArray> + Unpin + Sync + Send;
    type CompressedPointArray: ByteArray;
    type UncompressedPointArray: ByteArray;
    type ScalarArray: ByteArray;
    type CoordinateArray: ByteArray;

    const CURVE_NAME: &'static str;
}
Expand description

Elliptic curve

This trait contains all the low-level curve implementation logic: scalar, point arithmetics, encoding and etc.

Required Associated Types§

Required Associated Constants§

source

const CURVE_NAME: &'static str

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<C, X> Curve for RustCryptoCurve<C, X>
where C: CurveName + CurveArithmetic, <C as CurveArithmetic>::ProjectivePoint: From<<C as CurveArithmetic>::AffinePoint> + CofactorGroup + Copy + Eq + Default + ConstantTimeEq + ConditionallySelectable + Zeroize + Unpin, <C as CurveArithmetic>::AffinePoint: From<<C as CurveArithmetic>::ProjectivePoint> + ToEncodedPoint<C> + FromEncodedPoint<C>, &'a <C as CurveArithmetic>::ProjectivePoint: for<'a> Mul<&'a <C as CurveArithmetic>::Scalar, Output = <C as CurveArithmetic>::ProjectivePoint>, <C as CurveArithmetic>::Scalar: Reduce<<C as Curve>::Uint> + Eq + ConstantTimeEq + ConditionallySelectable + DefaultIsZeroes + Unpin, ScalarPrimitive<C>: for<'a> From<&'a <C as CurveArithmetic>::Scalar>, <C as Curve>::FieldBytesSize: ModulusSize, X: 'static,

source§

const CURVE_NAME: &'static str = C::CURVE_NAME

§

type Point = RustCryptoPoint<C>

§

type Scalar = RustCryptoScalar<C>

§

type CompressedPointArray = <<RustCryptoCurve<C, X> as Curve>::Point as CompressedEncoding>::Bytes

§

type UncompressedPointArray = <<RustCryptoCurve<C, X> as Curve>::Point as UncompressedEncoding>::Bytes

§

type ScalarArray = <<RustCryptoCurve<C, X> as Curve>::Scalar as IntegerEncoding>::Bytes

§

type CoordinateArray = GenericArray<u8, <C as Curve>::FieldBytesSize>

Implementors§