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

  • Grayscale transferred more than 1,000 BTC to Coinbase Prime address again last night

    According to Arkham data monitoring, the grayscale address transferred about 411 BTC to Coinbase Prime last night, and about 14 hours ago transferred 1003 BTC to Coinbase Prime address again, worth about $64.18 million.

  • Justin Sun has deposited 166 million USDT to Binance in the past 7 hours

    According to on-chain analyst @ai_9684xtpa, in the past 7 hours, Sun Yuchen has accumulated a total of 166 million USDT deposited into Binance.

  • An address transferred 8150 ETH to Galaxy Digital OTC address 8 hours ago

    According to on-chain analyst @ai_9684xtpa monitoring, 8 hours ago, address 0x4E8...fA555 transferred 8,150 ETH (valued at $25.64 million) to Galaxy Digital OTC address, suspected of commissioning sales.

  • Suspected Amber Group address withdraws 3 million SAFE from Gate.io

    Spot On Chain monitoring shows that wallet 0x011 (possibly Amber Group) withdrew 3 million SAFE tokens (worth $6.72 million) from Gate.io for the first time at a price of $2.25, six hours ago. It is worth noting that the price of SAFE has fallen by about 36% since April 23, 2024.

  • Franklin Ethereum ETF EZET listed on DTCC website

    COINOTAG has stated on the X platform that the Franklin Ethereum ETF EZET has been listed on the DTCC website.

  • Grayscale GBTC Bitcoin holdings fell below 300,000 BTC

    Official data from Grayscale shows that as of April 26th local time, GBTC's Bitcoin holdings have fallen below the 300,000 BTC mark to 298,445.4699 BTC, a decrease of approximately 2,167 BTC from the previous day. Additionally, GBTC's assets under management (non-GAAP) have decreased to $19,052,609,573.56, and its circulating shares have decreased to 335,190,100.

  • Hong Kong Investment Commission: Virtual asset spot ETFs can be bought and sold through banks

    Hong Kong investors and the Financial Education Committee have stated that the investment scope of spot virtual asset ETFs is limited to virtual assets (currently limited to Bitcoin and Ethereum) provided to the Hong Kong public for buying and selling on virtual asset trading platforms holding China Securities Regulatory Commission licenses. Trading counterparties must buy and sell virtual assets through licensed virtual asset trading platforms to reduce counterparty risks. Asset custody must be entrusted to designated institutions regulated in Hong Kong, such as licensed virtual asset trading platforms, banks, or their subsidiaries registered in Hong Kong, to reduce custody risks. Investors can buy and sell virtual asset spot ETFs through securities firms or banks. Some virtual asset spot ETFs also provide non-listed fund unit categories, which operate similarly to non-listed funds. Investors can apply for and redeem units through securities firms or banks.

  • Lido: SSV Simple DVT testnet has ended, selected participants will join the mainnet Simple DVT module

    Lido announced the end of the SSV Simple DVT testnet on the X platform and will soon launch the mainnet. In the next few weeks, selected participants will use SSV technology to join the Lido Simple DVT module on the mainnet.

  • Justin Sun redeemed 85.53 million USDT from JustLend 4 hours ago and immediately transferred it to Binance

    As monitored by on-chain analyst Yu Jin, 4 hours ago, Sun Yuchen's Tron address (TXN...752) redeemed 85.53 million USDT from JustLend and immediately transferred it to Binance.

  • ETH falls below $3,100

    According to market data, ETH has fallen below $3,100 and is now trading at $3,099.54, with a daily decline of 1.04%. The market is volatile, so please be prepared for risk control.