# How to compute projective coordinate Z in elliptic curve cryptography?

I was working on affine coordinates and struggling with the computation time taken for operations and then I was advised to use projective coordinates so that mul-inverse operation can be avoided

Can somebody tell me how to compute 'z'?...I read at some places that z can be assumed as (1,1). If so then can it be used for implementing NistP256 curves?

• nsa.gov/ia/_files/nist-routines.pdf – SEJPM Dec 13 '15 at 14:19
• Repeating myself: as an alternative to projective coordinates, you might want to have a look at the simpler technique of using affine coordinates, with all quantities kept as fractions, reducing numerator and denominator modulo $p$ when it gets much larger. Benefits that I expect: the math is easy; and you need to compute modular inverse only twice, when producing the final result; that removes the modular inverse performance bottleneck that you cite in a related question. – fgrieu Dec 13 '15 at 14:59
• @SEJPM Yeah it is exactly the link which u suggested where i read about making z(1,1)(Routine 2.2.1). If I do so, then can I implement using the formula given here (craigcostello.com.au/pairings/PairingsForBeginners.pdf) in section 2.4 where modular inversion is avoided ?? – abejoe Dec 13 '15 at 16:18
• @fgrieu For a curve like NISTP256 where the mod value is 256 bits long and I still end up with two 256-bit long inputs for modular inverse. I already tried that approach with affine coordinates but I'm not happy with the performance. Hence I seek an alternative for that and got the idea of using projective coordinates. If you still insist me to continue with affine coordinates, explain me why? – abejoe Dec 13 '15 at 16:22
• @abejoe: all methods I know for NISTP256 use some number of modular inverse operations with arguments of about 256 bits. The one that I propose uses very few, so that step will not become a bottleneck. And that method is readily understandable if one has already implemented and understood something with affine coordinates and modular inverse at each step. In light of your two other related questions, you seem to be in that situation, and an easy understandable solution might be pedagogical. – fgrieu Dec 13 '15 at 16:39