Ask Your Question

how to store data in array

asked 2018-03-30 10:46:24 -0500

santoshi gravatar image

offline computation , how to store precomputed data in array during scalar multiplication of elliptic curve i want the precomputed data 2p,4p,8p,16p,32p..... for further computation so how to generate that array.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-30 11:24:25 -0500

slelievre gravatar image

You could use a list.

Assuming you have defined a point p on your elliptic curve, form a list containing p, then iterate appending twice the last element of the list to the list.

sage: a = [p]
sage: for n in range(10):
....:     a.append(2*a[-1])
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-03-30 10:46:24 -0500

Seen: 41 times

Last updated: Mar 30