Blockchain is basically a list of transactions or records that cannot be modified. These records are known as blocks which are linked using cryptography. This technique was originally described in 1991 by the group of researchers and was originally intended to timestamp digital document so its not possible to backdate them or to temper with them almost like a notary. However it it went by mostly unused until it was adapted by Satoshi Nakamoto in 2009 to create a digital currency bitcoin. From here the Blockchain Revolution started.
Working of Blockchain
A blockchain is a distributed kind of ledger that is completely opensource. You cannot change the data once it is recorded inside a blockchain, it becomes very hard to change it.
So How does it works ? Well let’s take a closer look at a block
Each block has data, Own hash of the block and the hash of the previous block. The transaction or data which is stored inside the block depends on the blockchain you are using. Bitcoin blockchain for example stores the details about the transaction in here, such as sender, receiver and amount of coins. A block also has a hash. You can Compare hash to fingerprint. It identifies a block and all of it contents and it’s always unique, just as a fingerprint.
Consider a block is created, hence its hash also gets created. If you change something inside the block it will also change the hash. So we can say that : When you want to detect the changes in the blocks, hashes are very useful. If the hash key of a block changes, it no longer is the same block. The third part within every block is that the hash of the previous block. This effectively creates a sequence of blocks and it’s this system that creates a blockchain therefore secure.
Example of Blockchain Working
Here We have a chain of 3 blocks. As you’ll be able to see, every block incorporates a hash and also the hash of the previous block. Thus block No. 3 Points to block No. 2 and No. 2 points to no 1. Now the first block is a bit special, it cannot point to previous block because it’s the 1st one. We call this the genesis block.
Now Let’s say that you tamper with the 2nd block. This causes the hash key of the block to change as well. In turn that will make block 3 and all blocks after it invalid because they are no longer store a valid hash of the previous block. So changing a single block will automatically make all the upcoming blocks invalid.
But using hashes is not enough to prevent tampering of the blocks. Computers are very fast now a days and can calculate hundreds of thousands of hashes per second. It is very easy to recalculate all the hashes of other blocks to make your blockchain valid again.
So to mitigate this blockchain have something called PROOF-OF-WORK (It’s the mechanism that slows down the creation of new blocks). In case of bitcoin it takes around 10 min to calculate the required proof of work and add a new block to the chain. These mechanism makes it very hard to temper with the blocks, because if you temper with 1 block you need to recalculate the proof-of-work for all the following blocks. So the Security of the blockchain comes with creative use of hashes and proof-of-work mechanism for the blockchain revolution.