Explain like I'm 5

Atyha, told the way you would tell it to a five year old. The last section says which part of the story is which part of the real thing.

Playing with a friend

You want to play with your friend, but you live far apart, and your house has no address anyone can find. Your friend's house doesn't either. How do you meet?

The name of the treehouse

You make up a name for your game, like HK4M-7TRW, and tell it to your friend on the phone. That name is the room code. It is short, and it has no letters that look alike, so nobody mixes up an O with a 0.

The big notice boards

In the middle of town there are big public notice boards. Anybody can pin a note there, and anybody can read every note. These are the relays. Nobody in your game owns them, and you don't have to build your own.

You and your friend both go to the boards and look for notes about HK4M-7TRW. But you don't want to pin your home address there, where every stranger can read it. So you do a magic trick first.

The magic trick with the secret word

You and your friend both know a secret word (the password). It can even be something silly like 123. If you don't pick one, the name of the game is the secret.

Each of you mixes the secret word with a pinch of paint only you have, and pins the mixed colour on the board. Here is the magic:

  • If you both started from the same secret word, you each end up with the same hidden colour, and nobody else in town can make it.
  • Someone who looks at the board only sees mixed colours. They cannot work the secret word out from them.
  • Someone who wants to guess the word has to come and play the trick with you, one guess each time, and you only let them try 20 times a minute. So even 123 keeps strangers out for a while.

Notes in locked boxes

Now you both have the same hidden colour, and it works like a key. You put how to find your house in a little box, lock it with the key, and pin the box on the board. Your friend does the same.

Everybody can see the boxes, but only the two of you can open them. Nobody can swap a box for a fake one either: a fake box wouldn't open with your key, so you would notice.

Then you just go and play

Now each of you knows how to find the other. You go straight to your friend's house and play. You don't need the notice boards any more, and nobody in the middle carries your game.

If both houses have big fences (two very strict home networks), sometimes you need a grown-up friend who lets you pass messages over the fence. That friend is a TURN server. Most of the time you don't need one.

If there is no secret word

Then it's an open party: anyone who learns the name of the game can come and play. That is fine for a game with friends. If you want to keep strangers out, pick a secret word.

For the grown-ups

In the storyIn Atyha
The house with no addressA computer behind a NAT, no port forwarded
The name of the treehouseThe room code: 8 symbols, 25 symbol alphabet (section 3)
The notice boardsPublic Nostr relays (section 8)
Looking for notes about the gameSubscribing to the room's topic, a hash of the app id and the code
The magic trick with the paintCPace, a PAKE on ristretto255 (section 5)
The hidden colourThe shared key (ISK, then HKDF keys)
The locked boxesChaCha20-Poly1305 sealing of the SDP offer and answer
How to find your houseThe SDP with its ICE candidates and DTLS fingerprint
Going to your friend's houseThe direct WebRTC connection (ICE, DTLS, DataChannels)
20 guesses a minuteThe host's hello budget (Security)
The grown-up over the fenceA TURN server

The overview tells the same story with the real names, and Security says exactly what the boards can and cannot do.