Demystifying Crypto Currency: Part-1

Demystifying Crypto Currency: Part-1

TRADITIONAL MONEY SYSTEM, CRYPTOGRAPHY AND BLOCK CHAIN TECHNOLOGY

Introduction

Cryptocurrency, or “cryptos” as we may now refer to them for the sake of brevity, are around us since more than a decade. But what is crypto-currency? A cryptocurrency is a form of digital asset secured by cryptography, based on a network that is distributed across a large number of computers. This decentralized structure allows them to exist outside the control of governments and central authorities. Sounds confusing? It definitely does, ergo, we will break down the entire concept into three different parts, the following ones in subsequent issues. For now, we will deal with the history, the foundation, the genesis and the base of the virtual currency.

Traditional Money System

We know what barter system was – exchange of goods and services, and we all know the problems with that, so we will travel time into actual currencies. Without going into too much details, we shall start our journey from 1947. India became independent, and at that time in force, we were using the Indian Rupee (INR), which was pegged to the US Dollar (USD) which was further pegged to the price of gold. This was called Representative Currency as it was represented by gold. The currency of several countries was involved in this system in what we call as the Bretton Woods Agreement.

The system collapsed due to inflationary monetary policy (a policy used by central banks to keep economic growth and prices stable) affected key currency systems of some countries. It eventually collapsed in 1971. We then had the Reserve Bank of India, our Central Bank (RBI), and we still have the RBI. Do we have the INR backed by gold? Absolutely not. Who backs the INR? The answer is already printed on your currency note, residing comfortably in your purse or wallet. It is based on the trust and sovereignty of the State. The value fluctuates as per the demand of the INR in the international market. Sure enough, the RBI holds gold bullion and sovereign securities to balance its assets and liabilities. By the way, all currency is legal tender as per relevant legislations passed by the Government of India.

The problems projected by fiat money was – the monetary supply is in control of the Central Banks and they have huge power over the economy. Government control is a like a spice to a dish, without it, the dish will taste bland and too much of it will render it unpalatable. Counterfeiting is a huge problem in fiat currencies. Hyperinflationary conditions and accumulation of debt are also extremely high possibilities here. Too much inflation and debt will mean – the Government will not be able to fulfil their promise and obligations made on your pretty currency note and that will mean? Exactly.

Cryptography

Cryptography, is the practice and study of techniques for secure communication in the presence of adversarial behaviour. Say we are sending an article to someone and we don’t want someone to open that. We use the lock and key. We use a box to keep the articles in, and a key to lock it in so only the person having the key can open it and view the contents. Similarly, on the internet, when we are sending confidential information, we are at the mercy of prejudice of nefarious elements.

Imagine we have a computer program that will allow us to encrypt (secure) a text file or digital document by using either one of two passwords, so that once we freely choose any one of the two passwords for encrypting, then decryption can only be performed by using the other password. That is: you can’t both encrypt and decrypt by using the same password; once you use one of the two possible passwords for encryption, then you can only decrypt by using the other password you did not use for encrypting.This is the trick: you keep one of the two passwords as a secret password only you know and no one else knows; this is called your “private key”. And you let the other password be known by everybody; this will be your “public key”.

Using this, you can perform two interesting tasks, which are as follows:

  1. You can receive (not send) information in a secure manner:Since everybody knows your public key, then they can encrypt any information they want to send to you by using your public key. Since the information has been encrypted by using your public key, then it can only be decrypted by using your privatekey; and since you are the only one who knows your own private key, then you are the only person who will be able to decrypt the information that was sent to you.
  2. You can send information in such manner that you can absolutely prove that information was sent by you:If you want to send a certain information and you encrypt it by using your private key, then everybody will be able to decrypt and read that information, because the information will be decryptable by your public key and everybody knows your public key. So, your information is not protected against reading, but, since it is decryptable by your public key, then it is a complete proof that the information was encrypted by your private key. And since you are the only person who knows your own private key, then it gets perfectly proven that the information was encrypted by you and no one else. This is why encrypting by using your own private key is also known as “digitally signing” the information you send.

Yes, a smart person will argue, if everyone knows my public key, can’t they use the same public key and create their own key pair? This means, they will encrypt using their own private key and other people can decrypt using my public key, so how will I differentiate my public key from someone else’s key? The answer is – my public key and my private key are mathematically assigned that will prevent my public key to be reassigned to someone else’s key. This is called recoupling and this isn’t done.

