BlockChain is a chain of blocks that contain data. This was first described in 1991 by a group of researchers to implement a system where to timestamps documents so that it could not be tampered with or backdated. The first blockchain was conceptualized by a person (or group of people) known as Satoshi Nakamoto in 2008. They created the digital cryptocurrency bitcoin.
A blockchain is a decentralized, distributed and public digital ledger which is completely open to any one.One interesting property of blockchain is once a data recorded on the blockchain it becomes very difficult to change it.
Blockchain consists of connected blocks and each blocks contain data, hash of the block and hash of previous block.
The data will purely depend on the type of blockchain. A bank blockchain means the data will be balance amount,sender etc.
The hash is a unique ID which can be used to identify a block and its content.Once a block is created a hash is calculated. Any change happens to block result in change on hash.
The hash of previous block which effectively create a chain of block and that make the block chain more securely.
Lets take a look into a simple blockchain. Here we have a blockchain of 3 blocks. As you can see each block have a hash and hash of previous block. Previous hash of block number 3 will be equal to hash of block number 2. So block 3 is points to block 2 and block 2 points to block 1. First block is a special as it cant connect to previous block. This is called Genesis Block.
Let consider a scenario where we are tampering the data in second block. This tampering results in the re-creation of hash of the second block. Which result the blocks after second block invalid as there is the mismatch between the hash of the second and the hash of previous block of third block.
Using hashes alone cant prevent tampering. Because computer can generate hundred thousands of hashes in second now a days.So chances are there to recalculate the hashes of other block and make the blockchain valid again.
To prevent this, blockchain have the concept Proof of work. Its a mechanism which slows down the creation of new block. In bitcoin system it will take nearly 10 minutes to calculate the proof of work and add the block to the chain.The security of blockchain comes from the creative use of hash and Proof Of Work.
Another way by which blockchain secured is by being distributed. Instead of a central control system to manage chain, blockchain uses Peer-to-Peer network. Peer-to-peer, or P2P in its abbreviated form, refers to computer networks that use a distributed architecture. That means that all the computers or devices that are part of it share the workloads in the network. The computers or devices that are part of a peer-to-peer network are called peers. Each peer from a peer-to-peer network is equal to the other peers. There are no privileged peers, and there is no central administrator device in the center of the network.
When someone joins the network, that person will get a copy of the entire blockchain. When a new block added to the chain, that block is sent to everyone on the network and everyone can verify it and add it to their own block chain.All the people in the network will have a general agreement. They agree about what is a valid and not valid block and need 50 percent approval from the network to add a new block.So when we tampered a block, we have to tamper all the block on the chain and recalculate the hash and take control of more than 50 percent of the network.Which is almost impossible to do!
Blockchain also is constantly evolving and this is just a basic understanding of blockchain.
Thanks to Simply Explained YT channel for making me understand the logic!