Skip to main content

BatchNormalize

Trait BatchNormalize 

Source
pub trait BatchNormalize<Points: ?Sized> {
    type Output;

    // Required method
    fn batch_normalize(points: &Points) -> Self::Output;

    // Provided method
    fn batch_normalize_vartime(points: &Points) -> Self::Output { ... }
}
Expand description

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

Required Associated Types§

Source

type Output

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

Required Methods§

Source

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.

Provided Methods§

Source

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

Perform a batched conversion to affine representation on a sequence of projective points in variable-time.

Security Warning

This should NOT be used on points which represent secrets!

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§

Source§

impl<P> BatchNormalize<[NonIdentity<P>]> for NonIdentity<P>
where P: CurveGroup + BatchNormalize<[P], Output = Vec<P::Affine>>,

Available on crate feature alloc only.
Source§

impl<const N: usize, P> BatchNormalize<[NonIdentity<P>; N]> for NonIdentity<P>
where P: CurveGroup + BatchNormalize<[P; N], Output = [P::Affine; N]>,