# 认证加密

认证加密（AE）是一种对称密钥加密形式，在单次操作中同时提供保密性和完整性：该方案对明文进行加密，同时让接收方能够检测密文或其解密所得的明文在传输过程中是否被修改。<sup>[1](https://www.researchgate.net/publication/221327027_Authenticated_Encryption_Relations_among_Notions_and_Analysis_of_the_Generic_Composition_Paradigm)</sup> 其广泛使用的变体——带关联数据的认证加密（AEAD）——还会对随消息一同传输但不加密的信息进行认证，例如数据包头或 IP 地址。<sup>[2](https://datatracker.ietf.org/doc/html/rfc5116)</sup><sup> • </sup><sup>[3](https://www.nist.gov/news-events/news/2023/02/nist-selects-lightweight-cryptography-algorithms-protect-small-devices)</sup>

| 关键事实 | 详情 |
|---|---|
| 形式化定义 | 贝拉雷与南普伦普雷在 2000 年亚洲密码学会议上发表的成果中给出了 AE 的形式化安全定义，将其视为同时提供隐私性与完整性的对称加密方案<sup>[1](https://www.researchgate.net/publication/221327027_Authenticated_Encryption_Relations_among_Notions_and_Analysis_of_the_Generic_Composition_Paradigm)</sup> |
| 接口标准 | RFC 5116（2008 年 1 月）定义了 AEAD 及统一接口：每种算法声明密钥长度（K_LEN）、明文与关联数据上限（P_MAX、A_MAX）、随机数边界（N_MIN、N_MAX）以及最大密文长度（C_MAX）<sup>[2](https://datatracker.ietf.org/doc/html/rfc5116)</sup> |
| 随机数规则 | 对任意固定密钥，每次不同加密调用所提供的随机数必须互不相同，或者所有随机数必须为零长度<sup>[2](https://datatracker.ietf.org/doc/html/rfc5116)</sup> |
| 美国国家标准与技术研究院模式 | SP 800-38C 规定了 CCM（计数器模式加 CBC 链认证）；SP 800-38D（2007 年 11 月定稿）规定了 GCM，将计数器模式与通用哈希认证机制相结合，以及其仅做 MAC 的专用变体 GMAC<sup>[4](https://csrc.nist.gov/projects/block-cipher-techniques/bcm/current-modes)</sup><sup> • </sup><sup>[5](https://csrc.nist.gov/pubs/sp/800/38/d/final)</sup> |
| GCM 标签 | GCM 认证标签一般为 128、120、112、104 或 96 位；64 位和 32 位仅在限制输入长度和密钥寿命的条件下允许使用<sup>[6](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf)</sup> |
| 抗误用性 | SIV（RFC 5297，2008 年 10 月）在随机数被复用时仍能保持真实性，保密性的降级仅限于攻击者能够检测出相同的明文和关联数据被保护了两次<sup>[7](https://www.rfc-editor.org/info/rfc5297/)</sup> |
| 轻量级标准 | Ascon-AEAD128 来自美国国家标准与技术研究院于 2023 年选定的算法族，在 SP 800-232（2025 年 8 月 13 日定稿）中针对受限设备作出规定<sup>[8](https://csrc.nist.gov/pubs/sp/800/232/final)</sup> |

## 定义与安全目标

认证加密方案是一种对称加密方案，其目标是同时提供隐私性和完整性。文献区分了两种真实性概念——明文完整性和密文完整性——并探讨它们与选择明文攻击下的不可区分性（IND-CPA）结合时，同更强的隐私性概念（如 IND-CCA）之间的关系。<sup>[1](https://www.researchgate.net/publication/221327027_Authenticated_Encryption_Relations_among_Notions_and_Analysis_of_the_Generic_Composition_Paradigm)</sup> 在实践中，其保证是：篡改密文的攻击者无法产生一个被接收方接受并解密为相关明文的修改后密文；除非标签匹配，否则解密返回失败指示。<sup>[7](https://www.rfc-editor.org/info/rfc5297/)</sup>

**关联数据。** AEAD 通过对不加密的数据进行认证来扩展基本概念。诸如消息头或设备 IP 地址之类的额外信息被纳入认证计算但保持明文，因此接收方可以验证所有受保护数据在传输中未被更改。<sup>[2](https://datatracker.ietf.org/doc/html/rfc5116)</sup><sup> • </sup><sup>[3](https://www.nist.gov/news-events/news/2023/02/nist-selects-lightweight-cryptography-algorithms-protect-small-devices)</sup>

## 通用组合

构建 AE 方案的自然方式是在两个独立密钥下组合一个安全加密方案和一个安全消息认证码（MAC）。组合顺序有三种可能：加密并 MAC、MAC 后加密、加密后 MAC。对通用组合范式的分析表明，当加密方案和 MAC 各自独立安全时，只有加密后 MAC 才能保证安全。<sup>[9](https://www.sciencedirect.com/science/article/pii/S1574013715300290)</sup>

组合顺序在实际部署的协议中至关重要。SSH 协议最初的认证加密机制被发现有安全缺陷；贝拉雷、科诺和南普伦普雷提出了只需对协议做较少修改的修复方案，并证明了修改后的版本满足强选择密文隐私性和完整性要求。<sup>[10](https://homes.cs.washington.edu/~yoshi/papers/SSH/)</sup>

## 标准化 AEAD 方案

**GCM 与 GMAC。** 美国国家标准与技术研究院特别出版物 800-38D 于 2007 年 11 月 28 日定稿，规定了 Galois/[计数器模式](https://www.edgepedia.org/zh/counter-mode)（GCM）——一种带关联数据的认证加密算法——及其专用变体 GMAC，后者对不加密的数据生成 MAC。两者都是底层经批准的对称密钥分组密码（如 AES）的工作模式。<sup>[5](https://csrc.nist.gov/pubs/sp/800/38/d/final)</sup> 在 GCM 中，保密性来自计数器模式的一种变体，使用特定的递增函数 inc₃₂ 生成计数器块；认证基于 GHASH，这是一种在二元 Galois 域内通过与固定哈希子密钥相乘来实现的哈希函数。<sup>[6](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf)</sup> 标签长度 t 是一个安全参数：一般情况下实现应仅支持 128、120、112、104 和 96 位，64 位和 32 位在受限条件下允许使用，且每个密钥关联一个固定的 t 值。<sup>[6](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf)</sup>

**CCM。** 特别出版物 800-38C 规定了 AES 的 CCM 模式，它将用于保密性的计数器模式与用于认证的密码块链相结合。该规范的设计使得 CCM 可以与 [IEEE 802.11](https://www.edgepedia.org/zh/ieee-802-11) 无线局域网标准拟议修正案中出现的版本互换使用。<sup>[4](https://csrc.nist.gov/projects/block-cipher-techniques/bcm/current-modes)</sup>

**ChaCha20-Poly1305。** RFC 8439（2018 年 6 月）定义了 AEAD_CHACHA20_POLY1305 构造，它接受 256 位密钥、每次使用相同密钥调用时不同的 96 位随机数、任意长度的明文和任意长度的附加认证数据。在纯软件实现中，ChaCha20 比 AES 快得多，速度约为 AES 的三倍，这解决了 AES 在专用硬件上表现良好但在缺乏专用硬件的平台上表现明显较差的问题。<sup>[11](https://datatracker.ietf.org/doc/rfc8439/)</sup>

**SIV。** 合成初始化向量构造在 RFC 5297（2008 年 10 月）中针对 AES 作出规定，旨在抵抗随机数复用和误用。如果随机数从未被复用，SIV 达到通常的基于随机数的安全性；如果随机数被复用，真实性得以保留，保密性仅在攻击者能够确定相同明文和关联数据在相同随机数和密钥下被重复保护过的程度上受到损害。代价是吞吐量：SIV 需要对数据做两遍处理，无法达到 GCM 或 OCB 等模式的高速率，这使其更适合控制平面应用而非高容量数据路径。<sup>[7](https://www.rfc-editor.org/info/rfc5297/)</sup>

**Ascon。** 针对资源受限设备，美国国家标准与技术研究院开展了多轮轻量级密码学标准化流程，并于 2023 年 2 月选定了 Ascon 算法族，该算法族由多布劳尼希、艾希尔斯德、门德尔和施莱弗设计，最初由格拉茨技术大学、英飞凌科技、Lamarr 安全研究和拉德堡德大学的密码学家于 2014 年开发。Ascon 在 2019 年就已被选为 CAESAR 竞赛最终方案集中轻量级认证加密的首选。最终标准 SP 800-232 于 2025 年 8 月 13 日以最终形式发布，规定了用于带关联数据认证加密的 Ascon-AEAD128 以及哈希和可扩展输出函数变体。<sup>[8](https://csrc.nist.gov/pubs/sp/800/232/final)</sup><sup> • </sup><sup>[12](https://www.nist.gov/news-events/news/2025/08/nist-finalizes-lightweight-cryptography-standard-protect-small-devices)</sup> Ascon 基于置换的设计旨在比许多传统算法更容易支持抗侧信道实现，适用于 RFID 标签、植入式医疗设备和收费登记应答器等设备。<sup>[12](https://www.nist.gov/news-events/news/2025/08/nist-finalizes-lightweight-cryptography-standard-protect-small-devices)</sup>

## 随机数要求与误用

RFC 5116 明确规定了随机数要求：对于任何特定密钥，要么每次不同加密调用所提供的随机数必须互不相同，要么所有随机数必须为零长度，且每种算法规范应描述无意中复用随机数会导致何种安全性降级。<sup>[2](https://datatracker.ietf.org/doc/html/rfc5116)</sup> 对于基于计数器的模式，后果是具体的：在 CCM 或 GCM 中复用随机数会导致加密计数器块的复用。<sup>[13](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=956561)</sup> 在 GCM 中，相同密钥下重复的随机数允许攻击者恢复认证密钥材料并为任意消息生成有效的认证码，这就是存在 SIV、GCM-SIV 和 AES-GCM-SIV 等抗误用构造的原因。<sup>[14](https://www.rfc-editor.org/rfc/rfc9044.html)</sup><sup> • </sup><sup>[7](https://www.rfc-editor.org/info/rfc5297/)</sup>

## 部署

AEAD 是现代传输安全的记录保护机制。在 [TLS 1.3](https://www.edgepedia.org/zh/tls-1-3) 中，每个密码套件表示一种用于记录保护的 AEAD 算法以及一种用于 HKDF 密钥派生函数的哈希算法，AEAD 函数提供统一的加密和认证操作，将明文转化为受保护的记录。<sup>[15](https://www.rfc-editor.org/info/rfc8446/)</sup> AES-GCM 还在 IEEE 802.1AE（MACsec）、IPsec 和美国国家标准与技术研究院的 SP 800-38D 等标准中被强制要求。<sup>[16](https://github.com/larklaflamme/gcm-nonce-bounds)</sup>

标准本身也在更新。美国国家标准与技术研究院于 2024 年 3 月宣布修订 SP 800-38D，2026 年的预草案征求意见稿提议移除对短于 96 位的 GCM 认证标签的支持，并规定一个更宽的变体 wGCM，在 256 位分组密码上运行以支持 AES 的 Rijndael-256 变体，并提议以 192 位作为默认 IV 长度。<sup>[5](https://csrc.nist.gov/pubs/sp/800/38/d/final)</sup><sup> • </sup><sup>[17](https://csrc.nist.rip/pubs/sp/800/38/d/r1/2prd)</sup>

## References

1. [Mihir Bellare and Chanathip Namprempre (2000/2008). Authenticated Encryption: Relations among Notions and Analysis of the Generic Composition Paradigm. ASIACRYPT 2000; Journal of Cryptology 21(4).](https://www.researchgate.net/publication/221327027_Authenticated_Encryption_Relations_among_Notions_and_Analysis_of_the_Generic_Composition_Paradigm)
2. [RFC 5116: An Interface and Algorithms for Authenticated Encryption, IETF, January 2008.](https://datatracker.ietf.org/doc/html/rfc5116)
3. [NIST Selects 'Lightweight Cryptography' Algorithms to Protect Small Devices, NIST News, February 2023.](https://www.nist.gov/news-events/news/2023/02/nist-selects-lightweight-cryptography-algorithms-protect-small-devices)
4. [Block Cipher Techniques: Current Modes, NIST CSRC.](https://csrc.nist.gov/projects/block-cipher-techniques/bcm/current-modes)
5. [NIST SP 800-38D: Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC, NIST CSRC.](https://csrc.nist.gov/pubs/sp/800/38/d/final)
6. [NIST SP 800-38D (publication PDF), NIST.](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf)
7. [RFC 5297: Synthetic Initialization Vector (SIV) Authenticated Encryption Using the Advanced Encryption Standard (AES), RFC Editor, October 2008.](https://www.rfc-editor.org/info/rfc5297/)
8. [NIST SP 800-232: Ascon-Based Lightweight Cryptography Standards for Constrained Devices, NIST CSRC, August 2025.](https://csrc.nist.gov/pubs/sp/800/232/final)
9. [General classification of the authenticated encryption schemes for the CAESAR competition, ScienceDirect.](https://www.sciencedirect.com/science/article/pii/S1574013715300290)
10. [Bellare, Kohno, and Namprempre. Breaking and provably repairing the SSH authenticated encryption scheme.](https://homes.cs.washington.edu/~yoshi/papers/SSH/)
11. [RFC 8439: ChaCha20 and Poly1305 for IETF Protocols, IETF, June 2018.](https://datatracker.ietf.org/doc/rfc8439/)
12. [NIST Finalizes 'Lightweight Cryptography' Standard to Protect Small Devices, NIST News, August 2025.](https://www.nist.gov/news-events/news/2025/08/nist-finalizes-lightweight-cryptography-standard-protect-small-devices)
13. [NIST Internal Report on block cipher mode issues (nonce reuse in CCM and GCM), NIST.](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=956561)
14. [RFC 9044: Using the AES-GMAC Algorithm with the Cryptographic Message Syntax (CMS), RFC Editor.](https://www.rfc-editor.org/rfc/rfc9044.html)
15. [RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3, RFC Editor, August 2018.](https://www.rfc-editor.org/info/rfc8446/)
16. [Tight Security Bounds for AES-GCM Under Nonce Misuse, GitHub repository.](https://github.com/larklaflamme/gcm-nonce-bounds)
17. [SP 800-38D Rev. 1, Second Pre-Draft Call for Comments: GCM and GMAC Block Cipher Modes of Operation, NIST CSRC.](https://csrc.nist.rip/pubs/sp/800/38/d/r1/2prd)

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

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/authenticated-encryption

English original: https://www.edgepedia.org/authenticated-encryption
