# 签名方案

签名方案是一种密码学方法，由三个算法组成：密钥生成、签名创建和签名验证，它让签名者能够对消息生成可验证的签名。<sup>[1](https://www.etsi.org/deliver/etsi_ts/102100_102199/10217601/02.00.00_60/ts_10217601v020000p.pdf)</sup> 签名是一个数值，依赖于只有签名者知道的秘密以及消息内容；公正的第三方无需访问签名者的私钥即可验证该签名，从而实现身份认证、数据完整性和不可否认性。<sup>[2](https://cacr.uwaterloo.ca/hac/about/chap11.pdf)</sup> 用私人持有的密钥签名的消息，任何持有对应公钥的人都可以检验，签名在计算上难以伪造，签名者事后也无法否认其有效性。<sup>[3](https://doi.org/10.1145/359340.359342)</sup>

| 事实 | 详情 |
|---|---|
| 结构 | 由密钥生成、签名创建和验证算法组成的三元组；一套套件还附加填充方法和哈希函数 <sup>[1](https://www.etsi.org/deliver/etsi_ts/102100_102199/10217601/02.00.00_60/ts_10217601v020000p.pdf)</sup> |
| 保证 | 身份认证、数据完整性、不可否认性；第三方无需私钥即可验证 <sup>[2](https://cacr.uwaterloo.ca/hac/about/chap11.pdf)</sup> |
| 首个实用方案 | RSA，1978 年发表于《ACM 通讯》 <sup>[3](https://doi.org/10.1145/359340.359342)</sup> |
| 现行 NIST 经典标准 | FIPS 186-5 批准 RSA、ECDSA 和 EdDSA；DSA 仅可用于验证旧签名 <sup>[4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)</sup> |
| 后量子标准 | FIPS 204（ML-DSA）于 2024 年 8 月 13 日定稿 <sup>[5](https://csrc.nist.gov/pubs/fips/204/final)</sup>；FIPS 205（SLH-DSA）于 2024 年获批 <sup>[6](https://arxiv.org/pdf/2510.09271)</sup> |
| 尺寸差距 | ML-DSA-44：公钥 1,312 字节，签名 2,420 字节，而 Ed25519 分别为 32 和 64 字节 <sup>[7](https://blog.cloudflare.com/ml-dsa-will-have-to-do/)</sup> |
| 部署情况 | 证书透明度日志中约 94% 的证书使用 RSA 签名 <sup>[8](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)</sup> |

## 工作原理

理论基础是单向函数：一种易于计算、但对其值域中几乎所有输出求逆在计算上不可行的函数。<sup>[9](https://mit6875.github.io/PAPERS/Diffie-Hellman.pdf)</sup> RSA 实现了一种陷门单向置换，将其输入空间一一映射到自身，不产生碰撞。<sup>[8](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)</sup> 验证者检验一个涉及公钥和消息的等式，因此无需秘密即可检验有效性。

在“先哈希后签名”范式中，若底层方案具有 EUF-CMA 安全性且哈希函数具有抗碰撞性，则复合方案具有 EUF-CMA 安全性。<sup>[10](https://www.isec.tugraz.at/wp-content/uploads/teaching/mpkc/2021/L3-signatures.pdf)</sup> 标准安全目标是选择消息攻击下的存在性不可伪造性（EUF-CMA）。<sup>[11](https://people.csail.mit.edu/rivest/pubs/GMR84b.pdf)</sup> 强不可伪造性（SUF-CMA）还禁止对已签名消息生成任何新签名；ML-DSA 的设计即满足 SUF-CMA。<sup>[12](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)</sup> 安全性证明建立在随机预言机模型（ROM）中，或针对量子对手建立在 QROM 中：Dilithium 在经典 ROM 中基于 MLWE 和 MSIS 具有 SUF-CMA 安全性，但归约是非紧致的。<sup>[13](https://doi.org/10.46586/tches.v2018.i1.238-268)</sup>

## 具体实现

**RSA。** 密钥生成采样两个 \( \lambda \) 位素数（通常 \( \lambda = 1024 \) 或 2048），令 \( N = p \cdot q \)，并计算 \( d \) 为 \( e \) 模 \( \varphi(N) \) 的逆元，其中 \( e = 2^{16} + 1 \) 是常用的公开指数。<sup>[8](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)</sup> 签名时将哈希值求 \( d \) 次幂模 \( N \)；验证时将签名求 \( e \) 次幂。朴素的教科书式 RSA 因乘法性而在无消息攻击下存在性可伪造，因此需要 RSA-FDH 或 RSA-PSS 填充；科龙于 2000 年在随机预言机模型中给出了 RSA-FDH 的精确安全性证明。<sup>[10](https://www.isec.tugraz.at/wp-content/uploads/teaching/mpkc/2021/L3-signatures.pdf)</sup>

**ECDSA。** 域参数的形式为 (q, FR, h, n, Type, a, b, G, {domain_parameter_seed})，其中 q 为域大小，G 为阶为素数 n 的基点，h 为余因子。<sup>[4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)</sup> 每个签名都需要一个统计唯一、不可预测的每消息秘密整数 k，且每次签名都要重新生成。<sup>[1](https://www.etsi.org/deliver/etsi_ts/102100_102199/10217601/02.00.00_60/ts_10217601v020000p.pdf)</sup> 确定性 ECDSA 将 k 导出为消息的函数，这对于缺乏优质随机数来源的设备而言是可取的。<sup>[4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)</sup>

**Ed25519。** EdDSA 是扭曲爱德华兹曲线上的 Schnorr 变体；Ed25519 设 \( b = 256 \)，\( H \) 为 SHA-512，\( q \) 为素数 \( 2^{255} - 19 \)。<sup>[14](https://ed25519.cr.yp.to/ed25519-20110705.pdf)</sup> 签名时以确定性方式计算随机数 \( r = H(h_{b}, \ldots, h_{2b-1}, M) \)，不消耗每消息随机性，验证者检验群等式 \( 8S \cdot B = 8R + 8H(R,A,M) \cdot A \)<sup>[14](https://ed25519.cr.yp.to/ed25519-20110705.pdf)</sup>，在 RFC 8032 中写作 \( [2^{c} \cdot S]B = 2^{c} \cdot R + [2^{c} \cdot h]A \)。<sup>[15](https://datatracker.ietf.org/doc/html/rfc8032)</sup>

**一次性哈希签名。** 一种由任意单向函数构建的方案：签名者存入 40 个公开值 \( F(k_{i}) \)，签名时揭示由文档哈希选出的 20 个密钥；签名后销毁剩余的私钥。<sup>[16](https://lamport.azurewebsites.net/pubs/dig-sig.pdf)</sup>

## 起源

迪菲和赫尔曼于 1976 年在《IEEE 信息论汇刊》上发表的论文提出了数字签名（单向认证）问题，建议发送者用私钥“解密”消息以生成认证符，并将单向函数定义为底层原语。<sup>[9](https://mit6875.github.io/PAPERS/Diffie-Hellman.pdf)</sup> 同一篇论文还包含单向消息认证的部分解决方案，使用一个单向函数和 2N 个秘密向量。<sup>[9](https://mit6875.github.io/PAPERS/Diffie-Hellman.pdf)</sup><sup> • </sup><sup>[17](https://dspace.mit.edu/bitstream/handle/1721.1/148910/MIT-LCS-TM-082.pdf)</sup> 里维斯特、沙米尔和阿德尔曼于 1978 年在《ACM 通讯》上发表了 RSA，文中将提出公钥概念的功劳归于迪菲和赫尔曼，但指出他们未给出实用实现，并将 RSA 与 迪菲—赫尔曼指数密钥分发技术区分开来，后者并非基于陷门单向置换。<sup>[3](https://doi.org/10.1145/359340.359342)</sup>

戈德瓦瑟—米卡利—里维斯特签名方案可证明能抵御自适应选择消息攻击，伪造等价于分解大整数。<sup>[11](https://people.csail.mit.edu/rivest/pubs/GMR84b.pdf)</sup> DSA 是 ElGamal 方案的变体。<sup>[18](https://www.cs.miami.edu/home/burt/learning/Csc609.142/ecdsa-cert.pdf)</sup> ECDSA 是 DSA 的椭圆曲线对应方案，1998 年被接受为 ISO 标准，1999 年 1 月成为 ANSI 标准，2000 年成为 IEEE 和 NIST 标准；约翰逊、梅内泽斯和范斯通于 2001 年在《国际信息安全杂志》上发表了 ECDSA 论文。<sup>[19](https://doi.org/10.1007/s102070100002)</sup>

## 变体

各方案族因困难假设和结构而异。RSA 基于大整数分解；<sup>[3](https://doi.org/10.1145/359340.359342)</sup> DSA 和 ElGamal 基于离散对数问题，而一次性方案源自对称密钥密码学。<sup>[2](https://cacr.uwaterloo.ca/hac/about/chap11.pdf)</sup> 方案可分为带附录型（验证需要消息）和消息恢复型，以及随机化与确定性两类。<sup>[2](https://cacr.uwaterloo.ca/hac/about/chap11.pdf)</sup> BLS 签名简短且具有确定性，在 CDH 假设下于随机预言机中具有 sEUF-CMA 安全性，通过配对检验 \( e(\sigma, g) = e(H(m), y) \) 验证。<sup>[10](https://www.isec.tugraz.at/wp-content/uploads/teaching/mpkc/2021/L3-signatures.pdf)</sup>

**基于哈希的。** XMSS 是一种有状态方案，使用 WOTS+ 一次性签名，有单树（XMSS）和多树（XMSS\(^{\mathrm{MT}}\)）变体；其安全性不要求哈希函数具有抗碰撞性。<sup>[20](https://www.rfc-editor.org/rfc/rfc8391.html)</sup> LMS 是默克尔方案的变体，配有分层签名系统（HSS）以实现扩展。<sup>[21](https://datatracker.ietf.org/doc/html/rfc8554)</sup> SPHINCS+ 是一种无状态框架，引入 FORS 少次签名和可调哈希函数，通过默克尔树的超树进行签名。<sup>[22](https://eprint.iacr.org/2019/1086.pdf)</sup>

**基于格的及其他。** ML-DSA 源自 CRYSTALS-Dilithium，使用带中止的 Fiat-Shamir 构造，基于模学习误差问题。<sup>[12](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)</sup> Falcon 的假设是 NTRU-SIS。<sup>[23](https://pqshield.github.io/nist-sigs-zoo/)</sup> SQIsign 基于同源，是将 sigma 协议经 Fiat-Shamir 变换转化而成的签名方案，假设带提示的自同态环问题某版本的困难性。<sup>[24](https://csrc.nist.gov/csrc/media/Projects/pqc-dig-sig/documents/round-2/spec-files/sqisign-spec-round2-web.pdf)</sup> 后量子设计空间还包括多变量、基于编码、基于对称密钥以及 MPC-in-the-head 方案。<sup>[25](https://dl.acm.org/doi/10.1016/j.cosrev.2026.100935)</sup>

## 应用

TLS 证书由 RSA 主导，约占证书透明度日志条目的 94%。<sup>[8](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)</sup> 在第 12 代英特尔 i7-12650H 上（1,000 次迭代的中位数），ECDSA P-256 签名耗时 36.3 微秒，验证耗时 107.2 微秒；Ed25519 签名耗时 42.0 微秒，验证耗时 110.6 微秒；RSA-2048 签名耗时 981.4 微秒，但验证仅需 27.0 微秒。<sup>[23](https://pqshield.github.io/nist-sigs-zoo/)</sup> 后量子方案的尺寸更大：ML-DSA-44 公钥为 1,312 字节，签名为 2,420 字节，<sup>[7](https://blog.cloudflare.com/ml-dsa-will-have-to-do/)</sup> 而 SLH-DSA 签名从 7,856 字节到 49,856 字节不等。<sup>[23](https://pqshield.github.io/nist-sigs-zoo/)</sup> 在验证方面，格方案可以胜过经典方案：在安全等级 5 下，ML-DSA 在一台 ARM 笔记本电脑上的验证耗时为 0.14 毫秒，而 ECDSA 为 0.88 毫秒。<sup>[6](https://arxiv.org/pdf/2510.09271)</sup> 在 TLS 集成测试中，Dilithium 2 和 Falcon 512 的证书生成分别比 RSA-2048 快 18.98% 和 16.24%，但经典 RSA 在证书验证方面仍然最快。<sup>[26](https://www.mdpi.com/2410-387X/9/2/38)</sup>

[代码签名](https://www.edgepedia.org/zh/code-signing)有一段警示性的历史：索尼为 [PlayStation 3](https://www.edgepedia.org/zh/playstation-3) 代码签名实现的 ECDSA 复用了会话密钥，立即泄露了长期私钥。<sup>[14](https://ed25519.cr.yp.to/ed25519-20110705.pdf)</sup> 在区块链模拟中，ML-DSA 在安全等级 3 下将执行时间缩短了 90%，尽管更大的签名减少了每区块的交易数。<sup>[6](https://arxiv.org/pdf/2510.09271)</sup> ECDSA 加 Dilithium 的混合签名可在当前的 nRF52840 硬件安全密钥上运行，尽管后量子方案资源需求更大。<sup>[27](https://elie.net/static/files/hybrid-post-quantum-signatures-in-hardware-security-keys/hybrid-post-quantum-signatures-in-hardware-security-keys-paper.pdf)</sup> Google Cloud KMS 于 2026 年 7 月 28 日实现了量子安全的 ML-DSA 和 SLH-DSA 签名的正式可用。<sup>[28](https://cloud.google.com/blog/products/identity-security/future-proofing-data-integrity-quantum-safe-digital-signatures-in-cloud-kms)</sup> 部署工具随标准化跟进：RFC 9909 为 X.509 PKI 定义了 SLH-DSA 标识符，<sup>[29](https://www.rfc-editor.org/rfc/rfc9909.html)</sup> OpenSSL 3.5.0 于 2025 年 4 月添加了 ML-DSA 支持，首批 WebPKI ML-DSA 证书预计于 2027 年初出现。<sup>[7](https://blog.cloudflare.com/ml-dsa-will-have-to-do/)</sup>

## 局限与替代方案

**ECDSA 随机数。** 若单个签名背后的随机数 k 泄露，私钥即可由 \( d = (s \cdot k - e) \cdot r^{-1} \bmod n \) 推出；若同一 k 用于两条消息，则 \( k = (e_{1} - e_{2}) \cdot (s_{1} - s_{2})^{-1} \bmod n \)。这两种失误都在生产环境中发生过。<sup>[30](https://www.projecteleven.com/blog/post-quantum-signing-1-primer)</sup> 确定性 ECDSA 将消息确定性地映射为每消息秘密，是随机性薄弱设备的标准缓解措施。<sup>[4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)</sup>

**结构性伪造。** 教科书式 RSA 在无消息攻击下存在性可伪造：任意 \( \sigma \) 都能产生有效的 \( m = \sigma^{e} \bmod N \)，这正是 RSA-FDH 和 RSA-PSS 存在的原因。<sup>[10](https://www.isec.tugraz.at/wp-content/uploads/teaching/mpkc/2021/L3-signatures.pdf)</sup>

**状态与故障。** 在有状态哈希方案中，若秘密密钥状态被使用两次，则不再有任何密码学安全保证；<sup>[21](https://datatracker.ietf.org/doc/html/rfc8554)</sup> SLH-DSA 的一棵树不得用于超过 \( 2^{64} \) 次签名操作。<sup>[29](https://www.rfc-editor.org/rfc/rfc9909.html)</sup> 故障攻击可以伪造签名，而发布前验证这一典型对策对 SLH-DSA 无效；签名生成中的冗余才是有效对策。<sup>[29](https://www.rfc-editor.org/rfc/rfc9909.html)</sup> ML-DSA 的默认对冲签名结合新鲜随机性和预计算随机性以缓解侧信道攻击。<sup>[12](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)</sup> 经典密码体系面临的总体威胁来自量子计算：在足够大的量子计算机上运行[肖尔算法](https://www.edgepedia.org/zh/shors-algorithm)，可以在数秒内密码分析任何 RSA 或 ECC 公钥并生成伪造签名。<sup>[25](https://dl.acm.org/doi/10.1016/j.cosrev.2026.100935)</sup>

**开放问题。** 求逆 RSA 函数是否与分解模数一样困难尚属未知，尽管大多数密码学家相信如此。<sup>[8](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)</sup> FN-DSA 的签名依赖浮点运算，难以以恒定时间、侧信道安全的方式实现，导致其可用性延迟。<sup>[7](https://blog.cloudflare.com/ml-dsa-will-have-to-do/)</sup> 已发表的归约仍是非紧致的，如 Dilithium 的 SUF-CMA 证明所示。<sup>[13](https://doi.org/10.46586/tches.v2018.i1.238-268)</sup>

## References

1. [ETSI TS 102 176-1: Algorithms and Parameters for Secure Electronic Signatures](https://www.etsi.org/deliver/etsi_ts/102100_102199/10217601/02.00.00_60/ts_10217601v020000p.pdf)
2. [Handbook of Applied Cryptography, Chapter 11: Digital Signatures](https://cacr.uwaterloo.ca/hac/about/chap11.pdf)
3. [R. L. Rivest, A. Shamir, L. Adleman (1978). A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM.](https://doi.org/10.1145/359340.359342)
4. [FIPS 186-5: Digital Signature Standard (DSS)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)
5. [FIPS 204, Module-Lattice-Based Digital Signature Standard | CSRC](https://csrc.nist.gov/pubs/fips/204/final)
6. [Post-quantum signatures in blockchain systems (benchmarking ML-DSA, Falcon, SPHINCS+, Mayo, CROSS vs ECDSA)](https://arxiv.org/pdf/2510.09271)
7. [Why we cannot wait for better post-quantum signature algorithms | Cloudflare Blog](https://blog.cloudflare.com/ml-dsa-will-have-to-do/)
8. [MIT 6.1600 lecture notes: RSA Signatures](https://mit-pdos.github.io/6.1600-notes/lec06.pdf)
9. [New Directions in Cryptography (full text PDF; DOI record 10.1109/TIT.1976.1055638, IEEE Trans. IT 22(6), Nov. 1976)](https://mit6875.github.io/PAPERS/Diffie-Hellman.pdf)
10. [Modern Public Key Cryptography, Digital Signature Schemes (TU Graz lecture notes)](https://www.isec.tugraz.at/wp-content/uploads/teaching/mpkc/2021/L3-signatures.pdf)
11. [A "Paradoxical" Solution To The Signature Problem (FOCS 1984)](https://people.csail.mit.edu/rivest/pubs/GMR84b.pdf)
12. [FIPS 204: Module-Lattice-Based Digital Signature Standard (full text)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)
13. [Léo Ducas and colleagues (2018). CRYSTALS-Dilithium: A Lattice-Based Digital Signature Scheme. IACR Transactions on Cryptographic Hardware and Embedded Systems.](https://doi.org/10.46586/tches.v2018.i1.238-268)
14. [High-speed high-security signatures (Bernstein, Duif, Lange, Schwabe, Yang)](https://ed25519.cr.yp.to/ed25519-20110705.pdf)
15. [RFC 8032 - Edwards-Curve Digital Signature Algorithm (EdDSA)](https://datatracker.ietf.org/doc/html/rfc8032)
16. [Constructing Digital Signatures from One Way Function](https://lamport.azurewebsites.net/pubs/dig-sig.pdf)
17. [A Method for Obtaining Digital Signatures and Public-Key Cryptosystems (MIT LCS TM-82, April 1977)](https://dspace.mit.edu/bitstream/handle/1721.1/148910/MIT-LCS-TM-082.pdf)
18. [The Elliptic Curve Digital Signature Algorithm (ECDSA), Johnson, Menezes, Vanstone](https://www.cs.miami.edu/home/burt/learning/Csc609.142/ecdsa-cert.pdf)
19. [Don Johnson, Alfred Menezes, Scott Vanstone (2001). The Elliptic Curve Digital Signature Algorithm (ECDSA). International Journal of Information Security.](https://doi.org/10.1007/s102070100002)
20. [RFC 8391 - XMSS: eXtended Merkle Signature Scheme](https://www.rfc-editor.org/rfc/rfc8391.html)
21. [RFC 8554 - Leighton-Micali Hash-Based Signatures (LMS)](https://datatracker.ietf.org/doc/html/rfc8554)
22. [The SPHINCS+ Signature Framework](https://eprint.iacr.org/2019/1086.pdf)
23. [NIST PQC Signature Zoo](https://pqshield.github.io/nist-sigs-zoo/)
24. [SQIsign Specification Document, NIST PQC Round 2](https://csrc.nist.gov/csrc/media/Projects/pqc-dig-sig/documents/round-2/spec-files/sqisign-spec-round2-web.pdf)
25. [Securing the future: A comprehensive review of post-quantum digital signatures](https://dl.acm.org/doi/10.1016/j.cosrev.2026.100935)
26. [Security and Performance Analyses of Post-Quantum Digital Signature Algorithms and Their TLS and PKI Integrations](https://www.mdpi.com/2410-387X/9/2/38)
27. [Hybrid Post-Quantum Signatures in Hardware Security Keys](https://elie.net/static/files/hybrid-post-quantum-signatures-in-hardware-security-keys/hybrid-post-quantum-signatures-in-hardware-security-keys-paper.pdf)
28. [Future-proofing data integrity: Quantum-safe digital signatures in Cloud KMS | Google Cloud Blog](https://cloud.google.com/blog/products/identity-security/future-proofing-data-integrity-quantum-safe-digital-signatures-in-cloud-kms)
29. [RFC 9909: Algorithm Identifiers for SLH-DSA in X.509 PKI](https://www.rfc-editor.org/rfc/rfc9909.html)
30. [Post-Quantum Signing #1: Primer](https://www.projecteleven.com/blog/post-quantum-signing-1-primer)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Titles Mo to Z

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/signature-scheme

English original: https://www.edgepedia.org/signature-scheme
