This repository contains a set of tools to compute operations on an elliptic curve.
An elliptic curve is defined by the equation:
It looks something like this:
secp256k1 curve used by Bitcoin
Point at infinity is defined by
Where R
is the negation of the intersection of the straight line defined by P and Q, and the curve.
Where R
is the negation of the intersection of the curve's tangent at P, and the curve.
Point multiplication is the repetition of point addition.
Montgomery ladder algorithm
R0 ← 0
R1 ← P
for i from m downto 0 do
if di = 0 then
R1 ← point_add(R0, R1)
R0 ← point_double(R0)
else
R0 ← point_add(R0, R1)
R1 ← point_double(R1)
return R0