Skip to main content

Curve

Trait Curve 

Source
pub trait Curve: Curve {
    type Point: ConditionallySelectable + ConstantTimeEq + Default + MulByGenerator<Scalar = Self::Scalar> + Group + GroupEncoding + Hash + FromExtendedEdwards<BaseFieldElement = SubfieldElement<Self::BaseField>> + ToExtendedEdwards<BaseFieldElement = SubfieldElement<Self::BaseField>>;
    type Scalar: AsRef<Self::Scalar> + From<ScalarPrimitive<Self>> + FromUintUnchecked<Uint = Self::Uint> + Into<Array<u8, Self::FieldBytesSize>> + Into<ScalarPrimitive<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + FromUniformBytes + IsHigh + PartialOrd + ShrAssign<usize> + PrimeField + FieldExtension<Subfield = Self::Scalar> + Hash;
    type BaseField: PrimeField + FieldExtension + ShrAssign<usize> + FromUniformBytes + Hash;

    const SCALAR_BIG_ENDIAN: bool;
    const POINT_BIG_ENDIAN: bool;
    const BASE_FIELD_BIG_ENDIAN: bool;

    // Required method
    fn hash_to_curve(bytes: &[u8]) -> Self::Point;
}

Required Associated Constants§

Source

const SCALAR_BIG_ENDIAN: bool

Whether this curve uses big-endian for its scalar encoding natively.

Source

const POINT_BIG_ENDIAN: bool

Whether this curve uses big-endian for its point encoding natively.

Source

const BASE_FIELD_BIG_ENDIAN: bool

Required Associated Types§

Source

type Point: ConditionallySelectable + ConstantTimeEq + Default + MulByGenerator<Scalar = Self::Scalar> + Group + GroupEncoding + Hash + FromExtendedEdwards<BaseFieldElement = SubfieldElement<Self::BaseField>> + ToExtendedEdwards<BaseFieldElement = SubfieldElement<Self::BaseField>>

Elliptic curve point in projective coordinates.

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

Source

type Scalar: AsRef<Self::Scalar> + From<ScalarPrimitive<Self>> + FromUintUnchecked<Uint = Self::Uint> + Into<Array<u8, Self::FieldBytesSize>> + Into<ScalarPrimitive<Self>> + Into<Self::Uint> + Invert<Output = CtOption<Self::Scalar>> + FromUniformBytes + IsHigh + PartialOrd + ShrAssign<usize> + PrimeField + FieldExtension<Subfield = Self::Scalar> + Hash

Scalar field modulo this curve’s order.

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

Source

type BaseField: PrimeField + FieldExtension + ShrAssign<usize> + FromUniformBytes + Hash

Required Methods§

Source

fn hash_to_curve(bytes: &[u8]) -> Self::Point

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.

Implementations on Foreign Types§

Source§

impl Curve for Dalek

Implementors§