The two participants in the asymmetric encryption workflow are the sender and the receiver. Each has its own pair of public and private keys. First, the sender obtains the receiver’s public key. Next, the plaintext message is encrypted by the sender using the receiver’s public key. This creates ciphertext. The ciphertext is sent to the receiver, who decrypts it with their private key, returning it to legible plaintext.

Because of the one-way nature of the encryption function, one sender is unable to read the messages of another sender, even though each has the public key of the receiver. In other words, Sender B cannot decrypt the ciphertext sent by Sender A to Receiver. It can only be decrypted by the Receiver, and not the Sender B (unless, of course, when Sender B has the private keys of Receiver, then it is a different story).

Asymmetric cryptography is typically used to authenticate data using digital signatures. A digital signature is a mathematical technique used to validate the authenticity and integrity of a message, software or digital document. It is the digital equivalent of a handwritten signature or stamped seal.

Based on asymmetric cryptography, digital signatures can provide assurances of evidence to the origin, identity and status of an electronic document, transaction or message, as well as acknowledge informed consent by the signer.I have shifted the SHA-256 discussion in the next paragraph – in Blockchain.

Blockchain

When we in Kolkata send INR 100 via PhonePe to our friend in New Delhi, PhonePe isn’t literally putting INR 100 cash on an airplane or a railway coach. When they receive the money, it doesn’t mean that cash was taken and deposited into a metal box with their name on it.When somebody “trades stocks” the stock exchange isn’t moving paper stock certificates and our bank isn’t physically moving currency notes – all they really are, are giant digital ledgers moving digital numbers around from one account to the other. We all have accounts denoted by a unique account number which is not having any duplicate. When I took at an account number of a bank or DP, it contains a name, email Id, phone number, birth date, balance, stocks, everything. All our identity is contained behind that unique number. It doesn’t matter if the lentil soup coloured Rs. 20 currency note is changed into a chilly mushroom coloured Rs. 20 currency note. All that matters, is – we have Rs. 20 behind that number, held in our name, in the record books. Traditionally, you had to have a central authority (Hello RBI!) preside over these record books. How else would you do it? An accountant cannot give free access to the books. If everyone had full access to it, I might just add few crores to my bank balance and retire (it’s a different thing that someone else could then take it away from me).

Ergo, we have institutions by necessity. The PhonePe ledger lives in a computer. The bank ledger lives in a computer. That ledger is updated, secured and managed centrally. We trust these institutions to keep the integrity of the ledger.

Blockchain technology enables us to bypass the medium and transact directly, or P2P, which literally means peer to peer. Of course, we need a computer, internet, but there are no middlemen needed, whatsoever. But we need to be sure of the integrity of the participants.

Since we understood cryptography, we will discuss SHA-256. It is used to encrypt and decrypt values. SHA-256 is a cryptographic hash function of a value. Say, my name RAJAT outputs the hash e9cda15c60d17b76322e1b3fa917e176d4fa9be2784ec5632ebe35d7d774dd0a , This is just a single word (which is my first name). If I input the whole Srimad Bhagavad Geeta, the SHA 256 will give me another bunch of alphanumeric output of the same length. The same data will result in the same hash. If I change a single comma in the text, the whole output will drastically change. And when hash values do not match, the encrypted file or text is not decrypted. I will now extend this concept on something called a “Block”. The input data earlier is broken into three sections – the Block, the Nonce (Number Only Used Once) and …the actual Data! The Hash of these data will contain all the three sections.

A bitcoin, or any coin for that matter is just a list of people’s monies, as same as it is in a bank. Now say there are 100 people in a system, there are 100 computers. All these computers on a network are called “nodes” and they are all running the same software enabling the users behind the notes to transact. Everyone in the network has this list using the software. If you want to pay me INR 1000 in an online mode, you will just tell the bank or the medium. They will change numbers in their “list” to make sure you have INR 1000 less, and I have INR 1000 more. The bank will not physically take and give currency notes. How does this change under cryptos? Since you have my list, you will just deduct INR 1000 from the balance next to your name, and add INR 1000 next to my name. Money has been transacted. Except that here, electronically, INR isn’t used. The crypto-currency is used.

Interestingly enough, the actual list in a blockchain network has no balance. Just the transactions. To know how much crypto you have, you merely need to add up the transactions. The money you have will be equal to the money given to you. Only the transfers of money are recorded.

Now, going back to earlier example, you will send me INR 1000, you have to write a message to other nodes in the network asking them to edit the list, asking to add INR 1000 to RAJAT. But no body is tracking your balance and you have to prove you have the money to send – this is done by a password – private key to ensure it is really you who is sending the money, which we read above. Once it is verified that you received the INR 1000 from other sources, it is known you have the money, and now you can send it. Well, you can ask me, Rajat is it necessary that I need to receive INR 1000 from someone to send it to you? The answer is – Absolutely and unequivocally no! You can bring money, like we deposit money in banks from our homes. That is what is known as “Coinbase”. You use the software, a cryptocurrency exchange to use your fiat money stored in bank to convert the same into cryptos.

