📚 In the previous article, we learned that blocks store transactions on the blockchain.
But how does the system make sure that the data inside a block cannot be secretly changed?
This is where something called a hash becomes very important.
A hash is a special code that is created from data using a mathematical function.
It acts like a unique digital fingerprint for that data.
Even a very small change in the data will produce a completely different hash.
Because of this property, hashes help protect the integrity of information stored on the blockchain.
Every block in the blockchain has its own hash.
This hash is generated from the data inside the block, including the list of transactions and other important information.
Here are the key ideas behind how hashes work.
1️⃣ A hash is a digital fingerprint
It is a unique string of characters generated from a piece of data.
2️⃣ The same input always produces the same hash
If the data does not change, the hash will always remain exactly the same.
3️⃣ A small change creates a completely different hash
Even changing one character in the data will generate a new hash.
4️⃣ Hashes connect blocks together
Each block stores the hash of the previous block, which links them into a secure chain.
A simple example can help illustrate this idea.
Imagine you write a sentence and create a digital fingerprint for it.
If someone changes even one letter in the sentence, the fingerprint will become completely different.
This makes it easy to detect if the information has been modified.
Blockchain uses hashes in a similar way.
If someone tries to change a transaction inside a block, the hash will immediately change.
Since every block is linked to the previous one, this change would break the entire chain and be detected by the network.
That is why hashes play such a critical role in blockchain security.
They make it extremely difficult for anyone to tamper with the transaction history.
📌 In the next article, we’ll explore:
What mining is and how new blocks are added to the blockchain.
If you’re just starting to learn about crypto, follow the Crypto 101 series as we build the foundation step by step. 🚀
