When people say blockchain is "secured by math," they are specifically referring to Cryptographic Hash Functions.
A hash function is the absolute core engine of blockchain technology. Without it, the concepts of immutability, digital scarcity, and proof-of-work mining would simply not exist.
What is a Hash Function?
At its most basic level, a hash function is a mathematical algorithm that takes an input of *any size*—a single word, an image, or the entire text of the Harry Potter series—and produces an output of a *fixed size*.
Bitcoin utilizes the SHA-256 (Secure Hash Algorithm 256-bit) function. No matter what data you feed into SHA-256, it will always output a string of exactly 64 hexadecimal characters.
For example:
Input: "hello"
Hash: `2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824`
The 4 Golden Rules of a Solid Hash Function
To be useful in secure cryptography, the hash function must obey strict rules:
How Blockchain Uses Hashing
Blockchain relies on hashes to link "blocks" of transactions together securely.
When Block #2 is created, its data includes the exact hash of Block #1. When Block #3 is created, it includes the exact hash of Block #2.
If a hacker goes back and tries to secretly alter a transaction inside Block #1, the "Avalanche Effect" instantly alters the hash of Block #1. Because Block #2 was mathematically built using the *old* hash, Block #2 immediately becomes invalid, which invalidates Block #3, and so on.
The entire chain "breaks," alerting the rest of the decentralized network nodes to immediately reject the hacker's tampered version of the ledger. This incredibly elegant mathematical linkage is what makes blockchain entirely immutable without a central authority.
