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

Web3 & Blockchain PQC Solution

Public blockchains are among the most exposed systems in the post-quantum transition: their ledgers are open, their security rests almost entirely on digital signatures, and they are notoriously hard to change. This page maps the quantum risk across Web3 assets, lays out the migration approaches that actually fit an immutable, governance-driven environment, and gives a phased roadmap from key inventory to full PQC.

Why now

Blockchains depend on two cryptographic primitives. Account and transaction integrity rest on elliptic-curve signaturesECDSA over secp256k1 on Bitcoin and Ethereum, and Ed25519 on many newer chains. Proof-of-work and ledger integrity rest on hash functions such as SHA-256 and Keccak.

These two primitives age very differently under quantum attack. Shor's algorithm breaks elliptic-curve cryptography outright: an adversary with a cryptographically relevant quantum computer (CRQC) could derive a private key from its public key, forge signatures, and move funds that are not theirs. Grover's algorithm only halves the effective strength of hash functions, so PoW and hash-based integrity survive with a comfortable margin (and can be hardened by larger outputs).

The Harvest Now, Decrypt Later (HNDL) problem is uniquely acute here, and the "harvest" step is already done. The ledger is public, so capturing data costs nothing. On most chains a public key becomes visible the moment an address transacts — it is published outright, or it is recoverable from the signature in the spending transaction. Any address that has ever transacted, and especially any reused or known-public-key address, is therefore already quantum-vulnerable the day a CRQC appears. Unspent funds at an address that has never revealed its key are comparatively safer — until they are spent.

Risk & asset map

AssetCryptography todayQuantum threatPriority
Account / tx signaturesECDSA (secp256k1), Ed25519Broken by Shor — key recovery & signature forgeryCritical
Exposed addresses (reused / known pubkey)Public key already on-chainFunds stealable once a CRQC existsCritical
Unexposed addresses (public key not yet on-chain)Pubkey hidden behind address hashComparatively safer before first spend, provided the public key is not otherwise leaked by the address hash or the underlying implementation; once the public key is published with the spending transaction, it enters the quantum risk windowHigh
Consensus (PoW)SHA-256 / KeccakGrover-only — survives with marginLow
Smart contractsSignature / verify logic, precompilesVerification of broken schemes; needs PQC verify pathsHigh
Wallet & custody keysEC keypairs, seed phrases, HSM/MPCSame Shor exposure; key store must hold PQC keysCritical
Cross-chain bridgesMultisig / threshold EC signaturesHigh-value forgery targetsHigh

Recommended approaches

  • Quantum-safe signatures — replace on-chain signing with ML-DSA (lattice) or SLH-DSA (stateless hash-based), or stateful hash-based one-time schemes (LMS/XMSS) where a single-use signing model fits the protocol. See PQC signatures.
  • Hybrid / dual signatures — during transition, attach both an ECDSA and an ML-DSA signature so a transaction is valid only if both verify. This preserves classical compatibility while adding quantum resistance. See hybrid cryptography.
  • Account abstraction — on chains that support smart-contract accounts or extensible verification logic, partly elevate the signature scheme to an account property, reducing the dependence of key or algorithm rotation on a base-layer hard fork; the base layer may still need new PQC verification precompiles, gas rules, or transaction-format support. This is the single most practical lever for migratability on programmable chains.
  • Quantum-safe wallets — PQC-capable key storage, multisig, and recovery flows; treat first-spend as a key-rotation event so funds move to a fresh PQC-protected address.
  • PQC-aware bridges — upgrade threshold/multisig signing on cross-chain validators, which hold concentrated value and are prime forgery targets.
  • Permissioned & CBDC chains move faster — with a known validator set and central governance, they can mandate PQC without community-wide hard forks, unlike permissionless networks.

Migration challenges

