Generate rsa private key and public key under linux

Generate rsa private key and public key under linux

yum list openssl; install

Enter openssl to enter the interactive interface

genrsa -out rsa_private_key.pem 1024 This command generates a 1024-bit private key, and you can see rsa_private_key.pem in the current path

Convert rsa private key to pkcs8 format

Enter pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt to generate the resulting private key in PKCS8 format

Generate RSA public key

rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem successfully generated the public key

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326668279&siteId=291194637