Module secp256kfun::op
source · Expand description
Operations in the secp256k1 group.
The purpose of this module is to hold all the operations that can be done
with secp256k1 Points
and Scalars
. Usually, you shouldn’t call
these directly but instead use the group g!
and scalar s!
expression
macros which compile your expressions into (potentially more efficient)
calls to these functions.
Some of the functions here use the type parameters to try and optimize the operation they perform.
Functions§
- Computes
x * A + y * B
more efficiently than callingscalar_mul_point
twice. - lincombDeprecatedDoes a linear combination of points
- Adds two points together
- Conditionally negate a point
- Checks if two points are equal
- Check if a point has an even y-coordinate
- Negate a point
- Normalize a point
- Does a dot product of points with scalars
- Subtracts one point from another
- Adds two scalars together (modulo the curve order)
- Conditionally negate a scalar
- Does a [dot product] between two iterators of scalars.
- Checks equality between two scalars
- Invert a scalar
- Check if the scalar is high
- Check if the scalar is zero
- Multiplies two scalars together (modulo the curve order)
- Computes multiplies the point
P
by the scalarx
. - Negate a scalar
- Subtracts one scalar from another