Bitcoins are all set to disrupt financial exchanges globally. In just one year the value of all bitcoins together have risen from USD 6 billion to USD 16 billion.1 At this rate I am sure by 2020 bitcoins will have a global value of at least USD 50 billion. Just like Potato Chips are a subset of Chips in general, bitcoin is a subset of cryptocurrency. There are other variants of cryptocurrency which are equally doing well in global markets. Litecoin, Titcoin, Zetacoin, so on and so forth.

Bitcoins are a form of cryptocurrency, and cryptocurrency is an application of the blockchain technology. In this article we would find out what are bitcoins made up of, what provides for the force behind cryptocurrencies, and what is blockchain.

To understand the working of bitcoins you would need to understand:

In any case I will be providing a brief overview of the concepts when they come up for discussion.

 

Background of blockchain

How do computers work?

To understand how computers work you have to (and I insist) read on how information can be stored digitally.6

If you are too lazy here it is:

Information is stored in the form of text, converted to numbers, say T is 084, and U is 085.7. These numbers are further converted to hexadecimal and then to binary numbers.8 The binary can now be stored directly on a USB Drive which has billions of transistors. Each transistor can hold two bits of information (0 or 1). Together they hold billions of bits. An 8 GB Flash drive has 32 billion transistors which hold 64 billion bits. Eight bits make a byte. 64 billion bits make 8 billion bytes or 8 gigabytes.

 

What is hashing?

To understand what is hashing and how digital fingerprints work you have to (and I insist) read on What is digital fingerprint and hashing? And how is it generated?

Hashing is reduction of information into a fixed set of characters. A huge chunk of binary numbers is taken and converted to a specific set of alphanumeric characters. The thing about hashing is that it can be done only one way. Once a piece of information is hashed it is impossible to retrieve the original data. Also, a hash changes radically with the inclusion or exclusion of even one bit of information.

For e.g.:
Donnie = 6f171d413bee711762beff4276595068 
Donni  = 02d5a92d1fc9b4903bb8ed51bcb6fd3b

Therefore just by comparing the hash of two files one can assert if the files are same or different. Hashing is therefore mainly use to check file integrity and malware infection.

 

What is asymmetric cryptography?

If you have not already then you have to (and I insist) read on asymmetric encryption and cryptography.9

Unlike symmetric cryptography10 (which uses the same key to encrypt and decrypt), asymmetric cryptography (also called public key cryptography) uses two different keys belonging to a pair.

We can encrypt a piece of information with one key and decrypt using the other. It is impossible to generate one without the other as they are mathematically linked. The keys can be found only by using complex maths.

If a piece of information is decrypted by using a decryption key, it would mean that whoever has the encryption key is the sole person to have encrypted it. If one of the keys is lost it is impossible to generate it solely on the basis of the other key.

 

What is a digital signature?

Digital signatures are here to gain advantage over handwritten signatures. Please read on What are digital signatures? Signing and verification – Relevant Indian Laws.

This is what a digital signature looks like: 7t418gpx7ms74j9g6kf0xbvyka4n17qz

This digital signature would be sent along with a document such as a word or PDF document.

This is nothing but the hash of the document asymmetrically encrypted using the encryption key. This can be verified only by decrypting the signature by the linked decryption key. The signature is decrypted and the hash is compared with the hash of the document to find out if it was the same document which was signed.

The presence of a digital signature affirms the integrity of the document and that it was the same document which was signed digitally by the one who encrypted it.

 

—x—

What is blockchain?

In order to record global transactions a list of all global transactional events happening in a fixed period of time are processed into single immutable read-only record files, called blocks. The blocks are added one after one in a linear chronological chain of blocks called a blockchain.

The blockchain is made publicly available for anyone with a computer system to download and analyze. Also anyone can add new transactions to a blockchain just by broadcasting a message. This renders banks and law enforcement agencies redundant. As a result, payments cannot be prevented and accounts cannot be seized.

 

Application

As explained earlier a blockchain is nothing but a chain of transactional events stored in an immutable form. Anything you can imagine as transactional in nature where one party provides and another party accepts can be secured through the application of this technology.

For e.g. Diamond trade in the world is nothing but exchange of diamonds from one party to another. Every new transaction from now on till infinity can be stored on a blockchain. This innovation can do a lot to fully prevent disputes from manifesting in the first place.

As of now, blockchain has already found application in legal contracts (one party transfers goods or services to another), insurance, diamond trade11, etc. Quirky applications can be like organ transplants, vehicle or apartment renting,  etc. so on and so forth. Basically anything.

