Proposal for AT Protocol Instant Messenger #70
Replies: 4 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. |
Beta Was this translation helpful? Give feedback.
-
If you can figure this out, this might be usable for getting Bsky's DMs onto the protocol as well! Honestly huge. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
I was just thinking about this! I would love to live in a world where it no longer matters what IM app you use. |
Beta Was this translation helpful? Give feedback.
-
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
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.getPackage
Endpoint:
online.atproto.chat.getMessages
Endpoint:
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.
Beta Was this translation helpful? Give feedback.
All reactions