Web3 migration is harder than almost any other domain:

  • Immutable ledgers — history cannot be re-signed; only future transactions and balances can be protected, so exposed value must be actively migrated.
  • Hard-fork governance — consensus or signature-format changes require a hard fork and broad community agreement, which can take years on permissionless chains.
  • Signature size & fees — PQC signatures are far larger than 64–72 byte EC signatures; they inflate transaction size, raise fees, and stress block-size and gas limits.
  • Key migration — every wallet, seed-phrase scheme, and custody system must learn to hold and use PQC keys, and users must be guided to move funds.
  • Exchange & custody readiness — exchanges, custodians, and bridges concentrate value and must upgrade signing and key management ahead of the broader ecosystem.

Phased roadmap

PhaseGoalKey output
1. Inventory exposed keysIdentify addresses, contracts, and bridges whose public keys are on-chain or reusedExposure map ranked by value at risk
2. Wallet / custody PQC + hybrid signingAdd PQC key storage and dual ECDSA+ML-DSA signatures; rotate funds to fresh addresses on spendQuantum-safe wallets, hybrid tx support
3. Protocol upgrade (hard fork)Add PQC verify paths / account abstraction; upgrade bridge and consensus signingOn-chain PQC verification, forked protocol
4. Full PQCDeprecate classical-only signing; default to PQC across wallets, contracts, and bridgesClassical signatures disabled, monitoring in place

Reference case

A digital-currency exchange hybrid scheme — synthesized from the 安全牛 2025 report and documented on our China vendors page — illustrates a production-shaped design: key agreement combines ECDH and ML-KEM through a KDF; signatures are dual ECDSA + ML-DSA; and data encryption uses AES-256 with a Classic McEliece-encapsulated key. The pattern shows how custody and trading infrastructure can adopt PQC without breaking classical interoperability.

Standards & references

Warning
On a public chain the "harvest" is already complete. Every address that has revealed its public key is quantum-vulnerable the moment a CRQC arrives, and immutable history cannot be re-signed after the fact. Treat exposed, high-value, and reused-key addresses as the urgent priority — inventory them now and plan their migration to PQC-protected addresses before — not after — a CRQC becomes a realistic threat.

Web3 与区块链 PQC 解决方案

公有链是后量子迁移中暴露面最大的系统之一:账本完全公开,安全几乎全部依赖数字签名,而系统本身又极难变更。本页梳理 Web3 各类资产的量子风险,给出真正契合不可篡改、社区治理环境的迁移路径,并提供从密钥盘点到全面 PQC 的分阶段路线图。

为何刻不容缓

区块链依赖两类密码学原语。账户与交易完整性建立在椭圆曲线签名之上——比特币与以太坊使用 secp256k1 上的 ECDSA,许多新型链使用 Ed25519。工作量证明与账本完整性则建立在 SHA-256、Keccak 等哈希函数之上。

这两类原语在量子攻击下的命运截然不同。Shor 算法可彻底攻破椭圆曲线密码:拥有密码学相关量子计算机(CRQC)的攻击者能从公钥推导出私钥,从而伪造签名并转走他人资金。Grover 算法只会将哈希函数的有效强度减半,因此 PoW 与基于哈希的完整性仍有充裕余量(增大输出长度即可进一步加固)。

先收集、后解密(Harvest Now, Decrypt Later, HNDL)问题在此尤为尖锐,而且其中的"收割"这一步早已完成。账本本就公开,采集数据毫无成本。在大多数链上,一个地址一经交易,公钥便立即可见——要么直接公开,要么可从花费交易的签名中恢复。任何曾经交易过的地址,尤其是复用地址或公钥已知的地址,在 CRQC 出现之日起即已处于量子脆弱状态。从未暴露过密钥的地址上的未花费资金相对更安全——直到被花费为止。

风险与资产映射

资产当前密码学量子威胁优先级
账户与交易签名ECDSA(secp256k1)、Ed25519被 Shor 攻破——密钥恢复与签名伪造关键
已暴露地址(复用或公钥已知)公钥已上链CRQC 出现后资金可被盗取关键
未暴露地址(公钥尚未上链公开)公钥隐藏在地址哈希之后在地址哈希与底层实现未以其他方式泄露公钥的前提下,首次花费前相对更安全;一旦公钥随花费交易公开,即进入量子风险窗口。
共识(PoW)SHA-256 / Keccak仅受 Grover 影响,余量充足
智能合约签名与验签逻辑、预编译合约验证已被攻破的方案,需引入 PQC 验签路径
钱包与托管密钥EC 密钥对、助记词、HSM/MPC同样面临 Shor 暴露,密钥库须能存放 PQC 密钥关键
跨链桥多签、门限 EC 签名高价值伪造目标

