Bitcoin

Explanation: Cryptography

Required Reading

Technical Overview

First it is important to note that Bitcoin is completely Free and Open Source Software. This brings with it all the advantages inherent in the model. Another interesting aspect of Bitcoin is its decentralization. There is no central authority; there isn't a single server somewhere that stores and manages Bitcoin transactions, as opposed to most other financial areas such as credit cards or the government regulation of tender. Rather than store transactions on a single server owned by someone, every user of BitCoin possesses the entire transaction history on their local computer. This means that a central authority cannot change records, delete the service, or even block it. This Peer-to-Peer model ensures that no single person can gain total control over Bitcoin, which in turn implies enhanced stability for the protocol. Combined with the FOSS model, its decentralized nature makes Bitcoin robust to control, secrecy, and hacking.

Digital Signatures

In Bitcoin, digital signatures using the Elliptic Curve Digital Signature Algorithm (ECDSA) are used to confirm the identities of its users. Every user can have one or more virtual “wallets,” and each wallet has its own private key. Every Bitcoin transaction has to be signed with that wallet’s private key so the Bitcoin network can confirm, using the user’s public key, that the user actually owns that wallet. Therefore, if a user loses a wallet’s private key, the money in that wallet is lost forever. Moreover, the money is not only lost to the owner; indeed, no one can ever own those specific Bitcoins ever again. They have effectively been destroyed, unless someone manages to break the encryption, which is infeasible for modern computers.

The Block Chain

A common function in computer programming and cryptography is a “hash” function. A hash function takes input data and changes it into a more or less random string in a reproducible way. Most hash functions result in the same output size no matter how big the input is. Therefore, to check if two copies of the same data are identical, rather than compare them byte by byte, you can instead hash them and compare their (much shorter) hash values. Virtually any change to the data will change its hash value almost completely. Hash functions are commonly used to check for changes or inconsistencies in data, such as making sure a file downloaded correctly. If the hash value you calculate on the file you downloaded to your computer matches the hash value published on the website offering the download, you can be pretty certain that the file downloaded correctly and there is no corruption.

In Bitcoin, the SHA-256 hash function is used to maintain and verify the integrity of the block chain. Whenever a user makes a Bitcoin transaction, their Bitcoin software records it and distributes it to the rest of the Bitcoin network. About every 10 minutes, all of these new records are gathered together to create a “block” of transaction history, which is then distributed to every user on the Bitcoin network. However, these blocks contain one more piece of information in addition to recent transaction history, namely the hash value of the previous block. Since the full contents of every block depend on the one before it, the full record history of the entire network is referred to as the “block chain.” This is a very good security measure for ensuring that the block chain is never changed after creation. If someone tried to change a transaction in the block chain to steal Bitcoins, the hash value of that block would change, and would no longer match the value stored in the following block. Since every user’s Bitcoin software verifies that the hash is correct upon receiving a new block, changing the block chain would result in a hash mismatch and the software would refuse to accept the offending block. Therefore it is effectively impossible for anyone to tamper with Bitcoin’s transaction history.

The block chain is somewhat controversial due to its inability to effectively protect Bitcoin users’ privacy. Although every user only appears in the block chain as the “address” of their wallet, it is possible to connect these addresses to IP addresses using data mining techniques. After all, the block chain is unencrypted and anyone can view the full transaction history of the entire Bitcoin network. Several alternative cryptocurrencies have arisen to address this flaw, such as DarkCoin. Modifications to Bitcoin have also been proposed to for preserving privacy and anonymity, such as ZeroCoin, but are as of yet not widespread. The block chain is currently about 32 GB, which is a 14GB increase from 2014 to 2015. Note that recent additions to the Bitcoin protocol do not require every user to possess the entire block chain. Currently users only need about 100 MB of the block chain to function on the network.

Mining Bitcoins

The creation of Bitcoins is much different than that of traditional currency. For example, every year the US Treasury decides how much new money to print and circulate. Unlike the dollar, Bitcoins do not have a central authority, and so the creation of new Bitcoins can be done by anyone, and is referred to as “mining” Bitcoins. Additionally, in a centrally managed financial network, the company that controls the network has dedicated servers that keep track of all the transactions that occur. Of course, this is not the case for Bitcoin, since there is no central administration. Instead, mining is intended as an incentive for users to verify transactions and keep the entire network up-to-date. The process of mining is literally collecting transactions, putting them in a block, verifying them, and distributing the result to the entire network. In order to promote this behavior, the Bitcoin protocol gives anyone who successfully mines (i.e. verifies the hash of) a block 25 new Bitcoins. Since Bitcoins are not tangible, and exist solely as a record of transactions in the block chain, this mining reward is effectively minting new currency.

Computing hash functions is very easy; in fact, a good hash function is asymmetric, like in Public Key Cryptography. Finding the output of a hash function is computationally easy, while finding the input that yields a given output is computationally hard. In order to keep everyone on the network from getting hundreds or thousands of Bitcoins a second, the protocol requires the hash of every block to start with a specific number of zeros. This is achieved by adding a third section to every block, the “nonce” or “number used once.” Since we know the desired output of the hash function, we have to use the very slow guess and check method (choose some random nonce, add it to the block, and check the hash value) to find the nonce that fulfills the zero-padding criteria. The first user to find the correct nonce is awarded the Bitcoins, which are said to have been “mined.” The correct nonce is then the user’s “proof of work,” proving that they spent time and processing power. A complete block contains transaction history, the hash value of the previous block, and a nonce. The hash value of any block starts with a certain number of zeros determined by the network.

Initially, mining Bitcoins was a worthwhile endeavor on a regular desktop computer. However, in order to ensure that no one can mine Bitcoins too fast, the difficulty of mining changes. Every 2016 blocks (i.e. 14 days) the Bitcoin network changes the difficulty of (number of zeros required in) the hash value. It chooses a difficulty that results in an average block creation (i.e. nonce discovery) time of 10 minutes. So as soon as people started using powerful servers, graphics cards, and finally custom-built ASICs (Application Specific Integrated Circuits) arrays for mining, the difficulty of finding the correct nonce for a block went way up. In light of the difficulty increase, it is no longer profitable to mine Bitcoins on a personal computer.

The Bitcoin specification sets a limit on the number of Bitcoins that can be in circulation, namely 21 million. The network is projected to reach this limit in about a hundred years. Once no new Bitcoins can be mined, miners will be supported by transaction fees instead of mining rewards. In other words, sending money to someone over the Bitcoin network will require a small payment to the server that processes and verifies the transaction. Thus the network can continue to operate even if mining no longer yields new Bitcoins. Additionally, the reward from mining is cut in half about every four years to slowly transition the network from depending on mining rewards to depending on transaction fees.

Other Cryptocurrencies

Numerous other cryptocurrencies have been created to fill objectives or requirements not met by Bitcoin. A short list is discussed in this section, but the reader should be aware that there are at least several dozen, possibly many more, cryptocurrencies in use at the time of this writing.

Conclusion

An interesting benefit of Bitcoin is that funds are "pushed" rather than "pulled" from accounts. When you make a debit card purchase from a merchant, you are giving them the freedom to take as much money as they want from your checking account. You just trust that they will only take the amount you owe them for the good or service. On the other hand, in Bitcoins you actually send the merchant a specific amount of money from your account. They could not take more even if they wanted to, since they do not know your private key. Combined with its FOSS nature and decentralization, I think Bitcoin is here to stay, and may even become the de Facto standard for international financial transactions in time.