(c) 2025 Cyborg Unicorn Pty Ltd - MIT License
The ZOSCII Tamperproof Blockchain (ZTB) provides:
| Aspect | Traditional Blockchain | ZTB |
|---|---|---|
| Block Linking | Cryptographic hashes (SHA-256) | ZOSCII pointer encoding |
| Security Basis | Computational difficulty | Combinatorial impossibility |
| Quantum Threat | Vulnerable | Immune |
| Data Structure | Linear chain | Tree (trunk + branches) |
| Decoding Speed | Hash verification | O(1) pointer lookup |
Immutable root of trust. Contains random data with all 256 byte values (0-255) present.
⚠️ Lost Genesis ROM = Unrecoverable Blockchain
Built from samples of previous blocks (up to 64 blocks × 1KB each). Acts as encoding table for each new block.
Each byte (1 byte) → pointer (2 bytes) into Rolling ROM. Random selection creates non-deterministic encoding.
Genesis ROM (64KB random data)
↓
Trunk Block 1 (encoded)
↓
Trunk Block 2 (encoded)
├─→ Branch A Block 1 (encoded)
│ ↓
│ Branch A Block 2 (encoded)
│
├─→ Branch B Block 1 (encoded)
│ ↓
│ Branch B Block 2 (encoded)
↓
Trunk Block 3 (encoded)
is_branch = 0) - Main chain blocks, linear progressionis_branch = 1) - Splits from trunk, maintains parent linkis_branch = 2) - Archival boundary markerCreates the 64KB high-entropy Genesis ROM file.
ztbcreate <output_genesis_rom_file>
Example:
ztbcreate genesis.rom
Adds a new block to an existing chain (trunk or branch).
# Add text block
ztbaddblock <genesis_rom> <chain_id> -t "text string"
# Add file block
ztbaddblock <genesis_rom> <chain_id> -f <file_path>
Examples:
# First block creates new trunk
ztbaddblock genesis.rom MyTrunk -t "Genesis block"
# Add subsequent blocks
ztbaddblock genesis.rom MyTrunk -t "Block 2"
ztbaddblock genesis.rom MyTrunk -f invoice.pdf
Creates a new branch splitting from a trunk block.
ztbaddbranch <genesis_rom> <trunk_id> <new_branch_id> -t "text"
ztbaddbranch <genesis_rom> <trunk_id> <new_branch_id> -f <file>
Example:
# Create trunk
ztbaddblock genesis.rom CompanyLedger -t "2025 Books"
# Branch off for departments
ztbaddbranch genesis.rom CompanyLedger Sales -t "Sales Genesis"
ztbaddbranch genesis.rom CompanyLedger Marketing -t "Marketing Genesis"
Retrieves and decodes a specific block, verifying its integrity.
ztbfetch <genesis_rom> <chain_id> <block_index>
Examples:
# Fetch from trunk
ztbfetch genesis.rom MyTrunk 3
# Fetch from branch
ztbfetch genesis.rom ClientA 2
Verifies integrity of chains by working backwards from latest block to Genesis.
# Verify trunk and all branches (default)
ztbverify <genesis_rom> <trunk_id>
# Verify trunk only
ztbverify <genesis_rom> <trunk_id> -t
# Verify all branches only
ztbverify <genesis_rom> <trunk_id> -bb
# Verify specific branch
ztbverify <genesis_rom> <trunk_id> -b <branch_id>
Creates an archival boundary for pruning old blocks.
ztbcheckpoint <chain_id> <genesis_rom> <previous_block_guid>
Example:
# At end of financial year
ztbcheckpoint FY2024 genesis.rom last_block_of_2024_guid
<chain_id>_<index>_<block_guid>.ztb
Examples:
MyTrunk_0001_A0B9845E-1234-4567-89AB-CDEF01234567.ztb
ClientA_0002_B1C0956F-2345-5678-9ABC-DEF012345678.ztb
The encoded addresses themselves are the entropy source. Original payload might be boring, but random address selection creates high entropy. Copying encoded addresses preserves this entropy.
If an attacker modifies Block N:
This is combinatorially infeasible - not just hard, but information-theoretically impossible.
| Attack Vector | Traditional Blockchain | ZTB |
|---|---|---|
| Shor's Algorithm | Breaks PKI | No PKI to break |
| Grover's Algorithm | Weakens hashing | No hashing used |
| Brute Force | 2^256 operations | 10^152900 permutations |
| Quantum Computer | Eventually vulnerable | Immune |
# Compile all tools
make
# Clean build artifacts
make clean
# Individual compilation
gcc -o ztbcreate ztbcreate.c ztbcommon.c -O2
gcc -o ztbaddblock ztbaddblock.c ztbcommon.c -O2
gcc -o ztbaddbranch ztbaddbranch.c ztbcommon.c -O2
gcc -o ztbfetch ztbfetch.c ztbcommon.c -O2
gcc -o ztbverify ztbverify.c ztbcommon.c -O2
gcc -o ztbcheckpoint ztbcheckpoint.c ztbcommon.c -O2
# 1. Create Genesis ROM
./ztbcreate genesis.rom
# 2. Create trunk chain
./ztbaddblock genesis.rom MyTrunk -t "Block 1"
./ztbaddblock genesis.rom MyTrunk -t "Block 2"
./ztbaddblock genesis.rom MyTrunk -t "Block 3"
# 3. Verify
./ztbverify genesis.rom MyTrunk
# 4. Fetch specific block
./ztbfetch genesis.rom MyTrunk 2
# 1. Create genesis
./ztbcreate genesis.rom
# 2. Create company trunk
./ztbaddblock genesis.rom CompanyLedger -t "FY2025 Genesis"
# 3. Branch for departments
./ztbaddbranch genesis.rom CompanyLedger Sales -t "Sales Dept"
./ztbaddbranch genesis.rom CompanyLedger Marketing -t "Marketing Dept"
# 4. Add department records
./ztbaddblock genesis.rom Sales -f invoice_001.pdf
./ztbaddblock genesis.rom Marketing -f campaign_q1.doc
# 5. Verify everything
./ztbverify genesis.rom CompanyLedger