ecdsa: opt for shiftRight, pow and square

In the given situations, these offer better readability, or in the case
of shiftRight, a substantial performance increase.
ec: fix point decoding for other curves