First time here? Check out the FAQ!

Ask Your Question
2

Listing a few points in an elliptic curve

asked 9 years ago

MikaBowl gravatar image

I have a generated elliptic curve of a modulus. I want to list just a few points on it (doesn't matter what they are, I just need one or two) and I was hoping to do:

E.points()

However due to the size of the curve this generates the error:

OverflowError: range() result has too many items

Is there any way I can make it list just a few points?

Preview: (hide)

Comments

Please provide some code to generate E. People are more likely to explore the question and give help.

slelievre gravatar imageslelievre ( 9 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 9 years ago

vdelecroix gravatar image

Alternatively, you can also start to iterate the points on the curve without having to construct the whole list:

sage: k = GF(next_prime(7^5))
sage: E = EllipticCurve(k,[3,4])
sage: it = iter(E)
sage: it.next()
(0 : 1 : 0)
sage: it.next()
(0 : 2 : 1)
sage: it.next()
(0 : 16809 : 1)
sage: it.next()
(4 : 5217 : 1)
sage: it.next()
(4 : 11594 : 1)
sage: it.next()
(5 : 12 : 1)

What takes effort is to build the generators of the group. Once you have them, you just have to consider linear combinations. So you can also do

sage: gens = E.gens()
sage: gens
[(11860 : 14157 : 1), (15856 : 8344 : 1)]
sage: 12*gens[0] + 17*gens[1]
(14914 : 10227 : 1)
sage: 1243*gens[0] + 2*gens[1]
(7777 : 15736 : 1)
Preview: (hide)
link
2

answered 9 years ago

Castor gravatar image

updated 8 years ago

slelievre gravatar image

See the SageMath reference manual for elliptic curves over finite fields.

Here there are some examples that may help:

sage: k = GF(next_prime(7^5))
sage: E = EllipticCurve(k,[2,4])
sage: P = E.random_element(); P
(16740 : 12486 : 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

Stats

Asked: 9 years ago

Seen: 1,039 times

Last updated: Aug 18 '16