Description
Functions for various actions on the STARK curve: y^2 = x^3 + alpha * x + beta where alpha = 1 and beta = 0x6f21413efbe40de150e596d72f7a8c5609ad26c15c915c1f4cdfcb99cee9e89. The point at infinity is represented as (0, 0). Implementation largely follows: https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/common/ec.cairo
Definitions
builtin random_ec_point axiom randomEcPoint : PointSource#
double (point : Point) : PointSource#
Doubles a valid `point` (computes point + point) on the elliptic curve.
addMul (point1 : Point) (alpha : Field) (point2 : Point) : PointSource#
Computes point1 + alpha * point2 on the elliptic curve. Because the EC operation builtin cannot handle inputs where additions of points with the same x coordinate arise during the computation, this function adds and subtracts a nondeterministic point s to the computation, so that regardless of input, the probability that such additions arise will become negligibly small. The precise computation is therefore: ((point1 + s) + alpha * point2) - s so that the inputs to the builtin itself are (point1 + s), alpha, and point2. Arguments: point1 - an EC point. alpha - the multiplication coefficient of point2 (a field element). point2 - an EC point. Returns: point1 + alpha * point2. Assumptions: point1 and point2 are valid points on the curve.