Lightweight Extensible Message Format

LXMF is a simple and flexible messaging format that allows a wide variety of implementations, while using as little bandwidth as possible. It is built on top of Reticulum and offers zero-conf message routing, end-to-end encryption and Perfect Forward Secrecy by default.

Structure

LXMF messages are stored in a simple and efficient format, that's easy to parse and write.

The format follows this general structure:
And these rules:
  1. A LXMF message is identified by it's message-id, which is a SHA-256 hash of the Destination, Source and Payload. The message-id is never included directly in the message, since it can always be inferred from the message itself.

    In some cases the actual message-id cannot be inferred, for example when a Propagation Node is storing an encrypted message for an offline user. In theses cases a transient-id is used to identify the message while in storage or transit.

  2. Destination, Source, Signature and Payload parts are mandatory, as is the Timestamp part of the payload.

    • The Destination and Source fields are Reticulum destination hashes
    • The Signature field is a RSA signature of the Destination, Source, Payload and message-id
    • The Payload part is a list containing four items:
      1. The Timestamp is a double-precision floating point number representing the number of seconds since the UNIX epoch.
      2. The Content is the optional content or body of the message
      3. The Title is an optional title for the message
      4. The Fields is an optional dictionary
  3. The Content, Title and Fields parts must be included in the message structure, but can be left empty.

  4. The Fields part can be left empty, or contain a dictionary of any structure or depth.

Usage Examples

LXMF offers flexibility to implement many different messaging schemes, ranging from human communication to machine control and sensor monitoring. Here's a few examples:

Propagation Nodes

LXM Propagation Nodes offer a way to store and forward messages to users or endpoints that are not directly reachable at the time of message emission. Propagation Nodes can also provide infrastructure for distributed bulletin, news or discussion boards.

The LXM Router

The LXM Router handles transporting messages over a Reticulum network, managing delivery receipts, outbound and inbound queues, and is the point of API interaction for client programs. The LXM Router also implements functionality for acting as an LXMF Propagation Node.

Programatically, using the LXM Router to send a message is as simple as:

import LXMF

lxm_router = LXMF.LXMRouter()

message = LXMF.LXMessage(destination, source, "This is a short, simple message.")

lxm_router.handle_outbound(message)

The LXM Router then handles the heavy lifting, such as message packing, encryption, delivery confirmation, path lookup, routing, retries and failure notifications.

Transport Encryption

LXMF uses encryption provided by Reticulum, and thus uses end-to-end encryption by default. The delivery method of a message will influence which transport encryption scheme is used.

Wire Format & Overhead

Assuming the default Reticulum configuration, the binary wire-format is as follows:

The complete message overhead for LXMF is only 163 bytes, which in return gives you timestamped, digitally signed, infinitely extensible, end-to-end encrypted, zero-conf routed, minimal-infrastructure messaging that's easy to use and build applications with.

Caveat Emptor

As with Reticulum, LXMF is alpha software, and should be considered experimental. While it has been built with cryptography best-practices very foremost in mind, it has not been externally security audited, and there could very well be privacy-breaking bugs. If you want to help out, or help sponsor an audit, please do get in touch.

Installation

If you want to try out LXMF, you can install it with pip:

pip3 install lxmf