#creating rsa private key
1 | openssl genrsa -out rsa_private_key.pem 2048 |
#convert private key into PKCS#8 format
1 | openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out private_pkcs8.pem |
#get public key from private key (X509 format)
1 | openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem |