v1.1.0

ZeroByte An open-source relay for private data between devices

Encrypted on the sending device.

Deleted from the relay once delivered.

ZeroByte moves private data, such as health and medical records, between two devices that were paired with each other, for example a phone and a laptop. Every update is encrypted on the device that sends it, with a key the relay never receives. The relay passes the sealed envelope on and deletes it once the other device has collected it.

How it works

How two devices exchange data.

An update travelling from one device to another it is paired with The two devices pair once, on the local network. The sending device seals the update. The sealed envelope passes through the ZeroByte relay, which cannot open it, and reaches the paired device, which opens it. After delivery the relay holds nothing. 01 Paired once, on the local network 02 Sending device seals 03 ZeroByte relay cannot open, keeps nothing Paired device opens
  1. 01

    Pair

    Two devices pair once, in the same room or on the same network: a QR code or a comparison of digits on both screens. They agree a 32-byte link key. It stays in each device's keychain and is never sent to the relay.

  2. 02

    Seal

    From the link key, each device derives a mailbox name, an access token and one encryption key per direction (HKDF-SHA256). Every update is sealed with ChaCha20-Poly1305 before it leaves the device. A replayed or altered envelope fails to open.

  3. 03

    Pass

    The relay holds a sealed envelope until the other device collects it. The reader deletes what it has read. A mailbox without a write for 30 days erases itself, and unpairing deletes it at once.

Use cases

For data the servers in between shouldn't read.

What the relay sees

What the relay can and cannot see.

The relay can see

  • Which app a mailbox belongs to
  • A random 128-bit mailbox name
  • The size and time of each envelope
  • The IP address of each connection
  • A push token, if the app registers one

The relay never receives

  • Health, medical or any other private data
  • Names, emails or phone numbers
  • Device names
  • The link key or any key derived from it

Your users create no account and sign in to nothing. The relay keeps no request logs and sets no cookies. It counts requests and bytes per app, anonymously, without mailbox names, tokens or IP addresses. An envelope is capped at 1 MiB, a mailbox at 32 MiB.

On relay.zerobyte.cloud, the hosted relay, Cloudflare's storage also keeps a 30-day history of each mailbox so that it can be recovered after a failure. It holds the same sealed envelopes and nothing more, so a pruned envelope may stay there, still sealed, for up to 30 days. A relay you run yourself keeps whatever its own storage keeps.

Protocol

Built from open standards.

The two devices agree their key once, at pairing, on the local network. After that, every update is sealed and checked with algorithms published as open standards: HKDF (RFC 5869) and ChaCha20-Poly1305 (RFC 8439).

The relay only stores and forwards sealed envelopes. It has no key to open them with, and nothing to keep once they are delivered.

Optional extensions add push notifications that carry no content, and a live channel two online devices can use to set up a direct, peer-to-peer connection. Messages on that channel are sealed with keys of their own. A push registration is stored encrypted, and the relay can open it only while a request presents the mailbox token.

Key agreement
At pairing, on the local network
Key derivation
HKDF-SHA256
Encryption
ChaCha20-Poly1305, one key per direction
Replay protection
Sequence numbers in the authenticated header
Retention
Until read; idle mailboxes after 30 days
Extensions
Push (APNs and FCM), live signalling, STUN/TURN for peer-to-peer
Signal frames
ChaCha20-Poly1305 under separate keys, within a 5-minute window
Push at rest
AES-256-GCM, keyed from the mailbox token

Open source

Open source, with a relay you can run yourself.

The protocol, the relay and the SDKs are public on GitHub. You can read every line that handles an envelope, check the test vectors against your own implementation, and run the relay on your own server, in Docker or on your own Cloudflare account.

relay.zerobyte.cloud runs the same code as a hosted service: register your app in the console and point the SDK at it.

Pricing

Hosted for you, or run it yourself.

An envelope is one sealed message of up to 1 MiB. Prices include no VAT; where VAT is due, the customer accounts for it.

Contact

Where to report bugs and ask questions.