AIGuard Kernel: Interactive Demo

Keys, signatures, blocks, and Guardian Node decisions, computed live in your browser.

Runs in your browser Educational demo Not a live network

Try the AIGuard prototype kernel, step by step

AIGuard pairs a hybrid proof-of-work chain with a Guardian Node that checks data payloads, flags anomalous blocks, tunes difficulty, and writes every decision to an auditable log. This page runs a faithful JavaScript port of the prototype kernel. Every key, hash, signature, nonce, and verdict below is computed on your device when you click.

  1. 1Generate a keypair
  2. 2Sign a payload
  3. 3Tamper and verify
  4. 4Submit a block
  5. 5Guardian log
Educational demo. Real secp256k1 ECDSA signatures and SHA-256 proof of work run in your browser, but this is not production cryptography, not a wallet, and not a live network. Tokens here have no value. Nothing is sent to a server: keys live only in this tab's memory and disappear when you close it.

1Generate a keypair Not started

Your identity on the chain is a secp256k1 keypair. The address is the first 40 hex characters of SHA-256 over the public key, exactly as in the prototype's crypto_utils.py.

What you're seeing

The private key is 32 random bytes from your browser's secure random generator. The public key is that number multiplied by the secp256k1 generator point, and the address is a short fingerprint of it. Generating a key also starts a fresh local chain with a genesis block, and makes your address the demo treasury: 1,000,000 test tokens, of which 10% (100,000) is locked as Proof-of-Balance stake, just like the prototype's seeding rule.

The private key is hidden by default because real keys should never be shown. This one is a throwaway demo key.

2Sign a payload Waiting for step 1

Build a transaction with a data payload, such as a sensor reading, then sign it with your private key.

What you're seeing

The kernel signs one string: sender, recipient, amount, nonce, payload, type, and fee joined together. It hashes that string with SHA-256 and signs the hash with ECDSA. Anyone holding your public key can check the signature, and nobody without your private key can forge one.

The Guardian also screens the payload. It scores it against positional and sensor patterns (latitude, longitude, device, temperature, pressure) and rejects anything over the 10 KB educational limit.

3Tamper with it and watch verification fail Waiting for step 2

Pick an attack. The kernel re-runs its full validity check, Transaction.is_valid(), on the altered copy. Your original stays untouched.

What you're seeing

Changing any signed field changes the SHA-256 digest completely, so the old signature no longer matches. Flipping a single bit of the signature breaks it too. Swapping in someone else's public key fails earlier, at the address binding check: the kernel requires address(public key) to equal the sender, so a signature cannot be reused under a different identity.

4Submit a block and see the verdict Waiting for step 1

Send transactions to the mempool, then mine a block. The kernel runs its admission checks, the Guardian reviews the block proposal, and proof of work seals it.

A. Mempool admission

#AttemptVerdictReason from the kernel
No submissions yet.

B. Mine a block

C. Guardian stress test: a block full of oversized payloads

This injects three 10,001 byte payloads straight into the proposal (bypassing the mempool, as the prototype's own test does) so the Guardian's block review has something to catch.

D. Chain integrity

What you're seeing

The mempool rejects a transaction if its signature or address binding fails, if the sender cannot cover amount plus fee, if the nonce is wrong (so a replayed transaction is refused), or if the Guardian rejects its payload. Each verdict above names the exact check that decided it.

Mining searches for a nonce that makes the block's SHA-256 hash start with as many zeros as the difficulty. Your browser really does that search, so the nonce and hash rate are real. The block reward is 20 tokens; in hybrid mode 40% goes to a Proof-of-Balance validator when another staker exists, otherwise the miner keeps it all. Each block also links to the previous block's hash, so rewriting an old transaction breaks every link after it.

5Guardian log and policy decisions Waiting for step 1

The Guardian never holds keys and never moves funds. It adjusts difficulty within fixed bounds, flags anomalies, and records why. Humans keep final control.

Active policy

Adaptive difficulty

Mine blocks quickly and the Guardian raises difficulty. Leave long gaps and it lowers it. It waits 3 blocks between changes, and an early slow gap can pull the average up for a while.

What-if: ask a scratch Guardian

Guardian decision log

TimeSourceDecisionApprovedRationaleDetails
No decisions yet. Steps 4 and 5 will create some.
Raw log as JSON
[]
What you're seeing

Every Guardian action is a logged decision with a type, a plain-language rationale, the numbers it used, and whether it approved. difficulty_adjust entries come from the live chain when average block time leaves the band around the 3 second target. anomaly_flag entries come from block reviews that found too many invalid payloads. What-if entries come from a separate scratch Guardian, so they never change your chain.

How this demo is built