Skip to content

XMTP protocol overview

XMTP is a decentralized messaging protocol that enables secure, end-to-end encrypted communication between any identities that can produce a verifiable cryptographic signature.

XMTP implements Messaging Layer Security (MLS), which is designed to operate within the context of a messaging service. As the messaging service, XMTP needs to provide two services to facilitate messaging using MLS:

This section covers the elements of XMTP that provide these services.

Encryption

The encryption elements are mainly defined by MLS, with some additions by XMTP. To learn more, see:

  • Security

    XMTP and MLS prioritize security, privacy, and message integrity through advanced cryptographic techniques, delivering end-to-end encryption for both 1:1 and group conversations

  • Epochs

    Represent the cryptographic state of a group at any point in time. Each group operation (like adding members) creates a new epoch with fresh encryption keys

  • Envelope types

    Messages are packaged as envelope types that contain the actual message data plus metadata for routing and processing.

Identity

The identity elements are mainly defined by XMTP. To learn more, see:

Delivery

The delivery elements are mainly defined by XMTP. To learn more, see:

  • Topics

    Messages are routed through topics, which are unique addresses that identify conversation channels.

  • Cursors

    Enable efficient message synchronization by tracking where each client left off when fetching new messages.

  • Intents

    Provide reliable groupstate management through an internal bookkeeping system that handles retries, crashes, and race conditions when applying group changes.

Protocol evolution

XMTP evolves through XMTP Improvement Proposals (XIPs), which are design documents that propose new features and improvements. This governance process ensures systematic and decentralized protocol development.

Additional resources

For a broader vision of XMTP's approach to core concepts, see the following topics on xmtp.org: