PQC Performance
For most post-quantum schemes the bottleneck is not CPU — it is bandwidth. Lattice operations are blisteringly fast; the keys, ciphertexts, and signatures are what strain protocols and storage. Understanding that tradeoff is the key to a smooth migration.
CPU is usually not the bottleneck
In server TLS/KEM scenarios, CPU is usually not the primary bottleneck — but embedded, HSM, smartcard, and high-throughput signing services still need real-world measurement. The lattice-based standards are fast.ML-KEM key generation, encapsulation, and decapsulation all complete in microseconds on commodity hardware, and ML-DSA signing and verification are likewise fast. With optimized implementations on modern servers, ML-KEM/ML-DSA are generally fast enough that primitive computation is not the bottleneck in many scenarios; but the precise speed relationship versus ECDH/RSA must be confirmed by measurement on the target platform. For the everyday TLS/KEM case, the per-operation CPU cost of post-quantum crypto is usually not the primary bottleneck on modern servers.
The real cost is message size. A post-quantum handshake moves kilobytes where a classical one moved tens to hundreds of bytes, and a signature can be one to two orders of magnitude larger than an ECDSA signature. That extra data inflates handshake latency, certificate chains, and storage — and on lossy or constrained links it can force extra round trips or packet fragmentation.
Relative profile by scheme
Treat these as order-of-magnitude, qualitative comparisons; absolute numbers vary widely with hardware, compiler, and AVX2/hardware acceleration, so always benchmark on your target.
| Scheme | Type | Speed | Size profile | Practical note |
|---|---|---|---|---|
| ML-KEM | KEM | Very fast (µs) | Small — a few KB keys/ciphertext | The default KEM; bandwidth is modest. |
| ML-DSA | Signature | Fast | Moderate — KB-scale keys and sigs | Balanced default signature. |
| Falcon | Signature | Fast verify; complex sign | Compact signatures | Smallest lattice sigs, but the floating-point signer is delicate to implement safely. Falcon/FN-DSA has compact signatures and fast verification, but signer-side side-channel protection is complex, and it is not a published FIPS 204/205 mainline signature standard; prefer ML-DSA/SLH-DSA for compliant production. |
| SLH-DSA | Signature | Signing markedly slower than ML-DSA — commonly milliseconds or higher, depending on parameter set, implementation, and hardware | Large signatures (tens of KB) | Conservative hash-based security; use where signing is infrequent. |
| Classic McEliece | KEM | Slow keygen; fast encaps | Huge public keys (hundreds of KB to ~1 MB) | Extremely conservative; key transport dominates the cost. |
| HQC / BIKE | KEM | Fast | Larger than ML-KEM | Code-based diversity backups for ML-KEM. |
Where each scheme hurts
- ML-KEM / ML-DSA: usually modest CPU cost on modern servers; benchmark embedded, HSM, smartcard and high-throughput signing environments. The main visible cost is a few extra KB per handshake or signed object.
- SLH-DSA: signing is measured in milliseconds and signatures are large. Excellent for rarely-signed, long-lived artifacts (firmware, root certificates), poor for high-throughput online signing.
- Classic McEliece: encapsulation is fast and the security argument is decades old, but the public key is enormous and slow to generate — it taxes bandwidth and storage, not steady-state CPU.
- Falcon: small signatures and fast verification make it attractive for size-sensitive protocols, but constant-time signing is hard (see side channels).
Hardware acceleration
Optimized implementations use AVX2 (and increasingly AVX-512 and Arm NEON) to vectorize the polynomial arithmetic and NTT, giving large speedups over portable C. SHA-3/SHAKE hashing — used heavily by ML-KEM and ML-DSA — benefits from CPU SHA extensions and dedicated hardware. On embedded targets, lack of these features widens the gap, so benchmark on the actual deployment hardware rather than a development laptop.
How to benchmark honestly
Public benchmarking efforts such as SUPERCOP and the various PQC benchmarking suites measure cycle counts across platforms; use them for relative guidance, not as guarantees for your environment. When you benchmark:
- Measure on your target CPU with the same compiler flags you ship.
- Separate per-operation CPU cost from total bytes on the wire.
- For protocols, measure end-to-end handshake latency including any added round trips, not just the crypto primitive.
- Compare hybrid configurations (classical + PQ) against pure classical to size the real-world delta.
Related
Parameters & sizes →
Exact key, ciphertext, and signature sizes.
Side channels →
Why constant-time can cost performance.
SLH-DSA →
The slow-signing, large-signature scheme.
Classic McEliece →
The huge-key, conservative KEM.
Standards & references
- Open Quantum Safe — uniform harness for benchmarking schemes side by side.
- liboqs (GitHub) — the library and built-in speed tests behind such benchmarks.
- NIST PQC project — algorithm specifications and parameter sets.
- Resources — full standards register
PQC 性能
对多数后量子方案而言,瓶颈不在算力,而在带宽。格运算极快,真正给协议与存储带来压力的是密钥、密文与签名的体积。理解这一权衡,是平滑迁移的关键。
算力通常不是瓶颈
在服务器 TLS/KEM 场景中,算力通常不是首要瓶颈;但嵌入式、HSM、智能卡和高吞吐签名服务仍需实测。基于格的标准算法很快。ML-KEM 的密钥生成、封装与解封装在通用硬件上都在微秒级完成;ML-DSA 的签名与验证同样快。在优化实现和现代服务器上,ML-KEM/ML-DSA 通常足够快,很多场景下原语计算不是瓶颈;但与 ECDH/RSA 的精确快慢关系必须以目标平台实测为准。对日常 TLS/KEM 场景,后量子密码的单次运算算力开销在现代服务器上通常不是主要瓶颈。
真正的代价是消息体积。后量子握手传输的是数千字节,而经典握手只需数十到数百字节,一个签名可能比 ECDSA 签名大一到两个数量级。这些额外数据会拉长握手延迟,撑大证书链与存储,在有损或受限链路上还可能迫使额外往返或分片。
各方案相对画像
下表为数量级与定性比较,绝对数值随硬件、编译器及 AVX2 硬件加速大幅波动,务必在目标平台上实测。
| 方案 | 类型 | 速度 | 体积特征 | 实务说明 |
|---|---|---|---|---|
| ML-KEM | KEM | 极快 微秒级 | 小 数 KB 密钥与密文 | 默认 KEM 带宽适中 |
| ML-DSA | 签名 | 快 | 中等 KB 级密钥与签名 | 均衡的默认签名 |
| Falcon | 签名 | 验证快 签名复杂 | 签名紧凑 | 格签名中最小 但浮点签名器难以安全实现。Falcon/FN-DSA 签名紧凑、验证快,但签名器侧信道防护复杂,且不属于 FIPS 204/205 已发布主线签名标准;合规生产优先 ML-DSA/SLH-DSA。 |
| SLH-DSA | 签名 | 签名显著慢于 ML-DSA,常见为毫秒级到更高量级,具体取决于参数集、实现和硬件 | 签名大 数十 KB | 保守的哈希安全 适合签名不频繁的场景 |
| Classic McEliece | KEM | 密钥生成慢 封装快 | 公钥巨大 数百 KB 到约 1 MB | 极为保守 成本主要在密钥传输 |
| HQC / BIKE | KEM | 快 | 大于 ML-KEM | 作为 ML-KEM 的编码类多样性备选 |
各方案痛点所在
- ML-KEM 与 ML-DSA——在现代服务器上通常算力开销不大;嵌入式、HSM、智能卡与高吞吐签名场景仍需实测。主要可见成本是每次握手或签名对象多出的数 KB。
- SLH-DSA——签名耗时毫秒级且签名很大,适合极少签名、长生命周期的产物(固件、根证书),不适合高吞吐在线签名。
- Classic McEliece——封装快,安全论证历经数十年,但公钥极大且生成慢,它压榨的是带宽与存储,而非稳态算力。
- Falcon——签名小、验证快,对体积敏感的协议很有吸引力,但常数时间签名很难,参见 侧信道。
硬件加速
优化实现使用 AVX2 以及日益普及的 AVX-512 与 Arm NEON,对多项式运算与 NTT 做向量化,相比可移植 C 提速显著。ML-KEM 与 ML-DSA 大量使用的 SHA-3/SHAKE 哈希,可受益于 CPU SHA 扩展与专用硬件;在嵌入式目标上缺少这些特性会拉大差距。因此应在实际部署硬件上实测,而非开发笔记本。
如何诚实地做基准测试
SUPERCOP 等公开基准项目以及各类 PQC 基准套件在多平台测量周期数,可用作相对参考,而非对你环境的保证。测试时应:
- 在目标 CPU 上,用与上线相同的编译参数测量。
- 把单次运算算力成本与线上总字节数分开看。
- 对协议,测量含任何新增往返的端到端握手延迟,而非仅原语本身。
- 将混合配置(经典加 PQ)与纯经典对比,以量化真实差距。
相关
标准与参考
- Open Quantum Safe — 用统一框架横向对比各方案的基准测试
- liboqs (GitHub) — 上述基准背后的库与内置速度测试
- NIST PQC 项目 — 算法规范与参数集
- 资源链接 — 完整标准登记册