Introduction
With the publication of the Bitcoin white paper in 2008, and the subsequent delivery of a first prototype implementation of Bitcoin 2 months later, the individual or group behind the alias “Satoshi Nakamoto” was able to forge a new class of decentralized currency. Unlike previous electronic cash proposals, this proposal was rather straightforward, explained in a concise white paper comprising 8.5 single-column pages, and relying on basic cryptographic constructs, such as hash functions and digital signatures. The release of the proof of concept implementation of Bitcoin shortly after the dissemination of the white paper was extremely timely and important for the subsequent growth of Bitcoin. The working implementation confirmed that, unlike previous proposals, the system is clearly feasible/workable, and scales to a large number of nodes. Open-sourcing the implementation was also an excellent call for developers to maintain and support the growth of the system.
The design of Bitcoin offered the world a promise for a low-cost decentralized and anonymous currency. The core idea of Bitcoin is simple. The system allows two or more parties to exchange financial transactions without passing through intermediaries (such as banks or payment processors). These transactions are validated collectively in a peer-to-peer network by all users. This not only eliminates the need for centralized control (e.g., by banks), but also reduces the cost of making transactions (at the national and international levels). The premise of ease of use and anonymity were also appealing features of the original design; Bitcoin does not require users to register their identity/credentials nor does it require them to fill out endless forms in order to set up an account. More importantly, Bitcoin users could operate using pseudonyms—without ever revealing their true identity.
Bitcoin's design relies on a clever and well-incentivized cooperation between users in the network. Namely, peers in the network need to receive and validate all broadcasted transactions—regardless of their respective geographical location. Peers confirm transactions in blocks, by solving a computational puzzle. The puzzle’s difficulty is dynamically adjusted based on the computing power in the network, and those peers who succeed in solving the puzzle (and therefore confirm transactions) are financially rewarded. Such reliance on computational puzzles is an effective mechanism to provide a decentralized time-stamping service in the network, and an effective deterrent of Sybil attacks, whereby users create several fake identities in the hope of increasing their advantage in the open network. Namely, the vote or impact that these users exhibit in the network does not depend on the number of their accounts, but is tightly coupled with their available computing power.
This clever design was enough to attract enough traction and participation in Bitcoin across the community.
- • Open-sourcing Bitcoin’s code solicits the participation of skilled developers who are interested in attaining immediate impact in the community. Their contribution to the Bitcoin code will be reflected in official Bitcoin client releases, which will impact the experience of all Bitcoin users.
- • Users were asked to collaboratively contribute in confirming financial transactions; besides involving active user participation in regulating the Bitcoin ecosystem, several users saw in Bitcoin a novel way to invest their computing power and collect immediate financial returns.
- • Bitcoin drew a considerable number of consumers who were seeking refuge in the anonymity prospects of the emerging digital currency. This probably explains why Bitcoin’s first adopters were believed to be involved in illegal activities and controversial businesses.
These facts ensured a rapid growth of the Bitcoin community in spite of the suspicious disappearance of Bitcoin’s founder Satoshi Nakamoto shortly after its release. A number of reports claim that this disappearance was an outcome of the increasing adoption of the system. However, until the time of writing, there are no facts that substantiate these claims.
The rapid growth of the system was however only skeptically received by the financial sector and by the research community. Financial market makers were skeptical about the sustainability of Bitcoin, given the absence of regulations and legislations. As well, researchers criticized the lack of governance in Bitcoin, the underlying economic model, and the security and privacy provisions of the system. The latter point received considerable attention in various academic computer science communities; the literature features a considerable number of reported attacks, such as double-spending attacks, Eclipse attacks, selfish mining attacks, as well as thorough analyses criticizing the lack of privacy provisions in the system.
Nevertheless, in spite of the ongoing research criticism, and the considerable number of reported attacks on the system, Bitcoin grew to witness a wider adoption and attention than any other digital currency proposed to date. At the time of writing, Bitcoin holds the largest market share among all existing digital currencies, with a market cap of a few billion USD. There are also numerous businesses, exchange platforms, and banks that are currently built around the Bitcoin ecosystem.
One of the (many) reasons that led to the sustainability of the Bitcoin system was the ability of the developers to assimilate research results from the security community and integrate them swiftly within the development of released client implementations. This strategy has probably saved the Bitcoin community from a wide range of attacks and threats that would have definitely crippled Bitcoin’s growth. This also led to an implicit partnership between various researchers working on analyzing and securing Bitcoin and the Bitcoin development community. The immediate outcome is that several of the countermeasures proposed by the research community have been effectively integrated in official Bitcoin client releases.
Nevertheless, several security challenges remain ahead for Bitcoin, and there seems to be a sharp disagreement in the community and among core Bitcoin developers on the necessary strategies to sustain the growth of the system. These debates were mostly fueled by discussions on expanding Bitcoin’s block sizes. More specifically, a subset of the core developers were in favor of increasing the block size beyond the default cap of 1 MB in order to better cope with the growth of the network, while the rest of developers opposed such a move in the fear of changing/worsening the current network dynamics. This large debate resulted in the exit of developers who were favoring the increase of the maximum block size—a move that many see as the start of the decline of the emerging currency.
In this book, we are not concerned with contributing to the debate on the best strategies to sustain the growth of the system, nor do we plan to take part in favoring any of the existing Bitcoin forks (Bitcoin core, Bitcoin classic, Bitcoin XT), nor do we aim at suggesting/motivating any particular scalability changes to the core Bitcoin system. We definitely do not wish to contribute to the speculations about the future of the currency. Our view (which several other researchers in the community also share) is that the Bitcoin experiment has clearly succeeded. We base this view on the fact that no other proposal for digital currency—besides Bitcoin—has withstood the test of time; Bitcoin has sustained more than 9 years of operation. Namely, no other digital currency proposal—besides Bitcoin—has witnessed such a massive adoption by users/vendors/businesses.
This massive adoption of Bitcoin has truly fueled innovation, and there are currently more than 500 alternate blockchains—most of which are simple variants of Bitcoin. Bitcoin unveiled a key-enabling technology and a hidden potential within the system, the blockchain. Indeed, the blockchain allows transactions, and any other data, to be securely stored and verified without the need of any centralized authority. Note that the community has been in search of a scalable distributed consensus protocol for a considerable amount of time.
In this book, we overview, detail, and analyze the security and privacy provisions of Bitcoin and its underlying blockchain—effectively capturing 8 years of thorough research on these subjects. Our contributions go beyond the mere analysis of reported vulnerabilities of Bitcoin; namely, we describe and evaluate a number of countermeasures to deter threats on the system—some of which have already been incorporated in the system. Recall that Bitcoin has been forked multiple times in order to fine-tune the consensus (i.e., the block generation time and the hash function), and the network parameters (e.g., the size of blocks). For instance, Litecoin and Dogecoin—Bitcoin’s most prominent forks—reduce the block generation time from 10 to 2.5 and 1 minute, respectively. As such, the results reported in this book are not only restricted to Bitcoin, but apply equally to a number of altcoins that are basically clones/forks of the Bitcoin source code. As far as we are aware, this book emerges as the most comprehensive and detailed analysis of the security and privacy provisions of Bitcoin and of its related clones/variants.
This book takes a holistic approach in covering the security and privacy throughout the entire life cycle of coin expenditure in the system—effectively covering the security of transaction confirmation in the system, the fairness of the mining process, the privacy of users, the security of Bitcoin wallets, network attacks, the security and privacy of lightweight clients, among others. More importantly, the book aims to answer the following important questions:
- • What are the actual assumptions governing the security of Bitcoin? Is Bitcoin truly secure if 50% of the mining computing power is honest?
- • To which extent do the scalability measures adopted in Bitcoin threaten the underlying security of the system?
- • To which extent does Bitcoin offer privacy to its users? How can one quantify the user privacy offered by Bitcoin?
- • Are lightweight clients secure? To what extent do lightweight clients threaten the privacy of users?
- • What are the proper means to secure Bitcoin wallets?
- • Who effectively controls Bitcoin?
- • How do the security and privacy provisions of other blockchain technologies compare to Bitcoin?
- • What are the security lessons learned after 8 years of massive research into Bitcoin?
Thoroughly reporting on security and privacy vulnerabilities of systems can be often confused with criticism. The aim of this book is solely to provide our readers with the first in-depth analysis of the Bitcoin system with the goal of laying down the basic foundations for constructing next generation secure blockchain currencies and technologies. Based on recent incidents and observations, we additionally show that the vital operations and decisions that Bitcoin is currently undertaking are not decentralized. More specifically, we show that a limited set of entities currently control the services, decision making, mining, and incident resolution processes in Bitcoin. We also show that third-party entities can unilaterally decide to “devalue” any specific set of Bitcoin addresses pertaining to any entity participating in the system. In the following section, we present a detailed outlook of the contents of this book.