A PHP-based teaching application exploring block structure, mining and digital signatures through four experiments.
Problem
Blockchain is often taught as a black box: “a distributed ledger,” and little more. Yet why a block cannot be altered becomes clear only when hashing, nonce, previous-block linkage and digital signatures are seen together.
This work was designed to put those concepts into one interactive flow.
Approach
Each block carries an index, timestamp, data, previous hash, nonce, hash and RSA signature. A visitor can add a block, choose a difficulty, tamper with a block and verify its signature.
The aim is not to show a generic failure message, but to reveal which cryptographic layer catches the tampering.
Method
PHP 8, SHA-256, OpenSSL/RSA and a session-backed chain state. Every block is signed after mining; chain validation checks the hash, previous hash and signature.
Findings
Four guided experiments: the genesis block, mining at different difficulties, data tampering and signature verification. The app demonstrates step by step why a tampered block invalidates the chain.
Status: Educational demo. A learning-outcome study (pre/post test) is planned for the next version.
Limitations
It is a single-node, non-production simulation. It has no real peer network, consensus, propagation, scale or privacy layer. Proof-of-work difficulty is deliberately capped; it is a teaching device, not a security guarantee.