# A5/1

**A5/1** 是一种流密码，用于在GSM（2G）蜂窝标准中加密移动手机与基站之间的无线链路。它接收一个64位会话密钥和一个22位帧计数器，由三个受多数表决规则控制的线性反馈移位寄存器生成密钥流，再将密钥流与数字化语音或数据进行异或运算，从而实现空口隐私保护。<sup>[1](https://www.gsma.com/newsroom/press-release/gsma-statement-on-media-reports-relating-to-the-breaking-of-gsm-encryption/)</sup><sup> • </sup><sup>[2](https://onlinelibrary.wiley.com/doi/10.1155/2023/7249127)</sup>

| 关键事实 | 详情 |
|---|---|
| 用途 | 在GSM网络上加密手机与基站之间的用户语音和数据流量；在手机和基站子系统两端均有实现<sup>[3](https://www.gsma.com/solutions-and-impact/technologies/security/security-algorithms/)</sup> |
| 内部状态 | 三个长度分别为19、22和23位的LFSR，共64位，由第8、10、10位时钟控制位按多数规则进行不规则时钟控制<sup>[4](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)</sup> |
| 输入与输出 | 64位会话密钥和22位帧计数器设定初始状态；每个4.615毫秒的GSM帧获得228位密钥流，通话每个方向各114位<sup>[2](https://onlinelibrary.wiley.com/doi/10.1155/2023/7249127)</sup> |
| 设计与披露 | 设计于1987年；大致设计于1994年泄露，精确设计由Marc Briceno于1999年从一部GSM电话中逆向工程获得<sup>[5](https://cryptome.org/a51-bsw.htm)</sup> |
| 密码分析 | 已发表的攻击复杂度约为 \( 2^{40} \) 至 \( 2^{45} \) 步；2000年的一种攻击可在PC上实时恢复密钥，2009年发布的约2 TB彩虹表使密钥恢复变得实用<sup>[5](https://cryptome.org/a51-bsw.htm)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4851680/)</sup> |
| 后继算法 | 基于KASUMI分组密码的A5/3由GSMA开发，作为高强度替代方案逐步替换A5/1<sup>[7](https://www.etsi.org/expertise/algorithms-codes/)</sup> |
| 当前使用情况 | 2025年在德国10个地点对基站的测量发现，三大运营商之一仍严重依赖已被攻破的A5/1<sup>[8](https://arxiv.org/abs/2505.14509)</sup> |

## 设计

A5/1是一种同步流密码，由三个线性反馈移位寄存器（LFSR）R1、R2和R3构成，长度分别为19、22和23位。反馈抽头为：R1的第13、16、17和18位；R2的第20和21位；R3的第7、20、21和22位。当寄存器被时钟驱动时，其抽头位进行异或运算，结果进入最低有效位，同时最高有效位被移出。<sup>[4](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)</sup>

**不规则时钟控制。** 三个寄存器并非每个周期都前进。每个寄存器有一个时钟控制位（R1的第8位、R2的第10位、R3的第10位），每个周期计算三个时钟控制位的多数值；只有当寄存器自身的时钟控制位等于该多数值时，该寄存器才前进。每个周期至少有两个寄存器移动，一个可能停止。正是这一多数规则使密钥流成为密钥的非线性函数。<sup>[4](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)</sup><sup> • </sup><sup>[9](https://notes.sahithyan.dev/s5/computer-security/a5-1)</sup>

**初始化与密钥流。** 所有寄存器首先清零。初始化期间，三个寄存器被时钟驱动64次，同时64位会话密钥的每一位被异或到每个寄存器的反馈位中；随后22位帧号以同样方式通过22个额外时钟周期引入。之后，寄存器在多数规则下被时钟驱动100次，输出丢弃，以使密钥和帧号充分扩散。此后，每个周期将三个寄存器的输出位异或，产生一位密钥流。<sup>[4](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)</sup>

GSM将每次通话以4.615毫秒的帧进行传输，每帧包含228位，每个方向114位。对于每一帧，A5/1根据会话密钥和公开已知的帧计数器生成228位密钥流；前114位加密一个方向，后114位加密另一个方向，均通过按位异或施加。<sup>[2](https://onlinelibrary.wiley.com/doi/10.1155/2023/7249127)</sup><sup> • </sup><sup>[4](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)</sup>

## 保密与披露

GSM是首个使用密码学的大众市场通信系统，其算法是在当时限制密码强度的出口管制法规下设计的。<sup>[10](https://www.ericsson.com/en/blog/2021/6/evolution-of-cryptographic-algorithms)</sup>原始2G算法均未正式公开发表；其内部规范由GSM协会管理，仅应请求提供。<sup>[11](https://www.3gpp.org/ftp/TSG_SA/Wg3_Security/_Specs/Old_Vsns/43020-400.pdf)</sup>A5/1的大致设计于1994年泄露，A5/1和A5/2的精确设计由Marc Briceno于1999年从一部实际GSM电话中逆向工程获得。<sup>[5](https://cryptome.org/a51-bsw.htm)</sup>如今A5/1规范仍按GSMA规则分发：网络运营商成员在加入时获得书面授权使用，合格行业方可申请获取副本。<sup>[3](https://www.gsma.com/solutions-and-impact/technologies/security/security-algorithms/)</sup>

一个相关变体A5/2是一种刻意弱化的出口密码，仅提供40位安全强度；此类出口密码多年来已被禁止用于手机中。<sup>[10](https://www.ericsson.com/en/blog/2021/6/evolution-of-cryptographic-algorithms)</sup>

## 密码分析

由于A5/1具有64位内部状态，时间-内存权衡攻击可直接适用。早期已发表的攻击需要 \( 2^{40} \) 至 \( 2^{45} \) 步，这一水平使该密码易受大型组织的硬件攻击，但不受单个黑客的软件攻击威胁。<sup>[5](https://cryptome.org/a51-bsw.htm)</sup>2000年，[Adi Shamir](https://www.edgepedia.org/zh/adi-shamir)及其同事描述了这样的攻击：经过一次最多 \( 2^{48} \) 步的可并行化预处理阶段后，可在单台PC上实时恢复会话密钥——一种变体需要通话输出的前两分钟，约一秒内计算出密钥；另一种需要约两秒的输出和数分钟的处理时间。<sup>[5](https://cryptome.org/a51-bsw.htm)</sup>

**彩虹表。** 2009年A5/1破解项目在[彩虹表](https://www.edgepedia.org/zh/rainbow-table)方法基础上进行了构建。其约2 TB的彩虹表于2009年底放入公有领域；使用8个密钥流突发时成功率为约88%，仅使用单个114位突发时降至约24%。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC4851680/)</sup>GSMA于2009年回应称，迄今没有任何学术攻击已形成可用于实际商业GSM网络的实用攻击能力，且拦截移动通话在大多数司法管辖区很可能构成刑事犯罪。<sup>[1](https://www.gsma.com/newsroom/press-release/gsma-statement-on-media-reports-relating-to-the-breaking-of-gsm-encryption/)</sup>

对该密码的研究仍在继续。猜测-确定攻击利用非线性时钟控制：2023年的一种攻击以极少的密钥流达到 \( O(2^{52}) \) 的计算复杂度，成功率为96.6%。<sup>[2](https://onlinelibrary.wiley.com/doi/10.1155/2023/7249127)</sup>无内存状态恢复攻击也得到了改进；2023年的一项再分析发现，Golić的经典猜测-确定攻击复杂度为 \( 2^{46.04} \)，高于此前认为的 \( 2^{43.15} \)，并提出了复杂度为 \( 2^{43.92} \) 和 \( 2^{43.25} \) 的新攻击。<sup>[12](https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/ise2.12120?af=R)</sup>实际实现也随之出现：Anderson 1994年猜测-确定攻击的位切片实现将搜索空间从 \( 2^{64} \) 降至 \( 2^{53} \)，在消费级GPU上每个实例运行约十天，与彩虹表结合后形成成功率100%的实用工具集。<sup>[13](https://www.degruyterbrill.com/document/doi/10.1515/eng-2018-0002/html)</sup>

2019年，研究人员报告了GSM密钥交换本身——即在手机与基站之间建立会话密钥的过程——的缺陷。通过捕获密钥交换并利用密钥编码所依赖的错误控制机制的弱点，他们发现可以在约一小时内破解大多数A5/1实现中的密钥；对于A5/3，同样的攻击理论上是可能的，但需要许多年。研究人员指出，针对GSM的其他攻击，例如被称为“黄貂鱼”的恶意基站，在实践中更容易实施。<sup>[14](https://www.wired.com/story/gsm-decrypt-calls/)</sup>

## 替代与当前使用

GSMA开发了A5/3作为新的高强度算法来替代A5/1，这得益于2009年之后十年间强密码学出口管制壁垒的大量消除。<sup>[1](https://www.gsma.com/newsroom/press-release/gsma-statement-on-media-reports-relating-to-the-breaking-of-gsm-encryption/)</sup>A5/3及其GPRS对应算法GEA3基于KASUMI分组密码，在3GPP TS 55.216中规定；与保密的A5/1不同，其规范通过3GPP公开提供，但须遵守限制性使用承诺并支付管理费。<sup>[7](https://www.etsi.org/expertise/algorithms-codes/)</sup>

A5/1仍在使用中。2025年的一项测量研究被动监听了德国10个地点的基站收发台的加密模式命令消息，在三大移动网络运营商处收集了超过50万个样本。一家运营商偏好A5/3，另一家仍高度依赖已被攻破的A5/1；第三家偏好A5/3和A5/4。该研究指出，由于来自4G/5G网络的潜在降级攻击以及GSM在物联网应用中的使用，GSM安全仍然具有相关性。<sup>[8](https://arxiv.org/abs/2505.14509)</sup>

## References

1. [GSMA Statement on Media Reports Relating to the Breaking of GSM Encryption (2009), GSMA](https://www.gsma.com/newsroom/press-release/gsma-statement-on-media-reports-relating-to-the-breaking-of-gsm-encryption/)
2. [Jain (2023). A New Guess-and-Determine Method for Cryptanalysis of the GSM Encryption. Complexity.](https://onlinelibrary.wiley.com/doi/10.1155/2023/7249127)
3. [Security algorithms, GSMA](https://www.gsma.com/solutions-and-impact/technologies/security/security-algorithms/)
4. [Jensen and Andersen. A5 Encryption In GSM, UC Santa Barbara course project](https://sites.cs.ucsb.edu/~koclab/teaching/cren/project/2017/jensen%2Bandersen.pdf)
5. [Biham, Shamir (and Wagner). Real Time Cryptanalysis of A5/1 on a PC](https://cryptome.org/a51-bsw.htm)
6. [Algorithm for finding partitionings of hard variants of Boolean satisfiability problem, with application to inversion of some cryptographic functions, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC4851680/)
7. [Algorithms and codes, ETSI](https://www.etsi.org/expertise/algorithms-codes/)
8. [Koch et al. (2025). A5/1 is in the Air: Passive Detection of 2G (GSM) Ciphering Algorithms. arXiv.](https://arxiv.org/abs/2505.14509)
9. [A5/1 Stream Cipher, Sahithyan's Notes](https://notes.sahithyan.dev/s5/computer-security/a5-1)
10. [The evolution of cryptographic algorithms, Ericsson (2021)](https://www.ericsson.com/en/blog/2021/6/evolution-of-cryptographic-algorithms)
11. [3GPP TS 43.020 V4.0.0 (2000-11), Security related network functions](https://www.3gpp.org/ftp/TSG_SA/Wg3_Security/_Specs/Old_Vsns/43020-400.pdf)
12. [Xu (2023). Revisit two memoryless state-recovery cryptanalysis methods on A5/1. IET Information Security.](https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/ise2.12120?af=R)
13. [A Bitslice Implementation of Anderson's Attack on A5/1, De Gruyter](https://www.degruyterbrill.com/document/doi/10.1515/eng-2018-0002/html)
14. [Hackers Could Decrypt Your GSM Phone Calls, WIRED (2019)](https://www.wired.com/story/gsm-decrypt-calls/)

---
*Initially written 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/a5-1

English original: https://www.edgepedia.org/a5-1
