Assessment of Quantum Threat to Bitcoin and Derived Cryptocurrencies Stephen Holmes, Liqun Chen
Total Page:16
File Type:pdf, Size:1020Kb
1 Assessment of Quantum Threat To Bitcoin and Derived Cryptocurrencies Stephen Holmes, Liqun Chen University of Surrey Abstract—All cryptocurrencies are not the same. Today, they automate this approach making this almost invisible to users. share a common quantum vulnerability through use of non-quantum In order to keep the disclosure time of a valid address in a safe Elliptic Curve Digital Signature Algorithm (ECDSA) digital cryptocurrency blockchain as short as possible, a public key signatures yet they have very different risks of quantum attack. The risk of attack for a cryptocurrency depends on a number of identified can be hidden by using a cryptographic hash function or a factors such as the block interval time, the vulnerability to an attack pair of two hash functions, e.g. in bitcoin two hash functions that delays the time for an unprocessed transaction to be completed SHA256 and RIPEMD160 are used [3]. and the behaviour of a cryptocurrency user to increase the cost of The quantum attack that is a common threat to all ECDSA- a quantum computer attack. Shor’s algorithm can be used to break based cryptocurrencies can only be performed during the ECDSA signatures with a quantum computer. This research addresses the two questions: When will a quantum computer be powerful disclosure of a public key and signature to enable movement enough to execute Shor’s algorithm? How fast would a quantum of cryptocurrency funds. A window of opportunity exists until computer need to be to break a specific cryptocurrency? In this paper the unprocessed transaction is included in a block. we observe that by benchmarking the speed of circuits and the time ISO are currently developing a technical report for for quantum addition on quantum computers we can determine when blockchain security - Blockchain and distributed ledger tech- there is a potential threat to a specific cryptocurrency. nologies Security risks, threats and vulnerabilities [4], A cur- Keywords—digital signatures, quantum computing, cryptocur- rent proposed approach from Homoliak, Ivan & Venugopalan, rency, bitcoin, altcoin, ECDSA Sarad & Hum, Qingze & Reijsbergen, Daniel & Schumi, I.I NTRODUCTION Richard & Szalachowski, Pawel [5]. The Security Reference Architecture for Blockchains: Towards a Standardized Model HE bitcoin white paper was published in 2008 [1] and for Studying Vulnerabilities, Threats, and Defenses presents a T since that time, bitcoin and alternative currencies have Security Reference Architecture (SRA) for blockchain which grown in value and volume. Bitcoin and cryptocurrency sys- introduces a threat-risk model that is based on the template of tems provide a new means for multiple mutually distrusting ISO/IEC 15408 [6]. Using this stacked model of the security and remote parties to transact through a protocol that enforces reference architecture, focus is on the replicated state machine a level of trust between parties because of the immutability of layer and specifically transactions. the protocol and consensus mechanism. Bitcoin and altcoins The wide adoption of ECDSA for blockchain signature derived from bitcoin architecture current value is over 100 schemes is understandable given the proven security against billion USD. todays computers and the efficiency of the signature scheme Underpinning bitcoin and alternative cryptocurrencies are (time to execute and storage space required for keys and a series of cryptographic technologies used to secure bit- signatures). This gives rise to the primary question of this coin and alternative cryptocurrencies. With the advent of a research - How can we measure quantum computing advances future quantum computer many underpinning cryptographic regardless of the technology they are built from to assess protocols become susceptible to attack by the development the threat to bitcoin and derived cryptocurrencies? What of a sufficiently large quantum computer. More specifically, quantum computer performance indicators can give advanced digital signature schemes, for example ECDSA [2], used in warning of the threat to the ECDSA signature scheme in a cryptocurrencies are not quantum resistant. cryptocurrency implementation? This research is focused on the assessing the potential mechanisms for attack that are possible by a quantum com- II.C ONTRIBUTIONS puter to break digital signatures used in bitcoin and derived HIS paper is organised as follows: An overview of cryptocurrencies (altcoins). T related work on bitcoin and cryptocurrency vulnerability A public key of such a digital signature scheme is used to quantum computer attack. Analysis and review of possible as an address of an amount of cryptocurrency funds. The combined attacks to delay the time to process an unpro- corresponding private key(s) indicates the ownership of the cessed transaction. Review of estimating quantum computing funds. This research highlights that if the public key has resources to solve ECDLP using implementation of Shor’s been disclosed or if it has been used for more than one algorithm [7]. Assessment of the quantum computer capacity transaction, allowing it to be recorded for later quantum attack, required to execute Shor’s algorithm, taking into account the mitigation is simply to move funds to a new address. circuit size and error rates on a quantum computer. A new Most currently supported wallet software can be configured to proposed approach to assess unprocessed transaction time window for each cryptocurrency and derive quantum computer revealed in the presence of a quantum computer the address speed of execution required to meet this time window. The is no longer safe and thus should never be used again. While impact of noise and error rates on quantum computers and an always using fresh addresses is already the suggested practice examination of quantum computers capabilities today. in Bitcoin, in practice this is not always followed. Any address The key discovery from this paper is that not all cryptocur- that has bitcoin and for which the public key has been revealed rencies have the same timing attack vulnerabilities. A con- is completely insecure. sequence of this is that for some cryptocurrencies migration B. Processed transactions from ECDSA to quantum safe signatures may be possible to delay until a quantum computer is approaching the capacity If a transaction is made from an address which has not and performance required to pose a threat. been spent from before, and this transaction is placed on A further discovery is that cryptocurrency user behaviour the blockchain with several blocks following it, then this can significantly impact the cost of a quantum adversary transaction is reasonably secure against quantum attacks. The attack. The migration to one time use addresses is a practical private key could be derived from the published public key, protection that prevents a slow quantum computer attack on but as the address has already been spent this would have a disclosed public key. A further protection is to move to to be combined with out-hashing the network to perform a multi-signature addresses. Where n is the number of signatures double spending attack. Even with a quantum computer a required to unlock an address. In the case of Bitcoin, this double spending attack is unlikely once the transaction has enables up to n of 20 signatures to be required to unlock many blocks following it. an address. Making the quantum adversary solve n ECDSA C. Unprocessed transactions private keys from the public keys disclosed in the unprocessed After a transaction has been broadcast to the network, but transaction. Increasing the quantum computing requirement before it is placed on the blockchain it is at risk from a by n times within the same unprocessed transaction window. quantum attack. If the secret key can be derived from the Paying a significantly higher fee than the current average broadcast public key before the transaction is placed on the transaction fee increases the cost to a quantum adversary blockchain, then an attacker could use this secret key to in executing a denial of processing valid transactions attack. broadcast a new transaction from the same address to his own Reducing the amount of cryptocurrency in any one account by address. If the attacker then ensures that this new transaction spreading currency to multiple accounts, reduces the risk and is placed on the blockchain first, then he can effectively steal attractiveness of an attack. all the bitcoin behind the original address. This can stave off a quantum computer attack. However, The mitigation to protect against reusing an address is this is at the expense of usability and reliance on user oper- simple. However, in practice this will need to be achieved ational discipline. Enabling a cryptocurrency to decide when through either programatic wallet rules or disciplined changes to implement countermeasures such as moving to accepting in user behaviour. This makes every address a one-time use only multi-signature transactions or implementing new means address (receiving and sending). Currently for bitcoin this to reduce the unprocessed transaction time. stands at around 48.6% as of August 2020. Analysis of today’s The quantification of the unprocessed transaction time win- bitcoin wallet addresses shows that there are currently 2476 dow by cryptocurrency and the quantification of the number wallet addresses with bitcoin funds worth over 10 million US and depth of gates required to run Shor’s algorithm enables dollars. Yet, despite the advice to only use an address once (to a benchmarking of quantum computer capabilities required to prevent recording of public key by rogue miner, or intercepting meet or exceed this window and hence a risk assessment of across the network). Only 81 of these addresses only have quantum capability to make a successful attack on a specific one transaction. The remaining 2395 addresses have multiple cryptocurrency. This simple measurement can give advanced transactions meaning that the public key can be recorded and warning that a cryptocurrency may be at risk regardless of broken at leisure by a quantum computer adversary to generate quantum computing technology.