RSA私钥生成(==> PKCS#1)

openssl genrsa -out private_pkcs1.pem 1024

RSA公钥提取

openssl rsa -in private_pkcs1.pem -out public_pkcs8.pem -pubout

openssl rsa -in private_pkcs1.pem -out public_pkcs1.pem -pubout -RSAPublicKey_out

openssl rsa -in private_pkcs8.pem -out public_pkcs8.pem -pubout

openssl rsa -in private_pkcs8.pem -out public_pkcs1.pem -pubout -RSAPublicKey_out

RSA公钥格式转换(PKCS#8 ==> PKCS#1)

openssl rsa -in public_pkcs8.pem -out public_pkcs1.pem -pubin -RSAPublicKey_out

RSA私钥格式转换(PKCS#1 ==> PKCS#8)

openssl pkcs8 -in private_pkcs1.pem -out private_pkcs8.pem -topk8 -nocrypt

RSA私钥格式转换(PKCS#8 ==> PKCS#1)

openssl rsa -in private_pkcs8.pem -out private_pkcs1.pem

RSA密钥格式解析