openssl命令行

openssl产生密钥对

生成私钥

openssl genrsa -out privateKey.pem 2048

生成公钥

 openssl rsa -in privateKey.pem -pubout -out publicKey.pem

openssl解密文件

openssl rsautl -decrypt -oaep -inkey xx.pem -in cyphertext.enc -out plaintex.txt