How is blockchain tamper-proof?

We primarily use blockchain technology to manage peer-to-peer transactions (cryptocurrency) and the supply chain. Both require us to keep a tamper-proof record of the transactions to maintain transparency.

Blockchain is the first technology to protect stored data from being tampered with. It has a decentralizedMaintained by a distributed network of nodes instead of a single entity. structure.

Structure of blockchain

Structure of a blockchain

Every block in a blockchain has a block header that contains information about the block and the block's minerPerson/entity which validates all the transactions and solves complex mathematical problems to mine the block.. It also contains a field named the "previous block's hash" that chains a block with its previous block. If we change any previous block, its hash will change, resulting in unchaining the blockchain. The body of a block contains any transactions or data stored in that block.

Note: Read more about a block in a blockchain here.

Why is tampering not possible?

If any of the fields in a block are changed, then the entire hash of the block would change (due to the avalanche effect property of cryptographic hash functions). This will cause the unchaining of the blockchain. Blockchain is a decentralized network where we add blocks to the blockchain after a majority consensus. Thus, if other nodes see any unchaining of the blockchain, they will not accept those blocks.

Unchaining of blockchain
1 of 3

The malicious node needs to change the "previous hash" field of the following block to make this attack successful. It would change the hash of that block as well. Then they will have to update the "previous hash" field of the next block. They will have to do this until they reach the last mined block, then broadcast their chain to the whole network. This attack is called the 51% attack.

Note: Read more about the 51% attack here.

Conclusion

Hence, blockchain is popular as it is a tamper-proof way of storing data. Moreover, it is a decentralized network. Thus, no single entity can manipulate the data making the network more secure.

Copyright ©2024 Educative, Inc. All rights reserved