Security and privacy

What is protected, from whom, and what to be careful with.

The model in short

SecretWhat it doesHow it is handled
Portal code (6 digits)Lets a device ask to join, and keys the file encryption.Not a password. Guessing is rate limited; the host approves new devices by default; add a password for more.
Host token (bh_…)Controls the whole network: resume as host, rotate, destroy, add invites.Shown once, stored on the server only as a hash. Treat it like a password.
Invite key (bhi_…)Admits one machine without approval.Shown once, stored as a hash, revocable by removing the device.
Device token (bhd_…)Lets one device walk back into the network without asking anyone.Issued by the server on first join, stored only as a hash, works only from the device it was issued to. Treat it like a password.

File transfer

  • Files are encrypted in the sender (AES-GCM) and decrypted in the receiver, chunk by chunk. Direct browser connections are additionally protected by WebRTC’s own encryption.
  • The server forwards chunks and never stores file contents.
  • The link graph is enforced on the server for relayed data, not only in the interface.
  • Agents sanitise received file names and cannot write outside their inbox.

How the service protects itself

  • Five wrong passwords lock joining for five minutes, and every address is rate limited and capped in open connections.
  • The website and the server send strict security headers: no inline scripts, same-origin only, no framing, HTTPS only.
  • Tokens are random, stored only as hashes, and compared in constant time.
  • Report a vulnerability privately through the repository’s security page.

Good practice

  • Keep Approve new devices on, and add a password for networks that include sensitive machines.
  • Create one invite per machine and remove devices you retire.
  • Rotate the host token if it may have leaked.
  • Self-host behind TLS and set ALLOWED_ORIGIN to your own address.