# 良好隐私

**良好隐私**（Pretty Good Privacy，PGP）是[菲尔·齐默尔曼](https://www.edgepedia.org/zh/phil-zimmermann)于1991年创建的一款加密程序，用于保护电子邮件的隐私，同时也是它所引入的公钥加密方法的名称。它是最早广泛流行的公钥密码学实现之一，其消息格式成为IETF维护的[OpenPGP](https://www.edgepedia.org/zh/openpgp)标准的基础。<sup>[1](https://ssd.eff.org/ps/glossary/pgp)</sup><sup> • </sup><sup>[2](https://www.openpgp.org/about/history/)</sup>

| 关键事实 | 详情 |
|---|---|
| 创建 | 1991年由科罗拉多州博尔德市的程序员菲尔·齐默尔曼创建，作为保护电子邮件隐私的程序<sup>[3](https://tile.loc.gov/storage-services/master/gdc/gdcebookspublic/20/20/71/84/91/2020718491/2020718491.pdf)</sup> |
| 法律历史 | 因出口加密软件而成为美国为期三年的刑事调查目标，1996年1月结案，未予起诉<sup>[4](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)</sup> |
| 标准化 | OpenPGP：RFC 2440（1998年）、RFC 4880（2007年11月）、RFC 9580（2024年7月）<sup>[5](https://www.rfc-editor.org/rfc/rfc4880.html)</sup><sup> • </sup><sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup> |
| 加密模型 | 每条消息使用一个新的随机会话密钥加密；会话密钥则用每个收件人的公钥加密<sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup> |
| 密钥管理 | 信任网，没有中央签发机构；NIST称此模式不适合中型到大型部署<sup>[7](https://csrc.nist.gov/glossary/term/open_pretty_good_privacy)</sup> |
| 当前算法 | RFC 9580要求X25519、Ed25519、AES-OCB和SHA2-256，并推荐X448、Ed448、AES-256、SHA2-384和SHA2-512<sup>[2](https://www.openpgp.org/about/history/)</sup> |
| 自由实现 | GnuPG（GPG），其密钥和消息通常可与PGP的互换使用<sup>[1](https://ssd.eff.org/ps/glossary/pgp)</sup> |

## 起源与刑事调查

齐默尔曼编写PGP是为了帮助活动人士及其他人群保护他们的通信，并以免费软件的形式发布。<sup>[1](https://ssd.eff.org/ps/glossary/pgp)</sup><sup> • </sup><sup>[2](https://www.openpgp.org/about/history/)</sup> 1991年6月，有人在计算机公告板上发布了该软件，它随之在海外广泛流传。<sup>[4](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)</sup> 根据国务院对《[武器出口管制法](https://www.edgepedia.org/zh/arms-export-control-act)》的解释，通过互联网提供强加密即构成非法出口，因为超过特定技术阈值的加密技术被视为军用品。<sup>[3](https://tile.loc.gov/storage-services/master/gdc/gdcebookspublic/20/20/71/84/91/2020718491/2020718491.pdf)</sup><sup> • </sup><sup>[4](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)</sup>

加利福尼亚州圣何塞的一名联邦检察官启动了大陪审团调查，听取证词长达一年多。<sup>[3](https://tile.loc.gov/storage-services/master/gdc/gdcebookspublic/20/20/71/84/91/2020718491/2020718491.pdf)</sup> 齐默尔曼及其律师坚称他本人从未出口PGP；他将软件交给朋友是作为一种政治表态，希望人们拥有它并传播它。<sup>[4](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)</sup> 此案还涉及第二重法律风险：该程序侵犯了Rivest-Shamir-Adleman（RSA）专利，并与[罗恩·里维斯特](https://www.edgepedia.org/zh/ron-rivest)编写的Mailsafe程序相似。<sup>[3](https://tile.loc.gov/storage-services/master/gdc/gdcebookspublic/20/20/71/84/91/2020718491/2020718491.pdf)</sup> 政府于1996年1月结束了为期三年的调查，未予起诉；美国助理检察官拒绝解释原因，齐默尔曼则表示这一决定意味着他可以继续过自己的生活了。<sup>[4](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)</sup>

## PGP加密的工作原理

PGP将对称加密与公钥加密相结合。对于每条消息，发送方实现会生成一个新的随机会话密钥，仅使用一次。消息本身可选地经过压缩，然后用由会话密钥派生出的密钥加密。会话密钥用每个收件人的公钥加密，这些加密的会话密钥包置于加密消息之前。收件人用自己的私钥解密会话密钥，然后解密消息。<sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup>

签名操作独立进行：发送方对消息进行哈希，并使用发送方的私钥从哈希生成签名，签名附加在消息上或与消息一同传输。签名和保密服务均可应用于同一条消息，先生成签名，然后对已签名的消息进行加密。<sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup>

## 从PGP到OpenPGP

PGP的消息格式在IETF以OpenPGP之名进行了标准化，即PGP加密协议的开放标准版本。规范谱系从RFC 1991（PGP消息交换格式，1996年）经RFC 2440（1998年）延续到2007年11月发布的RFC 4880《OpenPGP消息格式》。<sup>[5](https://www.rfc-editor.org/rfc/rfc4880.html)</sup><sup> • </sup><sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup><sup> • </sup><sup>[2](https://www.openpgp.org/about/history/)</sup>

2024年7月，IETF发布了RFC 9580，废止了RFC 4880、RFC 5581（Camellia密码）和RFC 6637（椭圆曲线密码学），并规定了新的OpenPGP第6版格式。其必需算法套件为X25519、Ed25519、AES-OCB和SHA2-256，推荐使用X448、Ed448、AES-256、SHA2-384和SHA2-512。该修订还弃用了过时机制，包括旧规范中RSA算法所使用的PKCS #1 v1.5填充。<sup>[6](https://www.rfc-editor.org/info/rfc9580/)</sup><sup> • </sup><sup>[2](https://www.openpgp.org/about/history/)</sup><sup> • </sup><sup>[8](https://www.rfc-editor.org/rfc/rfc9580.pdf)</sup> 许多实现已支持第6版，包括Bouncy Castle Java、GopenPGP、OpenPGP.js、PGPainless、RNP、rPGP和Sequoia PGP。<sup>[9](https://openpgp.dev/book/openpgp.html)</sup>

## 密钥管理：信任网

OpenPGP的传统密钥管理模型是信任网，其中用户身份绑定的可信度由其他用户通过数字签名来担保，没有中央密钥签发或审批机构。<sup>[7](https://csrc.nist.gov/glossary/term/open_pretty_good_privacy)</sup><sup> • </sup><sup>[10](https://arxiv.org/abs/1508.04868)</sup> NIST的术语条目指出，这种依赖用户进行管理和控制的方式使该模型不适合中型到大型部署。<sup>[7](https://csrc.nist.gov/glossary/term/open_pretty_good_privacy)</sup> 这与S/MIME形成对比，后者依赖证书层次结构，在企业中具有更好的采用前景，而PGP因其隐私特性受到个人用户青睐，尽管它更难使用。<sup>[11](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5358848)</sup>

## 实现与生态系统

PGP继续作为商业软件产品存在，而GnuPG（GPG）是同一底层标准的自由实现；由于两者使用相同的可互换方法，人们即使在使用GnuPG时也会说“PGP密钥”或“PGP消息”。<sup>[1](https://ssd.eff.org/ps/glossary/pgp)</sup> 许多电子邮件客户端提供OpenPGP支持：[Mozilla Thunderbird](https://www.edgepedia.org/zh/mozilla-thunderbird)自第78版起直接支持OpenPGP，许多网络邮件提供商通过Mailvelope浏览器扩展支持OpenPGP加密。<sup>[12](https://www.openpgp.org/software/thunderbird/)</sup><sup> • </sup><sup>[13](https://www.openpgp.org/software/)</sup> Proton Mail等提供商将其加密建立在PGP与TLS相结合的基础之上。<sup>[14](https://www.techradar.com/best/best-secure-email-providers)</sup>

生态系统于2022年9月分裂，当时GnuPG宣布将实现后来成为RFC 9580的早期草案，而非OpenPGP工作组其余成员所同意的版本。为限制损害，RFC 9580将若干版本号从5增至6，并更改了代码点以避免定义冲突。GnuPG实现了RFC 4880、RFC 5581和RFC 6637，但其余部分并非实现RFC 9580，而是生成其他软件不支持的新格式；大多数Linux发行版所附的GnuPG带有FreePG补丁集，默认禁用这些非OpenPGP格式。<sup>[15](https://www.openpgp.org/about/gnupg/)</sup>

## 安全与可用性记录

可用性问题限制了采用。一项针对PGP、S/MIME和pEp的调查与用户研究发现，超过60%的电子邮件用户不知道此类加密技术的存在，而用户最主要的困扰是公钥管理及在邮件软件中设置加密。<sup>[16](https://arxiv.org/abs/2110.06019)</sup> 一篇系统分析论文指出，PGP存在广泛的可用性和安全问题，限制了其采用，并指出该协议不对每条消息进行认证，且在加密前进行压缩，而在IETF上试图在添加现代密码原语之外更新OpenPGP标准的努力均已失败。<sup>[17](https://arxiv.org/abs/2008.06913)</sup>

实际攻击针对的是实现而非密码原语。2018年的Efail研究展示了利用外泄信道攻破S/MIME和OpenPGP电子邮件加密的攻击，<sup>[18](https://ris.uni-paderborn.de/publication/15905)</sup> 而2019年USENIX Security的一项研究展示了对许多支持OpenPGP和S/MIME的客户端的实际电子邮件签名伪造攻击，结论是签名检查及向用户正确传达结果出奇地困难。<sup>[19](https://www.usenix.org/system/files/sec19-muller.pdf)</sup> 更早的工作已表明，PGP和OpenPGP等标准中所编纂的朴素“先签名后加密”是有缺陷的，因为内层密码层不依赖于外层，使得篡改可能不被检测到。<sup>[20](https://www.usenix.org/conference/2001-usenix-annual-technical-conference/defective-sign-encrypt-smime-pkcs7-moss-pem-pgp)</sup>

## 后量子扩展

将后量子密码学加入OpenPGP的工作正在进行，以扩展RFC 9580。该扩展定义了基于ML-KEM（原[CRYSTALS-Kyber](https://www.edgepedia.org/zh/crystals-kyber)）与椭圆曲线密码学相结合的组合公钥加密、基于ML-DSA（原CRYSTALS-Dilithium）与EdDSA相结合的组合签名，以及作为独立签名方案的SLH-DSA（原SPHINCS+），为抵御密码学相关量子计算机的长期安全签名和密文提供了基础。<sup>[21](https://www.ietf.org/archive/id/draft-ietf-openpgp-pqc-17.html)</sup> 这项工作已作为RFC 9980发布，规定了用于v4或v6密钥的组合ML-KEM-768 + X25519（算法ID 35）和用于v6密钥的组合ML-KEM-1024 + X448（算法ID 36）。<sup>[22](https://www.rfc-editor.org/info/rfc9980/)</sup> 该项目由德国BSI资助，目标包括为Thunderbird和GnuPG添加后量子支持。<sup>[9](https://openpgp.dev/book/openpgp.html)</sup>

## References

1. [PGP, Surveillance Self-Defense, Electronic Frontier Foundation](https://ssd.eff.org/ps/glossary/pgp)
2. [History, OpenPGP](https://www.openpgp.org/about/history/)
3. [Privacy on the Line, Updated and Expanded Edition (Diffie & Landau), Library of Congress](https://tile.loc.gov/storage-services/master/gdc/gdcebookspublic/20/20/71/84/91/2020718491/2020718491.pdf)
4. [U.S. Closes Investigation in Computer Privacy Case, The Washington Post, January 11, 1996](https://www.washingtonpost.com/archive/politics/1996/01/12/us-closes-investigation-in-computer-privacy-case/e2ad8190-74a1-4b50-8a1f-9f22d99480ae/)
5. [RFC 4880: OpenPGP Message Format, RFC Editor, November 2007](https://www.rfc-editor.org/rfc/rfc4880.html)
6. [RFC 9580: OpenPGP, RFC Editor, July 2024](https://www.rfc-editor.org/info/rfc9580/)
7. [Open Pretty Good Privacy (OpenPGP), NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/open_pretty_good_privacy)
8. [RFC 9580: OpenPGP (PDF), RFC Editor](https://www.rfc-editor.org/rfc/rfc9580.pdf)
9. [OpenPGP for application developers, Notes on OpenPGP](https://openpgp.dev/book/openpgp.html)
10. [From Pretty Good To Great: Enhancing PGP using Bitcoin and the Blockchain, arXiv](https://arxiv.org/abs/1508.04868)
11. [A Comparative Evaluation of Secure Email Protocols: PGP vs. S/MIME, SSRN](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5358848)
12. [Thunderbird, OpenPGP](https://www.openpgp.org/software/thunderbird/)
13. [Email Encryption, OpenPGP](https://www.openpgp.org/software/)
14. [Best secure email provider of 2025, TechRadar](https://www.techradar.com/best/best-secure-email-providers)
15. [GnuPG and OpenPGP, OpenPGP](https://www.openpgp.org/about/gnupg/)
16. [Secure Email: A Usability Study, arXiv](https://arxiv.org/abs/2110.06019)
17. [SoK: Why Johnny Can't Fix PGP Standardization, arXiv](https://arxiv.org/abs/2008.06913)
18. [Efail: Breaking S/MIME and OpenPGP Email Encryption using Exfiltration Channels, USENIX Security 18](https://ris.uni-paderborn.de/publication/15905)
19. [Email Security Fuzzing (Müller et al.), USENIX Security 19](https://www.usenix.org/system/files/sec19-muller.pdf)
20. [Defective Sign & Encrypt in S/MIME, PKCS#7, MOSS, PEM, PGP, and XML, USENIX ATC 2001](https://www.usenix.org/conference/2001-usenix-annual-technical-conference/defective-sign-encrypt-smime-pkcs7-moss-pem-pgp)
21. [Post-Quantum Cryptography in OpenPGP, Internet-Draft draft-ietf-openpgp-pqc-17](https://www.ietf.org/archive/id/draft-ietf-openpgp-pqc-17.html)
22. [RFC 9980: Post-Quantum Cryptography in OpenPGP, RFC Editor](https://www.rfc-editor.org/info/rfc9980/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Security governance and internet policy › Cryptographic protocols › Secure messaging and email protocols

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/pretty-good-privacy

English original: https://www.edgepedia.org/pretty-good-privacy
