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

  • Citibank Plans to Offer Bitcoin Custody Services for Institutional Clients This Year

    On August 21, Citibank announced plans to provide Bitcoin custody services for institutional clients later this year through its Custody+ platform. This service will integrate Bitcoin with traditional assets such as stocks and bonds within the same custody framework, allowing clients to access custody, settlement, foreign exchange, cash, and liquidity services through a single system. Bitcoin will be the first digital asset supported by Citibank's new custody service, although the bank has not yet disclosed a specific launch date or the list of initial clients. Citibank stated that Custody+ will offer real-time settlement, foreign exchange services, automated hedging, cash management, and liquidity tools. The Single Event Processing in its custody system currently processes over 80% of events in real time; in the U.S., this system has reduced processing times for certain voluntary corporate actions by up to 92%, with 96% of related events completed within two hours. Chris Cox, head of Citi Investor Services, noted that Citi invests over $2 billion annually in its Services platform.

  • Citibank Plans to Offer Bitcoin Custody Services for Institutional Clients This Year

    On August 21, Citibank announced plans to provide Bitcoin custody services for institutional clients later this year through its Custody+ platform. This service will integrate Bitcoin with traditional assets such as stocks and bonds within the same custody framework, allowing clients to access custody, settlement, foreign exchange, cash, and liquidity services through a single system. Bitcoin will be the first digital asset supported by Citibank's new custody service, although the bank has not yet disclosed a specific launch date or the list of initial clients. Citibank stated that Custody+ will offer real-time settlement, foreign exchange services, automated hedging, cash management, and liquidity tools. The Single Event Processing in its custody system currently processes over 80% of events in real-time; in the U.S., this system has reduced processing times for certain voluntary corporate actions by up to 92%, with 96% of related events completed within two hours. Chris Cox, head of Citi Investor Services, noted that Citi invests over $2 billion annually in its Services platform.

  • BTC Surpasses $72,500

    Market data shows that BTC has surpassed $72,500, currently priced at $72,510.18, with a 24-hour increase of 6.09%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Surpasses $72,500

    Market data shows that BTC has surpassed $72,500, currently priced at $72,510.18, with a 24-hour increase of 6.09%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Intercontinental Exchange, Parent Company of NYSE, Considers Participation in New Funding Round for Polymarket

    According to Bloomberg, Jeff Sprecher, CEO of Intercontinental Exchange (ICE), the parent company of the New York Stock Exchange, stated that the company will monitor the new funding round for the prediction market platform Polymarket and will consider participation if it contributes to the funding round. Previously, Intercontinental Exchange had invested over $1.6 billion in Polymarket.

  • Intercontinental Exchange, Parent Company of NYSE, Considers Participation in Polymarket's New Funding Round

    According to Bloomberg, Jeff Sprecher, CEO of Intercontinental Exchange (ICE), the parent company of the New York Stock Exchange, stated that the company will monitor the new funding round for the prediction market platform Polymarket and will consider participation if it aids the funding round. Previously, Intercontinental Exchange had invested over $1.6 billion in Polymarket.

  • U.S. Stock Indices Open Lower, Cryptocurrency Stocks Rise

    On August 20, the three major U.S. stock indices opened lower, with the Dow Jones Industrial Average down 0.71%, the S&P 500 down 0.32%, and the Nasdaq Composite down 0.45%. Cryptocurrency-related stocks rose, with Strategy up over 8%, Coinbase up over 7%, and Circle up over 5%. SK Hynix rose over 3%, with JPMorgan predicting that SK Hynix could return at least $130 billion to shareholders by 2027. Silicon carbide leader Wolfspeed fell over 10% after the company reported fourth-quarter revenue that fell short of expectations. Moderna dropped over 13%, after the stock surged over 176% the previous day.

  • U.S. Stock Indices Open Lower, Cryptocurrency Stocks Rise

    On August 20, U.S. stock indices opened lower across the board, with the Dow Jones down 0.71%, the S&P 500 down 0.32%, and the Nasdaq Composite down 0.45%. Cryptocurrency-related stocks rose, with Strategy up over 8%, Coinbase up over 7%, and Circle up over 5%. SK Hynix rose over 3%, with JPMorgan predicting that SK Hynix could return at least $130 billion to shareholders by 2027. Silicon carbide leader Wolfspeed fell over 10% after the company reported fourth-quarter revenue that fell short of expectations. Moderna dropped over 13%, following a surge of over 176% the previous day.

  • U.S. Initial Jobless Claims at 206,000 Last Week

    On August 20, the number of initial jobless claims in the U.S. was 206,000, compared to an estimate of 210,000 and a previous value of 209,000.

  • U.S. Initial Jobless Claims at 206,000 Last Week

    On August 20, the number of initial jobless claims in the U.S. was 206,000, compared to an estimate of 210,000 and a previous value of 209,000.