# 密码学

**密码学**（Cryptography）是运用数学技术保护信息安全的一门学问，提供机密性、数据完整性、身份认证和不可否认性（签名者事后不能否认自己签过名）等服务。<sup>[1](https://www.nist.gov/cryptography)</sup><sup> • </sup><sup>[2](https://csrc.nist.gov/glossary/term/security_service)</sup> 现代密码学是电子商务交易、移动设备通信以及其他在开放电子网络上交换数据的基础，它受已发布标准的规范，以便独立构建的系统能够互操作并接受评估。<sup>[1](https://www.nist.gov/cryptography)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 用于保护传输中和存储中信息安全的数学技术<sup>[1](https://www.nist.gov/cryptography)</sup> |
| 两大关键算法族 | 对称密钥算法对某一操作及其逆操作使用同一把秘密密钥；公钥（非对称）密码学使用两把独立的密钥，一把用于加密或签名，一把用于解密或验证<sup>[3](https://csrc.nist.gov/glossary/term/symmetric_key_algorithm)</sup><sup> • </sup><sup>[4](https://csrc.nist.gov/glossary/term/public_key_cryptography)</sup> |
| 加密标准 | AES，2000年从Rijndael算法族中选出，以128位、192位或256位密钥加密128位数据块（FIPS 197）<sup>[5](https://csrc.nist.gov/pubs/fips/197/final)</sup> |
| 哈希标准 | SHA-3，基于KECCAK，于2012年选出，在FIPS 202（2015年）中规定，是独立于SHA-2的备用算法族<sup>[6](https://csrc.nist.gov/Projects/Hash-Functions?trk=article-ssr-frontend-pulse_little-text-block)</sup> |
| 后量子标准 | FIPS 203（ML-KEM）、FIPS 204（ML-DSA）和FIPS 205（SLH-DSA）于2024年8月13日定稿；HQC于2025年3月11日被选为第五种算法<sup>[7](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)</sup><sup> • </sup><sup>[8](https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/Post_Quantum_Cryptography-Standardization)</sup> |
| 量子威胁 | 一台在密码分析意义上足够强大的量子计算机能够攻破RSA、ECDH和ECDSA等公钥系统；对手可能已经在收集数据以备日后解密（“先收集，后解密”）<sup>[9](https://www.cisa.gov/sites/default/files/2023-08/Quantum-Readiness%20-%20Migration%20to%20Post-Quantum%20Cryptography_508c.pdf)</sup> |
| 密钥管理 | 美国国家标准与技术研究院（NIST）的SP 800-57就密钥类型、保护和生命周期功能提供通用指导；恰当的密钥管理被描述为有效运用密码学的必要条件<sup>[10](https://csrc.nist.gov/Projects/Key-Management/Key-Management-Guidelines)</sup> |

## 安全服务

密码学用于提供若干基本安全服务：机密性、数据完整性、身份认证和不可否认性，这些服务也可能需要用来保护密码密钥材料本身。<sup>[11](https://csrc.nist.gov/csrc/media/events/key-management-workshop-2001/documents/guideline-overview-notes.pdf)</sup> 单一密码过程往往同时提供不止一种服务；例如数字签名就同时提供完整性、身份认证和不可否认性。<sup>[11](https://csrc.nist.gov/csrc/media/events/key-management-workshop-2001/documents/guideline-overview-notes.pdf)</sup>

**机密性**通过加密实现，即把明文转换为隐藏数据原意的密文；其可逆的逆操作是解密。<sup>[12](https://csrc.nist.gov/glossary/term/encryption)</sup> 消息的**完整性和来源认证**通常由消息认证码（MAC）提供，这是一种用对称密钥计算出的密码校验和，能够检测数据中的意外改动和蓄意改动；MAC提供真实性和完整性保护，但不提供不可否认性。<sup>[13](https://csrc.nist.gov/glossary/term/message_authentication_code)</sup>

## 对称密码学与非对称密码学

**对称密钥算法**对某一操作及其互补操作（如加密和解密）使用同一把秘密密钥。<sup>[3](https://csrc.nist.gov/glossary/term/symmetric_key_algorithm)</sup> 该密钥不公开，必须防止泄露；它通常被称为秘密密钥。<sup>[14](https://csrc.nist.gov/glossary/term/symmetric_key)</sup> 分组密码以块为单位加密数据，而非逐比特加密，适合加密大量数据，是许多密码服务的基础，尤其是提供机密性的服务。<sup>[1](https://www.nist.gov/cryptography)</sup><sup> • </sup><sup>[5](https://csrc.nist.gov/pubs/fips/197/final)</sup>

**公钥密码学**发明于1976年，使用两把相关联的密钥——公钥和私钥，其特性是从公钥推导出私钥在计算上是不可行的。<sup>[15](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup><sup> • </sup><sup>[4](https://csrc.nist.gov/glossary/term/public_key_cryptography)</sup> 它使各方无需受保护的通道即可建立密钥，并支持数字签名。随着20世纪80年代末互联网的发展，人们对不依赖集中式密钥分发的多对多安全通信需求上升，[互联网工程任务组](https://www.edgepedia.org/zh/internet-engineering-task-force)遂在互联网协议中部署公钥密码学，用于密钥建立和双向认证。<sup>[15](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup>

## 哈希函数与数字签名

密码哈希函数把任意长度的比特串映射为固定长度的输出。经批准的哈希函数被设计为单向的，即找到任何映射到预先指定输出的输入在计算上不可行；同时具有抗碰撞性，即找到两个映射到同一输出的不同输入在计算上不可行。<sup>[16](https://csrc.nist.gov/glossary/term/hash_function)</sup> 哈希为受保护的信息生成简短的摘要，用于许多安全应用，包括数字签名。<sup>[1](https://www.nist.gov/cryptography)</sup>

**数字签名**是数据经过密码变换后的产物；如果这一过程正确执行，接收方就能验证数据来自谁、确认数据未被改动，并防止签名者否认签名。<sup>[17](https://csrc.nist.gov/glossary/term/digital_signature)</sup> 它是一种非对称密钥操作：私钥对数据签名，公钥验证签名。<sup>[17](https://csrc.nist.gov/glossary/term/digital_signature)</sup> NIST于1994年定稿了关于数字签名生成与验证的FIPS 186标准，采纳了金融服务委员会X9已标准化的RSA和[椭圆曲线数字签名算法](https://www.edgepedia.org/zh/elliptic-curve-digital-signature-algorithm)（ECDSA）等签名方案。<sup>[18](https://csrc.nist.gov/nist-cyber-history?area=6081a7b8-6351-48a3-a7bf-33608ef5dd84&type=Standards)</sup><sup> • </sup><sup>[15](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup> 同一份FIPS 186还规定了首批经NIST批准、用于生成密钥及签名所需其他随机值的随机数生成器。<sup>[19](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>

## 标准与标准化

50多年来，NIST通过吸纳产业界、政府和学术界的开放协作流程，推动可信密码技术的发展；其标准有助于保障全球电子商务安全、保护美国联邦信息，并出现在从平板电脑、手机到自动取款机的商业产品中。<sup>[1](https://www.nist.gov/cryptography)</sup>

**AES。** 2000年，NIST宣布Rijndael分组密码族赢得[高级加密标准](https://www.edgepedia.org/zh/advanced-encryption-standard)竞赛。FIPS 197规定了三个成员——AES-128、AES-192和AES-256，它们分别使用128位、192位和256位密钥，以128位数据块为单位变换数据；数字后缀表示密钥长度。<sup>[5](https://csrc.nist.gov/pubs/fips/197/final)</sup>

**哈希函数。** 2005年，研究结果对SHA-1的抗碰撞性提出质疑，国际安全界敦促NIST举办竞赛，征集新的哈希函数族。NIST于2012年选出SHA-3，并在FIPS 202中加以规定。<sup>[15](https://www.nist.gov/blogs/cybersecurity-insights/cornerstone-cybersecurity-cryptographic-standards-and-50-year-evolution)</sup> SHA-3基于置换，其工作方式与SHA-2及更早的哈希算法完全不同，因此在SHA-2中发现的任何系统性问题都极不可能影响SHA-3。<sup>[19](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)</sup>

**迁移。** 由于算法会随时间推移而弱化，NIST SP 800-131A就迁移到更强的密钥和更稳健的算法提供指导；最近的一份修订草案提议淘汰作为机密性模式的ECB和用于签名生成的DSA，并为淘汰SHA-1和224位哈希函数设定了时间表。<sup>[20](https://csrc.nist.gov/pubs/sp/800/131/a/r3/ipd?source=post_page-----a346d0ccaefd--------------------------------)</sup>

## 后量子密码学

一台在密码分析意义上足够强大的量子计算机有可能攻破当今保护信息的公钥系统，包括RSA、椭圆曲线Diffie-Hellman（ECDH）和ECDSA。<sup>[9](https://www.cisa.gov/sites/default/files/2023-08/Quantum-Readiness%20-%20Migration%20to%20Post-Quantum%20Cryptography_508c.pdf)</sup> 网络安全和基础设施安全局（CISA）、国家安全局（NSA）和NIST敦促各组织现在就开始规划迁移，因为威胁行为者可能正在瞄准保密寿命较长的数据，以备日后解密，这种操作被称为“现在截获，日后攻破”或“先收集，后解密”。<sup>[9](https://www.cisa.gov/sites/default/files/2023-08/Quantum-Readiness%20-%20Migration%20to%20Post-Quantum%20Cryptography_508c.pdf)</sup>

NIST的后量子密码学项目自2016年起主持了一项公开标准化工作。<sup>[21](https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption)</sup> 2024年8月13日，商务部长批准了首批三项后量子[联邦信息处理标准](https://www.edgepedia.org/zh/federal-information-processing-standards)：<sup>[7](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)</sup>

- **FIPS 203**，《基于模格的密钥封装机制标准》（ML-KEM），源自CRYSTALS-KYBER。密钥封装机制让双方在公开信道上建立共享秘密密钥；ML-KEM的安全性关联于模误差学习问题的计算难度，它规定了三组参数——ML-KEM-512、ML-KEM-768和ML-KEM-1024，安全强度依次递增，性能依次递减。<sup>[22](https://csrc.nist.gov/pubs/fips/203/final)</sup>
- **FIPS 204**，《基于模格的数字签名标准》（ML-DSA），源自CRYSTALS-Dilithium，拟作为数字签名的首要标准。<sup>[7](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)</sup>
- **FIPS 205**，《无状态基于哈希的数字签名标准》（SLH-DSA），源自SPHINCS+，基于不同的数学方法，拟在ML-DSA被证明存在漏洞时作为备用方案。<sup>[7](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)</sup>

FALCON也被选中，将以FN-DSA之名作为FIPS 206发布。<sup>[8](https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/Post_Quantum_Cryptography-Standardization)</sup><sup> • </sup><sup>[7](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)</sup> 2025年3月11日，NIST选择HQC作为第五种后量子加密算法。据项目负责人、NIST数学家达斯汀·穆迪（Dustin Moody）介绍，HQC比ML-KEM更长，需要更多计算资源，但其简洁而安全的运行表现，加之基于不同的数学方法，使其成为值得信赖的备用方案；ML-KEM仍是通用加密的推荐选择。<sup>[8](https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/Post_Quantum_Cryptography-Standardization)</sup><sup> • </sup><sup>[21](https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption)</sup>

## 实践中的密码学

互联网协议组合运用这些原语。在[TLS 1.3](https://www.edgepedia.org/zh/tls-1-3)（RFC 8446）中，握手过程协商密码参数、认证服务器（并可选地认证客户端）并派生密钥材料；所有记录层密码都被建模为带关联数据的认证加密（AEAD），即一种统一的加密与认证操作，记录层被设计为提供机密性、完整性、顺序保护和抗重放性，以及长度隐藏。<sup>[23](https://datatracker.ietf.org/doc/html/rfc8446)</sup>

除加密和签名外，NIST的活跃工作领域还包括：面向小型物联网设备的轻量级密码学（当前算法对这些设备而言负担过重）、隐私增强密码学（旨在允许在不泄露身份特征的前提下研究私有数据）、随机比特生成，以及多方门限密码学。<sup>[1](https://www.nist.gov/cryptography)</sup><sup> • </sup><sup>[24](https://csrc.nist.gov/Projects/cryptographic-standards-and-guidelines)</sup> 密码模块验证计划等验证项目测试产品中密码学的实现，国家网络安全卓越中心则致力于弥合基础算法与其在商用现成技术中应用之间的差距。<sup>[25](https://csrc.nist.gov/Groups/Computer-Security-Division/Cryptographic-Technology)</sup>

## References

1. [Cryptography, NIST](https://www.nist.gov/cryptography)
2. [Security service, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/security_service)
3. [Symmetric key algorithm, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/symmetric_key_algorithm)
4. [Public key cryptography (PKC), NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/public_key_cryptography)
5. [FIPS 197, Advanced Encryption Standard (AES), NIST CSRC](https://csrc.nist.gov/pubs/fips/197/final)
6. [Hash Functions, NIST CSRC](https://csrc.nist.gov/Projects/Hash-Functions?trk=article-ssr-frontend-pulse_little-text-block)
7. [Announcing Approval of Three FIPS for Post-Quantum Cryptography, NIST CSRC](https://csrc.nist.gov/News/2024/postquantum-cryptography-fips-approved)
8. [Post-Quantum Cryptography Standardization, NIST CSRC](https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/Post_Quantum_Cryptography-Standardization)
9. [Quantum-Readiness: Migration to Post-Quantum Cryptography, CISA/NSA/NIST factsheet](https://www.cisa.gov/sites/default/files/2023-08/Quantum-Readiness%20-%20Migration%20to%20Post-Quantum%20Cryptography_508c.pdf)
10. [Key Management Guidelines, NIST CSRC](https://csrc.nist.gov/Projects/Key-Management/Key-Management-Guidelines)
11. [Key Management Workshop 2001, Section 3, NIST CSRC](https://csrc.nist.gov/csrc/media/events/key-management-workshop-2001/documents/guideline-overview-notes.pdf)
12. [Encryption, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/encryption)
13. [Message authentication code (MAC), NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/message_authentication_code)
14. [Symmetric key, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/symmetric_key)
15. [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)
16. [Hash function, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/hash_function)
17. [Digital signature, NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/digital_signature)
18. [NIST Cybersecurity Program History and Timeline, NIST CSRC](https://csrc.nist.gov/nist-cyber-history?area=6081a7b8-6351-48a3-a7bf-33608ef5dd84&type=Standards)
19. [Cryptography (history chapter), NIST CSRC](https://csrc.nist.gov/nist-cyber-history/cryptography/chapter)
20. [SP 800-131A Rev. 3 (Draft), Transitioning the Use of Cryptographic Algorithms and Key Lengths, NIST CSRC](https://csrc.nist.gov/pubs/sp/800/131/a/r3/ipd?source=post_page-----a346d0ccaefd--------------------------------)
21. [NIST Selects HQC as Fifth Algorithm for Post-Quantum Encryption, NIST](https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption)
22. [FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard, NIST CSRC](https://csrc.nist.gov/pubs/fips/203/final)
23. [RFC 8446, The Transport Layer Security (TLS) Protocol Version 1.3, IETF](https://datatracker.ietf.org/doc/html/rfc8446)
24. [Cryptographic Standards and Guidelines, NIST CSRC](https://csrc.nist.gov/Projects/cryptographic-standards-and-guidelines)
25. [About NIST's Cryptographic Technology Group, NIST CSRC](https://csrc.nist.gov/Groups/Computer-Security-Division/Cryptographic-Technology)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; 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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/cryptography

English original: https://www.edgepedia.org/cryptography
