From security perspective, it would be better to leverage PKI to protect and retain private keys if possible. This seems to complicate this feature.
another approach is provide user an option (disable by default) to save the private key in system for download with some warning message for security compromise to do this. To protect these keys in system, a pin code could be used to encrypt/decrypt the private key. Once the key pair generated, provide user a destroy link to erase the private key from system, a download link for private key protected by the pin code. It would be easier to manager lots of keys with this feature in some cases.
From security perspective, it would be better to leverage PKI to protect and retain private keys if possible. This seems to complicate this feature.
another approach is provide user an option (disable by default) to save the private key in system for download with some warning message for security compromise to do this. To protect these keys in system, a pin code could be used to encrypt/decrypt the private key. Once the key pair generated, provide user a destroy link to erase the private key from system, a download link for private key protected by the pin code. It would be easier to manager lots of keys with this feature in some cases.