What is Blockchain and How Blockchain Use Hash Functions

Blockchain is not the technology, it’s the revolution just like the internet. The way the internet brought the changes to our life the same changes will be brought up in the Blockchain in a very near future. Today we will try to understand what is blockchain in a very simple language. Well Do you know the chain? the metallic chain, You must have seen that Just like that metallic chain we have a chain of blocks and It is called a Blockchain. Well it’s true but it’s not that simple.Before we understand blockchain in very easy language, let's check the technical definition of Blockchain.

What is Blockchain?

Blockchain is a public distributed peer-to-peer ledger which keeps records in chronological order we just secured and immutable. Yeah it's too much Complicated I know you guys are angry with me when I heard this definition of Blockchain, I was literally cracking my head. So For now, just ignore the definition.

Let's try to understand blockchain in a very easy language. So, to understand this, consider an example. Suppose we have four people, Aniket, Bella, Dinesh, and John. Let's assume we give them some money like 200,300,400 and 600 dollars respectively. Suppose we create a ledger of this in a traditional way it will look like this.

So to incorporate this in blockchain We will encrypt this data using a very strong military grade algorithm almost impossible to hack and put it in a block. Please Look at the block, it has two section first is the link and second is the data. When we will turn this block as block number 1 Now we will share this block with everyone. Making our blockchain network truly public but the data is encrypted. Now Assume, Aniket wants to transfer some funds to Dinesh Hopefully manage because in blockchain data is never modified. Now, Since Aniket has done a transaction we have new set of records. But in a blockchain data can never be modified. So how this is handling blockchain, Here we will encrypt this new transaction and we will put it in this block number 2. Remember, block has a two section. One is data and other is Link. So in the Link section of block number 2, We will put all the encrypted data of block number 1. You see there is a linking Block number 2 contains a link of block number 1. And again we will share this block number 2 with everyone, Now again I am saying our data is truly public.

As we do more and more transactions, we will have to create more and more blocks to save this transactions. And they will be link to each other. Just like block number 1 and block number 2. So after some times we will have many blocks linked to each other. We can call it is Chain of Block. The real term is Blockchain.

This is one more thing to note down to understand blockchain. Whenever a transaction is done in the blockchain network. It has to be approved by all the person holding the data. Sometimes they are called Nodes. Now, this concept of Blockchain has lots of advantages but we discussed here few of them.
  • The best part is, there is no single point of failure. Because the data is shared with everyone, It is available in the computers of every person Who is participating in the network.
  • Second important benefit is there is no central authority in blockchain. Everybody who is participating in the network has a right to approve or reject the transaction. There is no centralized person monitoring every thing. Everybody is equally authorized and equally responsible for the network.
  • Third important benefit of blockchain is, Its Most secure and immutable technology available today.

Why Blockchain is so Secure and Immutable:

Just imagine, Somebody wants to hack block number 10. To Hack block number 10 we will first have to add block number 11 because, the link of data of block number 10 is available in block number 11. But to hack block number 11 he will have to hack first block number 12. One more thing, each block is encrypted with the military-grade algorithm and all the blocks are stored in 1000 different computers. Just imagine, we have 1 million blocks and which are stored in 1000 different computers across the globe. Believe me, Even a army of hackers can not hack all the computers and all the blocks.

Let's look at the definition Again, the definition was blockchain is a public distributed peer to peer ledger which keeps a record in a chronological order which is secured and immutable. When you see, it's public and it's shared with everyone. It's peer to Peer, it's not stored in a single computer. It's stored in the computer with everyone and also none of the blocks are modified. The Data is stored in every next block in chronological order. I hope you understood this technical definition of blockchain in a very simple way.

What is Hashing in Blockchain:

Hashing is the only thing that links the blocks in the blockchain. Each block contains the hash of the previous block and so on. Before we start, Let's check below image first. It’s an online tool that converts text into hash. Here we will select the algorithm sha256, the popular bitcoin algorithm, here we enter the “Hello World”, and you got the hash.

Please make a not that for Hello World we got this hash.

Now we just added a dot to the hello world text and again click on get hash, well our hash has changed.

Now we will write 200 or 400 character text and click on Get Hash, we got this hash.

So here I need to explain 3 important things:

  • First is Even if you change a single character in the input text, the output hash will change.
  • Second important thing is If you have 100 characters or 1000 characters the length of hash will remain the same.Well, here a lot of calculations are involved to calculate the hash. We don’t go into the mathematical formula but just try to understand that there are different types of algorithm to calculate the hash like sha256, Scrypt, X11, etc.
  • Third most important point is hash is one way. If you convert a text into hash there is noway to convert that back into actual value.

How Hashing helps in Blockchain:

When you do some transaction in Bitcoin or any other blockchain network, the data of block number 1 is hash and it’s added in the link section of the block number 2. When the block number 3 is created the hash of block number 2 is created and it's stored in the link section of block number 3. If someone tries to modify a block number 2, even the smallest modification will change the hash and the link will be destroyed. All the nodes will reject the data.

If we define the hashing in Blockchain it will be like this "Hashing is a process which accepts a string of any length and converts them into encrypted data of fixed length using available algorithms" Well, this was about hashing,to understand blockchain more you also need to understand like nonce (number only used once) and how it will affects the hashing, what is the algorithm, What is crypto currency, what is Ethereum, what is smart contract, what is hyperledger blockchain.

Post a Comment

Please do not enter any spam link in the comment box