Ellipticcurveinextendedfield

38 views
Skip to first unread message

Padmanabhan Tr

unread,
Oct 1, 2014, 3:16:57 AM10/1/14
to sage-s...@googlegroups.com
I am working with Elliptic curve in extended field.  I tried to get points / order in the group.  I have copied a small code set & results from notebook. The points obtained are not in the EC; I have checked it using a Python program I coded for this.  Is it a bug / wrong use of codes by me?

F.<f> = GF(11^2,'f')
ff2 = EllipticCurve([0+f*0,1+f*0])
ff2
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field in f of size
11^2
fg =ff2.gens()
fg
[(8*f : 6*f + 6 : 1), (5*f + 8 : 3*f + 6 : 1)]

Vincent Delecroix

unread,
Oct 1, 2014, 3:48:17 AM10/1/14
to sage-s...@googlegroups.com
Hello,

I do not get the same generators as you, but at least it works

sage: F.<f> = GF(11^2,'f')
sage: ff2 = EllipticCurve([0+f*0,1+f*0])
sage: ff2
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field in f of size 11^2
sage: fg =ff2.gens()
sage: fg
[(3*f + 1 : 8*f + 6 : 1), (3 : 5*f + 1 : 1)]
sage: x,y,z=fg[0]
sage: z*y^2 == x**3 + z**3
True
sage: x,y,z=fg[1]
sage: z*y^2 == x**3 + z**3
True

Which version of Sage are you using?

Best,
Vincent

2014-10-01 9:16 UTC+02:00, 'Padmanabhan Tr' via sage-support
<sage-s...@googlegroups.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

John Cremona

unread,
Oct 1, 2014, 2:30:12 PM10/1/14
to sage-s...@googlegroups.com
1. In you checking make sure that you have the correct polynomial satisfied by the field generator f:

sage: F.<f> = GF(11^2,'f')
sage: f.minpoly()
x^2 + 7*x + 2

2. You can define your curve more simply by

sage: ff2 = EllipticCurve(F,[0,1])

3. The code which computes the generators and group structure uses random points on the curve so will not give the same generators in different situations (I wrote that code!).  I get

sage: ff2.gens()
[(9 : 9 : 1), (3*f + 9 : 5*f + 1 : 1)]

I would be very surprised if you got points which did not satisfy the curve equation since Sage will refuse to construct points on the curve unless they do.  You can check manually, of course:

sage: (3*f+9)^3 + 1 == (5*f+1)^2
True
sage: (F(9))^3 + 1 == (F(9))^2
True

John Cremona

Padmanabhan Tr

unread,
Oct 2, 2014, 6:07:03 AM10/2/14
to sage-s...@googlegroups.com
1. I am using SAGE-6.2-x-86_64-Linux
2. From Documentation I understand that the points are chosen randomly & may differ at each entry.
3. I wrote the code with [0,1] as coefficient set & tried first. Since I did not get the points on the curve I made the change to [0+0j,1+0j] consciously & tried.
4. I wrote a Python program to get the points on the EC - extended field & checked.; these points are not on the EC.
5. With Python I have the following algebra for the 'point' [9+3j, 1+5j].

y2 = (1+5j)**2
>>> y2
(-24+10j)
>>> x3 = 1+(9+3j)**3
>>> x3
(487+702j)
>>> a=487%11
>>> a
3
>>> b = -24%11
>>> b
9
>>> 702%11
9
Mr Cremona, please see this.

John Cremona

unread,
Oct 2, 2014, 9:08:19 AM10/2/14
to SAGE support
What is j?


On 2 October 2014 11:07, 'Padmanabhan Tr' via sage-support
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/10kYPIEKnGw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

slelievre

unread,
Oct 2, 2014, 2:32:44 PM10/2/14
to sage-s...@googlegroups.com
Python complex numbers are entered as eg

    1 + 3j

To avoid preparsing in sage, enter them as

    1r + 3jr

Example:

    sage: 1r+3jr
    (1+3j)
    sage: type(1r+3jr)
    <type 'complex'>

John Cremona

unread,
Oct 2, 2014, 2:48:58 PM10/2/14
to SAGE support
On 2 October 2014 19:32, slelievre <samuel....@gmail.com> wrote:
> Python complex numbers are entered as eg
>
> 1 + 3j

I did know that of course. The original poster was trying to do
arithmetic in GF(11^2) using j which is problematic, especially as the
generator chosen by Sage is not a root of x^2+1:

sage: GF(11^2,'a').gen().minimal_polynomial()
x^2 + 7*x + 2

I pointed this out in a reply to his original post but he persists in
thinking that Sage cannot compute correctly.

John Cremona

Padmanabhan Tr

unread,
Oct 2, 2014, 7:20:57 PM10/2/14
to sage-s...@googlegroups.com
Dear Mr Cremona /slelievre
I understood my mistake. I am sorry for the mess


On Wednesday, October 1, 2014 12:46:57 PM UTC+5:30, Padmanabhan Tr wrote:
Reply all
Reply to author
Forward
0 new messages