## A Formula for Adding Points

We close this section with an explicit formula for adding two points in . If is an elliptic curve over a field , given by an equation , then we can compute the group addition using the following algorithm.

Algorithm 10.1.2 (Elliptic Curve Group Law)   Given , this algorithm computes the sum .
1. [One Point ] If set or if set and terminate. Otherwise write .
2. [Negatives] If and , set and terminate.
3. [Compute ]Set
Note: If and , output and terminate.
4. [Compute Sum] Then , where and  is the  coordinate of .

William Stein 2012-09-24