I'm implementing an elliptic curve system primarily for ECDSA verification. I've evaluated different point representations and decided that using Jacobian projective coordinates suits best for my needs. Using this representation the point at infinity $\infty$ corresponds to $(X:Y:Z)$ = $(1:1:0)$.
As it is required to check for the point at infinity $\infty$ inside the point doubling and point addition functions, I'm currently comparing all three coordinates of an elliptic curve point to $(1:1:0)$. My question here is, if it would already be enough to check only for $Z=0$. As you can imagine this could make some difference in terms of performance, as doublings and additions are repeatedly called for point multiplication and omitting the check for $X$ and $Y$ would thus reduce some time.
Is checking for $Z=0$ enough? Could there be any corner cases for which I get $Z=0$ but actually have not reached the point at infinity? I've tested it with a high number of ECDSA verifications, and it seems to work but who knows if I have really tested the "special" cases especially on curves with 512-bit order.