In the coming paragraphs I would discuss the most important and prevalent application of blockchain with which this technology found place in popular notion. Bitcoins. It was in fact other way round that bitcoins introduced blockchain in an anonymous paper titled: Bitcoin: A Peer-to-Peer Electronic Cash System by Satoshi Nakamoto

Although I would be explaining the working of bitcoins, you may please try and substitute it with anything of interest to you during the course of reading. Maybe real chocolates instead of bitcoins. Read on..

 

Bitcoins (BTC)

Bitcoins are nothing but simple numbers beside public keys (for the easiness of this article we shall substitute public keys with names). The names of the owners and the respective numbers are stored in a ledger format.

Donnie 5.777784
Bimal 70
Narendra 90.06

These numbers can be used just like fiat money to make transactions. After every transaction the balance of a transferor shall decrease and the balance of the transferee shall increase.

For e.g. If Narendra pays Bimal 5.4 BTC. The ledger will reflect the change and become:

Donnie 5.777784
Bimal 75.4
Narendra 84.66

However, in order to be used at par with fiat money BTC has to solve problems which money faces in general. In the coming paragraphs we will analyze each of the problems and find out how BTC uses the blockchain technology to solve them.

 

First problem: everyone should be able to read the ledger

To ascertain who owns how much, it is necessary that a copy of the ledger should be available globally.

This problem is solved by active nodes12 which continuously broadcast a copy of the BTC ledger. The copies of the ledger quickly spread across the internet and every node ultimately hosts a copy of the ledger.

This common storage of the ledger gives it a character of a public database, thereby establishing an irrefutable and indisputable clarity of ownership patterns.

Even if one node is dormant, other nodes on the network which are live would be able to store and continuously broadcast a copy of the ledger. In the most unlikely event of a global catastrophe, failure of internet across nations would only prevent registration of new transactions.

 

Second problem: fraudulent entries should be prevented

It is of prime concern to prevent malicious or fraudulent changes to the ledger. Random entries therefore should be prevented at all costs.

To solve this, the technology behind BTC – blockchain uses a concept called proof of stake. It basically means that only the stakeholders of a transaction should be able to make a transaction.

Therefore, only the transferor is allowed to make an entry (that too) on events of change of ownership of the BTC he holds. The only way to effect change in ownership is to transact.

To transact one has to broadcast a message containing

  • transferor’s name (however, in practice public keys are used)
  • transferee’s name
  • amount of BTC
Bimal -> 7 -> Narendra

Whoever receives the message can now update his own ledger. This updation would require calculation of the transaction w.r.t to the previous state of the ledger. The result would be:

Donnie 5.777784
Bimal 75.4-7 = 68.4
Narendra 84.66+7 = 91.66

 

Third problem: ascertaining authenticity of the message

If making a transaction were that simple then anyone could send transactional messages, or spoof it as if it were coming from a transferor. To avoid this, the message would simply be digitally signed by the transferor, and asymmetrically encrypted with his private key, to prove authenticity.

 

Fourth problem: dubious ownership

What will happen if the person sending the message does not in effect own the BTC? Disputes and eventual crash of the economy.

Solution: All transactional messages ever broadcasted are to be stored forever. The state of ownership pattern is then determined by every node independently. This is done by continuously calculating all the transactions that has taken place since the initial ledger.

Thus, every bit of it is kept accountable and traceable to the epoch of transactions. Every BTC transacted even in fractions and pieces can now be traced to the original BTC at any point of time.

Also, there cannot be negative BTC balances – blockchain does not allow anyone to pay what he does not have. Figuring out one’s own balance requires iterating through every transaction ever made and adding up the unspent inputs.

 

Fifth problem: the issue of double-spending

One may transmit two different messages transferring the same BTC twice to two different people. It would basically mean that the person is transferring something which he does not have by refuting an earlier transaction.

To ascertain immutability of previous transactions, new transactions carry the hash of the previous transaction. Every transaction is thus linked with the previous one and is in turn linked to the epoch of the transactions. This irrefutable link of all transactions is called a transaction chain.

For e.g.
Narendra -> 12.143 -> Bimal #a507a3a558f1e1858945e112a05bcee9 (hash of previous transaction Bimal -> 7 -> Narendra)
Bimal -> 2.0001 -> Amit     #0a931b4a58b7169e8e36ed4f6c2e6089 (hash of previous transaction Narendra -> 12.143 -> Bimal)
Amit -> 1.564 -> Naresh     #82ed03b2e546ebd51845507914deec39 (hash of previous transaction Bimal -> 2.0001 -> Amit)
Naresh -> 3 -> Donnie       #e50ac779f7bc9e6a2e6acf3eace05fc8 (hash of previous transaction Amit -> 1.564 -> Naresh)

