QianHeng乾珩 PQC Docs Hub量子文档 ✦ Ask AI✦ 问问文档 ⚐ Scan⚐ 扫一扫

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.

SchemeTypeSpeedSize profilePractical note
ML-KEMKEMVery fast (µs)Small — a few KB keys/ciphertextThe default KEM; bandwidth is modest.
ML-DSASignatureFastModerate — KB-scale keys and sigsBalanced default signature.
FalconSignatureFast verify; complex signCompact signaturesSmallest 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-DSASignatureSigning markedly slower than ML-DSA — commonly milliseconds or higher, depending on parameter set, implementation, and hardwareLarge signatures (tens of KB)Conservative hash-based security; use where signing is infrequent.
Classic McElieceKEMSlow keygen; fast encapsHuge public keys (hundreds of KB to ~1 MB)Extremely conservative; key transport dominates the cost.
HQC / BIKEKEMFastLarger than ML-KEMCode-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:

  1. Measure on your target CPU with the same compiler flags you ship.
  2. Separate per-operation CPU cost from total bytes on the wire.
  3. For protocols, measure end-to-end handshake latency including any added round trips, not just the crypto primitive.
  4. Compare hybrid configurations (classical + PQ) against pure classical to size the real-world delta.
Note
Resist quoting precise cycle counts or microsecond figures from a blog post as if they applied to you — they swing by an order of magnitude across CPUs, compilers, and AVX2 availability. The durable takeaways are qualitative: lattice CPU cost is negligible, SLH-DSA signing is slow with big signatures, Classic McEliece keys are huge, and bandwidth — not compute — is the migration constraint to design around.

Related

Standards & references

PQC 性能

对多数后量子方案而言,瓶颈不在算力,而在带宽。格运算极快,真正给协议与存储带来压力的是密钥、密文与签名的体积。理解这一权衡,是平滑迁移的关键。

算力通常不是瓶颈

在服务器 TLS/KEM 场景中,算力通常不是首要瓶颈;但嵌入式、HSM、智能卡和高吞吐签名服务仍需实测。基于格的标准算法很快。ML-KEM 的密钥生成、封装与解封装在通用硬件上都在微秒级完成;ML-DSA 的签名与验证同样快。在优化实现和现代服务器上,ML-KEM/ML-DSA 通常足够快,很多场景下原语计算不是瓶颈;但与 ECDH/RSA 的精确快慢关系必须以目标平台实测为准。对日常 TLS/KEM 场景,后量子密码的单次运算算力开销在现代服务器上通常不是主要瓶颈。

真正的代价是消息体积。后量子握手传输的是数千字节,而经典握手只需数十到数百字节,一个签名可能比 ECDSA 签名大一到两个数量级。这些额外数据会拉长握手延迟,撑大证书链与存储,在有损或受限链路上还可能迫使额外往返或分片。

各方案相对画像

下表为数量级与定性比较,绝对数值随硬件、编译器及 AVX2 硬件加速大幅波动,务必在目标平台上实测。

方案类型速度体积特征实务说明
ML-KEMKEM极快 微秒级小 数 KB 密钥与密文默认 KEM 带宽适中
ML-DSA签名中等 KB 级密钥与签名均衡的默认签名
Falcon签名验证快 签名复杂签名紧凑格签名中最小 但浮点签名器难以安全实现。Falcon/FN-DSA 签名紧凑、验证快,但签名器侧信道防护复杂,且不属于 FIPS 204/205 已发布主线签名标准;合规生产优先 ML-DSA/SLH-DSA。
SLH-DSA签名签名显著慢于 ML-DSA,常见为毫秒级到更高量级,具体取决于参数集、实现和硬件签名大 数十 KB保守的哈希安全 适合签名不频繁的场景
Classic McElieceKEM密钥生成慢 封装快公钥巨大 数百 KB 到约 1 MB极为保守 成本主要在密钥传输
HQC / BIKEKEM大于 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 基准套件在多平台测量周期数,可用作相对参考,而非对你环境的保证。测试时应:

  1. 在目标 CPU 上,用与上线相同的编译参数测量。
  2. 把单次运算算力成本与线上总字节数分开看。
  3. 对协议,测量含任何新增往返的端到端握手延迟,而非仅原语本身。
  4. 将混合配置(经典加 PQ)与纯经典对比,以量化真实差距。
注意
不要把博客里的精确周期数或微秒值当成适用于自己的数据,它们随 CPU、编译器与 AVX2 可用性波动一个数量级。真正可靠的结论是定性的:格的算力开销可忽略,SLH-DSA 签名慢且签名大,Classic McEliece 密钥巨大;带宽而非算力才是迁移要围绕设计的约束。

相关

标准与参考

⚑ Report an error⚑ 纠错与校正