In Guide to Elliptic Curve Cryptography, it provides the formulas to calculate the point addition in mixed Lopez Dahab-affine coordinates, as shown follows.
In the actual algorithm,
The code involves additional conditional statements to handle some special cases.
I am not sure what is the purpose of the condition block in
line 9
.
Could anyone explain the special case that this block trying to handle? Is this block always necessary?