← All works Software · 2024 · Live

Blockchain from First Principles

A guided security lab observing SHA-256, proof-of-work and RSA signatures on a single chain.

Type
Software
Year
2024
Status
Live
License
MIT

A PHP-based teaching application exploring block structure, mining and digital signatures through four experiments.

4 Guided experiments Genesis, mining, tampering, signature
2 Cryptographic layers SHA-256 + RSA
1 Nodes Educational, single node

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.

Related works

From the same thread.

Crypto Market Observatory
Software2026

Crypto Market Observatory

A crypto market dashboard combining BtcTurk and CoinGecko data, with an explicit methodology, data health status and documented limitations.