What is a block then? All the different entries in a list is a block! A blockchain is a group of blocks that are linked together. Say, first 100 entries are placed in Block # 1. The next 100 entries are placed in Block # 2. Since it is verified by all nodes in a network, the list becomes a valid blockchain. Also, you can trace the blocks and check the history.

We shall now discuss another core concept known as “Mining”. Crypto “mining” is just the process of determining what block goes next in the chain. We need to make sure the blockchain is valid and trustworthy for people to use it. In traditional system, we use the bank to tell us our bank balances. How does this work in a blockchain network, where there is no middleman? Consensus. Yes, we need every node to agree on the list in the block. (Remember, every block has its unique hash).

Millions of people are transacting and thus lists are created. How does the crypto decide which version of the list gets to become a block in the blockchain? The rule is – the chain with the most number of blocks is the valid chain. You already know that lists in a block are hashed by a special function. This concept will be useful now.

Think of mining as a “guessing game”. The node with correct guess will get to input the block in an existing chain and add transactions. They “mined” a block. The “winner” of the game is rewarded with a cryptocurrency! But playing this guessing game, or mining is not easy. We need a special computer and need to pay the electricity bill to run it. If more nodes are in a network, the blocks will be added faster because the probability of “guessing” the word becomes faster. The guessing game is using the hash of the previous block to mine to next block, and thus – create a chain – blockchain!

But every system has people with criminal intent – how do we prevent unscrupulous people to unduly incentivize themselves? Say you paid me INR 1000, it has been added into a list, made a block (say, Block # 419)and is added in a chain. Since the blockchain is a definitive version of the transaction list, people will see the payment and accept it as final. But unfortunately, you have other ideas in your mind – say you want to reverse the payment made to me. Say currently, the blockchain has Block # 420 at the end and people are mining that. How will you try your means – you will, instead reversing INR 1000 paid to me, you will try to pay INR 1000 to, say, AKASH (might be your associate, or your another account). You will obviously go back in time, the previous block, say Block # 419, because if you attempt to indulge in double payment in current block, i.e. Block # 420, it will be taken as fresh transaction, since previous Block, i.e. Block # 419 has already been verified (You paid me INR 1000). So, you went back, paid INR 1000 to AKASH, and then try to guess the game (mine) again, so you can determine the “updated” Block # 420. Once it happens, the previous block,. i.e. Block # 419 containing information that you paid me INR 1000 will be lost and a fresh blockchain is created.

But there is a problem, you are not the only one playing the guessing game (mining). The rest nodes in the network are also mining. Since greater nodes have a greater probability of mining a block, they can find a lead faster than you. The result – you will fall behind and will fail in your intentions. The blockchain remains secured. Also, if you remember as we read earlier, every node in the network has the list. Which means, if you alter the hash in previous blocks, you have to alter the hash of the following blocks to continue the blockchain. And even if – say you manage to outwit other nodes and make the first lead, your blockchain will not tally with the blockchain which other nodes has. So, since everyone else on the network will have same blockchain with the same hash value, it will be proved that your blockchain was fraudulently done, as because the hash value of your blockchain will be different – remember the concept of cryptography and SHA-256 earlier?This is the very concept of “Distributed Blockchain” i.e. the blockchain is distributed among several nodes in the network. Thus, even if you successfully mutate a blockchain, you will fail in your underlying intentions. Tamper proof material!

The lists which contain the transaction data is in Blockchain jargon is referred to as “Tokens”. Take a moment to understand – it is all falling together like pieces of jigsaw puzzle. Tokens basically track who owns which assets. Remember we studied that the pretty piece of paper in your purse or wallet represents a store of value? Tokens basically do the same. They are a store of value of transactions, not balances.

Conclusion

If you are reading this, then well, congratulations! You have indeed stuck on and are ready for the next Part of crypto series. We have now scratched the surface and laid bare the concepts. We will build upon these and dig deeper into the crypto world, how to buy, where to store, the concept of wallets, trading, ICOs, etc. What the future holds is uncertain, but one thing is sure, no civilization has succeeded while trying to curtail technology, and all we can do is embrace it.

Disclaimer: Please do not copy any material without permission. The author can be reached out at csrajatagrawal@gmail.com. All the content is based on the author’s understanding and knowledge.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Social profiles