Trait generic_ec_core::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> + Multiplicative<CurveGenerator, Output = Self::Point> + Multiplicative<Self::Point, Output = 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§

source

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 that represents a curve point

source

type Scalar: Additive + Multiplicative<Self::Scalar, Output = Self::Scalar> + Multiplicative<CurveGenerator, Output = Self::Point> + Multiplicative<Self::Point, Output = Self::Point> + Invertible + Zero + One + Samplable + Zeroize + Copy + Eq + ConstantTimeEq + ConditionallySelectable + Default + IntegerEncoding<Bytes = Self::ScalarArray> + Unpin + Sync + Send

Type that represents a curve scalar

source

type CompressedPointArray: ByteArray

Byte array that fits the whole bytes representation of compressed point

source

type UncompressedPointArray: ByteArray

Byte array that fits the whole bytes representation of uncompressed point

source

type ScalarArray: ByteArray

Byte array that fits the whole bytes representation of a scalar

source

type CoordinateArray: ByteArray

Byte array that fits the whole bytes representation of a coordinate

If a curve doesn’t expose point coordinates, it may be [u8; 0]

Required Associated Constants§

source

const CURVE_NAME: &'static str

Curve name

Object Safety§

This trait is not object safe.

Implementors§