Categories
2. Blockchain technology from beginning

Understanding SHA256 – Hash

A block also has a hash. A can be understood as a fingerprint which is unique to each block. It identifies a block and all of its contents, and it’s always unique, just like a fingerprint. So once a block is created, any change inside the block will cause the hash to change.

What is SHA256 Hash

Therefore, the hash is very useful when you want to detect changes to intersections. If the fingerprint of a block changes, it does not remain the same block.

Each Block has

  1. Data
  2. Hash
  3. Hash of the previous block

Consider the following example, where we have a chain of 3 blocks. The 1st block has no predecessor. Hence, it does not contain has the previous block. Block 2 contains a hash of block 1. While block 3 contains Hash of block 2.

Block Architecture of Blockchain

Hence, all blocks are contain hashes of previous blocks. This is the technique that makes a blockchain so secure. Let’s see how it works –

Assume an attacker is able to change the data present in Block 2. Correspondingly, the Hash of the Block also changes. But, Block 3 still contains the old Hash of Block 2. This makes Block 3, and all succeeding blocks invalid as they do not have the correct hash of the previous block.

Block Architecture of Blockchain

Therefore, changing a single block can quickly make all following blocks invalid.

Leave a Reply

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