Point package:crypton

A point on curve edwards25519.
A P256 point
Define a point on a curve.
Point at Infinity
Add points on a curve
Multiply a scalar with the curve base point
Negate a curve point
Scalar Multiplication on a curve
Multiply the point p with s2 and add a lifted to curve value s1
Add two points.
Deserialize a 32-byte array as a point, ensuring the point is valid on edwards25519. WARNING: variable time
Add a point to itself.
pointDouble p = pointAdd p p
Serialize a point to a 32-byte array. Format is binary compatible with PublicKey from module Crypto.PubKey.Ed25519.
Test whether a point belongs to the prime-order subgroup generated by the base point. Result is True for the identity point.
pointHasPrimeOrder p = pointNegate p == pointMul l_minus_one p
Scalar multiplication over curve edwards25519. Note: when the scalar had reduction modulo L and the input point has a torsion component, the output point may not be in the expected subgroup.
Multiply a point by h = 8.
pointMulByCofactor p = pointMul scalar_8 p
Negate a point.
Multiply the point p with s2 and add a lifted to curve value s1.
pointsMulVarTime s1 s2 p = pointAdd (toPoint s1) (pointMul s2 p)
WARNING: variable time
Add a point to another point
Get the base point for the P256 Curve
Similar to pointMul, serializing the x coordinate as binary. When scalar is multiple of point order the result is all zero.
Convert from binary to a valid point
Convert from (x,y) Integers to a point
Check if a Point is the point at infinity