Search This Blog

Apr 29, 2020

Consensus Protocol for Blockchains in Cryptocurrency

Blockchain of every Cryptocurrency should be distributed in nature with the help of a consensus protocol. Even though it is distributed across thousands of computers all over the world, a Blockchain is immutable.

If an attacker tries to change the data of any existing block in the ledger, then that block's "hash" value (generated by SHA 256 Algorithm) will change. Then, this new hash will not match with the next block's "previous hash" field. So, now the attacker needs to change this block also and this process will continue till all the subsequent blocks are manipulated successfully. 

Even if the attacker successfully changed the data of blockchain, since there are thousands of copies of original blockchian around the internet, this fake blockchain will not be valid because of the Majority Rule.

Majority Rule - Whichever copy is found more number of times, then that copy of blockchain is considered to be original and valid.

So, the attacker can't achieve anything by simply modifying one or two copies of blockchain, atleast 51% of copies of blockchains needs to be modified simultaneously with same fake data all over the world. Then only the hackers can corrupt the blockchain. But this task can be considered as impossible in real world practicality. 

Consider these 2 Scenarios:

Scenario - 1:

If an attacker adds a block exactly after the current last block in Blockchain.

If attacker entered fake/malicious transactions in the block and mined it successfully, then this block will not be added to chain because before adding any block to the chain, a series of checks are performed for validating the block.

More than 20 checks are performed on each new block before adding and copying it to all the blockchains in the distributed network.

Scenario - 2:

What if 2 blocks are mined exactly at the same time and both are valid blocks.

In this case, both the blocks are copied to the copies of blockchains which are geographically nearer in the network. So one block is copied into its nearest blockchains and other block is added to its nearest copies of blockchains. This means 2 versions of Blockchains will exist and both of the versions are Valid and original. 

Both the  versions of chains will wait for the next new block to be mined and whichever version gets the new block then it is copied all over the distributed network. So, the longest chain will be valid and the previous block in the other version will be cancelled. Those transactions needs to be validated again in a new block and it has to be mined again.


Go to Next Post - SHA 256 Algorithm


Go to Previous Post - What is Cryptography and its usage in Cryptocurrency ?

Apr 13, 2020

What is Cryptography and its usage for Cryptocurrency ?

Cryptography is the science of keeping data secure from unwanted or untrusted entities. Main goal of cryptography is to make a public open channel into a virtual secure channel such that it satisfies the following 3 properties:

  1. Privacy
  2. Authenticity
  3. Integrity
Cryptographic mechanisms can vaguely be divided into two types: 
  1. Symmetric Key Cryptography
  2. Asymmetric Key Cryptography.

In Cryptocurrencies, Asymmetric Key Cryptography is used. So, we will try to understand that in this post.
Asymmetrical cryptography follows Public Key Mechanism meaning that - one key is publicly displayed and it is sharable to anyone. However the Private key should be kept secret. (Know more about private keys and how to store securely in this article)

Some attributes of Asymmetric Key Cryptography:
  • Public Key Cryptography
  • One key will be in public domain and the other will be Private
  • Different Keys are present on both Parties (sender and receiver)
  • No need of prior key agreement
  • Computationally a little bit heavier.

In Blockchain, all the blocks are linked cryptographically. For every block, a hash is generated using SHA 256 Algorithm. Then, that hash is stored in that block and copied to next new block as well. In this way every block will contain two hashes : one is its own hash and other one is that of previous block.


Go to Next Post - Consensus Protocol for Blockchain


Go to Previous Post - Technologies behind BTC & Cryptocurrency

Mar 30, 2020

Technologies behind Bitcoin and Cryptocurrency

There are many concepts that enable the successful working of Bitcoin and Alt Coins over the years. The following are fundamental technologies that contribute to Cryptocurrency domain.

1) BlockChain

Blockchain acts a record of ledger for all the transactions in the network. Think of a Blockchain as a database for storing all of the transactions occurred and will occur in the future.

Know more about the Blockchain technology in this post

2) Cryptography

Cryptography deals with the security aspects in the networking domain. It aims to protect the data that is being communicating over the network (generally Internet) so that, no outsider can understand the data except for the intended receiver. Cryptography is a demanding field in Computer Science.

Know more about Cryptography in this article...

3) Distributed / Decentralized

In every cryptocurrency, the underlying blockchain is distributed. It means the same blockchain is copied and distributed to many computers all over the globe. All of the Blockchains have same data. If anyone tries to change data then it will be detected because there are several copies of blockchain and we can know which is the valid blockchain.

Know more about this Consensus Protocol here

4) Peer 2 Peer

A Peer 2 Peer (also known as P2P) is decentralized application architecture in which all the users can interact or perform the required use case directly with each other. There will be no governing authority that facilitates the interaction or provides the approval. The users in the P2P network will have the full rights. Main aim is to avoid the mediator / intermediate authority or any 3rd party.

Examples are uTorrent, Bittorrent, Bitcoin Transactions...etc.

5) SHA 256 Algorithm

  • S - Secure
  • H- Hash
  • A - Algorithm

SHA 256 is a Cryptographic Hash Function that converts any given input into a string of 64 random Hexa-Decimal characters. These 64 characters take 256 bits of size to store in memory. Hence, the name SHA 256.

Know more about the SHA 256 Algorithm here


Go to Next Post - What is Cryptography? Its usage in Cryptocurrency


Go to Previous Post - What are Stable Coins ?

Mar 8, 2020

What are Stable Coins in Cryptocurrency ?

Stable Coins - Aims to Keep their Value Stable

Stable coins are a class of Cryptocurrencies whose goal is to keep the price or market value of exchange rate as stable as possible. The implementors of stable coins achieve this by fixing the price of a stable coin to an external factor like Price of Dollar or Price of Gold etc.

Cryptocurrency markets are highly volatile and the values of any coin may crash and sink to bottom or the value may increase and sky-rocket up to the moon. The market is unpredictable.

So, there is a need for a fixed value coins that don't undergo these type of unpredictable changes. Stable coins came into existence to fulfill this need.

Bitcoin is not a stable coin !!

Each Stable coin has its own Blockchain and all the transactions of that respective coin will get recorded in that Decentralized ledger.

Some of the popular & widely used Stable coins:


1) Tether
2) Paxos Standard Token
3) DAI
4) USD Coin
5) True USD
6) Reserve

and many more... Detailed posts on each of the stable coins will be updated soon... bookmark this page or remember this site (jvermaDLL.blogspot.com) for insights on cryptocurrencies for beginners.


Go to Next Post - Technologies Behind Cryptocurrency


Go to Previous Post - What are ALT Coins ?

Watch Naruto vs Rock Lee vs Shiikamaru vs Kiba Battle Royal