elliptic_curve::ops

Trait Invert

Source
pub trait Invert {
    type Output;

    // Required method
    fn invert(&self) -> Self::Output;

    // Provided method
    fn invert_vartime(&self) -> Self::Output { ... }
}
Expand description

Perform an inversion on a field element (i.e. base field element or scalar)

Required Associated Types§

Source

type Output

Field element type

Required Methods§

Source

fn invert(&self) -> Self::Output

Invert a field element.

Provided Methods§

Source

fn invert_vartime(&self) -> Self::Output

Invert a field element in variable time.

⚠️ WARNING!

This method should not be used with secret values, as its variable-time operation can potentially leak secrets through sidechannels.

Implementors§