A blockchain is a decentralized, distributed ledger technology that records transactions across a peer-to-peer (P2P) network of computers. Once data is recorded in a block and added to the chain, it cannot be altered retroactively without changing all subsequent blocks — making the ledger tamper-resistant and trustworthy without requiring a central authority.
Key idea: Instead of one bank or government keeping a single record, thousands of computers each hold an identical copy of the same ledger.
Every block in a blockchain contains three core components:
| Component | Description |
|---|---|
| Data | The transaction details (e.g., sender, receiver, amount) |
| Hash | A unique cryptographic fingerprint of this block's contents |
| Previous Hash | The hash of the block before it, linking the chain together |
The very first block is called the Genesis Block. Because it has no predecessor, its Previous Hash field is set to a string of zeros (000...000).
No single entity controls the network. Every node (computer) in the P2P network holds a full copy of the ledger and participates in validating transactions.
Once data is written to a block and confirmed by the network, it is extremely difficult to change or delete. Altering one block changes its hash, which invalidates every subsequent block — the network immediately detects the tampering.
All participants can view the transaction history, promoting accountability.
Each block's hash is generated from its contents using a cryptographic hash function (e.g., SHA-256). Any change to the data produces a completely different hash, making fraud detectable instantly.
Because there is no central authority, all nodes must agree on the valid state of the ledger. This is achieved through a consensus mechanism — a fault-tolerant protocol that ensures all distributed nodes reach the same conclusion.
Blockchain directly addresses two pillars of the CIA Triad:
| CIA Pillar | How Blockchain Addresses It |
|---|---|
| Confidentiality | Cryptographic keys control who can read/write data |
| Integrity | Immutability ensures data cannot be silently altered |
| Availability | Decentralization removes single points of failure |
The Immutability feature is blockchain's strongest contribution to Integrity — ensuring that recorded data is accurate and has not been tampered with.
| Type | Description | Example |
|---|---|---|
| Public | Open to anyone; fully decentralized | Bitcoin, Ethereum |
| Private | Restricted access; controlled by one organization | Hyperledger |
| Consortium | Controlled by a group of organizations | R3 Corda |
Blockchain can serve as a mitigation technique for several security threats:
These properties make blockchain relevant to CS-12-F-02 — secure techniques for transmitting and storing data.
Blockchain has significant potential for Pakistan across multiple sectors: