0:前言:
如果你还没有注册支付宝开放平台,请先注册:
URL:https://open.alipay.com/platform/home.htm
1:RSA钥匙用途:
公钥加密/私钥解密
私钥签名/公钥验签
2,linux环境下创建RSA两把钥匙的过程:
1在项目目录下执行命令openssl
2先生成私钥genrsa -out app_private_key.pem 2048
3导出公钥:rsa -in app_private_key.pem -pubout -out app_public_key.pem
4退出:exit
5查看密钥:ls
centos演示:
[root@web01 ~]#openssl
OpenSSL> genrsa -out app_private_key.pem 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
...+++++
.......+++++
e is 65537 (0x010001)
OpenSSL> rsa -in app_private_key.pem -pubout -out app_public_key.pem
writing RSA key
OpenSSL> exit
[root@web01 ~]#ls