Like the name indicates Blockchain is a chain of blocks that contains information. This technique was originally described in 1991 by a group of researchers. It was intended for timestamp digital documents so that it’s not possible to backdate them or to temper with them almost like a notary. However, it went by mostly unused until it was adapted by Satoshi Nakamoto in 2009 to create a digital “Cryptocurrency Bitcoin”. It can also be used in technologies like Medical records, E-notary, collecting taxes. Through this post, we want to share you 7 things you must know before tampering a Blockchain
What is Blockchain?
A Blockchain is a distributed register book that is completely open to anyone. They have interesting properties, once they have been recorded inside a blockchain it becomes very difficult to change it.
Each block contains some data i.e hash of the block and hash of the previous block. The data is generally collected inside a block and it depends on the type of blockchain. Bitcoin blockchain for example stores the details about the transaction, the sender, receiver and the number of coins.
A block also consists of a hash that could be compared to a fingerprint. It identifies a block and its contents and its always unique just as a fingerprint. Once a block is created its hash is been calculated, changing something inside the block will make the hash to change. Hashes are very useful to detect the changes in the block. There is a third element inside the block which is the hash of the previous block. This effectively creates the chain of a block and its this technique that makes it so secure.
Also, Read | What are VLANs, What they actually do?
There is a chain of three blocks. Each block has a hash and hash of the previous block. The hash of block number 3 points to number 2 and number 2 points to number 1. The first block is a bit special it cannot point the previous blocks because its the first one. We call this block the genesis block. Let say someone tempers with the second block. The hash of the second block changes well that in turn changes the hash of the second block making it invalid as a hash in the third block won’t match with it. Thus second block hash is no longer a valid hash for the block. Therefore, altering any block will make all the following blocks invalid.
But using hashes is not enough to prevent a blockchain from tampering. Computers these days are very fast and calculate the 100s and 1000s of hashes per second. You could effectively tamper the block and recalculate all the hashes of other blocks to make a blockchain valid again.
To mitigate this, blockchain has something called Proof-of-work. This is a functionality that slows down the creation of new blocks. In Bitcoin’s case, it takes about 10 mins to calculate the proof-of-work to add a new block to the chain. This mechanism makes it very hard to tamper with the blocks. If you tamper with one block, you need to calculate proof-of-work for all the following blocks. The security of a blockchain heavily depends on its creative use of hashing and the proof-of-work mechanism.
There is one more way blockchain secures itself that is by being distributive. Instead of being a sectional entity to manage the chain, blockchains use the P2P (peer to peer) network and everyone is allowed to join. When someone joins this network, it gets a full copy of the blockchain. The node can use this information to verify that everything is still in order.
Example: Creation of a new block.
The newly created block is sent to everyone on that network. Each node then authenticates the block and make sure that it hasn’t tampered. If everything checks out, each node adds this block to its own blockchain. All the nodes on this network create consensus. They comply with what blocks are valid and which aren’t. Blocks that are tampered with are rejected by other nodes on the network.
So, successfully tamper a blockchain you need to tamper with all blocks on the chai, redo the proof-of-work for each block and take the control of over more than 50 % consensus on the P2P network. Only then you’re tampered block become accepted by everyone else.
Blockchains are also constantly evolving. One of the most recent developments in the creation of Smart Contracts which are simple programs that are stored on the blockchain. It can use to automatically exchange the coins based on certain conditions.