How Ciphra works

The whole protocol in one page: where the key comes from, what gets sealed, what the server stores, and what it would take to read a message you did not write.

Key derivation

Ciphra never asks for a private key and never sends a transaction. Your wallet signs one fixed sentence with signMessage:

CIPHRA key derivation v1

Signing this creates your private messaging key inside this page.
The signature never leaves your browser.
Only sign this on ciphra.agentapp.fun.
Signing is free and sends no transaction.

Solana wallets sign with Ed25519, and Ed25519 signatures are deterministic: the same wallet signing the same sentence always produces the same 64 bytes. Ciphra hashes them into a seed and makes an X25519 keypair from it.

seed    = SHA-512("ciphra/x25519/v1" || signature)[0..32]
keypair = nacl.box.keyPair.fromSecretKey(seed)

The secret half exists only in the memory of the tab that derived it. Close the tab and it is gone; sign again on any device and the same key comes back, so there is nothing to back up. Anyone who can make your wallet sign that sentence can rebuild your key, which is why the sentence names the only site that should ask for it.

The key directory

To be reachable, a wallet publishes the public half of its messaging key. The wallet signs a second message that binds the key to the wallet and a timestamp:

CIPHRA
Publish key and sign in
Key: <base64 X25519 public key>
Wallet: <wallet address>
Time: <ISO timestamp>
Signing is free and sends no transaction.

The server checks the Ed25519 signature against the wallet address and refuses timestamps older than ten minutes. It stores the key, the signature and the timestamp in ciphra_keys. Every browser that writes to you fetches that record and verifies the signature itself before sealing, so a server that swapped your key would be caught by the client, not trusted by it.

The same signed message is your sign-in: the server answers with a session token valid for 12 hours, scoped to your wallet.

Sealing a message

Messages use nacl.box from tweetnacl: X25519 key agreement, then XSalsa20-Poly1305 authenticated encryption with a random 24-byte nonce. The sender's secret key and the recipient's public key go in; only the recipient's secret key with the sender's public key gets the text back out, and any change to the ciphertext makes it fail to open.

Before sealing, the text is padded to one of four sizes (256, 1024, 4096 or 8192 bytes) with a length prefix and random filler, so the stored size says roughly how long a message is, never exactly. Messages are capped at 2,000 characters.

The reader's browser checks that the sender key on the row matches the sender's own signed record. If it does not, the message is shown with a warning instead of a verified mark.

Notes that wait

You can write to a wallet that has never used Ciphra. There is no key to seal to yet, and the server must never hold one for it, so the note is sealed to your own key and stored as waiting. The recipient's inbox shows that a note exists and who wrote it, nothing more.

When the recipient publishes a key, the next time you open your inbox your browser opens the note with your key, verifies their signed record, seals the text to them and replaces the row. Until you come back, the note stays waiting. This is the honest cost of a server that cannot read: someone has to hold a key, and it is you.

What the server sees

StoredNever stored
Sender and recipient walletMessage text
Sealed box and nonceAny secret key or seed
Both public messaging keys, signed by their walletsYour derivation signature
Created, sealed, opened and expiry timesRaw IP addresses (only a salted hash, for rate limits)
Blocks, reports and an optional excerpt the reporter chose to shareAnything from your wallet beyond its address

So the operator, or anyone who copies the database, learns who wrote to whom, when, roughly how long it was, and whether it was opened. They do not learn what it says. Expired messages are deleted every five minutes; burned messages are deleted at once.

Threat model

Covered

A database leak, a curious operator, a network observer and a tampered ciphertext. None of them can read a message, and a modified box fails to open rather than opening wrong.

Not covered

A site that serves you malicious JavaScript could read what you type, as with every web app; the code is unminified so it can be checked. A phishing site that gets you to sign the derivation sentence gets your key, so only sign it here. Metadata is visible, as listed above. There is no forward secrecy: if your key is rebuilt later, past messages sealed to it open. Burn what matters after reading it.

Key changes

The key is a function of the wallet and the fixed sentence, so it only changes if the protocol version changes. If a record ever changes, senders see the new signed record and readers see a warning on messages sealed to the old one.

Limits

Per sending wallet: 20 messages in 10 minutes and 150 a day. To a single recipient: 25 a day. Per network: 40 in 10 minutes. Expiry can be 1 hour, 1 day or 7 days, or none. The live numbers are on the status page.

Blocks and reports

Blocking a wallet hides its messages from your inbox and refuses its new ones. Reporting sends the message id, the sender and a reason to the moderators. Because they cannot read sealed text, you may choose to share the text with your report; it is never sent unless you tick that box. Moderators can hide a message and ban a wallet from sending. You can take your wallet off the public wall from your inbox.

SDK

The same code the site runs is a small MIT library on top of tweetnacl, tested against the live API. It works in the browser and in Node.

const C = require('@ciphra/sdk');
const me = C.keyFromSignature(await wallet.signMessage(C.DERIVE_MESSAGE));
const rec = (await (await fetch('/api/key?q=name.sol')).json()).key;
if (!C.verifyKeyRecord(rec)) throw new Error('key does not verify');
const sealed = C.seal('hello', C.fromB64(rec.box_pub), me.secretKey);
// later, as the recipient:
const text = C.open(row, C.fromB64(row.sender_key), me.secretKey);

API

EndpointDoes
POST /api/authPublish a signed key and get a 12 hour session
GET /api/key?q=Resolve a wallet or .sol name to its signed key record, or null
GET /api/messages?box=Your inbox or sent rows, ciphertext only, with the other parties' key records
POST /api/messagessend, open, burn, reseal
POST /api/safetyblock, unblock, report, wall
GET /api/wallUnopened counts per wallet, or one wallet with ?w=
GET /api/statusLive counts and health