显示标签为“openssl”的博文。显示所有博文
显示标签为“openssl”的博文。显示所有博文

2016年4月27日星期三

Use OpenSSL to generate RSA private key and public key

Generate RSA private key
1、openssl genrsa -out rsa_private_key.pem 1024

Convert RSA private key into PKCS8 format
2、openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -out PEM -nocrypt

Generate RSA public key
3、openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

Now the RSA key pair is available