生成私钥 *.pem文件放在当前文件夹下
openssl genrsa -out rsa_private_key.pem 1024
![_GS7UPKMJ25D9XF_O]J)RLS.png](http://upload-images.jianshu.io/upload_images/2070388-406f4fa3a9271b2a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/640)
对私钥进行PKCS#8编码
openssl pkcs8 -topk8 -in rsa_private_key.pem -out pkcs8_rsa_private_key.pem -nocrypt
根据生成的私钥生成公钥
openssl rsa -in rsa_private_key.pem -out rsa_public_key.pem -pubout