Demo only
// encrypted private memos · $CPOST placeholder, no token exists

Say it once.

// live demo

Seal a memo. Open it. Try to break it.

Every button below runs real Web Crypto: ECDH key agreement, HKDF key derivation and AES-256-GCM encryption. Nothing is sent anywhere; keys exist only in this tab.

1

Recipient creates a keypair

The recipient generates an ECDH P-256 keypair. The public key can be shared with anyone; the private key never leaves the recipient.

Demo keys only. Never paste a real seed phrase or private key.
2

Sender seals a memo

The sender needs only the recipient's public key. Each memo uses a fresh ephemeral keypair, so encrypting the same text twice gives completely different ciphertext.

Nothing sealed yet. Press the button above.

What a public observer sees

memo id-
3

Recipient opens it (and attackers fail)

Paste any packet below (it is pre-filled with the one you just sealed). Decryption uses the private key from step 1.

// how it works

Sealed to a key, not to an account.

ephemeral key e+recipient pubkey R→ ECDH →shared secret→ HKDF-SHA256 →AES-256 key→ AES-GCM →ciphertext + tag

Forward-looking

The sender's ephemeral private key is thrown away right after sealing. Only the recipient's private key can re-derive the shared secret.

Authenticated

AES-GCM adds a tag. Change a single bit of the packet and decryption refuses to return anything, as the third button above shows.

Length-padded

Plaintext is padded to a multiple of 64 bytes before sealing, so short and slightly-longer memos look the same size.

Hidden by the cryptography

  • The memo content
  • Which of many public keys can open it (the recipient key is not in the packet)
  • Whether two packets carry the same text
  • Exact memo length (within a 64-byte bucket)

Still visible to anyone

  • That a packet exists, and its approximate size
  • When it was posted
  • On a real chain: the fee-payer and any accounts the transaction touches, unless routed separately
  • Traffic patterns, if one party sends or reads many memos

About the curve. This demo uses ECDH on P-256 because Web Crypto supports it everywhere. A Solana build would instead use ed25519 identity keys converted to x25519 (or native x25519) with a sealed-box style construction. The structure (ephemeral key, KDF, AEAD) is the same; the curve is not.

Known limitations — please read

  • Reduces linkability, not anonymity. Hiding a memo's content does not hide that you used the system, when, or from which wallet. Metadata can still link people.
  • Demo only. No program is deployed, no token exists, nothing here touches mainnet or real funds. The $CPOST ticker is a placeholder.
  • Unaudited. This code has had no security review. Do not use it to protect anything that matters.
  • Demo keys only. Never paste a real seed phrase or private key into this page. Private keys here are shown on screen in plain text for teaching purposes.
  • No sender authentication. Anyone holding the recipient's public key can send a memo that claims to be from anyone. A real design needs signatures.
  • No key verification. The page cannot tell you that a public key really belongs to the person you think it does.
  • Browser trust. Whoever serves this page could change its code. Local files and extensions can read what you type.