Cointime

Download App
iOS & Android

How to hard-fork to save most users’ funds in a quantum emergency

From ethresearch by vbuterin

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 13, 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 20), 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.

Comments

All Comments

Recommended for you

  • Spot gold continues to fall

    spot gold continues to decline, with the decline expanding to 2%, at $3315.49 per ounce.

  • BTC breaks through $93,500

    the market shows BTC has broken through $93,500, now trading at $93,506.58, with a 24-hour increase of 6.12%. The market is fluctuating greatly, please manage your risks.

  • U.S. strategic Bitcoin reserves may announce details in the coming weeks

    Trump signed an executive order in early March this year proposing to establish a national strategic reserve of Bitcoin and other tokens, and requested the Treasury Secretary to submit an evaluation report on the legality and feasibility of the plan within 60 days. With less than two weeks remaining until the 60-day deadline set by Trump's executive order, this means that more details about the US Bitcoin reserve will soon be disclosed. Market expectations for this may be one of the important catalysts for the recent rebound in cryptocurrency. In addition, any comments questioning the independence of the Federal Reserve have also had a positive spillover effect on Bitcoin.

  • Bitcoin's market share once rose to 64.67%, but now fell back to 64.30%

    On April 23rd, data, the Bitcoin dominance (BTC.D) briefly rose to 64.67% this morning, reaching a new high since February 2021, and is currently back at 64.30%. The high Bitcoin dominance indicates the quietness of the altcoin market, but it may also suggest that a bottom reversal is imminent. Based on historical data, when Bitcoin dominance surged above 60% in November last year, altcoins started a small bull market. In 2019 and 2021, Bitcoin dominance reached highs above 70%, followed by a broad and spectacular uptrend.

  • Cointime精选 ·

    Are we finally ready for a gas limit increase?

    There has been growing discussion around the possibility of increasing Ethereum’s gas throughput, either by raising the gas limit or reducing slot time. The key argument in favor of this is that the hardware requirements for running a validator have steadily decreased over the past four years.

  • Cointime August 17th News Express

    1.VanEck and 21Shares Solana ETF Form 19b-4 Suspected to be Removed from CBOE Website

  • Ethereum network gas fee falls back below 1 gwei

    According to Etherscan data, the current Ethereum network gas fee has fallen below 1 gwei, currently at 0.937 gwei.

  • Cointime August 10th News Express

    1. The U.S. Internal Revenue Service has released a new draft of the crypto tax form, which no longer requires filling in wallet addresses and transaction IDs

  • Ethereum ACDC #139: Pectra's Devnet 2 upgrade is under debugging, and the release date of Devnet 3 is still to be determined

    Christine Kim, Vice President of Galaxy Research, summarized the main content of the 139th ACDC conference call. The debugging of Pectra's upgraded Devnet 2 is currently underway, and the release date of Devnet 3 is yet to be determined. Developers will hold weekly testing update meetings starting from Monday to better coordinate the release of Pectra's Devnet. The decision to include EIP-7688 in Pectra's upgrade has been postponed again.

  • Ethereum network gas fee drops to 1 gwei

    According to Ether­scan data, the current gas fee on the Ethereum network has dropped to 1 gwei.