Skip to main content

DOCurveConfig

Trait DOCurveConfig 

Source
pub trait DOCurveConfig: CurveConfig {
    const COEFF_A: Self::BaseField;
    const COEFF_B: Self::BaseField;
    const GENERATOR: Affine<Self>;

    // Provided methods
    fn get_c() -> Self::BaseField { ... }
    fn mul_projective(
        base: &Projective<Self>,
        scalar: &[u64],
    ) -> Projective<Self> { ... }
    fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self> { ... }
    fn msm(
        bases: &[Affine<Self>],
        scalars: &[Self::ScalarField],
    ) -> Result<Projective<Self>, usize> { ... }
    fn serialize_with_mode<W: Write>(
        item: &Affine<Self>,
        writer: W,
        compress: Compress,
    ) -> Result<(), SerializationError> { ... }
    fn deserialize_with_mode<R: Read>(
        reader: R,
        compress: Compress,
        validate: Validate,
    ) -> Result<Affine<Self>, SerializationError> { ... }
    fn serialized_size(compress: Compress) -> usize { ... }
}
Expand description

Constants and convenience functions that collectively define the Double-Odd curve. In this model, the curve equation is y² = x(x² + ax + b), (b and (a² - 4b) not squares in field) for constants a and b.

Required Associated Constants§

Source

const COEFF_A: Self::BaseField

Coefficient a of the curve equation.

Source

const COEFF_B: Self::BaseField

Coefficient b of the curve equation.

Source

const GENERATOR: Affine<Self>

Generator of the prime-order subgroup.

Provided Methods§

Source

fn get_c() -> Self::BaseField

Source

fn mul_projective(base: &Projective<Self>, scalar: &[u64]) -> Projective<Self>

Source

fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self>

Source

fn msm( bases: &[Affine<Self>], scalars: &[Self::ScalarField], ) -> Result<Projective<Self>, usize>

Source

fn serialize_with_mode<W: Write>( item: &Affine<Self>, writer: W, compress: Compress, ) -> Result<(), SerializationError>

Source

fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Affine<Self>, SerializationError>

Source

fn serialized_size(compress: Compress) -> usize

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§