Hacker News new | ask | show | jobs
by betterunix2 3112 days ago
You are thinking in terms of affine coordinates i.e. (x,y) coordinates. The math is better explained (but not as easily to visualize) in projective coordinates. The conversions work as follows:

(x,y) --> (x : y : 1) (x : y : z) --> (x/z, y/z)

In that case, the "vertical line" will intersect the elliptic curve at (0 : 1 : 0), which is the identity element of the group.

Tangent lines are considered to intersect the curve "twice," (EDIT: "twice" at the point where the line is tangent and one more time at a third point) which is analogous to a polynomial equation having a double root. There is also a triple intersection case (EDIT: "triple" at a single point, all lines intersect the curve three times), which is possible at (0 : 1 : 0).

I'll leave it to the "reader" to work out the group law in projective coordinates based on the conversions given above. One neat trick: you can avoid inversions in the field by using projective coordinates and cleverly using the Z coordinate; this is a common optimization used in practice.