Ask Your Question
2

Listing a few points in an elliptic curve

asked 2015-04-27 19:12:45 -0500

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 02:29:40 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-04-30 01:19:52 -0500

Castor gravatar image

updated 2016-08-18 10:51:20 -0500

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
2

answered 2015-04-30 10:27:56 -0500

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

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-27 19:12:45 -0500

Seen: 184 times

Last updated: Aug 18 '16