<p>Ok, running that code for you.</p>
<pre><code>n=115792089237316195423570985008687907852837564279074904382605163141518161494337

K =  GF(n)
E = EllipticCurve(K,[0,7])
print(E)
</code></pre>
<blockquote>
<p>Elliptic Curve defined by y^2 = x^3 + 7 over Finite Field of size 115792089237316195423570985008687907852837564279074904382605163141518161494337</p>
</blockquote>
<pre><code>print(E.order())
</code></pre>
<blockquote>
<p>115792089237316195423570985008687907853269984665640564039457584007908834671663</p>
</blockquote>
<pre><code>print(E.abelian_group())
</code></pre>
<blockquote>
<p>Additive abelian group isomorphic to Z/115792089237316195423570985008687907853269984665640564039457584007908834671663 embedded in Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 7 over Finite Field of size 115792089237316195423570985008687907852837564279074904382605163141518161494337</p>
</blockquote>
<pre><code>for i in (1..E.order()):
    print(E[i], E[i].order())
</code></pre>
<p>Now, that won't work. To evaluate <code>E[i]</code>, Sage would have to compute all 115792089237316195423570985008687907853269984665640564039457584007908834671663 points on the curve, put them in a list, sort them, and return the i'th element of it. The numbers are just completely infeasible to perform this with.</p>
<p>However, it's possible to achieve the same thing slightly differently: try X coordinates from low to high, and see if they have corresponding points on the curve, and print those. The output will be the same, but it'll run in reasonable time (as long as you don't actually want it for <em>all</em> points on the curve):</p>
<pre><code>for X in K:
    if E.is_x_coord(X):
        for P in sorted([E.lift_x(X), -E.lift_x(X)]):
             print(P, P.order())
</code></pre>
<p>With as output:</p>
<pre><code>(1 : 5647885500061325675748484062311156374277086380342947163834798608016077912256 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(1 : 110144203737254869747822500946376751478560477898731957218770364533502083582081 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(5 : 8431666291905083954801522372371357832158519650241434717544640703033853370223 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(5 : 107360422945411111468769462636316550020679044628833469665060522438484308124114 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(6 : 42020070001348706790142152499247364340931555193283231437254515282684880346805 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(6 : 73772019235967488633428832509440543511906009085791672945350647858833281147532 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(9 : 39862443989807251807276656820089717727772887583549899554895021886628471965623 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(9 : 75929645247508943616294328188598190125064676695525004827710141254889689528714 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(10 : 29483468331181912791030599117258770751379792607712291527986097186178047239105 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(10 : 86308620906134282632540385891429137101457771671362612854619065955340114255232 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
...
</code></pre>
<p>Now, these are not the points with private keys 1, 2, 3, 4, ...; they're just the lowest X coordinates which have a corresponding point on the curve. Their discrete logarithm is not computable.</p>

CC BY-SA 4.0
2023-03-07T05:05:19.043Z
thank you for your comment. But you get different result. If result was E[5] it possible substract E[5] from any point on E, And you will get result point With order lower then order of point from what you substract !!! But with yours points example order is not changes !!!! This understand ? Look to this url:.     https://crypto.stackexchange.com/questions/89362/is-there-any-way-to-mapping-point-between-2-elliptic-curves
Donald
CC BY-SA 4.0
2023-03-07T13:42:58.257Z
That has nothing to do with all of this. Orders don't get added or subtracted when you add/subtract points. The order is how many times you have to add a point to *itself* to get the point at infinity.
Pieter Wuille
CC BY-SA 4.0
2023-03-07T18:33:27.823Z
and how get point with order bigger or smaller then G , in secp256k1 ?
Donald
CC BY-SA 4.0
2023-03-07T18:37:43.733Z
You cannot. secp256k1 is a prime-ordered curve. Every point (except infinity, which has order 1) has the same order, equal to the number of points on the curve.
Pieter Wuille
CC BY-SA 4.0
2023-03-07T04:46:22.473Z
2023-03-07T04:46:22.473Z
Pieter Wuille
<p>My sagemath cannot compute the result of the following code for such a large number N. Can someone provide the result for the first 10 points ?</p>
<pre><code>n=115792089237316195423570985008687907852837564279074904382605163141518161494337

K =  GF(n)
E = EllipticCurve(K,[0,7])
print(E)
print(E.order())
print(E.abelian_group())

for i in (1..E.order()):
    print(E[i], E[i].order())
</code></pre>

<secp256k1>
What result of this sagemath script?
Donald
# What result of this sagemath script?

(Asked by: username_0 on 2023-03-07)

My sagemath cannot compute the result of the following code for such a large number N. Can someone provide the result for the first 10 points ?

```
n=115792089237316195423570985008687907852837564279074904382605163141518161494337

K =  GF(n)
E = EllipticCurve(K,[0,7])
print(E)
print(E.order())
print(E.abelian_group())

for i in (1..E.order()):
    print(E[i], E[i].order())

```

**Tags:** secp256k1


---

## 1 answers

### Answer by username_1 on 2023-03-07. Score: 1

Ok, running that code for you.

```
n=115792089237316195423570985008687907852837564279074904382605163141518161494337

K =  GF(n)
E = EllipticCurve(K,[0,7])
print(E)

```

> Elliptic Curve defined by y^2 = x^3 + 7 over Finite Field of size 115792089237316195423570985008687907852837564279074904382605163141518161494337

```
print(E.order())

```

> 115792089237316195423570985008687907853269984665640564039457584007908834671663

```
print(E.abelian_group())

```

> Additive abelian group isomorphic to Z/115792089237316195423570985008687907853269984665640564039457584007908834671663 embedded in Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 7 over Finite Field of size 115792089237316195423570985008687907852837564279074904382605163141518161494337

```
for i in (1..E.order()):
    print(E[i], E[i].order())

```

Now, that won't work. To evaluate `E[i]`, Sage would have to compute all 115792089237316195423570985008687907853269984665640564039457584007908834671663 points on the curve, put them in a list, sort them, and return the i'th element of it. The numbers are just completely infeasible to perform this with.

However, it's possible to achieve the same thing slightly differently: try X coordinates from low to high, and see if they have corresponding points on the curve, and print those. The output will be the same, but it'll run in reasonable time (as long as you don't actually want it for *all* points on the curve):

```
for X in K:
    if E.is_x_coord(X):
        for P in sorted([E.lift_x(X), -E.lift_x(X)]):
             print(P, P.order())

```

With as output:

```
(1 : 5647885500061325675748484062311156374277086380342947163834798608016077912256 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(1 : 110144203737254869747822500946376751478560477898731957218770364533502083582081 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(5 : 8431666291905083954801522372371357832158519650241434717544640703033853370223 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(5 : 107360422945411111468769462636316550020679044628833469665060522438484308124114 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(6 : 42020070001348706790142152499247364340931555193283231437254515282684880346805 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(6 : 73772019235967488633428832509440543511906009085791672945350647858833281147532 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(9 : 39862443989807251807276656820089717727772887583549899554895021886628471965623 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(9 : 75929645247508943616294328188598190125064676695525004827710141254889689528714 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(10 : 29483468331181912791030599117258770751379792607712291527986097186178047239105 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
(10 : 86308620906134282632540385891429137101457771671362612854619065955340114255232 : 1) 115792089237316195423570985008687907853269984665640564039457584007908834671663
...

```

Now, these are not the points with private keys 1, 2, 3, 4, ...; they're just the lowest X coordinates which have a corresponding point on the curve. Their discrete logarithm is not computable.

> **Comments:**
> **username_0**: thank you for your comment. But you get different result. If result was E[5] it possible substract E[5] from any point on E, And you will get result point With order lower then order of point from what you substract !!! But with yours points example order is not changes !!!! This understand ? Look to this url:.     https://crypto.stackexchange.com/questions/89362/is-there-any-way-to-mapping-point-between-2-elliptic-curves  
> **username_1**: That has nothing to do with all of this. Orders don't get added or subtracted when you add/subtract points. The order is how many times you have to add a point to *itself* to get the point at infinity.  
> **username_0**: and how get point with order bigger or smaller then G , in secp256k1 ?  
> **username_1**: You cannot. secp256k1 is a prime-ordered curve. Every point (except infinity, which has order 1) has the same order, equal to the number of points on the curve.  

---