推荐方案

  • 抗量子签名——将链上签名替换为 ML-DSA(格基)或 SLH-DSA(无状态哈希),或在一次性签名模型契合协议时采用有状态哈希方案(LMS/XMSS)。参见 PQC 签名
  • 混合与双签名——过渡期为每笔交易同时附加 ECDSAML-DSA 签名,二者均验证通过方为有效。既保留经典兼容性,又增加抗量子能力。参见 混合密码
  • 账户抽象——在支持智能合约账户或可扩展验证逻辑的链上,将签名方案部分上移为账户属性,从而降低密钥或算法轮换对基础层硬分叉的依赖;但底层仍可能需要新增 PQC 验签预编译、gas 规则或交易格式支持。这是可编程链上最务实的可迁移性杠杆。
  • 抗量子钱包——支持 PQC 的密钥存储、多签与恢复流程,将首次花费视为密钥轮换事件,把资金迁移至全新的 PQC 保护地址。
  • 具备 PQC 能力的跨链桥——升级跨链验证节点的门限与多签机制,这些节点价值集中,是首要伪造目标。
  • 联盟链与 CBDC 迁移更快——验证节点已知、治理集中,可直接强制采用 PQC 而无需全社区硬分叉,这与无许可网络形成对比。

迁移挑战

Web3 的迁移难度几乎超过其他任何领域:

  • 不可篡改账本——历史无法重新签名,只能保护未来的交易与余额,因此已暴露的价值必须主动迁移。
  • 硬分叉治理——共识或签名格式变更需要硬分叉与广泛的社区共识,在无许可链上可能耗时数年。
  • 签名体积与手续费——PQC 签名远大于 64 至 72 字节的 EC 签名,会膨胀交易体积、抬高手续费,并对区块大小与 gas 上限造成压力。
  • 密钥迁移——每个钱包、助记词方案与托管系统都须支持存放和使用 PQC 密钥,并须引导用户转移资金。
  • 交易所与托管就绪度——交易所、托管方与跨链桥价值高度集中,须先于整体生态升级签名与密钥管理。

分阶段路线图

阶段目标关键产出
1. 盘点已暴露密钥识别公钥已上链或复用的地址、合约与跨链桥按风险价值排序的暴露面图谱
2. 钱包与托管 PQC 加混合签名加入 PQC 密钥存储与 ECDSA+ML-DSA 双签名,花费时将资金轮换至新地址抗量子钱包、混合交易支持
3. 协议升级(硬分叉)加入 PQC 验签路径与账户抽象,升级跨链桥与共识签名链上 PQC 验证、已分叉协议
4. 全面 PQC弃用纯经典签名,钱包、合约与跨链桥默认采用 PQC经典签名停用、监控到位

参考案例

某数字货币交易所的混合方案——取材于安全牛 2025 报告 并记录于本站 国内厂商页面——展示了一种贴近生产的设计:密钥协商通过 KDF 融合 ECDHML-KEM签名采用 ECDSA + ML-DSA 双签;数据加密采用 AES-256,其密钥由 Classic McEliece 封装。该模式说明托管与交易基础设施可在不破坏经典互操作性的前提下采用 PQC。

标准与参考

警告
在公有链上"收割"早已完成。每一个已暴露公钥的地址,在 CRQC 出现之时即处于量子脆弱状态,而不可篡改的历史无法事后重新签名。请将已暴露、高价值、复用密钥的地址列为最紧迫优先项——现在就盘点它们,并在 CRQC 具备现实威胁能力之前(而非之后)规划其向 PQC 保护地址的迁移。
⚑ Report an error⚑ 纠错与校正