I wish to use elliptic curves for cryptographic operations like commitments etc. I see that most standard elliptic curves like $\operatorname{secp256k1, sect571r1}$ have a certain specific and fixed order of the corresponding bit-length.
However, I require groups of non-standard order like say $q = (2^k)n +1$ for a certain $k,n$ for $k =128, 300$ etc.
Is there a way I can generate/form an elliptic curve group of any given order? Of course, I require solving discrete-log to be hard in the group.