Skip to main content

BatchNormalize

Trait BatchNormalize 

pub trait BatchNormalize<Points>: Curve
where Points: ?Sized,
{ type Output: AsRef<[Self::AffineRepr]>; // Required method fn batch_normalize(points: &Points) -> Self::Output; }
Expand description

Normalize point(s) in projective representation by converting them to their affine ones.

Required Associated Types§

type Output: AsRef<[Self::AffineRepr]>

The output of the batch normalization; a container of affine points.

Required Methods§

fn batch_normalize(points: &Points) -> Self::Output

Perform a batched conversion to affine representation on a sequence of projective points at an amortized cost that should be practically as efficient as a single conversion. Internally, implementors should rely upon InvertBatch.

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§

§

impl<const N: usize, C> BatchNormalize<[ProjectivePoint<C>; N]> for ProjectivePoint<C>
where ProjectivePoint<C>: Double, C: PrimeCurveParams, <C as PrimeCurveParams>::FieldElement: Invert<Output = CtOption<<C as PrimeCurveParams>::FieldElement>>,

§

type Output = [<ProjectivePoint<C> as Curve>::AffineRepr; N]

§

fn batch_normalize( points: &[ProjectivePoint<C>; N], ) -> [<ProjectivePoint<C> as Curve>::AffineRepr; N]

Implementors§

§

impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for airbender_crypto::k256::ProjectivePoint