To get the old format you have to add '-m PEM' to the keygen command. That should be a simple patch to the module code. I have found that the openssl_privatekey module generates the PEM format, and has similar options to openssh_keypair. If you need the corresponding public key, ...