What is the addition rule when the field is GF(p)?
In this case the addition rule has the form (x1,y1) + (x2,y2) => (x3,y3) where x3 = L^2 – x1 – x2 and y3 = L·(x1-x3) – y1 and L = (y1-y2)/(x2-x1) If x1=x2 and y1=y2 we must use instead, x3 = L^2 – 2·x1 y3 = L·(x1-x3) – y1 L = ( 3·x1^2 + a ) / ( 2·y1 ) There are some other special cases which must be considered first: if x1=x2 and y1=-y2 then the result is zero, and if either point is zero, the result is the other operand. By doing some algebra, you can check that the usual laws for addition apply, e.g. P+Q=Q+P and (P+Q)+R = P+(Q+R), and that the result of adding two points is indeed another curve point.