who holds the keys
everything you send is locked on your device first, and stays locked on the way and on disk. each server keeps the keys for its own conversations, so you choose who to trust by choosing where you talk.
four things worth knowing
- locked first
- messages and files are encrypted on your device before anything leaves it. voice and screen shares too.
- keys stay put
- a server makes each channel's key and seals it with its own identity. a copied database is useless without that identity file.
- the operator can read
- whoever runs a server can read its channels. on a community server that's the owner, and for direct messages and calls it's the hub. run your own and it's only you.
- servers get checked
- your app remembers each server's identity the first time it connects, and warns you if that ever changes.
what the server actually gets
a toy, so the bytes here are random. the real app uses XChaCha20-Poly1305 and a key the server never shows anyone.
what happens when you hit send
- you get an identity
on first run your device makes two key pairs: Ed25519 signs, X25519 agrees keys. your account keeps a copy sealed with your password, so you can sign in on another device.
- the server keys the channel
every channel gets a random 32-byte key. the server stores it sealed to its own identity, and each member gets a copy sealed just for them.
- the message is locked and signed
XChaCha20-Poly1305 encrypts the message, tied to its channel, sender and id. move it somewhere else and it won't open. the sender signs it as well.
- voice goes in 10 ms slices
each slice of audio is encrypted on its own. a 28-byte header lets the server route it, and a slice that shows up twice is dropped.
- streams are encrypted per frame
screen shares go through a media relay that ships with the server. every video frame is encrypted with the channel's media key.
- keys change when people leave
when someone leaves or gets removed, the server makes a fresh channel key. new messages use it, and the person who left never gets it.
standard parts, nothing homemade
| job | used for it |
|---|---|
| encrypting messages and media | XChaCha20-Poly1305 with a 24-byte nonce and a 16-byte tag |
| sealing a key for one person | sealed box over X25519 and XSalsa20-Poly1305 |
| identity | Ed25519 for signatures and X25519 for key agreement |
| turning a password into a key | Argon2id with 64 MiB of memory, 3 passes on 1 lane and a 32-byte output |
| proving a password without sending it | HMAC-SHA256 over a nonce the server picks |
| server fingerprints | BLAKE2b-256, shown as 8 groups of 4 hex characters |
all of it comes from libsodium, bundled with the app and the server. nothing is fetched from anywhere else.
how it's checked
- test vectors
- one file pins the exact bytes for every operation, plus broken inputs that must fail. the server and the app both test against it.
- tampering
- change one byte of a message or its nonce and decryption refuses. those cases run on every change.
- specs
- the wire protocol and the crypto design are written down and versioned. read them here.
no outside audit yet. veiled is alpha software, so treat it that way until someone independent has reviewed it.