Bitcoin is a new kind of digital currency originally created by Satoshi Nakamoto in 2009. Of course, the idea of digital money is not new; for many years now we have had Paypal, credit cards, WebMoney dollars and even the virtual gold in video games like World of Warcraft. What makes Bitcoin different from anything that came before it, however, is that Bitcoin exists only on the internet, and is not dependent on any government or corporation. Instead, the Bitcoin system is collectively maintained by thousands of computers owned by various individuals around the world. Because of this, Bitcoin is able to offer a number of advantages over other methods of digital payment:
1. Bitcoin has very low fees. Technically, you do not need to pay any fees at all, although if you do not include a small fee of about 0.0001 BTC (~$0.01) transactions below 0.01 BTC (~$1) will be processed more slowly.
2. Your Bitcoin wallet cannot be frozen or seized. Some kinds of organizations – particularly political organizations, must frequently deal with Paypal or credit card companies refusing to process payments for them and even freezing their account, leaving their owners to maintain them out of pocket. With Bitcoin, there is no way for anyone to block or reverse transactions.
3. You have increased privacy with Bitcoin. Although all transactions between Bitcoin addresses are public, you do not have to tell anyone which Bitcoin addresses belong to you (to further increase privacy, most Bitcoin wallets give you a new address every time you receive money), making it very difficult for anyone to link you with your transactions.
4. Bitcoin transfers are nearly instant. When someone sends you bitcoins, you will see the transaction within five seconds, and it will usually be “confirmed” by the network within ten minutes. Accepting transactions without confirmations is sufficiently low-risk for nearly all applications, so many merchants will accept your payment immediately.
5. Bitcoin is international. Paypal is unusable in 60 countries around the world, and international payments often charge hefty fees, but with Bitcoin sending money from Kyrgyzstan to Guatemala is exactly as easy, quick and cheap as sending money to your own neighbor.
Essentially, Bitcoin does to finance what email did to our communications.
In order to use Bitcoin, you need to have a Bitcoin wallet. The purpose of a Bitcoin wallet is, as the name implies, to let you receive, store and send bitcoins. To receive bitcoins, you need to have a Bitcoin address; this is a series of numbers and letters like “1McqmmnxRwZRCpD2VoGEMzCYcdeXYvCBsB” that is essentially the equivalent of a bank account number – you give your Bitcoin address out to people so that they can send you money. Your wallet will generate Bitcoin addresses for you. When you want to send money, your Bitcoin wallet will have a form where you can paste in the Bitcoin address you want to send to, enter the amount, and hit “Send”. It’s just like email or a bank account; if you just want to use Bitcoin to send and receive money that’s all there is to it.
Bitcoin wallets can be desktop programs, smartphone apps (Android only so far unfortunately; blame Apple’s policies) or websites. Here is a page listing the more popular ones.
Transactions: the Technical Description
There are three numbers connected to each Bitcoin address:
1. The private key. This is needed to sign transactions (more on this below).
2. The public key. This can be derived from the private key, and can be used to verify that a signature made with the associated private key is legitimate, without actually knowing the private key.
3. The Bitcoin addreess itself. This is the hash (a mathematical one-way compressing function) of the public key.
Here is one example of such a triple:
Private key: c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a
Public key: 0478d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71a1518063243acd4dfe96b66e3f2ec8013c8e072cd09b3834a19f81f659cc3455
In order to send money to someone, you (or rather, your Bitcoin wallet) must create a file called a Bitcoin transaction and publish it to the network. A Bitcoin transaction contains five basic parts: (1) the previous transaction that originally gave you the money that you are trying to spend, (2) the public key associated with the Bitcoin address that the previous transaction was sending money to (ie. your address), (3) the destination Bitcoin address that you are sending to, (4) the amount to send and (5) a digital signature of the rest of the transaction signed by the private key associated with the same address whose public key you included. To verify that a transaction is legitimate, the Bitcoin network does the following:
1. Check the signature to make sure that (i) the transaction was signed by the private key connected with the public key included in the transaction and (ii) the transaction was not tampered with.
2. Check that the public key included in the transaction matches the receiving address of the previous transaction.
If you know (1) and (2), you know that the transaction was signed by the owner of the private key connected to the receiving address, and so they are entitled to spend the money. Every “full node” in the Bitcoin network makes this calculation, and if everything checks out the transaction is accepted.
Mining is the other important part of Bitcoin’s underlying cryptographic mechanism. The transaction system solves one major problem of security: it ensures that no one can spend other people’s money, either by making transactions themselves or by modifying other transactions in transit. However, there is still another attack that the transaction system by itself does not solve: the double spending attack. The attack works like this:
1. Alice sends 10 BTC to Bob, and publishes the transaction.
2. Alice waits for Bob to give her some product (in order to be effective, it must be some instant-transfer digital good, like a one-time code or another cryptocurrency)
3. Alice makes a transaction sending the exact same 10 bitcoins to herself, and publishes that transaction. She then floods the network with this second transaction with thousands of computers, hoping that the majority of computers will accept her transaction (thus nullifying the conflicting transaction to Bob) even if Bob’s came first.
The naive way to resolve this is by saying that the first transaction always wins. However, the problem is that this can easily fragment the network; for example, evil Eve might send a 10 BTC transaction to Alice to one half of the network and a 10 BTC transaction to Bob to the other half, and then watch in glee as Alice and Bob make further transactions and the Bitcoin network splits in half over the disagreement. To ensure consensus, Bitcoin uses the mechanism that is known as mining.
Roughly every ten minutes, Bitcoin transactions are gathered together and published in what is called a “block”. A block has certain mathematical properties that make it very hard to create – so hard, in fact, that it takes the entire Bitcoin network an average of ten minutes to create one (the difficulty of the mathematical property in question is deliberately adjusted to ensure this). The only algorithm for making blocks is basically to change around insignificant details in the block until the mathematical property checks out. This is what Bitcoin miners do – they keep on trying different values until eventually one gets lucky, creates a valid block, and the process continues from there. Note that each block also contains a pointer (technically, a hash) to the previous block, so if someone tries to change one block in the middle then the next block will need to also be re-created (there are no shortcuts here; this is just as hard as creating that block was originally), and from there the block after that will also need to be re-created, and so on. Now, what happens if Alice wants to carry out her attack?
1. Alice sends 10 BTC to Bob, and publishes the transaction.
2. Bob, being a particularly security-conscious merchant, waits for three confirmations, and sends off the good. This means that he waits until his transaction was put into a block and then two further blocks were published after it.
3. Alice sends 10 BTC to herself. This transaction will not be accepted by the network, because a conflicting transaction was already made three blocks ago. She cannot simply modify a block in the middle, because of how the blocks are linked to each other. Thus, her only choice is to replace every single block after the one that she wishes to change.
4. Even though Alice spent $100,000 on Bitcoin mining hardware, she still has a hundred times less computing power than the rest of the Bitcoin network put together. Thus, in the time that she creates the three blocks needed to catch up, the rest of the network will already be three hundred blocks ahead. Once Alice catches up to there, the rest of the network will be thirty thousand blocks ahead, and so on.
Thus, Alice’s situation is hopeless. The only way she could possibly catch up to the rest of the network is if she had more computing power than the rest of the network combined – perhaps the weakest security assumption in the entire Bitcoin system, but nevertheless a very daunting task. To date, no one has managed to do such a thing and it is getting harder for an outside attacker to pull this off every month. Since the more legitimate miners there are, the harder this gets, the Bitcoin network incentivizes mining by giving every miner that creates a block 25 BTC plus all transaction fees (about 0.25 BTC per block right now).
Should I Mine?
Probably not. Mining these days is done by computers with specialized chips known as ASICs (application-specific integrated circuits), which are hundreds of times more efficient than the average CPU. If you have a computer with a powerful graphics card, you may or may not be able to profitably mine with your GPU; you may want to check your local electricity costs, get a Kill-A-Watt to measure your electricity usage and try it out for yourself. You may also wish to consider mining Litecoin instead; there are currently no Litecoin ASICs (and when they do come out they will have less of a speed advantage), so the situation is stacked somewhat more in your favor. If you wish to own bitcoins, it is probably a better idea to buy or earn them instead.