Trait darkfi_sdk::crypto::pasta_prelude::Curve

pub trait Curve: Group + GroupOps<Self::AffineRepr> + GroupOpsOwned<Self::AffineRepr> {
    type AffineRepr;

    // Required method
    fn to_affine(&self) -> Self::AffineRepr;

    // Provided method
    fn batch_normalize(p: &[Self], q: &mut [Self::AffineRepr]) { ... }
}
Expand description

Efficient representation of an elliptic curve point guaranteed.

Required Associated Types§

type AffineRepr

The affine representation for this elliptic curve.

Required Methods§

fn to_affine(&self) -> Self::AffineRepr

Converts this element into its affine representation.

Provided Methods§

fn batch_normalize(p: &[Self], q: &mut [Self::AffineRepr])

Converts a batch of projective elements into affine elements. This function will panic if p.len() != q.len().

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Curve for Ep

§

type AffineRepr = EpAffine

§

fn batch_normalize(p: &[Ep], q: &mut [<Ep as Curve>::AffineRepr])

§

fn to_affine(&self) -> <Ep as Curve>::AffineRepr

§

impl Curve for Eq

§

type AffineRepr = EqAffine

§

fn batch_normalize(p: &[Eq], q: &mut [<Eq as Curve>::AffineRepr])

§

fn to_affine(&self) -> <Eq as Curve>::AffineRepr

Implementors§