Blockchain has become a term frequently mentioned in media and during conversations, but what exactly is it?
As you might be able to tell from its name, a blockchain, simply put, is just a chain of blocks that contains information. The purpose of these blocks is to make the information stored within them difficult or impossible to change and hack. But how does that work?
Well, each block contains some data, the hash of the block, and the previous block's hash. The data stored inside a block varies based on the type of blockchain. The Bitcoin blockchain, for example, stores data about the details of a transaction, such as who the sender and receiver are and the number of coins.
Each block also has a hash. A hash is almost like a fingerprint; it's always unique and identifies the block and its contents. A hash will be generated whenever a block is created, and whenever a change is made inside the block, the hash will change. This makes hashes very useful when you want to detect changes to blocks; if the fingerprint is no longer the same, it's no longer the same block.
Every block also holds the hash of the previous block. This is where the chain in blockchain comes from. When each block holds the hash of the previous block, a chain is formed that links all the blocks together. This is what makes blockchains so secure.
Why is this secure? Say you have a chain of 10 blocks, and you decide to change something in block three. This will result in the hash of block three changing, making block four and any subsequent blocks void because they no longer store a valid hash of the previous block. By changing a single block, all the following blocks were made invalid.
This adds to another significant aspect of the blockchain, the fact that it's decentralized. Blockchains are duplicated and distributed across an entire network of computers on the blockchain, which anyone can join. Whenever a new transaction occurs on the blockchain, a record of that transaction is verified and recorded by every computer on its own blockchain, not at a central location. This network is called a Peer-to-Peer Network.
Combining these aspects makes it so that in order to tamper with a blockchain, you'll need to tamper with all blocks on the chain and take control of more than 50% of the peer-to-peer network, which is almost impossible to do.