Perhaps let's move this function and `generate_rsa_private_key` using it to a seperate PR?