# Could someone explain the given algorithm?

The following snapshot of the algorithm is taken from the book Guide to Elliptic Curve Cryptography published by Springer 2004.

I don't understand that why at the statement 9.1 if both $T_1$ and $T_2$ are zero, then the double is computed? Why they are doing so in a point addition procedure?

By the way Algorithm 3.21 is used for computing the double of a Jacobian projective point.

• T1 and T2 hold the affine coordinate of the second point converted in Jacobian form. Then If T1=T2=0 Then the two points coincide and then it's normal to double them. It's more conveniant to double $(x_2:y_2:1)$ rather than $P(X_1:Y_1:Z_1)$ to save some inversions. By this forme adding a point in Jacobian form with a point in affine form is more efficient. – Robert NACIRI Sep 7 '15 at 15:05
• Yes, I agree but would it not be better to display a message that "both the points are same"? Because it is mixed-coordinate addition procedure. – user110219 Sep 7 '15 at 19:52

Assume $T_1=0$ and $T_2=0$ then you have $X_1=x_2\cdot Z_1^2$ and $Y_1=y_2\cdot Z_1^3$ which means that $P=(x_2\cdot Z_1^2 :y_2\cdot Z_1^3 : Z_1 )$ whose affine representation if $Z_1\neq 0$ is $P=(x_2:y_2)=Q$ (Explicit Formula Database). Hence $P+Q=2\cdot Q$