How Hashes Link Blocks Together

Hashes are what make blockchain truly "crypto" — they're unbreakable digital fingerprints that chain everything together.

---

1. What Is a Hash?

Think of a hash like a fingerprint for any piece of data.

· Feed any data into a hash function (like SHA-256)
· You get a unique 64-character code in return
· Change even one letter, and the entire code changes completely

Example:

```
Hash("Ali sends 1 BTC") = a3f9d2... (64 characters)
Hash("Ali sends 2 BTC") = 7b2c8e... (completely different!)
```

Same length, totally different result — that's what makes it secure.

---

2. How Two Blocks Link

Every block contains three essential pieces:

```
Block #101
├─ Transactions: Ali→Sara 0.1 $BTC , etc.
├─ Previous Block Hash: <fingerprint of Block #100>
└─ Current Block Hash: <fingerprint of Block #101 itself>
```

The link: Block #101 literally stores the hash of Block #100 inside it.

So the chain flows like this:

```
Block #100 → [its hash: 9d4e...]

Block #101 → stores "9d4e..." + new transactions → [its hash: c8a1...]

Block #102 → stores "c8a1..." + new transactions → [its hash: 3f77...]
```

Each block is physically tied to the one before it.

---

3. Why This Makes It Tamper-Proof

Imagine a hacker tries to change Block #100 from "Ali sends 1 $BTC " to "Ali sends 100 $BTC ":

1. Block #100 changes → Its hash changes from 9d4e... to something completely different
2. Block #101 still stores 9d4e... → Now the link is broken. Block #101 no longer matches
3. To fix it, the hacker must recalculate Block #101's hash → But that changes Block #101's hash
4. Now Block #102 is broken → ...and the domino effect continues for every single block after

To fake one transaction, you'd need to redo every block that came after it — on over 51% of all computers worldwide, simultaneously. Practically impossible.