hn.today

How to Create Your Own Decentralized Messenger Protocol

karboosx.net86 points18 comments
Screenshot of How to Create Your Own Decentralized Messenger Protocol

The proposal sketches a deliberately minimal federated messenger: independent servers discover one another and exchange messages directly, without a central coordinator, much like email servers use DNS and SMTP. Users have domain-qualified identities so a sender’s server can find the recipient’s home server. Each server publishes a versioned `/.well-known/lnchat.json` file describing its protocol version and federation endpoints. The initial scope is intentionally narrow - encrypted text messages between users on one device, leaving groups, attachments, multi-device support, and read receipts for later. Federation requests must also be authenticated so a server cannot simply claim to represent a domain it does not control.

End-to-end encryption keeps message contents unreadable to servers: clients generate a key pair, retain the private key locally, and upload only the public key. A recipient server exposes a bulk user-resolution endpoint that returns public keys and key identifiers, or reports that a user cannot receive encrypted messages. Identifiers let clients recognize key changes, though key publication alone cannot prevent a malicious server from substituting keys; the design notes that warnings, fingerprints, trust on first use, or key transparency are needed. To send a message, the client encrypts locally using the recipient’s key, then gives the encrypted payload to its home server. That server adds federation metadata, including a message ID and sender identity, and forwards it to the recipient server, which stores it for delivery. The recipient decrypts it on their device. This division keeps encryption client-side while leaving routing and storage to servers.

Read on karboosx.net18 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.