维塔利克·布特林 2024:如何在量子紧急情况下通过硬分叉挽救大部分资金
Vitalik Buterin: How to hard-fork to save most funds in a quantum emergency (2024)

原始链接: https://ethresear.ch/t/how-to-hard-fork-to-save-most-users-funds-in-a-quantum-emergency/18901

该文本认为,以太坊可以通过一次相对简单的硬分叉,从突发的量子计算突破中恢复,即使在账户抽象尚未广泛可用之前也是如此。量子计算机可能利用过去交易暴露的椭圆曲线公钥反推出私钥,使攻击者能够盗取资金;从未暴露公钥的地址仍然安全。由于许多私钥是通过哈希从助记词或密码短语派生出来的,用户可以在分叉后使用 STARK 证明所有权,这些证明可证明他们知道秘密原像,以及该原像如何派生出其地址。拟议中的分叉将回滚发生盗窃的区块,禁用传统 EOA 交易,允许智能合约钱包交易,并让用户安装新的验证代码。批量 STARK 证明可以降低成本,准备工作可以立即开始。

Hacker News 上的一个讨论帖讨论了 Vitalik Buterin 的提议:在未来出现量子计算危机时,通过对以太坊进行硬分叉来保住大部分资金。一位评论者质疑称,如果公钥已通过过去的交易被公开,量子攻击者就能推导出私钥,并冒充合法所有者。其他人解释说,许多钱包使用的主密钥或助记词从未在链上暴露,因此分叉可以回滚盗窃交易、禁用常规交易,并允许通过这些主密钥恢复资产。有一条评论将其与 Coldcard 的 RNG 问题相比较。另一些人警告说,如今进行追溯性回滚会很困难,因为资产可能已经跨链转移,其他项目也依赖以太坊,而且可能引发法律纠纷。有人建议将提前预警的预防性分叉作为替代方案。
相关文章

原文

Suppose that it is announced tomorrow that quantum computers are available, and bad actors already have access to them and are able to use them to steal users’ funds. Preventing such a scenario is the goal of quantum-resistant cryptography (eg. Winternitz signatures, STARKs), and once account abstraction is in place, any user can switch to using a quantum-resistant signature scheme on their own schedule. But what if we don’t have that much time, and a sudden quantum transition happens long before that?

I argue that actually, we are already well-positioned to make a pretty simple recovery fork to deal with such a situation. The blockchain would have to hard fork and users would have to download new wallet software, but few users would lose their funds.

The main challenge with quantum computers is as follows. An Ethereum address is defined as keccak(priv_to_pub(k))[12:], where k is the private key, and priv_to_pub is an elliptic curve multiplication to convert the privkey into a pubkey. With quantum computers, elliptic curve multiplications become invertible (because it’s a discrete-log problem), but hashes are still safe. If a user has not made any transactions with their account, then only the address is publicly visible and they are already safe. But if a user has made even one transaction, then the signature of that transaction reveals the public key, which in a post-quantum world allows revealing the private key. And so most users would be vulnerable.

But we can do much better. The key realization is that in practice, most users’ private keys are themselves the result of a bunch of hash calculations. Many keys are generated using BIP-32, which generates each address through a series of hashes starting from a master seed phrase. Many non-BIP-32 methods of key generation work similarly: eg. if a user has a brainwallet, it’s generally a series of hashes (or medium-hard KDF) applied to some passphrase.

This implies the natural structure of an EIP to hard-fork the chain to recover from a quantum emergency:

  1. Revert all blocks after the first block where it’s clear that large-scale theft is happening
  2. Traditional EOA-based transactions are disabled
  3. A new transaction type is added to allow transactions from smart contract wallets (eg. part of RIP-7560), if this is not available already
  4. A new transaction type or opcode is added by which you can provide a STARK proof which proves knowledge of (i) a private preimage x, (ii) a hash function ID 1 <= i < k from a list of k approved hash functions, and (iii) a public address A, such that keccak(priv_to_pub(hashes[i](x)))[12:] = A. The STARK also accepts as a public input the hash of a new piece of validation code for that account. If the proof passes, your account’s code is switched over to the new validation code, and you will be able to use it as a smart contract wallet from that point forward.

For gas efficiency reasons (after all, STARKs are big), we can allow the STARK to be a batch proof, proving N STARKs of the above type (it has to be a STARK-of-STARKs rather than a direct proof of multiple claims, because each user’s x needs to be kept private from the aggregator).

The infrastructure to implement a hard fork like this could in principle start to be built tomorrow, making the Ethereum ecosystem maximally ready in case a quantum emergency does actually come to pass.

联系我们 contact @ memedata.com