Proposal for AT Protocol Instant Messenger #70
Replies: 5 comments 2 replies
|
Inspiring! A point of consideration I'd like to bring up would be weighing the pros and cons between iroh-gossip and Libp2p as the transport layer. Libp2p has a similar gossip protocol and hails from Protocol Labs, the team responsible for development on IPFS. |
|
If you can figure this out, this might be usable for getting Bsky's DMs onto the protocol as well! Honestly huge. |
|
This is a great proposal! Would it be out of scope to consider key recovery processes? Additionally, is there a way to verify DIDs before starting a new chat/continuing a chat? |
|
I was just thinking about this! I would love to live in a world where it no longer matters what IM app you use. |
|
Here’s one way to make an ‘amicably adversarial’ post-bsky messenger app:
This would enable people to maintain their ongoing conversations on Bluesky whilst also providing an off-ramp into Bluesky-independent messaging. There wouldn’t even need to be any guarantees of legitimate security for the first phase of operation; just vibe code it all the way to a working proof of concept first, then a conversation can be had about what a rigorous implementation would require. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Atproto Instant Messenger (AtprotoIM) Architecture Overview
Overview
This document outlines the architectural decisions, cryptographic considerations, and key management strategies for building a decentralized instant messaging app called Atproto Instant Messenger (AtprotoIM), leveraging AT Protocol, OpenMLS, Iroh Gossip, and a custom App-view backend for persistence.
Architectural Components
1. AT Protocol (DID Identity & Discovery)
online.atproto.actor.package{ "$type": "online.atproto.actor.package", "keypackage": "<MLS KeyPackage serialized as base64>", "createdAt": "2025-03-11T00:00:00Z" }2. OpenMLS (End-to-End Encryption)
MLS Client-Server Architecture
MLS specifies cryptographic operations clients must perform to securely manage messaging. But MLS itself doesn’t define networking or storage directly. Instead, it explicitly depends on an external Delivery Service for practical communication. The architecture typically looks like this:
3. Iroh Gossip (Real-time Decentralized Transport)
4. App-view Backend (Persistent Storage & Retrieval)
XRPC Endpoints
Endpoint:
online.atproto.actor.getPackageEndpoint:
online.atproto.chat.getMessagesEndpoint:
online.atproto.chat.writeMessages(Optional)Recommended Key Management
Message Flow (Complete)
Step 1: Publish KeyPackage
online.atproto.actor.package).Step 2: Real-time Messaging (Encrypted via MLS)
Step 3: Offline Message Recovery
online.atproto.chat.getMessages) upon reconnect.Updated Example Implementation Code (Rust)
Publishing KeyPackage
Receiving and Persisting Ciphertext (App-view backend)
Client Fetching Missed Messages
Technical Considerations and Risks
Conclusion
The outlined architecture ensures robust security, decentralization, scalability, and usability for AtprotoIM, leveraging the strengths of AT Protocol, OpenMLS encryption, and Iroh Gossip transport, supported by a minimal persistent App-view backend.
All reactions