Nostr is signed notes, passed around by simple servers
Nostr ("Notes and Other Stuff Transmitted by Relays") is a protocol, not an app. Your account is a key pair. Everything you post is a small JSON object called an event, signed with that key. Relays are servers that store events and send them to anyone who asks. Clients do the rest: they sign, publish, ask, and check.
Because every event carries its own signature, no relay has to be trusted. A relay can refuse you, lose your data or change a copy. Your followers will notice the change and can ask a different relay. The film above follows one note through all of this.
The run
Your browser makes a new private key, derives the public key, writes a kind 1 note, hashes it into an id and signs it. Your client sends it to your write relays, and it puts your relay list on an indexer. Three followers ask their own relays for your notes, check each signature, and use the outbox model when their relays do not have it. Two of them reply or react, and the relays push that back to you.
What's real
- The private key, public key,
npubandnsec(NIP-19 bech32). - The event, its serialization, the SHA-256 id and the BIP-340 Schnorr signature. The followers' replies and reactions are signed with their own keys.
- Every check and cross is a real verify call on that exact data.
- The wire messages use the exact NIP-01 formats:
EVENT,OK,REQ,EOSE. - Kinds and tags follow NIP-01, NIP-10, NIP-25 and NIP-65.
What's measured
The page times the cryptography in your browser when it loads:
- Measuring…
Network times in the captions are typical values, not measurements.
What's drawn to illustrate
- The curve is y² = x³ + 7 over integers mod 251, not mod the real 256-bit prime. The gold path is a real double-and-add on that small curve.
- The hashing rings and the signing seal are pictures. SHA-256 and Schnorr are arithmetic.
- Each message is an arrow in a sequence diagram. A real one is a text frame on a WebSocket, and it arrives in milliseconds, not seconds.
What's simplified
- The film runs in story order. In real life, followers keep their subscriptions open before you post, so your note arrives tens of milliseconds after a relay stores it.
- Clients use more than the outbox model to find people: relay hints in links (
nprofile,nevent), NIP-05 names and caches. - Relays also enforce sizes, rate limits, payment and authentication (NIP-42). Only the signature check is shown.
- Nothing is published. The relays are simulated, and the failures in "What if…" are made up.
Common kinds
| Kind | What it is |
|---|---|
| 0 | Profile: name, picture, about |
| 1 | Short text note |
| 3 | Follow list |
| 5 | Deletion request |
| 6 | Repost |
| 7 | Reaction |
| 9735 | Zap receipt (Lightning payment) |
| 10002 | Relay list (NIP-65) |
| 30023 | Long-form article |
The messages
| Message | Direction | Meaning |
|---|---|---|
| ["EVENT", event] | client → relay | Publish a signed event. |
| ["REQ", sub_id, filter…] | client → relay | Start a subscription: send stored events that match, then new ones as they come. |
| ["CLOSE", sub_id] | client → relay | Stop a subscription. |
| ["EVENT", sub_id, event] | relay → client | An event that matches your subscription. |
| ["OK", id, true|false, msg] | relay → client | The result of a publish. A refusal has a reason prefix such as blocked: or invalid:. |
| ["EOSE", sub_id] | relay → client | End of stored events. Live events follow. |
| ["CLOSED", sub_id, msg] | relay → client | The relay ended or refused a subscription. |
| ["NOTICE", msg] | relay → client | A human-readable message. |
Controls
- Play the film, or drag the rail to scrub. Click a part of the rail to jump to a chapter.
- From chapter 05, each lane is a node and each arrow is one message. Point at an arrow to see the full JSON. Scroll the diagram to look back.
- What if… changes the story: fewer relays, a ban, a forged copy, an outage. The diagram rebuilds at once.
- Go deeper explains the current chapter, with two small tools to try the hash and the signature.
- Type your own note in Your event. The wire lists every message so far.
Keys
| Space | Play or pause |
| [ ] | Previous or next chapter |
| ← → | Back or forward 2 seconds |
| 1–4 | Change a "What if" switch |
| D | Go deeper |
| M | Sound |
| Esc | Close a drawer |