News broke out a few days ago alerting uTorrent users to the silent install of a cryptocurrency miner bundled with the newest 3.4.2 update. I warned several of my friends, and most of them had no idea what I was talking about. The people that have heard of Bitcoins associate it with criminal activity. The “average” person does not follow cryptocurrency and are unaware of its existance and purpose. Because of this, I felt compelled to write a little introduction to what Bitcoin is and how cryptocurrency works. However, a few words of warning: I am not an expert on the topic and this is just meant to be an introduction based on my understanding.
What is a Bitcoin?
In the most basic terms, Bitcoin is a peer to peer currency that can be transferred instantly. Think cash, but electronic. Bitcoin is a cryptocurrency, meaning it is a form of money that uses cryptology to control its growth and transactions. Bitcoins come into existance through a process known as mining, where computer resources are used to solve complex problems.
Why use Bitcoin?
Bitcoin is an attractive currency for a couple of reasons:
- It is a decentralized currency. One instution does not have the power to control Bitcoins. There is no central authority or middleman. The people have total control of their money.
- Instant payments anywhere. Sure, electronic banking exists. However, sending money across different banks results in processing times, awareness of holiday schedules, and waryness of weekend transactions. Bitcoins transfer instantly no matter the amount.
- Anonymity. Today is a time where privacy is a huge issue and people are becoming concerned about giving up personal information. Bitcoins are anonymous in the sense that you do not need to give your own personal information to partake in transactions, neither would you need the receiver’s information. All that’s needed is a wallet address and an amount.
- No chargebacks. Chargebacks are not fun. Not too long ago I was selling virtual goods on eBay where I ran into a scam. Several buyers claimed that those transactions were unauthorized purchases and the credit card company decided to side with them because my proof of delivery was not sufficient due to the virtual nature of the item. Once Bitcoins are sent, there is no way to get them back unless the recipient chooses to reimburse you. I will be dealing with Bitcoin from now on seeing as this is what my PayPal account looks like:
How do I get into Bitcoin?
There are several ways to start sending and receiving Bitcoin. You can use an online wallet, or an offline wallet (I prefer offline because only I have access to it). Online wallets are less secure, because your money exists on your host’s servers. However, Circle seems to be the easiest and safest online solution to get into buying and using Bitcoins.
What controls the worth of a Bitcoin?
The same thing that controls the worth of any other currency; faith. However, Bitcoin is a new currency and is extremely volatile. When I first got into Bitcoins, they were worth around $8 each. The climb was incredible as Bitcoin got more and more traction and eventually I sold my coins at $100. That was a mistake because the value soared to over $1000 before the bubble finally popped. It is a currency that is highly influenced by the world around us. For example, the value of Bitcoin dropped significantly when MtGox, a Bitcoin exchange, got hacked and went bankrupt after a large number of Bitcoins were stolen. Countries such as China also blocked Bitcoins, causing another drop in its value. My understanding of the change in value is limited to the events that I have personally seen. Here is an article about events that have affected Bitcoin prices.
Coin mining is using your computer to solve complex math problems. These complex math problems are extremely difficult for home computers to solve. Whenever a problem gets solved, you discover a block of Bitcoins. Simple? Not quite.
First off, the premise of Bitcoin mining is hashing, which is a process which encrypts data. The ideal cryptographic hash function has four main properties (Wikipedia):
- it is easy to compute the hash value for any given message
- it is infeasible to generate a message from its hash
- it is infeasible to modify a message without changing the hash
- it is infeasible to find two different messages with the same hash.
What does this mean? Basically a hashing algorithm is good when you can’t revert it to its original form without the original algorithm, the data is preserved, and each message is unique. The data being passed through a hashing algorithm will result in an undecipherable code.
Here’s what a hash looks like:
hello world ==> 98c615784ccb5fe5936fbc0cbe9dfdb408d92f0f Hello World ==> a830d7beb04eb7549ce990fb7dc962e499a27230 Hello World! ==> 8476ee4631b9b30ac2754b0ee0c47e161d3f724c Hello, World ==> 6782893f9a818abc3da35d745a803d72a660c9f5
With Bitcoin mining, the problem being solved isn’t figuring out the original algorithm, or matching a hash. Bitcoin mining is difficult because the SHA-256 hash of a block’s header must be lower than or equal to the target in order for the block to be accepted by the network. Each hash is altered by a nonce, which is a random 32 bit integer added into the hash. To successfully mine this block, the computer has to find out the random number along with the hashed transaction data, hashed against other transaction data, then hashed together with another transaction pair, hashed together, that leads to a hash with a value lower than a hash that has certain amount of leading zeros.
Using our hello world example:
"Hello, world!0" => 1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64 "Hello, world!1" => e9afc424b79e4f6ab42d99c81156d3a17228d6e1eef4139be78e948a9332a7d8 "Hello, world!2" => ae37343a357a8297591625e7134cbea22f5928be8ca2a32aa475cf05fd4266b7 ... "Hello, world!4248" => 6e110d98b388e77e9c6f042ac6b497cec46660deef75a55ebc7cfdf65cc0b965 "Hello, world!4249" => c004190b822f1669cac8dc37e761cb73652e7832fb814565702245cf26ebb9e6 "Hello, world!4250" => 0000c3af42fc31103f1fdc0151fa747ff87349a4714df7cc52ea464e12dcd4e9
On the 4251st try, a hash with three leading zeroes has been produced. Who knows how many hashes it takes to reach a number with say 20 leading zeroes. A nonce is a 32 bit integer, meaning it can go up to ten digits in size.
The combination is extremely difficult to guess, and thus requires a massive amount of computational power. The difficulty of finding a match goes up by lowering the previously mentioned “certain amount” as more Bitcoins are mined.
Bitcoin mining is also a race. When blocks are released, there is a race to see who can solve it first. Typically, no normal household computer will be able to find a solution first because Bitcoin farms and mining pools exist. Mining pools gather willing participants to share their computational power and divide the earnings when a block is found. A Bitcoin farm is a server room with computers solely dedicated to mining coins. No way is your household computer going to compete with this:
uTorrent was trying to silently turn all of its users into its own personal mining pool, using your CPU/GPU and electricity for their profit.
Here is what a mined block looks like on the blockchain:
And here is excellent additional reading on this topic: https://chrispacia.wordpress.com/2013/09/02/bitcoin-mining-explained-like-youre-five-part-2-mechanics/
If Bitcoin is generated, why can't they just be duplicated or hacked?
If you read the mining section above, remember that once a nonce is found that is lower than a defined amount, the block will be found and you will receive Bitcoins in your wallet. Other miners will check the hash with the nonce found to see if what was found is legit. This check relatively effortless to do compared to the work needed to mine a new block. The transaction gets written to a public ledger known as the blockchain, and any attempts to duplicate Bitcoins or alter transactions will be rejected.
One reason why Bitcoin isn’t as anonymous as cash is because when anyone sends or receives money, that transaction is broadcasted to everyone and written to the blockchain. If you have an offline wallet, you would notice constant syncing because it is downloading the entire ledger.
Transactions are grouped into block. Each block, which is a list of transactions, contains the hash to the next block. Unless you can compute the proper hash to generate new transactions before a new block comes in, hacking the blockchain is impossible without having at least 51% of the entire blockchain’s computational power.
Litecoin, Dogecoin, -- Insert coin name here --
Bitcoin is open source. Any developer can look into the source code to see how it works, and to alter it to create their own cryptocurrency. I could have a Bchoycoin if I wanted to, but it would be worthless until it gains traction and trust. Cryptocurrencies such as Litecoin become successful because they offer an (arguable) improvement over the Bitcoin. Dogecoin garnered a lot of traction because it was a fun and easy way to get involved with the cryptocurrency world without much understanding.