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§

type Output

Field element type

Required Methods§

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

Invert a field element.

Provided Methods§

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§