Security

Atyha sends its messages through relays nobody in the room controls, so it is built on the assumption that every relay, and anyone subscribed to it, reads and may rewrite every message. This page says what that lets them do.

Who can see what

PartyWhat it learns
A relay, or anyone subscribed to the kindThat a room with a given topic exists, when, and the public keys (fresh for every room and every attempt) and network addresses of the WebSocket connections. The topic is a hash of the application id and the code: anyone who knows the application id can hash every code and so learn which codes are in use. Nothing of the SDP, the ICE servers or the application's meta: they are sealed.
Someone who knows the code of a room without a passwordEverything a joiner learns: they can join. A room without a password is open to whoever has its code, by design.
Someone who knows the code of a room with a passwordOne password guess per attempt, checked by the host (below). No way to test guesses offline.
The host, about a joinerIts meta, then its address once ICE connects.
The joiner, about the hostThe host's meta and ICE servers (TURN credentials included) once its code and password are right; the host's address once ICE connects.

What the PAKE gives

Every room runs CPace (draft-irtf-cfrg-cpace-21, ristretto255 and SHA-512), with the code and the password as the secret, even when the password is empty:

  • No offline guessing. Nothing a relay sees lets it test a password: CPace is designed so that each run of the protocol tests one guess, and only by taking part in it. A password like 123 is therefore much stronger here than as a hash someone could steal.
  • No tampering. The offer and the answer are sealed with keys only the two ends hold. WebRTC's DTLS fingerprints are inside the SDP, so a relay cannot swap in its own and sit in the middle of the connection.
  • No replay across rooms. The session id is fresh for every attempt and bound into the keys; the application id is part of the CPace context.

Guessing a password

A host answers at most 20 hellos a minute per room (configurable) and ignores the rest. A person typing the right password never meets the limit; a script trying a list gets 20 guesses a minute, about an hour for the thousand most common passwords. A password keeps strangers out of a game; it is not meant for secrets.

The same limit means that someone who floods a room with hellos can keep others from joining it until they stop. A host that sees it can draw a new code.

Codes

Codes are 8 symbols of a 25 symbol alphabet with no look-alikes (no I L O Q
0 1 G S 2 6 8
): 258 ≈ 1.5 × 1011 codes, drawn from the system's secure generator. Guessing an open room's code is not practical; learning it from the relays is (see above), which is why a room that matters has a password.

Relays

A relay can refuse to carry a room, delay its messages or drop them: that stops a join, nothing more. Atyha uses several relays at once, so a single one going down or misbehaving is not noticed. The default list is in the protocol, and applications can give their own, including a relay of their own.