i have implemented algorithm for point addition and point double operation for elliptic

asked 2017-01-27 05:51:38 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

i am using above algorithm for scalar multiplication for point add and double operation but it is not working properly. the following sage math code i am using for scalar multiplication

F= FiniteField(p);                        #p=5
E = EllipticCurve(F,[A,B]); 
print (E.points()[:8])    
l = [0, 0, 1,1];l if my scalar is 3  binary of that is (0011)
for i in range(l):
    if(i == 1):
        load("pointaddition.sage") # Q=Q+P

            else :
                ("load pointdouble.sage") # P=2p 
            return Q

when i will load pointaddition it will take Q=0 and some random point p and perform point addition so that i will get new value of Q. it is not working properly please guide

edit retag flag offensive close merge delete

Comments

There is an obvious indent error in the if-else block. And we do not know the points to be added, and do not know where is the error while adding them, since load("pointaddition.sage") cannot be accessed on our HD.

dan_fulea gravatar imagedan_fulea ( 2017-03-05 10:27:06 -0600 )edit