Protocol · qwire/1

How qwire works

Every part of a qwire message lives in ordinary Solana transactions. There is no qwire server that stores, relays or can read anything.

1. Your key comes from your wallet

Your wallet signs a fixed text that names your address. Ed25519 signatures are deterministic, so the same wallet always produces the same signature. qwire hashes it into a 32-byte seed and expands that into an X-Wing keypair: ML-KEM-768 (NIST FIPS 203) combined with X25519.

// in your browser, never sent anywhere seed = SHA-256("qwire/1 seed" ‖ walletSignature) publicKey = XWing.getPublicKey(seed) // 1,216 bytes

Lose the browser, keep the wallet: sign again and the same key comes back.

2. The directory is the chain

Your public key is base64-encoded and written into two Memo v2 transactions signed by your wallet. Each one also sends 0 SOL to a key address derived from your wallet, so anyone can find your key from your address alone.

keyBox(wallet) = PDA(["qwire:key", wallet], Memo program) memo = "qw1:k:<id>:<part>:<parts>:<base64>"

3. Sealing a message

The sender encapsulates to your key, derives a one-time key and seals the message and the attached amount together. Both wallet addresses are bound in as associated data, so a ciphertext can't be replayed between other wallets.

(ct, shared) = XWing.encapsulate(recipientKey) // ct = 1,120 bytes key = HKDF-SHA256(shared, salt = nonce, info = "qwire/1 msg" ‖ from ‖ to) body = XChaCha20-Poly1305(key, nonce, {text, lamports, ts}, ad = from ‖ to) envelope = ct ‖ nonce ‖ body

4. On the wire

The envelope is split across Memo transactions that the sender approves in one go. The first one carries the SOL payment to you. Every part also pings your inbox address.

PartCarriesSize
tx 1Payment to recipient · ping inbox(to) · ping outbox(from) · memo part 1≤ 1,232 B
tx 2–3Ping inbox(to) · memo part n≤ 1,232 B

5. Reading your inbox

qwire lists the transactions on your inbox address, groups the parts by message id, decapsulates with your seed and opens the envelope in your browser. If the sealed amount doesn't match the on-chain transfer, the message says so.

6. Cost

A short message is three transactions, about 0.000015 SOL in network fees. Publishing your key is two transactions. qwire charges nothing on top.