# how can i convert the elliptic curve point representation

i've created an Elliptic curve over finite field GF(2^101). when i generate a random point on this curve is appear as the following representation. p1=(z101^99 + z101^98 + z101^97 + z101^96 + z101^95 + z101^94 + z101^92 + z101^91 + z101^90 + z101^89 + z101^87 + z101^86 + z101^84 + z101^80 + z101^79 + z101^77 + z101^74 + z101^73 + z101^72 + z101^70 + z101^66 + z101^65 + z101^63 + z101^61 + z101^59 + z101^57 + z101^56 + z101^55 + z101^52 + z101^51 + z101^49 + z101^47 + z101^41 + z101^40 + z101^38 + z101^36 + z101^30 + z101^29 + z101^28 + z101^27 + z101^25 + z101^23 + z101^20 + z101^18 + z101^15 + z101^14 + z101^10 + z101^3 + z101^2 + z101 + 1 : z101^100 + z101^99 + z101^96 + z101^90 + z101^88 + z101^87 + z101^85 + z101^82 + z101^81 + z101^72 + z101^70 + z101^69 + z101^68 + z101^67 + z101^66 + z101^62 + z101^60 + z101^59 + z101^58 + z101^53 + z101^52 + z101^50 + z101^49 + z101^48 + z101^46 + z101^45 + z101^44 + z101^43 + z101^42 + z101^40 + z101^39 + z101^37 + z101^36 + z101^34 + z101^32 + z101^27 + z101^26 + z101^25 + z101^23 + z101^15 + z101^13 + z101^12 + z101^9 + z101^7 + z101^3 : 1).

i need this point coordinates to be numbers not polynomials. any recommendations?

edit retag close merge delete

Sort by ยป oldest newest most voted

You could try

p1[0].integer_representation()


etc. The coordinates are given are not polynomials, although they are written as a polynomial expression in the generator of the field. With "integer representation" you basically take the bitstring obtained by looking at the coefficients of z101^i and interpreting that bitstring as an integer.

more

it is worked fine. can i generate points directly with integer representation >> make E.random_point() generate random points in integer representation

( 2020-04-27 03:54:02 -0600 )edit

It works a little better if you call the routine different:

def random_point_in_integer_representation(E):
P = E.random_point()
return (P[0].integer_representation(), P[1].integer_representation())


A good computer algebra system gives you the tools to get the output/representation you want, rather than provide little custom routines to provide each possibility individually. Sagemath gives you the tools. You do the programming.

( 2020-04-27 18:07:10 -0600 )edit