WHSPR

Technical overview

How WHSPR encryption works

WHSPR is a messenger where your Solana wallet is your account. This article explains what happens to a message from the moment you type it to the moment someone reads it, and what our server can and cannot see along the way.

The short version

  • Your messages are encrypted in your browser before they’re sent.
  • The server stores and delivers only ciphertext.
  • Your wallet proves who you are. It never encrypts or decrypts anything.
  • Every message is signed, so a recipient can tell if it was tampered with or forged.

1. Signing in: identity without an email

To sign in, you sign a short text message with your wallet. It contains a one-time nonce, an issue time and an expiration time, so an old signature can’t be replayed.

It is a message signature, not a transaction. There is no fee, no spending approval, and nothing leaves your wallet.

2. Your encryption keys live in your browser

The first time you use WHSPR, your browser generates two key pairs:

  • X25519, used to encrypt and decrypt messages
  • Ed25519, used to sign the messages you send

The private keys are stored only on your device, in the browser’s IndexedDB. They are never sent to the server. Your wallet keys and your messaging keys are completely separate. Your wallet is never asked to decrypt anything.

3. Linking keys to your wallet

How does someone know a key really belongs to you and not to an attacker, or to us?

When your keys are created, you sign a statement with your wallet that says, in plain text: this wallet, this encryption key, this signing key, this fingerprint, this date. Only the public keys and that signed statement are published.

Every time your browser fetches someone’s key, it checks that signature locally. If the server ever swapped in a different key, the check would fail, because the server can’t produce a signature from your wallet.

4. Fingerprints

Each identity has a fingerprint: the first 128 bits of SHA-256 over both public keys, shown as eight groups of four characters.

You can compare fingerprints with a contact through another channel to confirm you’re talking to the right person. If a contact’s key changes, for example after they reinstall or switch devices, WHSPR warns you in the conversation instead of silently trusting the new key.

5. Sending a message

When you press send, your browser:

  1. 1.Generates a fresh random 256-bit content key for this message alone.
  2. 2.Encrypts the message with XChaCha20-Poly1305 using that key and a random 24-byte nonce. The conversation, the message ID, the sender and the sender’s key ID are bound in as associated data, so a ciphertext can’t be moved into another conversation or attributed to someone else.
  3. 3.Wraps the content key separately for each recipient and for your own other devices. Each wrap uses a new single-use X25519 key pair, a shared secret derived with HKDF-SHA256, and its own XChaCha20-Poly1305 encryption.
  4. 4.Signs the whole envelope (ciphertext, nonce and every wrapped key) with your Ed25519 key.
  5. 5.Wipes the content key and the single-use secrets from memory.

The result, called an envelope, is all the server ever receives.

6. Receiving a message

The recipient’s browser works in a fixed order:

  1. 1.Verifies the sender’s signature first. If it fails, the message is rejected and never decrypted.
  2. 2.Finds the wrapped key addressed to its own key.
  3. 3.Unwraps the content key, then decrypts the message.

If anything was changed in transit, whether one byte of ciphertext or one wrapped key, authentication fails and the message isn’t shown.

7. Group rooms

Rooms use the same envelope. Each message’s content key is wrapped once per member key, up to 15 members. There is no shared group password sitting on the server.

8. Files

Attachments are encrypted in your browser with XChaCha20-Poly1305 and a fresh random key before they’re uploaded. The server stores an unreadable file.

The file’s key travels inside the encrypted message itself, so only people who can read the message can open the file.

9. Changing devices and backups

Because your keys live only on your device, losing the device means losing them. To prevent that, WHSPR offers an encrypted key backup:

  • You choose a passphrase.
  • A key is derived from it with scrypt (N = 2^16, r = 8, p = 1), which deliberately slows down guessing.
  • Your keyring is encrypted with XChaCha20-Poly1305 and bound to your wallet address.

We never see your passphrase. If you forget it, we can’t recover the backup. That’s the point. When keys are rotated, old keys are kept on your device so your earlier messages stay readable.

10. What the server can see

We’d rather be precise than promise “total privacy.”

Cannot see

  • The content of your messages
  • The content or names of your files
  • Your private keys or backup passphrase

Can see

  • Which wallets are talking to each other
  • When messages are sent, and roughly how large they are
  • Your public keys and username

This is metadata, and like most messengers, we need it to deliver messages. We don’t claim to hide it.

11. Built on audited primitives

We don’t use homemade cryptography. WHSPR uses the @noble libraries (curves, ciphers, hashes), which are widely used and have been independently audited.

Message and file encryption
XChaCha20-Poly1305
Key exchange
X25519
Message signatures
Ed25519
Key derivation
HKDF-SHA256
Backup passphrase
scrypt
Fingerprints
SHA-256

Summary

Your wallet is your identity. Your browser holds the keys. The server is a delivery service for sealed envelopes it cannot open.