Handling of special cases in ECDSA point arithmetic