# Scalar multiplication with projective coordinates

I'm implementing point addition, doubling and scalar multiplication using projective coordinates. I took reference from this link.

I have implemented

• Routine 2.2.6 (ec_double)
• Routine 2.2.9 (ecc_full_sub)

They all are working and I have verified the results with the example results given at the last for P-256 curve.

I implemented Routine 2.2.10 ec_mul t(Scalar multiplication) But I couldnt get the correct output. In line 15 and 16 of this routine they take the binary representation of $$d$$ (random number) and $$3d$$. And the loop skips both MSB and LSB and performs the operations.

I got doubts like that $$3d$$ is modular multiplication or simple multiplication?. The loops runs for $$d$$ or $$3d$$ if its not modular multiplication?

Is there anything else I'm missing out?. If somebody has followed this algorithm and implemented it please help me out here.

• I have problems with ec_doubling. It gives wrong result. E.g. for point (5,1) it gives result (11,4) it should be (6,3). Are you sure there is no mistake in formula? Nov 4, 2021 at 10:27