I'm trying to generate an RSA key pair using openssl with a custom bit-length. Using the openssl genrsa command, passing the bit-length at the end of the command would work. But as genrsa is show depricated in the man page(man openssl-genrsa), I've chosen the genpkey command instead. The man page shows several options for generating the key including the algorithm to use, but there isn't any option to specify the bit-length.
This is the command I used: openssl genpkey -algorithm rsa -out pkey.pem -outform PEM
I'm new to openssl and Public Key Encryption, so please forgive me if the question is too basic.