elliptic_curve

Module ops

Source
Available on crate feature arithmetic only.
Expand description

Traits for arithmetic operations on elliptic curve field elements.

Traits§

Add
The addition operator +.
AddAssign
The addition assignment operator +=.
BatchInvert
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.
Invert
Perform an inversion on a field element (i.e. base field element or scalar)
LinearCombination
Linear combination.
LinearCombinationExt
Linear combination (extended version).
Mul
The multiplication operator *.
MulByGenerator
Multiplication by the generator.
Neg
The unary negation operator -.
Reduce
Modular reduction.
ReduceNonZero
Modular reduction to a non-zero output.
Shr
The right shift operator >>. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for _ >> _, setting the result type for integer operations to the type of the left-hand-side operand. This means that though a >> b and a.shr(b) are one and the same from an evaluation standpoint, they are different when it comes to type inference.
ShrAssign
The right shift assignment operator >>=.
Sub
The subtraction operator -.
SubAssign
The subtraction assignment operator -=.