What is Bitcoin – Part 3

In this 3rd installment, we will get into what a Bitcoin is, at a technical level, so we can build up a more detailed understanding of how the technology actually works. This post will cover all the major components of how the Bitcoin cryptocurrency works without getting super technical and getting into the deeper realms of cryptography, hashing or Blockchain.  I will however try and give you a good overall understanding of all the major elements involved in Bitcoin.

The inventor of Bitcoin is the enigma that is Satoshi Nakamoto.  Satoshi’s original paper is still recommended reading for anyone studying how Bitcoin works. https://bitcoin.org/bitcoin.pdf – however, it is not easy going for the layman and is more akin to a university-level dissertation than a Forbes or Wired level article, but nonetheless, it’s the bible for Bitcoin and you get brownie points for reading it!

As a new user, you can get started with Bitcoin without understanding any of the technical details. The first thing you need to do is install a Bitcoin wallet on your computer or mobile phone.  I will be coming back to Bitcoin wallets and the major vendors in subsequent blogs but suffice to say the market leader by app downloads is Coinbase. Whether Coinbase is a wallet and exchange or a trading platform is up for debate but for the casual user, it’s your one-stop shop.  You will need to make some decision about where you want to store your Bitcoin, as this is a hot topic, again I will be coming back to this topic in later blogs.  But for now, let’s stick with simplicity, heck you are new to Bitcoin and just starting to learn, so why make it complicated!

At the time of Bitcoin’s highest price of just over $17k, Coinbase was the most downloaded app in the Apple Store for a few weeks. Take my advice, be VERY careful about setting up a strong password for your phone and for the app.  We will come back to why later, but anything you can do to make this app and your phone more secure I suggest you do…

Blockchain

Blockchains are not limited to Bitcoin or other cryptocurrencies, in fact, lots of use cases for Blockchain exist outside of cryptocurrency, such as tracking shipping containers, simplifying the settlement of stocks or ensuring the provenance of food.  If you want to do some wider reading on the non-crypto uses of Blockchain then the Hyperledger project hosted by the Linux Foundation is a good place to start.  Another good source is Ethereum, I won’t get into the politics between these two Blockchain approach’s but suffice to say it gets religious!!!

What is a Blockchain?

A block is a record in the blockchain that contains and confirms numerous waiting transactions. For something like Bitcoin roughly every 10 minutes, on average, a new block including transactions is appended to the blockchain through a process known as mining.

According to Don & Alex Tapscott, authors of ‘Blockchain Revolution’ (2016). The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.” 

Put another way a blockchain is; a time-stamped series of an immutable record of data that is managed by a cluster of computers not owned by any single entity. Each of these blocks of data (i.e. block) is secured and bound to each other using cryptographic principles (i.e. chain).

So, what is so special about it and why are we saying that it has industry-disrupting capabilities?

A blockchain carries no transaction cost. (A computing infrastructure cost to run the blockchain network yes, but no transaction cost.) The blockchain is a simple yet ingenious way of passing information from A to B in a fully automated and safe manner. 

One party to a transaction initiates the process by creating a block. This block is verified by thousands, perhaps millions of computers distributed around the net. The verified block is added to a chain, which is stored across the network, creating not just a unique record, but a unique record with a unique history. Falsifying a single record would mean falsifying the entire chain in millions of instances. That is virtually impossible. Bitcoin uses this model for monetary transactions, but it can be deployed in many other ways.

Proof-of Work

Proof of work is a requirement, also called mining, for reasons which I will outline later, be performed in order to facilitate transactions on the blockchain. To understand the link between computational difficulty and trustless consensus within a network implementing a distributed cryptocurrency system takes some understanding but let’s tray and break it down further. 

Proof of Work (PoW) is the validation of the work that happened and proving it is correct. Bitcoin coins follow this way of establishing consensus (agreement by multiple parties) to make sure the authenticity of the chain is good.

To understand how it works in simple terms, assume that you are in a mathematics exam along with other students and the teacher declares there is a prize for the winner. The student who can, can not only come up with the correct answer but who can also come up with the complete proof (show their working out) of getting the correct answer first, gets the prize. 

The winning student needs a lot of brainpower which also consumes a lot of energy from the body. To help make the analogy translate to Bitcoin, let’s break to down further. The “mathematics exam” refers to the “transaction”, the “classroom” refers to the “world”.  The “Student” in the analogy refers to the “computing hardware” that runs the complex algorithms, “brainpower” refers to the “computing power” and the “lot of energy” refers to the “lot of electric power”. 

You will have heard about some of the issues with Bitcoin in the popular press.  One of the biggest downsides is how much electricity it takes to run the Bitcoin network.  Some estimates put the carbon footprint the same as the global airline industry.  My own perspective is that as Bitcoin takes off as a currency rather than a store of wealth this will become less of an issue.  Why?  Well, all those paper notes and metal coins aren’t good for the environment either so replacing them will be better in the long run for the environment. The downsides to a system based on proof of work are:

  • Requires lots of electricity which in turn costs the miner
  • Expensive and highly specialized computing hardware is required to do the work.
  • With more and more Bitcoins getting released, the miner’s reward would come down as the coin becomes scarce to mine.  We will cover the scarcity of Bitcoin in future blog posts but there will only ever be 21 million Bitcoins

Immutable

