Skip to main content

SimpleX Protocol Stack: Implementation Specification

An Implementer's Guide to the SimpleX Messaging Protocol Suite

Draft

Version 0.1 (Draft) — February 2026
Contributors: cannatoshi, SimpleGo Project
License: CC BY-SA 4.0

What is this document?

This specification provides a complete, implementation-oriented reference for the SimpleX messaging protocol stack. It is designed to enable developers to build interoperable SimpleX clients without reading the Haskell source code.

SimpleX is a decentralized, metadata-private messaging protocol created by Evgeny Poberezkin and the SimpleX Chat team. Unlike other messaging protocols, SimpleX uses no user identifiers — not even random ones. Instead, it relies on unidirectional message queues on untrusted relay servers.

Why this spec exists

As of early 2026, SimpleX does not have a complete formal specification. The protocol creator confirmed:

"I am currently updating the protocol specification to match the current protocol"
— Evgeny Poberezkin, January 28, 2026

The existing documentation covers parts of the protocol but leaves critical implementation details undocumented:

  • Wire format byte layouts (length prefixes, encoding conventions)
  • Encryption layer parameters (IV sizes, HKDF salts, AAD construction)
  • Double Ratchet profile (deviations from the Signal specification)
  • Encoding conventions (Maybe-type, ByteString length encoding, SPKI)
  • Versioning across all five independent version layers
  • Compressed message format (Zstd integration)

Origin

This specification was reverse-engineered during the development of SimpleGo — the first native third-party implementation of the SimpleX protocol, running on ESP32-S3 microcontrollers. Over 20 development sessions, we:

  • Found and documented 19 protocol-level bugs with before/after analysis
  • Verified every encryption layer byte-by-byte against the Haskell reference
  • Produced verified hex dumps for every processing step
  • Identified all deviations from standard cryptographic libraries
  • Created 14,000+ lines of analysis documentation

How to read this specification

The specification is organized in layers, from the outermost (transport) to the innermost (application messages):

ChapterContentStatus
00 — TerminologyConventions, glossary, RFC 2119 keywords🔲 Draft
01 — ArchitectureSystem design, layer model, connection lifecycle🔲 Draft
02 — TransportTLS 1.3, block format, version negotiation🔲 Draft
03 — SMP CommandsQueue operations, command encoding, authentication🔲 Draft
04 — Encryption Layer 3Server-to-recipient (NaCl crypto_box)🔲 Draft
05 — Encryption Layer 2Per-queue E2E (NaCl crypto_box)🔲 Draft
06 — Encryption Layer 1Double Ratchet (X3DH, AES-256-GCM)🔲 Draft
07 — Agent ProtocolHandshake, connection state machine🔲 Draft
08 — Wire FormatEncoding rules, byte layouts🔲 Draft
09 — Message TypesChat messages, ConnInfo, compression🔲 Draft
10 — VersioningFive independent version layers🔲 Draft
11 — SecurityThreat model, private routing🔲 Draft

Appendices

AppendixContent
A — Test VectorsVerified hex dumps from ESP32 hardware tests
B — Implementation NotesPitfalls, deviations, our 19 bugs
C — Haskell ReferenceMapping: spec section → Haskell source file:line
D — ChangelogSpecification revision history

Audience

  1. Implementers building SimpleX clients in other languages
  2. Security researchers auditing the protocol
  3. The SimpleX team as a basis for the official specification
  4. Academics formally analyzing the protocol

Conventions

This document uses RFC 2119 keywords: MUST, MUST NOT, SHOULD, SHOULD NOT, MAY. See Terminology for full definitions and notation conventions.


Contributing

This is a living document. Corrections, additions, and test vectors are welcome via GitHub Issues or pull requests.