First time here? Check out the FAQ!

Ask Your Question
0

how to store data in array

asked 7 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 7 years ago

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])
Preview: (hide)
link

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: 7 years ago

Seen: 435 times

Last updated: Mar 30 '18