How to Create Your Own Decentralized Messenger Protocol karboosx.net · 17 points...
HN Best 200 @best
How to Create Your Own Decentralized Messenger Protocol karboosx.net · 17 points · 4 comments · HN thread
TL;DR The article is a step-by-step design walkthrough for a simple federated messaging protocol called lnchat, modeled on SMTP and email-style domain addressing. It covers DNS-like discovery via a .well-known JSON file, server-to-server user key resolution, end-to-end encryption with HPKE, and Ed25519 signing of federation requests. The post is a design tutorial with code snippets, not a released product.
- Users are addressed as nickname@domain, and the domain points other servers to federation metadata at /.well-known/lnchat.json.
- Clients encrypt message bodies with recipient public keys (X25519 via HPKE) so the servers only relay ciphertext; the article warns that servers publishing keys could lie, so fingerprints or key transparency are needed.
- Servers expose a resolve_users endpoint that batches lookups and returns per-user status such as ok or not_deliverable, with key_id values to detect key changes.
- The sending server sets sender and message_id itself, using message_id (UUIDv7) for idempotency, and never trusts the client for sender identity.
- Federation requests are signed with a separate server Ed25519 key over a strict canonical text including method, path, domains, timestamp, request id and body hash, with guidance on replay protection and SSRF.
- The article is explicit that the design proves the server signed a request, not that the user personally sent the message, and that the home server is trusted for login and routing.
Discussion The thread is small, with four comments. The top comment points to an existing alternative, LXMF on the Reticulum network, and a reply discusses how little known Reticulum is and its niche mesh-radio use. The most substantive comment argues the article starts with email, a proven decentralized messaging system, and then rebuilds from scratch without addressing why; the commenter describes using email as a messaging transport with queueing, retries and federated lookup for free. The mood is informed and mildly skeptical rather than hostile.
- Existing protocols like LXMF or email should be considered first (many): Commenters suggest reusing existing decentralized messaging work instead of building a new protocol. One points to LXMF on Reticulum as a ready-made option.
- Email already works well as a decentralized messaging transport (some): A commenter with first-hand experience says email gave queueing, retries, federated lookup and easy debugging for software messaging, and that the article dismisses email too quickly.
- Reticulum is niche but worth knowing (a few): One commenter notes that Reticulum is obscure, with no Wikipedia article for the main project, yet is becoming more known in radio circles, though it needs a computer and does not run on ESP32 alone.
Links from the comments
- LXMF, the messaging protocol on Reticulum suggested as an existing alternative.
- Disambiguation page linked by a commenter for Reticulum.
#federation #endpoints #encryption #decentralizedMessaging #protocolDesign