Multiply an elliptic curve point by a scalar.
(curve-scalar-* s point p a b) applies the elliptic group operation toFunction:
(defun curve-scalar-* (s point p a b) (declare (xargs :guard (and (natp s) (dm::primep p) (< 3 p) (fep a p) (fep b p) (pointp point) (point-in-pxp-p point p) (point-on-weierstrass-elliptic-curve-p point p a b)))) (if (zp s) :infinity (if (= s 1) point (if (evenp s) (let ((half-curve-scalar-* (curve-scalar-* (/ s 2) point p a b))) (curve-group-+ half-curve-scalar-* half-curve-scalar-* p a b)) (curve-group-+ point (curve-scalar-* (- s 1) point p a b) p a b)))))