# 恩尼格玛密码机

恩尼格玛密码机（Enigma machine）是一系列机电式转子密码机，由德国工程师亚瑟·谢尔比乌斯（Arthur Scherbius）发明，通过旋转的布线轮、反射器和插线板将报文中的每个字母打乱。1918年2月23日，正值第一次世界大战期间，谢尔比乌斯为他第一台“密码装置”（DE416219）提交了专利申请<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。他买下了科赫（Koch）的一项竞争专利，改进了设计，并以“恩尼格玛”为商标在市场上销售；商用A型和B型有四个转子，因价格高昂而销路不佳<sup>[2](https://www.arcsi.fr/doc/The-history-of-cracking-the-ENIGMA-machine-MJDR-PG.pdf)</sup>。[德国海军](https://www.edgepedia.org/zh/german-navy)于1926年采用恩尼格玛，陆军于1928年采用<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。单缺口、三转子型号是德军使用中最常见的一种；战争后期，海军采用了一种四转子变体<sup>[4](https://web.archive.org/web/20040315083558/http:/www.nsa.gov/publications/publi00004.cfm)</sup>。

| 关键事实 | 详情 |
|---|---|
| 发明 | 亚瑟·谢尔比乌斯于1918年2月23日提交了他的第一项密码装置专利（DE416219）<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup> |
| 服役采用 | 德国海军1926年，陆军1928年<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup> |
| 每日密钥空间 | 107,458,687,327,250,619,360,000 ≈ 1 × 10^23（约2^76）种设置<sup>[4](https://web.archive.org/web/20040315083558/http:/www.nsa.gov/publications/publi00004.cfm)</sup> |
| 插线板 | 十根电缆可产生150,738,274,937,250（超过150万亿）种接线方式，是密钥空间中最大的贡献项<sup>[5](https://cryptocellar.org/pubs/enigma-modern-breaking.pdf)</sup> |
| 设计缺陷 | 反射器从不将字母映射到自身，这一弱点被破译者利用<sup>[6](https://www.cryptomuseum.com/crypto/enigma/working.htm)</sup> |
| 首次破译 | 马里安·雷耶夫斯基（Marian Rejewski）、杰尔兹·罗佐基（Jerzy Różycki）和亨里克·齐加尔斯基（Henryk Zygalski）于1932—33年破译了恩尼格玛；1939年7月向英国和法国披露<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup> |
| 战时数量 | 每天约有3,000—5,000份恩尼格玛报文送达布莱切利园（Bletchley Park）；并非全部被破译<sup>[7](https://www.tnmoc.org/bh-2-the-enigma-machine)</sup> |
| 保密结束 | F·W·温特博瑟姆（F. W. Winterbotham）于1974年出版《超级机密》（*The Ultra Secret*）<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup> |

## 机器如何工作

一台恩尼格玛密码机由五个可变部件组成：一个插线板，可接零到十三根双线电缆；三个按顺序排列的转子，每个转子将26个输入触点连接到26个输出触点；26个锯齿用于设定转子起始位置；一个可移动的环，通过缺口控制步进；以及一个不旋转的反射器<sup>[9](https://www.govinfo.gov/content/pkg/GOVPUB-D-PURL-gpo252341/pdf/GOVPUB-D-PURL-gpo252341.pdf)</sup>。轮组的左侧是固定的反射器（Umkehrwalze），右侧是固定的进入轮（Eintrittwalze）<sup>[7](https://www.tnmoc.org/bh-2-the-enigma-machine)</sup>。

按下按键时，机械联动装置会在任何电路闭合之前先推进一个或多个轮子，步进由每个轮子轮缘上的凹口决定<sup>[10](https://www.codesandciphers.org.uk/documents/bmbrpt/usbmbrpt.pdf)</sup>。随后电流流经转子，从反射器弹回，再经由不同的路径返回穿过转子，点亮一盏灯。由于反射器使电流沿一条与来路不同的路径返回，加密可以将一个字母变成任何其他字母，但字母永远不会被变换为自身<sup>[6](https://www.cryptomuseum.com/crypto/enigma/working.htm)</sup>。反射器将26个字母配成13对互不相交的对换，这使得恩尼格玛的每一种置换都是自逆的：同一台机器的设置既用于加密也用于解密<sup>[11](https://archive.math.arizona.edu/mbbush/enigma/Polish%20Mathematicians%20finding%20patterns%20in%20enigma%20messages.pdf)</sup>。

三个转子位置各有26种可能的设置<sup>[12](https://ciphermachines.com/enigma)</sup>。自加密特性是一个重大弱点：由于没有任何字母x满足π(x) = x，密文T永远不可能代表明文t，这使得密码分析人员能够排除候选的已知明文片段，即猜测的明文片段<sup>[11](https://archive.math.arizona.edu/mbbush/enigma/Polish%20Mathematicians%20finding%20patterns%20in%20enigma%20messages.pdf)</sup>。德国专利商标局称这一反射器弱点为破译者打开了一扇重要的大门<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。

## 密钥、设置与密钥管理

操作员每天会收到一张密钥表，上面规定了轮序、环设置（Ringstellung）和插线板（Stecker Board）的排列；用过的每日数据会被剪下销毁，以防被缴获后泄露前几天的设置<sup>[10](https://www.codesandciphers.org.uk/documents/bmbrpt/usbmbrpt.pdf)</sup>。德国操作手册将“当日密码”定义为：用[罗马数字](https://www.edgepedia.org/zh/roman-numerals)表示的轮序、用阿拉伯数字或字母表示的环设置、以及用字母表示的插线连接，并配有K手册（M.Dv. 98）等辅助文件<sup>[13](https://www.codesandciphers.org.uk/documents/egenproc/egenproc.pdf)</sup>。操作流程还包括标识组（Kenngruppen），即向接收方标识所用密钥的字母组<sup>[14](https://www.ciphermachinesandcryptology.com/en/enigmaproc.htm)</sup>。

操作习惯削弱了看似强大的密钥空间。直到1940年5月，操作员都会将三字母的报文密钥连续加密两次，分析人员利用了这一冗余<sup>[15](https://pk.org/classes/419/notes/crypto-2.html)</sup>；双重加密在加密后的指示符的第一与第四个、第二与第五个、第三与第六个字符之间建立了关系<sup>[14](https://www.ciphermachinesandcryptology.com/en/enigmaproc.htm)</sup>。可预测的指示符，例如“HITLER”（LER后面跟着BER/LIN）以及某位职员女友的名字，催生了被称为“西利”（Cillies）的已知明文片段<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。

## 破译恩尼格玛

**波兰人的突破。** 1932—33年，马里安·雷耶夫斯基在法国秘密情报机构提供的恩尼格玛操作手册的帮助下，推断出了恩尼格玛轮组内部的布线模式，并制造出一台成功的解密机<sup>[17](https://www.britannica.com/topic/Enigma-German-code-device)</sup>。雷耶夫斯基于1932年与杰尔兹·罗佐基和[亨里克·齐加尔斯基](https://www.edgepedia.org/zh/henryk-zygalski)一同受雇，他运用置换理论推导出一个确定转子布线的数学方程<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。雷耶夫斯基后来写道，这项工作使得破译德国恩尼格玛密码成为可能，而这一破译随后对1939—1945年战争在欧洲、非洲和[远东](https://www.edgepedia.org/zh/far-east)战场的进程产生了相当大的影响<sup>[18](https://www.cryptocellar.org/enigma/files/rew80.pdf)</sup>。

齐加尔斯基研制了齐加尔斯基片，用于利用双重加密的报文指示符；此外还制造了一台以机械方式利用同一弱点的机器：密码学炸弹（Bomba kryptologiczna）<sup>[19](https://www.cryptomuseum.com/crypto/enigma/hist.htm)</sup>。雷耶夫斯基的[炸弹机](https://www.edgepedia.org/zh/bomba-cryptography)旨在暴力穷举超过17,000种可能的转子位置<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。波兰炸弹机于1938年11月由AVA无线电制造公司根据雷耶夫斯基的设计制造，由六台恩尼格玛机协同工作，能在两小时内确定正确的转子位置<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。

1938年9月15日，密钥分发方式发生重大变化，操作员自行选择初始转子设置并以明文传送，这使得波兰此前开发的所有密钥恢复方法都过时了<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。1939年7月25日和26日，随着德国入侵迫在眉睫，波兰人将其成果与法国和英国情报机构分享<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>；在华沙附近的皮里（Pyry）会议上，他们移交了两台重建的恩尼格玛机以及齐加尔斯基片和炸弹机的相关文件，而法国和英国此前对波兰的进展一无所知<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。戈登·韦尔奇曼（Gordon Welchman）后来写道：“如果我们没有在紧要关头从波兰人那里了解到德国军用恩尼格玛机的细节以及当时使用的操作流程，超级机密就永远不可能起步”<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。

**英国的炸弹机。** 当德国人改进其加密方式，使雷耶夫斯基的方法过时后，[艾伦·图灵](https://www.edgepedia.org/zh/alan-turing)（Alan Turing）研制了一台更先进的机器，到1940年已能破译恩尼格玛报文<sup>[17](https://www.britannica.com/topic/Enigma-German-code-device)</sup>。英国炸弹机由哈罗德·“博士”·基恩（Harold “Doc” Keen）在英国制表机器公司（British Tabulating Machines）设计制造，包含12组各三个转子，同步遍历所有转子位置；与波兰炸弹机不同，它不依赖密钥分发流程，但确实依赖于可能被猜错的已知明文片段<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。韦尔奇曼贡献了一项“对角板”创新，提高了炸弹机的效率<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。德国专利商标局指出，炸弹机利用已知明文片段可以从约1,054,560种可能值中计算出当日密钥<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。

## 数字一览

美国国家安全局（NSA）计算出的战时操作密钥空间为107,458,687,327,250,619,360,000，约1 × 10^23，即约一千万亿亿种设置<sup>[4](https://web.archive.org/web/20040315083558/http:/www.nsa.gov/publications/publi00004.cfm)</sup>。密码博物馆（Crypto Museum）的部件算术将712,882,560乘以150,738,274,937,250，得出同样的总数，≈ 1.07 × 10^23 ≈ 2^76，即76比特<sup>[6](https://www.cryptomuseum.com/crypto/enigma/working.htm)</sup>。十根插线板电缆交换20个字母，有150,738,274,937,250种可能的接线方式，使插线板成为最大的贡献项；前三个因子给出60 × 26³ × 26 = 27,418,560个“位置”<sup>[5](https://cryptocellar.org/pubs/enigma-modern-breaking.pdf)</sup>。另一项学术统计将1930—1938年德国陆军的每日密钥空间定为约3.6 × 10^23，由6种轮序、约0.5 × 10^14种插线板连接、17,576种转子位置和26种环位置构成<sup>[3](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)</sup>。

在[布莱切利园](https://www.edgepedia.org/zh/bletchley-park)，负责德国陆军和空军恩尼格玛的六号小屋（Hut Six）每天只需破译每个网络中的一份报文；恢复的当日密钥随后往往能在同一天解密数百份报文<sup>[5](https://cryptocellar.org/pubs/enigma-modern-breaking.pdf)</sup>。每天约有3,000—5,000份加密报文送入布莱切利园；并非全部被破译，有些需要数天或数周，有些则始终未能破译<sup>[7](https://www.tnmoc.org/bh-2-the-enigma-machine)</sup>。

## 海军恩尼格玛与大西洋海战

[德国陆军](https://www.edgepedia.org/zh/german-army)和空军从5个轮子中选用3个，而海军从8个中选用4个<sup>[10](https://www.codesandciphers.org.uk/documents/bmbrpt/usbmbrpt.pdf)</sup>。（一份美国国家安全局的历史文献则称海军从8个转子中选用3个；战时美国陆军炸弹机报告的“8选4”说法与实际用于海军的四转子机器相符。）八转子组合在[大西洋海战](https://www.edgepedia.org/zh/battle-of-the-atlantic)期间使盟军破译工作复杂化了21个月<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。

海军上将[卡尔·邓尼茨](https://www.edgepedia.org/zh/karl-donitz)（Karl Dönitz）于1941年下令研制四转子M4，以加强U型潜艇通信的安全性<sup>[20](https://www.tomshardware.com/tech-industry/wwii-enigma-machine-sells-for-over-half-a-million-dollars-at-auction-this-was-one-of-the-rare-4-rotor-m4-models)</sup>。1942年2月，M4随“海神”（Triton）系统被引入大西洋U型潜艇主网络，使破译工作中断了约十个月，这段“黑暗期”从1942年2月持续到12月<sup>[15](https://pk.org/classes/419/notes/crypto-2.html)</sup><sup> • </sup><sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。在U-559潜艇被俘获并缴获恩尼格玛器材和密码本后，破译工作得以恢复<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>，德国潜艇和气象拖网渔船的缴获也提供了帮助；重新掌握海军恩尼格玛的破译是避免英国在大西洋海战中失败的一个主要因素<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。

到1944年春天，96台投入运行的炸弹机例行破译U型潜艇报文，破译每日密钥设置的平均延迟仅12小时；在高峰时段，U型潜艇报文的译文在发送后约20分钟即可获得<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。美国炸弹机约55%的运行时间用于海军密钥，45%用于非海军通信；到战争结束时，美国已击沉或俘获95艘德国U型潜艇<sup>[16](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)</sup>。超级机密还使盟军能够就盟军意图欺骗德国，最著名的是在1944年6月[诺曼底登陆](https://www.edgepedia.org/zh/normandy-landings)前夕<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。

## 与其他密码机的比较

20世纪30年代末，美国的SIGABA以不规则、不可预测的方式推进其15个转子，这意味着分析人员不能认为大多数转子是静止的，而且从未出现过关于其破译的公开记载<sup>[15](https://pk.org/classes/419/notes/crypto-2.html)</sup>。苏联1956年的菲亚尔卡（Fialka）使用了10个转子，其反射器允许字母加密为自身，从而消除了英国炸弹机所依赖的过滤条件<sup>[15](https://pk.org/classes/419/notes/crypto-2.html)</sup>。英国的泰普克斯（Typex）是一种类似的密码机，它避免了恩尼格玛的缺陷，例如使用多个进位缺口，希特勒的密码专家从未破译过这些密码<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。德国单独的洛伦兹（Lorenz）电传打字机密码不在此详细讨论。

## 影响、保密与后续

一种普遍观点认为，超级机密使战争缩短了两年，尽管这种关于时长的估计存在争议，因为它们预设了结果<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。并非每一个密钥都能被恢复，而一份读得太晚的报文可能几乎没有作战价值<sup>[21](https://enigma.design/history)</sup>。1943年，德国最高统帅部通过其瑞士办事处收到一份报告，称用于向作战U型潜艇下达命令的德国海军密码已被成功破译了数月之久<sup>[1](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)</sup>。

在丘吉尔的指示下，超级机密一直保密，直到F·W·温特博瑟姆于1974年出版《超级机密》<sup>[8](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)</sup>。现存的机器如今价格高昂：2025年11月，佳士得巴黎拍卖行以482,600欧元（约合555,233美元）售出一台完全可运行的四转子M4，据称曾由邓尼茨使用，成交价约为估价的两倍，据信是仅存的约八台可运行M4之一<sup>[20](https://www.tomshardware.com/tech-industry/wwii-enigma-machine-sells-for-over-half-a-million-dollars-at-auction-this-was-one-of-the-rare-4-rotor-m4-models)</sup>。

## 近期进展

除了2025年的拍卖之外，两项近期成果表明恩尼格玛仍在不断揭示新的细节。对一台从德国扫雷艇R15残骸中打捞出的恩尼格玛M4（序列号M 15648）进行的微型断层扫描（MicroCT）分析，在不拆卸的情况下揭示了转子排列（Walzenlage）、外部轮位置和内部环设置<sup>[22](https://zdjp.si/ojs/index.php/ashs/article/view/451)</sup>。该扫雷艇于1945年4月16日在亚得里亚海北部沉没。

2026年9月，一个AI系统（“GPT-6 Astra”）在约十小时内解密了1941年那份82字符的MVUEH报文，恢复的密钥和明文由恩尼格玛研究者和密码地窖（CryptoCellar）馆长弗雷德·韦耶鲁德（Fred Weyerud）独立验证<sup>[23](https://www.elseif.net/gpt-6-astra-decrypts-1941-enigma-message-in-ten-hours)</sup>。该报文此前一直未被破译，因为其转子顺序为2-5-3，与同日其他通信的标准5-1-2轮序不同<sup>[23](https://www.elseif.net/gpt-6-astra-decrypts-1941-enigma-message-in-ten-hours)</sup>。

## 抵御现代攻击的安全性

恩尼格玛约10^23（约2^76）种设置意味着，以每秒十亿种设置的速度进行暴力搜索将需要约三百万年<sup>[15](https://pk.org/classes/419/notes/crypto-2.html)</sup>。

## References

1. [Enigma, Deutsches Patent- und Markenamt (DPMA)](https://www.dpma.de/english/our_office/publications/milestones/computerpioneers/enigma/index.html)
2. [From Poznań to Bletchley Park: the history of cracking the ENIGMA machine (ARCSI)](https://www.arcsi.fr/doc/The-history-of-cracking-the-ENIGMA-machine-MJDR-PG.pdf)
3. [Facts and Myths of Enigma: Breaking Stereotypes (Springer)](https://link.springer.com/content/pdf/10.1007%2F3-540-39200-9_7.pdf)
4. [The Cryptographic Mathematics of Enigma (NSA, archived)](https://web.archive.org/web/20040315083558/http:/www.nsa.gov/publications/publi00004.cfm)
5. [Modern Breaking of Enigma Ciphertexts (CryptoCellar)](https://cryptocellar.org/pubs/enigma-modern-breaking.pdf)
6. [Enigma Working Principle, Crypto Museum](https://www.cryptomuseum.com/crypto/enigma/working.htm)
7. [The Enigma Machine, The National Museum of Computing](https://www.tnmoc.org/bh-2-the-enigma-machine)
8. [Enigma Machine, Encyclopedia.com](https://www.encyclopedia.com/history/encyclopedias-almanacs-transcripts-and-maps/enigma-machine)
9. [The Cryptographic Mathematics of Enigma (NSA, govinfo)](https://www.govinfo.gov/content/pkg/GOVPUB-D-PURL-gpo252341/pdf/GOVPUB-D-PURL-gpo252341.pdf)
10. [The US 6812 Bombe Report 1944 (codesandciphers.org.uk)](https://www.codesandciphers.org.uk/documents/bmbrpt/usbmbrpt.pdf)
11. [Polish Mathematicians Finding Patterns in Enigma Messages (University of Arizona)](https://archive.math.arizona.edu/mbbush/enigma/Polish%20Mathematicians%20finding%20patterns%20in%20enigma%20messages.pdf)
12. [Cipher Machines: Enigma](https://ciphermachines.com/enigma)
13. [Enigma Instruction Manual M.Dv. 32/1, translated (codesandciphers.org.uk)](https://www.codesandciphers.org.uk/documents/egenproc/egenproc.pdf)
14. [Enigma Procedures, Cipher Machines and Cryptology](https://www.ciphermachinesandcryptology.com/en/enigmaproc.htm)
15. [Part 2: Mechanized Cryptography (pk.org course notes)](https://pk.org/classes/419/notes/crypto-2.html)
16. [Solving the Enigma: History of the Cryptanalytic Bombe (NSA)](https://ed-thelen.org/comp-hist/NSA-solving_enigma.pdf)
17. [Enigma, Britannica](https://www.britannica.com/topic/Enigma-German-code-device)
18. [Marian Rejewski, An Application of the Theory of Permutations in Breaking the Enigma Cipher](https://www.cryptocellar.org/enigma/files/rew80.pdf)
19. [Enigma History, Crypto Museum](https://www.cryptomuseum.com/crypto/enigma/hist.htm)
20. [WWII Enigma machine sells for over half a million dollars at auction, Tom's Hardware](https://www.tomshardware.com/tech-industry/wwii-enigma-machine-sells-for-over-half-a-million-dollars-at-auction-this-was-one-of-the-rare-4-rotor-m4-models)
21. [A history of Enigma (enigma.design)](https://enigma.design/history)
22. [Enigma M4 from the German Minesweeper R15 in the Upper Adriatic, Annales, Series Historia et Sociologia](https://zdjp.si/ojs/index.php/ashs/article/view/451)
23. [GPT-6 Astra decrypts 1941 Enigma message in ten hours (elseif.net)](https://www.elseif.net/gpt-6-astra-decrypts-1941-enigma-message-in-ten-hours)

---
*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 › Key management

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/enigma-machine

English original: https://www.edgepedia.org/enigma-machine
