# how can i export an elliptic curve over finite field values as a look up table.

i need to export an elliptic curve over finite field after it's generated as a lookup table.. like two columns ( finite field element, it's output point after multiplied by the generator point of the curve). how can i do this?

edit retag close merge delete

Sort by » oldest newest most voted

Here is an example with a curve over a small field GF(17)$=\Bbb F_{17}$ having order $23$ and exactly one generator: $$E \ :\ y^2 = x^3 +3x+5\qquad\text{ over }F=\Bbb F_{17}\ .$$ Then every non trivial point is a generator, let $P=(2,6)\in E(F)$ be our choice for the table. The table can be obtained via:

sage: P = E.point( (2, 6) )
sage: print E.order(), P.order()
23 23
sage: for k in range(23):
....:     Q = k*P
....:     print "%2s | %s" % (k, Q.xy() if Q else 'ZERO')
....:
0 | ZERO
1 | (2, 6)
2 | (5, 3)
3 | (11, 3)
4 | (6, 1)
5 | (1, 14)
6 | (10, 7)
7 | (9, 8)
8 | (4, 8)
9 | (12, 1)
10 | (16, 1)
11 | (15, 12)
12 | (15, 5)
13 | (16, 16)
14 | (12, 16)
15 | (4, 9)
16 | (9, 9)
17 | (10, 10)
18 | (1, 3)
19 | (6, 16)
20 | (11, 14)
21 | (5, 14)
22 | (2, 11)
sage

more

( 2019-07-03 09:14:33 +0200 )edit

i've followed these steps but there is an issue. as i work on NIST-P521 curve so it's order is very large number so i am receiving the following error

OverflowError:range() result too many items

is there a way to solve this

( 2019-07-06 22:11:41 +0200 )edit