Search
  • BBCA

Understand the Blockchain 101: Hash Verification

By Alexis de Girardier

As described by our amazing Luca two weeks ago, a blockchain is a chain of blocks that contain information. We know that the type of information stored depends on the type of blockchain.

So please, take a sheet of paper or try to visualize a chain of blocks. Now we are going to enter a block to see what is inside.

What is a block? Each block contains three aspects, data, the hash of the block and the hash of the previous block.

We know about the data, it could more or less be anything.A hash could be compared to a fingerprint. It is unique and identifies a block and its content! Once a block is created, its hash is being calculated. If you change something inside the block, it will cause the entire hash to change. This is very important for you to remember! Think about a chain of silver rings, if you modify one single atom of one ring (from silver to gold or gold to silver), your ring won’t have the same characteristics, the same weight or the same composition. A hash is a large number.

Look at that picture, each pieces information is hashed into a very long and complex number! Fancy! Now, I hope you understood the basic idea behind a hash. It is also a key aspect of blockchain we will cover in the future, it is the basis of “mining”.

3. The third element in a block is the hash of the previous block. Do you follow me? It simply means that each block possesses the fingerprint of the previous block, that is the process that create the chain! You can view this third element as the link between two blocks. It is this technique that makes the blockchain so secure.

A bit about security Wait why do we talk about security now? … wait for it!

Picture now a chain of three blocks, the third block contains data, its own hash and the hash of the 2nd block (thepreviousone),which contains the hash of the1st block, its own hash and data.The first block is called the genesis block, it still contains data but doesn’t have hashes from any previous block.

If we try to tamper with the 2nd block for instance, by changing the information registered, it will cause the hash of the tampered block to change and will make the block 3 and its following invalid because the link is broken between the two blocks. Why? Remember about the 3rd element of a block,the hash of the previous block? Well if doesn’t match with the previous one, it is invalid.

Sadly it’s not enough to prevent tampering, as computers today are able to calculate thousands and thousands of hashes per second. So, in principle you can change one block and recalculate all hashes of the following blocks to make the blockchain valid again in a very short amount of time!

But to mitigate these effects, blockchain has several weapons! The most famous one is called proof-of- work. It is a process aimed at reducing the pace of creation of new blocks. For bitcoin it takes about 10 minutes to recalculate everything and add a new block to the chain. Makes it hard to tamper with one block because if you do, you would have to recalculate all the proof of work of the following blocks. (In future article we will talk about the other weapons, Decentralized Consensus Algorithms, the Practical Byzantine Fault Tolerance and the Proof of Stake.)

The security of the blockchain comes from its hashing and proof-of-work mechanism. In addition to this, as Luca wrote in his previous article, the blockchain is so safe because it is a distributed ledger!

So, if you want to tamper with one block, you’d need to tamper with all the following blocks on the chain, recalculate the proof of work for each block and take control of over 50% of the P2P network. Only then will everyone else accept your tampered block. That is to say, almost impossible to do.

Because it is so safe and public, the blockchain has many possible uses in our current world. We will discuss them in a future article.

#Blockchain #Hashverification #BBCA #Learningseries

28 views

©2018 by BBCA.

  • Facebook Social Icon
  • LinkedIn Social Icon
  • BBCA instagram
  • BBCA Medium