pub trait Invert {
    type Output;

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

    // Provided method
    fn invert_vartime(&self) -> Self::Output { ... }
}
Available on crate feature arithmetic only.
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§