Ask Your Question
0

how to store data in array

asked 2018-03-30 17:46:24 +0200

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
0

answered 2018-03-30 18:24:25 +0200

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

Stats

Asked: 2018-03-30 17:46:24 +0200

Seen: 358 times

Last updated: Mar 30 '18