Ask Your Question
1

How to work with points in GF(p**2) for a prime p

asked 2021-04-26 01:34:51 +0200

b17 gravatar image

updated 2023-01-10 11:11:35 +0200

FrédéricC gravatar image

I'm constructing elliptic curves over fields of size $p^{2}$ for some prime $p$, and I want to do arithmetic with points on these curves. I think my question is best asked with an example: Say I put

p=431
k=GF(p**2)
E=EllipticCurve(k,[0,329,0,1,0])
E

Sage will say

Elliptic Curve defined by y^2 = x^3 + 329*x^2 + x over Finite Field in z2 of size 431^2

I understand that z2 in this case is the root of an irreducible polynomial used in the construction of GF(p**2). Say I want to use sage to figure out what $[2] (272z2 + 405 : 167z2 + 52 : 1)$ is. This is what I would type into sage:

2*E(272*z2 + 405, 167*z2 + 52, 1)

But if I do that, I get an error saying that z2 is undefined. I've also gotten the error message

unsupported operand parent(s) for +: '<class 'tuple'>' and 'Integer Ring'

I'm not sure how to get sage to treat z2 as the root of the irreducible polynomial. It seems to think of it as a variable that should have a value assigned to it. Any help would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-04-26 08:28:06 +0200

vdelecroix gravatar image

The generator is obtained by doing

sage: k.gen()
z2

Here z2 is just its name. You can store it in a Python variable z2 if you like

sage: z2 = k.gen()
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: 2021-04-26 01:34:51 +0200

Seen: 173 times

Last updated: Apr 26 '21