Trait elliptic_curve::ops::BatchInvert
source · pub trait BatchInvert<FieldElements: ?Sized>: Invert + Sized {
type Output: AsRef<[Self]>;
// Required method
fn batch_invert(
field_elements: &FieldElements
) -> CtOption<<Self as BatchInvert<FieldElements>>::Output>;
}
Available on crate feature
arithmetic
only.Expand description
Perform a batched inversion on a sequence of field elements (i.e. base field elements or scalars) at an amortized cost that should be practically as efficient as a single inversion.
Required Associated Types§
Required Methods§
sourcefn batch_invert(
field_elements: &FieldElements
) -> CtOption<<Self as BatchInvert<FieldElements>>::Output>
fn batch_invert( field_elements: &FieldElements ) -> CtOption<<Self as BatchInvert<FieldElements>>::Output>
Invert a batch of field elements.
Object Safety§
This trait is not object safe.
Implementors§
source§impl<T> BatchInvert<[T]> for Twhere
T: Invert<Output = CtOption<Self>> + Mul<Self, Output = Self> + Copy + Default + ConditionallySelectable,
Available on crate feature alloc
only.
impl<T> BatchInvert<[T]> for Twhere T: Invert<Output = CtOption<Self>> + Mul<Self, Output = Self> + Copy + Default + ConditionallySelectable,
Available on crate feature
alloc
only.