What exactly is blockchain ?

Blockchain is a complicated topic to understand but after reading this blog you would know exactly what is blockchain and some more basic concepts like cryptography and blockchain mining .

Before starting off let us look at some important terms which could help us learn blockchain in a much faster way . These terms we are going to see are going to be short and quick :

  • Blockchain : Block with chain .
  • Decentralized : Anything which is not centralized but distributed .(Also called distributed system)
  • P2P Network : Peer to Peer Network . (Point to Point Network Connectivity) .
  • Node : A point or a physical device in the Network .
  • Cryptography : A way for secure communication .

Blockchain — As the word suggests , blockchain means a block with a chain .

“ A blockchain is nothing but a complicated and an unique Database “

Yes ! Blockchain is nothing but a database . Then why is it so hyped ?

One key difference between a typical database and a blockchain is the way the data is structured. A blockchain collects information together in groups, also known as blocks, that hold sets of information. Blocks have certain storage capacities and, when filled, are chained onto the previously filled block, forming a chain of data known as the “blockchain.” All new information that follows that freshly added block is compiled into a newly formed block that will then also be added to the chain once filled.

The Blockchain contains many blocks which are interconnected with each other , via hash value as shown above. It also has an index , timestamp and data .

  • If you are from a computer science background , you could use LINKED LIST for the analogy .

Working

The Blockchain contains many blocks which are interconnected with each other , via hash value as shown above. It also has an index , timestamp and data . * If you are from a computer science background , you could use LINKED LIST for the analogy .

Blockchain works on a Peer to Peer Network (P2P Network) . A peer is also called a node . Blockchain is also called Decentralized as it does not have its own central server , rather it has many individual nodes .

P2P example : Napster , uTorrent .

* A Node could be a laptop , desktop or even a mobile phone .

There are 2 Types of Nodes

1) Full Node — Full nodes act as a server in a decentralized network. Their main tasks include maintaining the consensus between other nodes and verification of transactions. They store a copy of the blockchain which makes them a full node .

In the case of cryptocurrency , a full node is also eligible for mining .

Mining — Blockchain mining is a process to validate every step in the transactions while operating cryptocurrencies like bitcoin .

2) Partial Node — Partial nodes are also called lightweight nodes. They do not store complete blockchain in the device , you could also make a partial node with a mobile phone . Partial nodes cannot mine as they do not have enough recourse .

Cryptography

If there are two Nodes , Node A and Node B . If Node A wants to transfer data to Node B , the medium of transfer should be secure in the terms of :

  • Data Privacy(Confidentiality)
  • Data Authenticity(Checking if the data is from a trusted source )
  • Data integrity(Checking if the data is been changed)

And cryptography makes sure that all these security features are present in the transfer of money or data .

There are 3 types of Cryptography

  • Symmetric Key Cryptography : In this type of cryptography only one unique key is used for every transaction . Which would result in many unique keys for each and every transaction, resulting in further complications in the system .

Working : If Node A is sending data to Node B , the data sent by A is encrypted (and locked with a shared key) with an algorithm after which it converted to cypher text (unreadable text) . Then the cypher text is encrypted with an encryption algorithm (and unlocked with a shared key) , decoding the data in the block .

  • Asymmetric Key Cryptography : In this cryptography we have 2 types of keys (Private Key & Public Key) to avoid assigning multiple keys for every single transaction like symmetric cryptography . A public key is used for encryption and a private key is used for decryption. Public key and Private Key are different. Even if the public key is known by everyone the intended receiver can only decode it because he alone knows the private key.

Working : If Node A is sending data to Node B , The public key of Node B is known to everyone as it is public but the private key of Node B is only with B . So when Node A sends data , it is encrypted with an algorithm (and a public key) and converted to cypher text or scrambled data also know as unreadable format . In the next step when Node B receives the data , Node B could encrypt it using a private key which is only with B , And voilà! the Data is received !

  • Hash function : The process of converting information from a readable format to something that makes no sense .

Working : Hashing means taking an input string (Large text) of any length and giving out an output of a fixed length. The fixed-length output is called an equivalent hash or simply hash.

  • Blockchains make use of two types of Cryptographic Algorithms, Asymmetric-key algorithms, and Hash functions to achieve the 3 objectives of cryptography as mentioned above .

Conclusion : Blockchain is just a complicated Database to store Data which is Decentralized .

FOR MORE BLOGS ON BLOCKCHAIN FOLLOW ME!

Originally published at https://yuvrajkanna3.blogspot.com on January 29, 2021.

Full Stack Developer | Blockchain Enthusiast