Ask Your Question
2

Listing a few points in an elliptic curve

asked 2015-04-28 02:12:45 +0100

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?

edit retag flag offensive close merge delete

Comments

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

slelievre gravatar imageslelievre ( 2015-04-28 09:29:40 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-04-30 17:27:56 +0100

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)
edit flag offensive delete link more
2

answered 2015-04-30 08:19:52 +0100

Castor gravatar image

updated 2016-08-18 17:51:20 +0100

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)
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

Stats

Asked: 2015-04-28 02:12:45 +0100

Seen: 1,016 times

Last updated: Aug 18 '16