Technical Whitepaper V1.0

Key Protocol

A Permissionless Messaging Protocol on Solana

Abstract

Key is an open, permissionless messaging protocol built on Solana that combines end-to-end encryption with blockchain immutability. By abstracting transaction costs through a fee-payer model and storing encrypted messages on-chain via memo instructions, Key provides a censorship-resistant communication layer with no vendor lock-in.

This whitepaper describes the technical architecture, cryptographic implementation, and economic sustainability model that enables truly sovereign digital communication.

Problem Statement

Modern messaging platforms suffer from three critical vulnerabilities:

Centralization

Messages stored on corporate servers, subject to surveillance and deletion.

Vendor Lock-In

Users cannot export their identity or migrate to alternative clients.

Cost Barriers

Blockchain-based solutions impose transaction fees that hinder adoption.

Solution Architecture

1. Username Registry (Anchor Program)

A Solana program deployed at 96hG67JxhNEptr1LkdtDcrqvtWiHH3x4GibDBcdh4MYQ manages the mapping of human-readable usernames to cryptographic public keys.

Program Data Account (PDA):

  • • Owner: Ed25519 public key (32 bytes)
  • • Username: UTF-8 string (3-20 characters)
  • • Encryption Key: X25519 public key (32 bytes)
  • • Created At: Unix timestamp (8 bytes)

2. Message Transmission (Memo + Arweave)

Messages are transmitted via Solana memo instructions. For messages under 750 bytes, the encrypted content is stored directly in the memo. Larger messages are uploaded to Arweave with only the transaction ID stored on-chain.

Transaction Structure:

  • 1. SystemProgram.transfer(1 lamport) → Triggers recipient listener
  • 2. MemoProgram → Stores "senderPubkey|encryptedMessage"
  • 3. Fee Payer Signature → Server subsidizes cost

3. Encryption Scheme (X25519 + ChaCha20)

All messages use NaCl box (X25519 Elliptic Curve Diffie-Hellman + ChaCha20-Poly1305 AEAD cipher). Encryption keys are derived from Ed25519 signing keys using the first 32 bytes.

Security Guarantees:

  • • 128-bit security level (X25519)
  • • Authenticated encryption (Poly1305 MAC)
  • • Random nonce per message (forward secrecy)
  • • Client-side encryption (server never sees plaintext)

4. Fee Abstraction (Gasless UX)

Users never pay transaction fees. A fee-payer service signs and submits all transactions to Solana. Users only sign with their own keypair to prove authorship.

Security Model

Threat Model

Protected Against:

  • • Server-side decryption (keys never leave device)
  • • Message tampering (authenticated encryption)
  • • Replay attacks (5-minute timestamp window)
  • • Spoofing (Ed25519 signature verification)

Limitations:

  • • Metadata visible (sender/recipient/timestamp)
  • • No perfect forward secrecy (no key ratcheting)
  • • Compromised keypair leaks all messages

Tokenomics

The Key Protocol is sustained by the $KEY token launched on Pump.fun. Creator fees from $KEY trading volume fund the fee-payer service, subsidizing all transaction costs for users.

"By holding $KEY, you are not just an investor; you are a Patron of privacy."

Decentralization & Open Protocol

Key is fully open and permissionless. Any developer can:

  • • Build alternative frontends with custom UI/UX
  • • Deploy their own fee-payer service
  • • Call the username registry program directly via Solana RPC
  • • Create platform-specific clients (desktop, CLI, mobile)

Users retain full sovereignty over their keypairs and can export their identity to any compatible client.

Group Chat Architecture

Key implements Signal-style hybrid encryption for group messaging, supporting up to 50 members with full end-to-end encryption. No group messages are stored in plaintext - ever.

Encryption Flow

1. Message Encryption: Generate random ChaCha20 symmetric key → Encrypt message with symmetric key

2. Key Distribution: Encrypt symmetric key separately for each member using their X25519 public key

3. Storage: Upload encrypted payload to Arweave: {encryptedMessage, encryptedKeys: {member1: key1, ...}}

4. Notification: Send 1 lamport transaction to each member with memo: group:groupId:arweaveTxId

5. Decryption: Member receives notification → Fetches from Arweave → Decrypts their personal key → Decrypts message

Data Storage

  • Redis: Group metadata only (name, member list) - NO MESSAGES
  • Arweave: Encrypted message payloads (cannot be decrypted without member keys)
  • Solana: Notification transactions (pointers only, no content)
  • Your Device: Decryption keys never leave your device

Roadmap

LIVE

Group Chat Support ✓

Hybrid encryption for up to 50 members with Arweave storage

Q2 2026

Ephemeral Messages

Self-destructing messages with local-only mode

Q3 2026

Desktop Clients

Native macOS/Windows/Linux applications

References