Transaction chain:
a507a3a558f1e1858945e112a05bcee9 <-> 0a931b4a58b7169e8e36ed4f6c2e6089 <-> 82ed03b2e546ebd51845507914deec39 <-> e50ac779f7bc9e6a2e6acf3eace05fc8

 

Sixth problem: the issue of global syncing

Many transaction chains may quickly branch out from a single high volume transaction. Transaction chains are created by nodes who deal closely. They are sometimes country specific or industry specific. The different chains encounter different network and threat conditions globally. Computers may crash, hackers may manipulate, and networks may delay reporting of transactions.

To defeat these anomalies all transaction chains globally are queued for hashing. The longest available chain is hashed at the first followed by smaller chains.

One single transaction chain is hashed into a single file called a block. Blocks are permanent indisputable records of transactions. The block is then stored along with the current time and the hash of the previous block in a linear chronological arrangement called a blockchain. Every block is globally broadcasted and everyone updates their copy of the ledger.

 

Seventh problem: issues of data security, ingress and egress of BTC, centralisation of computational power

Generating a block after processing a transaction chain is an easy task and does not require much effort, anyone can generate a block. This creates a security threat from malicious users having huge computational power.

If it were true that only the best computers could manage blockchains then Google and Facebook would have been controlling the global BTC economy. To prevent such centralisation of computational power the blockchain works on a system of a mathematical lottery.

To be able to add a block to the end of a blockchain the publisher needs to solve a mathematical problem every time. This problem involves generating a 256 bit hexadecimal hash with a value lower than the specification set by the blockchain.

When a hash is generated it is mathematically random. Try generating the hash of your name here. Generating a hash within a given specification is very difficult and is akin to a lottery. If the hash generated is larger than the required value, 0s are appended to the beginning of the block to try and get a different hash. This is done with a hope that the random hash value generated would be lower than the specification set.

Lower the specification of the hash set by the blockchain, the more difficult it is to solve. The difficulty level of a blockchain keeps increasing over time as total computation power of the network increases (more and more nodes enter the network).

In practicality, billions of hashes need to be generated in order to get lucky and be able to add a block. As this is a lottery it does not matter what kind of computer you are using. This process of solving a mathematical challenge to add a block to a blockchain is called mining.

To incentivise mining and maintenance of the blocks, every addition to the block is automatically awarded by crediting the miner with new BTC. As a result the entry of new BTCs in global economy is intrinsically related to a real phenomenon of investing energy resources (electricity required to run nodes) in mining. This provides for a predictable, regular and stable growth of BTCs.

 

Cryptocurrency differences with fiat currency

Decentralised:

The management of cryptocurrency is decentralised. There would be no public policy affecting inflation or deflation in the economy. This nature of cryptocurrency also promotes cross border free trade and freedom to transfer and hold without any fees. Law enforcements agencies or governments will have no control over the currency.

Privacy safeguards:

In Bitcoin, only the public key and the amount is mentioned, making it impossible to affix a business or person’s name. At the same time the ledgers are publicly maintained rendering extreme clarity on ownership. One can have multiple bitcoin accounts to receive funds for multiple reasons.

Quality:

Bitcoin meets all the criteria of currency more than extant currencies. It cannot be forged, manipulated, created or destroyed unless as provided in the algorithm.

 

Overall Blockchain provides for the best medium to store and transfer intrinsic value. Instead of printing paper or plastic money if Rupees were to be printed digitally the blockchain medium has to be used.

For a good and long aftertaste of this article please watch this video:

 


 

  1. Bitcoin Market Capitalisation Chart – Mar 2016 – Feb 2017 – Coindesk
  2. What is digital information and how does the computer work? For a lawyer
  3. What is digital fingerprint and hashing? And how is it generated?
  4. Understanding Asymmetric Cryptography, Public Key, Private Key and the RSA Algorithm
  5. What are digital signatures? Signing and verification – Relevant Indian Laws
  6. What is digital information and how does the computer work? For a lawyer
  7. The ASCII Character Set
  8. Decimal to Binary Conversion
  9. Understanding Asymmetric Cryptography, Public Key, Private Key and the RSA Algorithm
  10. Encryption and Symmetric Cryptography – How is data secured electronically?
  11. Everledger – Diamond Blockchain
  12. an active unit in a computer network, basically a computer or a smartphone

Posted by Donnie Ashok

Donnie Ashok is a legal technology developer and a technology lawyer. He is a recent graduate from Gujarat National Law University and currently works as a technology consultant with iPleaders a leader in online legal education. IndiaTechLaw is an initiative by Donnie Ashok.

One Comment

  1. Fantastic explanation..and probably the simplest out of all guides available on internet.

    Reply

Leave a Reply