# Revision history [back]

The needed method to get one random point on the constructed elliptic curve is E.random_point().

First of all, in questions and answers, it is better to use a situation that can be reconstructed, if possible. This method E.random_point()is itself unpredictable, but the curve E will be at least fixed.

The following code

F.<a> = GF( 2^113 )
A, B = a+2017, a+2018
E = EllipticCurve( F, [ 1, A, 0, 0, B ] )
E.random_point()


produces (this time):

(a^112 + a^108 + a^105 + a^104 + a^102 + a^98 + a^96 + a^95 + a^94 + a^93 + a^91 + a^90 + a^89 + a^85 + a^83 + a^82 + a^81 + a^76 + a^74 + a^73 + a^69 + a^67 + a^66 + a^65 + a^62 + a^61 + a^60 + a^55 + a^54 + a^52 + a^51 + a^49 + a^48 + a^45 + a^39 + a^37 + a^33 + a^32 + a^31 + a^30 + a^28 + a^24 + a^23 + a^21 + a^19 + a^18 + a^15 + a^13 + a^10 + a^6 + a^5 + a^2 + a + 1 : a^112 + a^107 + a^105 + a^103 + a^101 + a^100 + a^98 + a^97 + a^95 + a^94 + a^93 + a^92 + a^90 + a^89 + a^88 + a^87 + a^86 + a^85 + a^82 + a^81 + a^80 + a^79 + a^74 + a^72 + a^71 + a^70 + a^69 + a^67 + a^66 + a^65 + a^61 + a^56 + a^55 + a^54 + a^52 + a^51 + a^50 + a^48 + a^47 + a^45 + a^44 + a^43 + a^42 + a^40 + a^39 + a^36 + a^35 + a^34 + a^33 + a^32 + a^29 + a^27 + a^25 + a^24 + a^19 + a^17 + a^16 + a^15 + a^13 + a^12 + a^7 + a^5 + a^3 + a : 1)


Note that computing all points (and then taking the first two) is not a good idea, since there are too many, and they must all be (computed and) stored, before the first two are shown. And also, these first two points are not really random, for instance:

sage: EllipticCurve( GF(11), [4,5] ).points()[:2]
[(0 : 1 : 0), (0 : 4 : 1)]


and the first point is $O$.