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

  • BTC Drops Below $83,000

    Market data shows that BTC has fallen below $83,000, currently priced at $83,015.81, with a 24-hour decline of 0.46%. The market is experiencing significant volatility, so please ensure proper risk management.

  • ETH Surpasses $2500

    Market data shows that ETH has surpassed $2500, currently priced at $2500.4, with a 24-hour decline of 0.23%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Standard Chartered Launches Cryptocurrency Trading Service in UAE for High-Net-Worth Clients

    On October 14, Standard Chartered announced the launch of a cryptocurrency trading service in the UAE aimed at high-net-worth clients, having obtained the relevant license from the Dubai Virtual Assets Regulatory Authority (VARA). Eligible clients can buy and sell BTC and ETH directly through their existing Standard Chartered accounts without the need for independent wallets or third-party trading platforms, with the bank responsible for asset custody and transaction settlement. This service is launched in partnership with Zodia Markets and is initially available only to professional investors in the UAE, with plans to expand to other markets in the future. Standard Chartered stated that this is the first direct cryptocurrency trading service offered to wealth management clients and the first of its kind by an international bank in the UAE.

  • US Spot Bitcoin ETF Sees Net Inflow of $175.7 Million Yesterday

    On October 14, according to monitoring data from Farside Investors, the US spot Bitcoin ETF saw a net inflow of $175.7 million yesterday.

  • US Spot Ethereum ETF Sees Net Inflow of $24.8 Million Yesterday

    On October 14, according to monitoring data from Farside Investors, the US spot Ethereum ETF experienced a net inflow of $24.8 million yesterday.

  • Solana to Launch Alpenglow Upgrade on October 21, Aiming for 150 Milliseconds Transaction Finality

    On October 14, Solana announced that the Alpenglow upgrade will officially activate on October 21 at approximately 14:50 UTC. This upgrade will replace the existing TowerBFT consensus with the Votor consensus. After the upgrade, the median transaction finality time is expected to be around 150 milliseconds, compared to the current value of approximately 12.8 seconds. The upgrade supports single-slot migration without the need for node restarts; it will also remove validator voting information from blocks, reducing operational costs. Even if the actual on-chain usage remains unchanged, statistics indicate that the total number of transactions reported is likely to decrease significantly. The current price of SOL is around $107, and there has not been a noticeable market reaction yet. From a narrative perspective, this upgrade is beneficial for Solana's speed and scalability story; however, Solana has experienced multiple network outages in the past, and this upgrade carries execution risks, serving as a potential warning signal.

  • South Korea Plans to Release Cryptocurrency Tax Guidelines Next Month

    On October 14, according to Yonhap News Agency, South Korea plans to release cryptocurrency tax guidelines next month in preparation for the cryptocurrency taxation policy set to be implemented in January 2027. Local traders in South Korea have been petitioning for a delay in the implementation of the tax policy, citing that the current regulations are not clear enough and the supporting infrastructure is still not fully developed.

  • Michael Saylor: New Bull Market Has Started, Bitcoin Expected to Surpass $100,000 Again

    On October 14, Michael Saylor, co-founder and Executive Chairman of Strategy, stated in an interview that Bitcoin has rebounded from its bottom and is expected to break through $100,000 again. He believes that Bitcoin previously bottomed out just below $60,000 and has now risen to the $80,000 range, with further increases anticipated. Saylor noted that improvements in the regulatory environment and banks accelerating their adoption of Bitcoin are driving the market into a new bull phase. He expects that in the coming years, Bitcoin's long-term annualized growth rate will reach 20% to 30%, and Strategy may increase its Bitcoin purchases during the bull market and issue more securities to fund these acquisitions. Additionally, regarding MSCI's consideration to adjust index rules and potentially exclude companies primarily engaged in accumulating assets from global stock indices, Saylor expressed opposition, arguing that such a move could set a negative precedent for the digital asset industry. MSCI is expected to announce its decision this Friday. Last November, JPMorgan estimated that if Strategy were excluded, it could face a risk of up to $2.8 billion in capital outflows.

  • Fed's Williams: One More Rate Hike This Year is Appropriate, No Need for Hikes in 2027

    On October 14, Federal Reserve's Williams stated that one more rate hike this year is appropriate; currently, he believes there is no need for rate hikes in 2027. There are no signs that the labor market is driving inflation, and apart from the AI and energy sectors, no widespread price pressures are observed in other areas.

  • BTC Falls Below $83,000

    Market data shows that BTC has fallen below $83,000, currently priced at $82,988.08, with a 24-hour increase of 0.56%. The market is experiencing significant volatility, so please ensure proper risk management.