# 密码学史

密码学是使信息除预定接收者外无法被读懂的技艺，其历史从古埃及的篡改铭文一直延续到保护现代数字通信的数学公钥系统与抗量子标准。这一领域反复围绕一个动态展开：设计出一种密码，攻击者找到统计上或机械上的弱点，然后更强的方法将其取代。

| 关键事实 | 详情 |
|---|---|
| 已知最早的例子 | 埃及赫努姆霍特普二世墓中篡改的象形文字（约公元前1900年），以及一块记录以语音方式加密的陶釉配方的美索不达米亚泥板（约公元前1500年）<sup>[1](https://www.une.edu.au/about-une/faculty-of-humanities-arts-social-sciences-and-education/hass/museum-of-antiquities/codebreaker-challenge/spartan-scytale)</sup> |
| 科学密码分析的诞生 | 金迪于约公元850年在巴格达撰写的破译密码信息的论文，引入了频率分析<sup>[2](https://www.historyofinformation.com/detail.php?entryid=3605)</sup> |
| 恩尼格玛时间线 | 原型机于1918年4月15日提供给德国海军；海军于1926年以“无线电密钥C”之名采用，陆军于1928年7月15日采用<sup>[3](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)</sup> |
| 首次破解恩尼格玛 | 波兰密码局于1932年10月开始针对德国恩尼格玛信息开展工作，由马里安·雷耶夫斯基进行统计分析<sup>[4](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/1621548/marian-rejewski/)</sup> |
| 数学理论 | 克劳德·香农的《保密系统的通信理论》，《贝尔系统技术杂志》，1949年10月，为密码学提供了第一个通用数学框架<sup>[5](https://onlinelibrary.wiley.com/doi/10.1002/j.1538-7305.1949.tb00928.x)</sup> |
| 公钥时代 | 20世纪70年代初由埃利斯、科克斯和威廉姆森在英国政府通信总部秘密构想；1976年由迪菲和赫尔曼公开出版<sup>[6](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/3006218/clifford-cocks-james-ellis-and-malcolm-williamson/)</sup><sup> • </sup><sup>[7](https://dblp.org/rec/journals/tit/DiffieH76.html)</sup> |
| 现代标准 | DES（FIPS 46，1977年11月23日）、AES（FIPS 197，2001年12月4日），以及首批后量子标准（FIPS 203、204和205，2024年8月）<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup><sup> • </sup><sup>[9](https://csrc.nist.gov/nist-cyber-history?area=6081a7b8-6351-48a3-a7bf-33608ef5dd84&type=Standards)</sup> |

## 古代

秘密信息和加密书写的历史十分古老。带有篡改象形文字的埃及石碑铭文出现在约公元前1900年的赫努姆霍特普二世墓中，而约公元前1500年的一块美索不达米亚泥板记录了以加密形式语音书写的陶釉配方。希腊文献既描述了隐藏，也描述了变换：历史学家[希罗多德](https://www.edgepedia.org/zh/herodotus)讲述了藏在写字板蜡层下的信息以及刺在奴隶剃光头上的信息<sup>[1](https://www.une.edu.au/about-une/faculty-of-humanities-arts-social-sciences-and-education/hass/museum-of-antiquities/codebreaker-challenge/spartan-scytale)</sup>。

**斯巴达密码棒**是换位装置的经典例子。据普鲁塔克记载，当斯巴达派出海军将领或将军时，会制作两根长度和粗细完全相同的圆木棒，一根留在家中，一根交给指挥官。一条窄羊皮纸无缝隙地缠绕在木棒上，信息沿其书写，然后将解下的纸条送给指挥官，后者只有将其缠绕在匹配的木棒上才能阅读<sup>[1](https://www.une.edu.au/about-une/faculty-of-humanities-arts-social-sciences-and-education/hass/museum-of-antiquities/codebreaker-challenge/spartan-scytale)</sup>。公元前2世纪，波利比奥斯将[希腊字母](https://www.edgepedia.org/zh/greek-alphabet)排列在5×5的网格中，用一对行号和列号表示每个字母，这是一种早期的坐标替换法<sup>[1](https://www.une.edu.au/about-une/faculty-of-humanities-arts-social-sciences-and-education/hass/museum-of-antiquities/codebreaker-challenge/spartan-scytale)</sup>。

## 阿拉伯人的突破：频率分析

约公元850年，在巴格达，博学家金迪（Abū Yūsuf Yaʻqūb ibn Isḥāq al-Kindī，约801—873）撰写了《破译密码信息手稿》（*Risālah fī Istikhrāj al-Muʿammā*），这是已知最早的密码分析文本，也是已知最早的任何类型的统计推断应用<sup>[2](https://www.historyofinformation.com/detail.php?entryid=3605)</sup><sup> • </sup><sup>[10](https://www.tandfonline.com/doi/abs/10.1198/tas.2011.10191)</sup>。他的洞见在于，在任何语言中，字母都以特征性的、稳定的频率出现。单表替换密码隐藏了哪个字母是哪个，但没有隐藏每个字母出现的频率；统计密文符号并将最常见的符号与语言已知的频率分布相匹配，就能恢复密钥，无论该密码名义上有多少密钥<sup>[10](https://www.tandfonline.com/doi/abs/10.1198/tas.2011.10191)</sup>。该手稿本身失传了大约一千年，后在伊斯坦布尔的苏莱曼尼耶奥斯曼档案馆中被重新发现，并于1987年出版<sup>[10](https://www.tandfonline.com/doi/abs/10.1198/tas.2011.10191)</sup>。

## 机器密码学与恩尼格玛时代

二十世纪，手工密码被转子机取代。阿图尔·舍尔比乌斯于1918年4月15日向[德国海军](https://www.edgepedia.org/zh/german-navy)提供了一台恩尼格玛原型机；该机器于1919年获得专利，最初在德国作为保护商业秘密的手段销售，后来国防军所有军种都采用了它。德国海军于1926年2月9日以“无线电密钥C”之名引入，陆军于1928年7月15日跟进<sup>[3](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)</sup><sup> • </sup><sup>[11](https://www.nsa.gov/portals/75/documents/news-features/declassified-documents/cryptologs/cryptolog_114.pdf)</sup>。

**波兰人的突破**来得最早。马里安·雷耶夫斯基被波兰国防部选中加入其密码局，于1932年10月开始针对恩尼格玛开展工作，在业余时间独自工作，运用非常规的统计分析来揭示该机器的接线和技术。他和两位同事设计出一种恢复每日设置的方法，他们的工作产生了*炸弹机*（bomba），一种用于破解恩尼格玛设置的机器<sup>[4](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/1621548/marian-rejewski/)</sup>。当德国人于1938年在原有三个转子基础上增加两个转子时，炸弹机将需要六十台相互连接的恩尼格玛而非六台，超出了波兰系统的处理能力<sup>[12](https://www.nsa.gov/Portals/70/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf)</sup>。1939年7月25日和26日，随着德国入侵迫在眉睫，波兰人向法国和英国代表揭示了他们的密码分析工作，后者惊讶地不仅看到了恩尼格玛的复制品，还看到了一台能够破解设置的机器<sup>[12](https://www.nsa.gov/Portals/70/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf)</sup>。

**布莱切利园**将工作向前推进。英国政府密码学校（GC&CS），即政府通信总部的前身，于1938年迁至伦敦以北约60英里的[布莱切利园](https://www.edgepedia.org/zh/bletchley-park)庄园<sup>[13](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/Article-View/Article/2740696/the-international-agreements/)</sup>。数学家[艾伦·图灵](https://www.edgepedia.org/zh/alan-turing)和戈登·韦尔奇曼在敌对行动爆发时加入GC&CS，于1939年9月初到布莱切利园报到，在那里听取了关于波兰工作的简报<sup>[12](https://www.nsa.gov/Portals/70/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf)</sup>。GC&CS于1940年1月首次读取德国恩尼格玛信息，并在战争剩余时间里以不断增加的数量持续进行<sup>[14](https://bletchleypark.org.uk/wp-content/uploads/2023/10/Bletchley-Park-and-AI.pdf)</sup>。图灵意识到解决方案不在于复制六十台恩尼格玛：他没有设计一台在指示符中搜索匹配的机器——德国人可以随时更改指示符——而是设计了一台从假定明文出发的机器，逐一检验可能的设置，且不依赖指示符<sup>[12](https://www.nsa.gov/Portals/70/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf)</sup>。图灵还承担了尚未有人解决的海军恩尼格玛问题的责任，并成为海军密码分析部门8号小屋的业务主管<sup>[15](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/1621551/alan-turing/)</sup>。

该行动的规模从1939年的几百人增长到1944年数千人轮班工作的情报工厂<sup>[14](https://bletchleypark.org.uk/wp-content/uploads/2023/10/Bletchley-Park-and-AI.pdf)</sup>。针对德国洛伦茨电传打字机密码，布莱切利园部署了十台巨像机，每台重约一吨，由多利斯山的[邮政总局](https://www.edgepedia.org/zh/general-post-office)研究实验室建造；巨像机被视为世界上第一台大规模电子数字计算机<sup>[14](https://bletchleypark.org.uk/wp-content/uploads/2023/10/Bletchley-Park-and-AI.pdf)</sup>。由此产生的解密情报被划入“超级机密”（ULTRA）这一保密类别，是盟军利用德国高级密码的最高级别情报产品<sup>[11](https://www.nsa.gov/portals/75/documents/news-features/declassified-documents/cryptologs/cryptolog_114.pdf)</sup>。整个故事在战后保密了近30年，直到1974年才首次公开<sup>[14](https://bletchleypark.org.uk/wp-content/uploads/2023/10/Bletchley-Park-and-AI.pdf)</sup>。

美国密码学平行发展。赫伯特·O·亚德利的密码局是美国历史上第一个和平时期的国家级情报机构，从1919年运作至1929年10月31日关闭<sup>[3](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)</sup><sup> • </sup><sup>[16](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/Article-View/Article/2740622/the-black-chamber/)</sup>。威廉·弗里德曼从1930年起建立了陆军的信号情报局，雇用了弗兰克·罗利特、亚伯拉罕·辛科夫和[所罗门·库尔贝克](https://www.edgepedia.org/zh/solomon-kullback)<sup>[3](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)</sup>。1938年6月日本外务省引入紫密（PURPLE）密码机后，美国密码分析人员共同领导了成功的紫密破解，为盟国提供了对日本和第三帝国的第一手洞察<sup>[3](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)</sup><sup> • </sup><sup>[17](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/3329044/robert-orestes-ferner/)</sup>。1941年1月，包括辛科夫在内的美国代表团访问了布莱切利园，这是两国之间首次共享密码情报，开启了后来成为世界上最重要的信号情报联络关系<sup>[18](https://www.nsa.gov/Press-Room/News-Highlights/Article/Article/1624054/75th-anniversary-of-a-key-us-visit-to-bletchley-park/)</sup><sup> • </sup><sup>[19](https://www.nsa.gov/Press-Room/Digital-Media-Center/Biographies/Biography-View-Page/Article/1623039/dr-abraham-sinkov/)</sup>。

## 香农与数学转向

1949年10月，克劳德·E·香农在《贝尔系统技术杂志》（第28卷，第656—715页）上发表了《保密系统的通信理论》，发展了一套通用的保密系统数学理论。该材料最初出现在一份日期为1945年9月1日的机密报告《密码学的数学理论》中，基于战时机密工作<sup>[5](https://onlinelibrary.wiley.com/doi/10.1002/j.1538-7305.1949.tb00928.x)</sup>。香农表明，普通语言的冗余性正是大多数密码可被破解的原因，并引入了唯一解距离——唯一解所需的截获文本量，约为H(K)/D，其中H(K)衡量密钥空间的大小，D衡量语言的冗余度；对于英语上的简单替换，这大约是30个字母<sup>[20](https://eecs.umich.edu/courses/eecs589/papers/shannon1949.pdf)</sup>。他的框架使安全性成为一个可以测量和证明而非假定的量。

## 公钥密码学与开放标准

直到20世纪70年代，密码学主要是军事和情报机构的事务。这种情况发生了两次改变，一次是秘密的，一次是公开的。在英国政府通信总部，詹姆斯·埃利斯早在1970年就提出了“非秘密加密”——现称[公钥密码学](https://www.edgepedia.org/zh/public-key-cryptography)——的可能性；1973年，克利福德·科克斯设计了一种基于整数分解困难性的公钥系统，1974年马尔科姆·威廉姆森修订了该系统，科克斯为其使用设计了协议。GCHQ直到1997年才公开这三人先于外部研究人员提出这一构想的事实<sup>[6](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/3006218/clifford-cocks-james-ellis-and-malcolm-williamson/)</sup>。

在公开领域，[惠特菲尔德·迪菲](https://www.edgepedia.org/zh/whitfield-diffie)和马丁·E·赫尔曼于1976年发表了《密码学的新方向》，引入了公钥密码系统，其中加密和解密由不同的密钥控制，因此从公钥计算私钥在计算上是不可行的<sup>[7](https://dblp.org/rec/journals/tit/DiffieH76.html)</sup><sup> • </sup><sup>[21](https://cr.yp.to/bib/1976/diffie.pdf)</sup>。RSA算法于1977年由麻省理工学院教授罗纳德·里维斯特、阿迪·沙米尔和伦纳德·阿德尔曼提出<sup>[22](https://www.giac.org/paper/gsec/502/rsa-overview-analysis-implications-future/101199)</sup>。公钥密码学随后使得无需受保护信道的密钥建立和数字签名成为可能，随着多对多安全通信需求的增长，互联网工程任务组将其部署到互联网协议中<sup>[23](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup>。

**公共标准**改变了该领域的影响范围。20世纪70年代初，美国国家标准局（NBS，现为NIST）启动了针对非机密联邦和商业数据的对称算法标准的开发，这是第一个产生公开可用密码标准的联邦项目。IBM于1974年8月提交了候选算法，NBS于1977年11月23日发布了[数据加密标准](https://www.edgepedia.org/zh/data-encryption-standard)FIPS 46<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。DES是一种由IBM开发的64位分组密码，密钥长度为56位，是美国政府第一个公开技术规范的密码算法，并成为美国商业密码行业事实上的对称标准<sup>[23](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup><sup> • </sup><sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。其采用引起了争议：批评者认为56位密钥对于密钥穷举攻击来说太短，一些人怀疑NSA削弱了该算法，但DES保护联邦数据数十年，直到2005年仍用于遗留应用，并将密码学从政府控制下带入私营部门<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。

到20世纪90年代中期，计算能力的提高和差分密码分析、线性密码分析等更新的攻击方法使DES的替换成为必要。1997年，NIST发起了首次全球公开竞赛，征集一种128位分组密码，密钥长度为128、192和256位。2000年10月2日，NIST选择了由琼·戴门和文森特·赖门开发的Rijndael，并在2001年12月4日发布的FIPS 197中规定了[高级加密标准](https://www.edgepedia.org/zh/advanced-encryption-standard)<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。在其最初的20年中，NIST验证了超过6，000个AES实现，相比之下30年间DES的验证不到500个，而AES现在保护着Wi-Fi（IEEE 802.11）、TLS、IPsec以及无数设备<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。

## 后量子密码学

当前的转型由量子计算驱动。大规模量子计算机将破解许多正在使用的公钥密码系统，因为今天的RSA和ECDSA等方案依赖于整数分解或离散对数问题的困难性<sup>[23](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup>。NIST于2016年启动了后量子标准化进程；2017年11月提交了82个候选算法，69个被接受为第一轮候选，截至2022年3月第三轮仍有15个在评估中<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。2024年8月，NIST发布了首批后量子标准FIPS 203、204和205，规定了一种密钥封装机制和两种旨在抵御量子攻击的数字签名方案，随后宣布汉明准循环（HQC）作为第四个标准化算法<sup>[9](https://csrc.nist.gov/nist-cyber-history?area=6081a7b8-6351-48a3-a7bf-33608ef5dd84&type=Standards)</sup>。由于部署公钥基础设施历来需要近二十年，迁移规划早在任何足以威胁密码安全的量子计算机出现之前就已开始<sup>[8](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>。

## References

1. [Ancient codebreaking: Spartan Scytalae, Museum of Antiquities, University of New England](https://www.une.edu.au/about-une/faculty-of-humanities-arts-social-sciences-and-education/hass/museum-of-antiquities/codebreaker-challenge/spartan-scytale)
2. [Al-Kindi Writes the First Treatise on Cryptanalysis, History of Information](https://www.historyofinformation.com/detail.php?entryid=3605)
3. [NSA Pre-1952 Historical Timeline](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/)
4. [Marian Rejewski, NSA Historical Figures](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/1621548/marian-rejewski/)
5. [Shannon, C. E. (1949). Communication Theory of Secrecy Systems. Bell System Technical Journal 28(4): 656–715](https://onlinelibrary.wiley.com/doi/10.1002/j.1538-7305.1949.tb00928.x)
6. [Clifford Cocks, James Ellis, and Malcolm Williamson, NSA Historical Figures](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/3006218/clifford-cocks-james-ellis-and-malcolm-williamson/)
7. [Diffie, W. and Hellman, M. E. (1976). New Directions in Cryptography, IEEE Transactions on Information Theory](https://dblp.org/rec/journals/tit/DiffieH76.html)
8. [Cryptography, NIST CSRC Cybersecurity History](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)
9. [NIST Cybersecurity Program History and Timeline: Standards](https://csrc.nist.gov/nist-cyber-history?area=6081a7b8-6351-48a3-a7bf-33608ef5dd84&type=Standards)
10. [An Account of Early Statistical Inference in Arab Cryptology, The American Statistician 65(4)](https://www.tandfonline.com/doi/abs/10.1198/tas.2011.10191)
11. [Cryptolog, Issue 114 (explanatory notes on Bletchley Park, Enigma, and ULTRA), NSA](https://www.nsa.gov/portals/75/documents/news-features/declassified-documents/cryptologs/cryptolog_114.pdf)
12. [Solving Enigma, NSA Center for Cryptologic History publication](https://www.nsa.gov/Portals/70/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf)
13. [The International Agreements, NSA Historical Events](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/Article-View/Article/2740696/the-international-agreements/)
14. [A Brief History of Bletchley Park, Bletchley Park Trust press information](https://bletchleypark.org.uk/wp-content/uploads/2023/10/Bletchley-Park-and-AI.pdf)
15. [Alan Turing, NSA Historical Figures](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/1621551/alan-turing/)
16. [The Black Chamber, NSA Historical Events](https://www.nsa.gov/History/Cryptologic-History/Historical-Events/Article-View/Article/2740622/the-black-chamber/)
17. [Robert Orestes Ferner, NSA Historical Figures](https://www.nsa.gov/History/Cryptologic-History/Historical-Figures/Historical-Figures-View/Article/3329044/robert-orestes-ferner/)
18. [75th Anniversary of a Key U.S. Visit to Bletchley Park, NSA](https://www.nsa.gov/Press-Room/News-Highlights/Article/Article/1624054/75th-anniversary-of-a-key-us-visit-to-bletchley-park/)
19. [Dr. Abraham Sinkov, NSA Biography](https://www.nsa.gov/Press-Room/Digital-Media-Center/Biographies/Biography-View-Page/Article/1623039/dr-abraham-sinkov/)
20. [Shannon (1949), Communication Theory of Secrecy Systems, full text PDF](https://eecs.umich.edu/courses/eecs589/papers/shannon1949.pdf)
21. [Diffie and Hellman (1976), New Directions in Cryptography, full text PDF](https://cr.yp.to/bib/1976/diffie.pdf)
22. [RSA: Overview, Analysis and Implications for the Future, GIAC paper](https://www.giac.org/paper/gsec/502/rsa-overview-analysis-implications-future/101199)
23. [The Cornerstone of Cybersecurity: Cryptographic Standards and a 50-Year Evolution, NIST blog](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › 安全治理与互联网政策 › 安全与互联网治理概述

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/history-of-cryptography

English original: https://www.edgepedia.org/history-of-cryptography
