Skip to content

🔐 The protocol

Encrypted messaging,
on or off chain.

A cross-language E2EE protocol. Six implementations, one wire format, cross-conformance tested. Your Algorand address is your messaging identity.

How it works

X25519 + ChaCha20-Poly1305

Standard elliptic-curve Diffie-Hellman + authenticated encryption. Well-trodden primitives, no exotic crypto.

Two-level ratchet

Forward secrecy across messages. Compromise tomorrow's key, yesterday's messages stay sealed.

On-chain transport (optional)

AlgoChat's original transport is Algorand transactions. Encrypted note fields. corvid-chat uses the same envelope shape over WebSocket; the protocol is transport-neutral.

PSK pairing

Pre-Shared Key contacts let two parties establish encrypted channels out-of-band. QR codes, paste-pair, deterministic from a BIP-39 phrase.

Cross-language by design

Six implementations, all conformance-tested against a shared protocol spec. Encrypt in Swift, decrypt in Rust. Identical bytes.

Algorand identity = AlgoChat identity

The same 32-byte seed derives both your Algorand address (Ed25519) and your AlgoChat keypair (X25519). One identity, two cryptographic surfaces.

Wire shape

Every AlgoChat message is a base64url envelope containing four parts. Encrypted body lives inside the AEAD; everything else is metadata the receiver needs to decrypt.

// AlgoChat envelope (simplified)
struct Envelope {
  sender_pubkey: [u8; 32], // X25519 ephemeral
  ratchet_counter: u64, // for replay protection
  nonce: [u8; 12], // ChaCha20-Poly1305
  ciphertext: Vec<u8>, // the actual message body
  tag: [u8; 16], // AEAD authentication
}

What uses it