For context, I was watching this bit of the video: which goes over this source code. The piece is about elliptic curve cryptography and how it works. I want to use some of this knowledge to make my own curve as an exercise. I did some self-study on this stuff and understand how some it works, like how point doubling and point addition operations and that this is all done over some prime field $\mathbb{F}_p$, but some things escape me.
Now, few seconds after the mark in the video, he mentions that changing the generator point $(x_g, y_g)$ on the elliptic curve can easily break the digital signature algorithm. But suppose I want to use a different generator point. How would I go about finding the order of the field $N=\#E(\mathbb{F}_p)$ for some arbitrary generator point $(x_g, y_g)$? What about some arbitrary prime field p? I don't know how to find $G$ or $N$.
My goal here is to do something a little insane. Like... make a 1024-bit elliptic curve I could use to sign things. Again, as an exercise, but I would like to actually code this stuff.