top of page
Nabeel Khan

How Does Blockchain Work?

A blockchain is basically a chain of blocks, which contains information. After data has been recorded on a blockchain, it becomes essentially impossible for someone to edit the data without anyone noticing. Every time a transaction occurs, it is recorded as a new block of data. The way blockchains maintain their security is by assigning a hash to each block in a chain. The hash is a number identifying the data of a block, and the hash is always unique, so no two blocks can have the same hash. When the block is created, based on circumstances, its hash is created. After this, whenever the data in that specific block is changed, its hash is also changed. But it always remains unique. And since the hash is essentially the identity of the block, when the hash changes, it is no longer the same block. What makes the system of blockchain so secure is that whenever a new transaction occurs, new blocks have 3 types of data stored in them, the first being the data of the transaction, the second is its own unique hash, and thirdly, each block has the hash of the previous block. The only exception to this is the first block in a chain which is known as the genesis block, it has no previous hash recorded. This essentially creates a chain of secure records because when you maliciously alter the data on one block, its hash changes, however the hash already recorded in the next block is now different. Since there is now a hash mismatch in two of the blocks, the entire chain after the tampered block is rendered invalid due to said mismatch. This makes it extremely easy to identify alterations. However this is not foolproof as machines with high levels of computational power can make large hash calculations and alter all the hashes in a chain in a short period of time thus altering the data seemingly undetected. In order to counter this, something called “proof of work'' was added to blockchain systems. This is essentially a system which increases the time it takes to create a new block. For example, in the case of bitcoin, it takes ten minutes to calculate the needed proof of work. This makes it hard to tamper with blocks because you will have to recalculate the proof of work of each individual block which will take a large amount of time.


Another feature that blockchain uses is peer to peer network (P2P). This means that each person receives a full copy of the blockchain. When someone creates a new block, the block is sent to each user, and each version of the blockchain verifies this new block and if it is legitimate, adds it to the chain. The multiple chains then create a general consensus for what is verified or not. So in order to successfully tamper with a blockchain, you would have to alter the hash values of the entire chain, while also manipulating the proof of work time period and then you would have to take control of more than 50% of the peer to peer network, in order to make your tampered version of the blockchain the prevailing version. This makes it almost impossible to alter blockchain. Thus we can clearly see that blockchain is extremely secure.


17 views0 comments

Recent Posts

See All

Comments


bottom of page