One of the other key terms you will hear in the Bitcoin space is immutability.  Immutability can be defined as the ability of a blockchain ledger (see below for explanation) to remain unchanged, for a blockchain to remain unaltered and indelible. Put simply, the information in the blockchain cannot be altered. Each block of information, such as facts or transaction details, goes ahead using a cryptographic principle or a hash value.

Distributed Ledger

A distributed ledger is a database held and updated independently by each participant (or node) in a large network. The distribution is federated i.e. records are not communicated to various nodes by a central authority, such as bank or financial institution.

Instead, data is independently constructed and held by every node. The way it works is; every single node on the network processes every transaction, coming to its own conclusions and then voting on those conclusions to make certain the majority agree with the conclusions. This is called consensus.

Once there is this consensus, the distributed ledger has been updated, and all nodes maintain their own identical copy of the ledger. This architecture enables one of the key benefits seen by many in the Bitcoin space in that no one central party controls or administers the network.  This is VERY different from how the Federal Reserve controls the flow and distribution of dollars as the Central Bank of the USA.

Mining

Mining is the way in which a block is validated. The process of validating a transaction or block in a network by the process of complex algorithms to prove and validate the correctness of the transaction.  Once this process is complete a new block is added to the chain.

Bitcoin mining involves making specialized computers do mathematical calculations for the Bitcoin network to confirm transactions and increase security. Mining is the way the Bitcoin system ensures consensus and is used to confirm pending transactions by including them in the blockchain.  Mining enforces a chronological order in the blockchain, protects the neutrality of the network, and allows different computers to agree on the state of the system. 

For a transaction to be confirmed, it must be packed in a block that adheres to very strict cryptographic rules that will be verified by the network. These rules prevent previous blocks from being modified.  If a previous block is modified all the subsequent blocks would be invalidated.

Mining also creates the equivalent of a competitive lottery that prevents any individual from easily adding new blocks consecutively to the blockchain. Through this competitive lottery, no group or individuals can control what is included in the blockchain or replace parts of the blockchain to roll back their own spends. This is laid out extensively in Satoshi’s whitepaper as one of the main benefits of Bitcoin, in that it doesn’t allow you to spend the same money twice or ‘double spend’.

In order to incentivize people to do the mining for Bitcoin, they get a reward. Bitcoin miners can collect transaction fees for the transactions they confirm, along with newly created bitcoins up to the limit of 21 million Bitcoins. Mining is a specialized and competitive market where the rewards are divided up according to how much calculation work is done. Not all Bitcoin users need to do Bitcoin mining, and increasingly the Bitcoin miners are using farms of highly specialized computer based in countries where electricity is cheap, and the climate is conducive to cooling lots of computers.

Cryptography

The integrity and the chronological order of the blockchain are enforced with cryptography.  This is where ‘cryptocurrency’ gets its name from.  Cryptography is about constructing and analysing protocols that prevent third parties or the public from reading private messages.  Cryptography has been around for centuries and involves encrypting and decrypting text or numbers so to mask the real meaning.

What you need to code messages are some key components, namely a Private Key and a Public Key. In a 1976 paper titled “Multi-user cryptographic techniques”, Whitfield Diffie and Martin Hellman proposed the notion of public-key (more generally called asymmetric key) cryptography in which two different but mathematically related keys are used—a public key and a private key. 

A public-key system is constructed so that calculation of one key (the ‘private key’) is computationally infeasible from the other (the ‘public key’), even though they are necessarily related. Instead, both keys are generated secretly, as an interrelated pair.  

In public-key cryptosystems, the public key may be freely distributed, while its paired private key must remain secret. In a public-key encryption system, the public key is used for encryption, while the private or secret key is used for decryption. 

The diagram below shows simply how it works.

Private and Public Keys

In a Bitcoin context, a private key is a secret piece of data that proves your right to spend bitcoins from a specific wallet through a cryptographic signature. Your private key or keys are stored on your computer if you use a software wallet. People go to great lengths to secure their Private Keys.  In their book the Bitcoin Billionaires, the Winklevoss Twins stored their private keys in bank vaults in multiple different cities. Private keys must never be revealed as they allow you to spend bitcoins for their respective Bitcoin wallet.

Cryptographic Signatures

Cryptographic signatures are a mathematical way to allow someone to prove ownership. A Bitcoin Wallet and its private key or keys are linked by some pretty special math. When your Bitcoin software signs a transaction with the appropriate private key, the whole network can see that the signature matches the bitcoins being spent. However, there is no way for anyone to guess your private key and to therefore to steal your Bitcoins. Well not unless you have been careless about how or where you store your private key!

What is a Bitcoin Wallet?

A Bitcoin wallet is basically the same as a physical wallet but it is used on the Bitcoin network. It’s basically where you keep your Bitcoin. A bitcoin wallet actually contains your private key or keys. A Bitcoin wallet can show you the total balance of all the bitcoins it controls and lets you pay a specific amount to a specific person, just like a real wallet. This is very different from other systems of money transfer where a trusted third party such as Visa or Mastercard who provide credit cards and charged by the merchant a fee by processing a transaction.

A transaction is a transfer of value between Bitcoin wallets. Bitcoin wallets keep your private key, which is used to sign transactions, providing a mathematical proof that they have come from the owner of the wallet. The signature also prevents the transaction from being altered by anybody once it has been issued. 

Summary

In this blog, I have covered Blockchain, Immutability, Proof-of-Work, wallets, basic cryptography, and mining so you should now understand most of the basics of how Bitcoin works… Lots more to understand so check back for more Bitcoin and crypto themed blogs in the coming weeks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.