本章学习的内容
- PGP简介
- 生成密钥对
- 加密和解密
- 生成和验证数字签名
- 生成数字签名并加密以及解密并验证数字签名
- 信任网
PGP简介
PGP的功能
- 对称密码
- 公钥密码
- 数字签名
- 单项散列函数
- 证书
- 压缩
- 文本数据
- 大文件拆分与拼合
- 钥匙串管理
生成密钥对
加密与解密
加密
公钥密码加密会话密钥,对称密码加密消息。
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-194.png)
解密
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-195.png)
简单图示如下:
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-196.png)
生成和验证数字签名
生成数字签名
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-197.png)
验证数字签名
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-198.png)
简单图示如下:
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-199.png)
生成数字签名并加密所以解密并验证数字签名
生成数字签名并加密
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-200.png)
解密并验证数字签名
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-201.png)
简单过程图示如下:
![](http://www.resetoter.cn/wp-content/uploads/2020/10/image-202.png)
信任网
PGP没有使用认证机构,而是采用了一种叫信任网的方法。在这种方法中PGP用户会互相对对方的公钥进行数字签名。