DoxigAlpha

P256

Group operations over P256.

Fields of this type

Fields

#
z:Fe
= Fe.one
is_base:bool
= false

Field arithmetic mod the order of the main subgroup.

Types

#
scalar
Field arithmetic mod the order of the main subgroup.

Reject the neutral element.

Functions

#
rejectIdentity
Reject the neutral element.
fromAffineCoordinates
Create a point from affine coordinates after checking that they match the curve equation.
fromSerializedAffineCoordinates
Create a point from serialized affine coordinates.
recoverY
Recover the Y coordinate from the X coordinate.
fromSec1
Deserialize a SEC1-encoded point.
toCompressedSec1
Serialize a point using the compressed SEC-1 format.
toUncompressedSec1
Serialize a point using the uncompressed SEC-1 format.
random
Return a random point.
neg
Flip the sign of the X coordinate.
dbl
Double a P256 point.
addMixed
Add P256 points, the second being specified using affine coordinates.
add
Add P256 points.
sub
Subtract P256 points.
subMixed
Subtract P256 points, the second being specified using affine coordinates.
affineCoordinates
Return affine coordinates.
equivalent
Return true if both coordinate sets represent the same point.
mul
Multiply an elliptic curve point by a scalar.
mulPublic
Multiply an elliptic curve point by a *PUBLIC* scalar *IN VARIABLE TIME*
mulDoubleBasePublic
Double-base multiplication of public parameters - Compute (p1*s1)+(p2*s2) *IN VARIABLE TIME*

The P256 base point.

Values

#
basePoint
The P256 base point.
identityElement
The P256 neutral element.
B
= Fe.fromInt(41058363725152142129326129780047268409114441015993725554835256314039467401291) catch unreachable