If L = (y2 - y1) / (x2 - x1) what does 1 / (x2 - x1) mean?
It means that you take the result of x2 - x1 = xdiff, and then raise it to the (p-2)th power: xdiff
p-2 mod p. (xdiff
p-1 % p would be equal to 1, while xdiff
p % p is simply xdiff) Where p is the curve characteristic.
It's just a shorthand way of writing the above expression as division doesn't really exist in elliptic curves but modular inverses to.