Security

Security and privacy. What is sealed, and what is not.

Messages travel between browsers. Here is what jsflow protects, what it leaves to you, and what our servers see.

Protected

Messages to one peer are sealed. Every link is encrypted.

The relay, and the peers that forward a message, see only ciphertext.

  • send and sendReliable are sealed end to end.

    X25519, HKDF and AES-GCM. Peers that forward them, and the relay, cannot read or change them, and the receiver knows which peer sent each one.

  • Every link is encrypted.

    WebRTC encrypts every link between two browsers with DTLS. On a relayed link, the relay passes on data it cannot read.

  • The keys are vouched for.

    The signalling service signs each peer's key into its join.

  • The introducer carries no data.

    It introduces peers. Messages never pass through it.

Two peers, p7 and p9, whose direct link is blocked by their networks. Their link goes through the relay, outside the room, which passes on ciphertext it cannot read. p7 (you) and p9 are in the room with p3 and p8, which link to them directly. Between p7 and p9 the direct link is blocked (a cross). A dashed link runs from p7 down to the relay, outside the room, and back up to p9. The relay sees only ciphertext. ROOM · K3X9Q no direct link relayciphertext only p7 · you p9 p3 p8

p7 and p9 cannot link directly. Their link runs through the relay, outside the room, which passes on ciphertext it cannot read.

Not sealed

broadcast is open to the room. Signed, not sealed.

Every member of the room can read a broadcast. Each one is signed by its sender and checked by every peer, so its sender is the real one. Signed means who sent it, not that it is true: a peer can still send false state as itself. Use send or sendReliable for anything only one peer should read.

Two ways to send in the same room. Left, a broadcast from p1 reaches every peer hop by hop through other peers, and every member can read it. Right, a send from p1 to p6 is sealed end to end; p3 and p7 forward it but cannot read it. Left, broadcast(data): p1 sends to p2 and p3 (hop 1); p2 forwards to p4 and p5, p3 to p7 (hop 2); p4 forwards to p6 (hop 3). Every member can read a broadcast. Right, send(p6, data): the message goes p1 to p3 to p7 to p6, sealed with a lock; it is on its last hop. p3 and p7 forward it but cannot read or change it. broadcast(data) 1 1 2 2 2 3 p1 p2 p3 p4 p5 p6 p7 hop by hop, through peers; every member can read it send(p6, data) 1 2 3 p1 p2 p3 p4 p5 p6 p7 sealed end to end; p3, p7 forward, can't read
Two messages
  1. broadcast(data) from p1 reaches every peer, through other peers. Every member can read it.
  2. send(p6, data) from p1 goes p1, p3, p7, p6, sealed end to end. p3 and p7 forward it but cannot read or change it.
Who can join

Your key, your origins. And the room's name.

Anyone with your publishable key and a room name can join that room from a page on one of your allowed origins.

  • The key is public.

    It belongs in your page source. The service also checks the page's origin, which stops other websites from using your key, but not a determined person with a script.

  • Room names are secrets.

    Generate them on your server, hard to guess, and give them only to people who should be in the room.

  • Join tickets.

    Your server signs a short-lived ticket for one user and one room, and jsflow admits only joins that carry one.

  • Authority stays with you.

    Decide anything that must be fair or secret on your own server.

IP addresses

Direct peers see addresses. The relay can hide them.

WebRTC peers that connect directly see each other's IP addresses. Join with iceTransportPolicy: 'relay' and everything goes through the relay, so no peer sees another's address. It costs a little latency: in lab tests, p95 16 ms instead of 7 ms on one network. Delivery then depends on the relay path.

What we keep

No message content. IP addresses only in our logs.

Mention both the peers' view of addresses and our logs in your own privacy text.

  • No messages.

    Messages go browser to browser and are never stored by us.

  • Logs, for abuse.

    The signalling service logs IP addresses for rate limiting and abuse handling.

  • Usage records without addresses.

    The records that count what your app uses hold no IP addresses.

Reporting

Found a security problem? Please tell us.

We confirm that we received your report within 3 working days, and keep you informed until it is fixed or closed. Where to write, and what testing is welcome: Reporting a security problem.

Read more

The details. In the docs.