# How to find the generator of an elliptic curve? [duplicate]

This question already has an answer here:

If the elliptic curve has prime order of points, then all of its points are generator. Is this true? If so, how can I find the optimized generator(which generates more number of points) among them?

## marked as duplicate by Gilles, otus, e-sushiFeb 6 '17 at 17:12

• Yes, I think so @Gilles – Venkatesh Feb 6 '17 at 10:36
• If you agree that your question is a duplicate, please click the button “That solves my problem” to confirm. – Gilles Feb 6 '17 at 11:02

If the elliptic curve has prime order of points, then all of its points are generators.

Almost: The point at infinity is not a generator, but (if the number of points is prime) all finite points are. This is a consequence to Lagrange's theorem.

If so, how can I find the optimized generator (which generates more points) among them?

This does not make sense: Any generator of a group must generate all the points, otherwise it wouldn't be called a generator (by definition). Note also that generally, the choice of base point does not matter, thus one typically uses random points or points with "interesting" (e.g. small) coordinates.

• So this means if I am using a curve of prime order, any point in the curve can generate all the points of the curve. Am i right? – Venkatesh Feb 6 '17 at 6:16
• @Venkatesh Yes, except the point at infinity. – yyyyyyy Feb 6 '17 at 6:16
• But the NIST defined curves have something called cofactor(1,2,4) which is the ratio between number of points on the curve to the number of points that can be generated by the generator. This shows that the generator generates lesser number of points in the curve. What is the need of cofactor and how it relates to the generator? @yyyyyyy – Venkatesh Feb 6 '17 at 6:27
• @Venkatesh if cofactor $\neq1$ it means the curve has not prime order. Its order will in fact be cofactor times the prime order of the generator which NIST shows. – Ruggero Feb 6 '17 at 9:54