Skip to content

The protocol

Encrypted messaging,
on or off chain.

A cross-language, end-to-end encrypted messaging protocol. A new Raven chat starts as a hybrid session: X25519 plus ML-KEM-768. Everyday chat and Extra lock stay choices. One wire format, six implementations. Your Algorand address is your messaging identity. Chat with Raven.

The positioning

Encrypted, transport-neutral, conformant.

AlgoChat is a protocol, not an app. It defines exactly how a message is sealed, what bytes go on the wire, and how any two implementations agree on the result.

End-to-end encrypted

Only the people in the chat hold the keys. A hybrid session uses X25519 plus ML-KEM-768, then ChaCha20-Poly1305. It is not forward secrecy.

Transport-neutral

Originally Algorand transaction notes: encrypted, immutable, on-chain. The same envelope rides just as well over a WebSocket or any other transport. The protocol does not care about the wire underneath it.

Cross-language conformant

Six language implementations, one shared spec, one set of canonical test vectors. Conformance is mechanical: same seed in, same bytes out, in every language.

The crypto, in one line

# a new chat is a hybrid session
protocol 0x04 handshake, then 0x05 messages
X25519 + ML-KEM-768 (FIPS 203, category 3) + ChaCha20-Poly1305

# still choices
protocol 0x01 everyday, level 0
protocol 0x02 Extra lock, level 1 only while the secret stays secret

How it works

Hybrid session

A new Raven chat starts here. Protocol 0x04 agrees on a session key with X25519 plus ML-KEM-768. Protocol 0x05 carries the messages. That is category 3. Breaking only one of those two does not open the handshake.

No Signal-style ratchet

AlgoChat does not provide forward secrecy. A long-term key, or the 25-word recovery phrase, can open old messages. A hybrid session reuses its handshake key. Ephemeral private keys are not stored, and that still does not seal yesterday.

Bidirectional decryption

An encrypted sender-key rides in the envelope, so the sender can re-decrypt their own sent messages on any authorized device. Chat history without storing plaintext locally.

Everyday chat and Extra lock

Everyday chat, protocol 0x01, is the low-stakes choice. It is level 0. Extra lock, protocol 0x02, adds a 32-byte secret that stays off the chain. It is level 1 only while that secret stays secret, and it is not a stronger post-quantum choice than hybrid. The two do not stack.

Cross-language by design

Six implementations, one wire format, all checked against shared test vectors. Encrypt in Swift, decrypt in Rust. Identical bytes, byte-for-byte.

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, no separate signup.

Wire format

A hybrid message header is 78 bytes, under the session key from one handshake. Everyday chat uses a 126-byte header. Extra lock adds a 4-byte counter, so that header is 130 bytes. The body stays ciphertext. Full byte-level breakdown in the protocol spec.

// Hybrid message, protocol 0x05 (78-byte header)
version(1) · protocol(1) · sender_pubkey(32) · handshake_id(32) · nonce(12)
  · ciphertext(variable)

// Everyday chat, protocol 0x01 (126-byte header)
version(1) · protocol(1) · sender_pubkey(32) · ephemeral_pubkey(32) · nonce(12) · encrypted_sender_key(48)

// Extra lock, protocol 0x02, adds a 4-byte counter (130-byte header)

// one Algorand note holds 4096 bytes

Pick your language

All in the catalogue →

Same protocol, every language: each one conforms to the spec and the shared test vectors. All six libraries live alongside the specification in the AlgoChat monorepo.

The five conformance-tested implementations (Swift, TypeScript, Python, Rust, Kotlin) currently pass the shared test vectors; Go is implemented and being brought into the harness. The shared test vectors live in the monorepo. Every covered implementation encrypts the same vectors and must produce identical bytes.

Use it

AlgoChat is a standalone protocol, not a product you adopt wholesale. Pick an implementation, exchange keys, and send. It encrypts, it decrypts, and every implementation agrees on the bytes.

Chat with Raven

Use AlgoChat in your browser with Raven. End-to-end encrypted messaging on Algorand, with your keys on your device. Open Raven →

Pick a language

Six implementations, one wire format. Encrypt in Swift, decrypt in Rust, byte for byte. Implementations →

Message on Algorand

Each envelope fits in one transaction note: encrypted, immutable, on-chain. Your Algorand address is your identity.

Read the spec, or open Raven.

The protocol docs cover the full wire format, the implementation guide, the security threat model, and canonical test vectors. Raven is the current product surface for the protocol.