End-to-end encrypted mesh chat for iOS and macOS by Olib AI
Used in StealthOS, the privacy-focused operating environment.
PoolChat is a Swift package that provides fully encrypted, serverless group and private messaging, plus voice and video calling, over ConnectionPool networks. It sits on top of ConnectionPool and adds Curve25519 key agreement, AES-256-GCM message encryption, Trust-On-First-Use identity verification, rich message types, encrypted history persistence, calling UI, and ready-made SwiftUI views. It works with both local mesh pools and remote ConnectionPool topologies. No internet connection, no chat servers, no accounts, just devices communicating with end-to-end encryption.
Because chat should not require trusting a third party. Every mainstream messenger routes your messages through corporate servers, where they can be stored, analyzed, or handed over on request, even when "end-to-end encrypted." PoolChat removes the server entirely. Messages travel directly between devices over a local mesh network, encrypted before they leave the sender and decryptable only by the intended recipient. There is no metadata to harvest because there is no central point to collect it.
| Document | Contents |
|---|---|
| Features | Encryption, messaging, calling, and infrastructure capabilities |
| Architecture | Component layout, send and receive flows, package structure |
| Security | Encryption pipeline, TOFU, fingerprints, downgrade prevention, what relays can see |
| Installation | Swift Package Manager, XcodeGen, requirements |
| Quick Start | Configure, exchange keys, send a message, drop in the SwiftUI view |
| Configuration | PoolChatConfiguration, logger protocol, storage provider protocol |
| API Reference | Core, message, content, chat mode, and calling types, plus TOFU events |
- End-to-end encrypted: Curve25519 ECDH, HKDF-SHA256 derivation, AES-256-GCM authenticated encryption, applied before anything leaves the device
- No server, no account: messages move directly between devices over the ConnectionPool mesh, locally or through a remote pool
- Trust-On-First-Use identity: peer keys recorded on first contact, key changes surfaced as events, fingerprints available for out-of-band verification
- Encrypted at rest too: history persists through an injectable
SecureStorageProvider, and PoolChat never writes plaintext to disk - Rich messaging: text, images with metadata stripped, voice notes, emoji, polls, reactions, replies, @mentions, delivery status
- Voice and video calling: encrypted 1:1 and group calls with per-call media keys and ready-made call UI
- Drop-in UI:
PoolChatViewgives a complete cross-platform chat surface, or drivePoolChatViewModelyourself - Swift 6 strict concurrency: no data races, proper actor isolation,
Sendablethroughout
See Features for the complete list.
dependencies: [
.package(url: "https://github.com/Olib-AI/PoolChat.git", from: "1.5.0")
]PoolChat depends on ConnectionPool; SPM resolves it automatically. XcodeGen setup and platform requirements are in Installation.
import PoolChat
// Inject storage and logging once, at startup
PoolChatConfiguration.storageProvider = MySecureStorage()
PoolChatConfiguration.rejectUnencryptedMessages = true
// Then drop in the whole chat UI
struct ChatScreen: View {
@StateObject private var viewModel = PoolChatViewModel()
var body: some View {
PoolChatView(viewModel: viewModel)
}
}Key exchange, manual encryption, and payload construction are covered in Quick Start.
iOS 17.0+, macOS 14.0+, Swift 6.0+, Xcode 16+, and ConnectionPool. Details in Installation.
MIT License. Copyright (c) 2025 Olib AI. See LICENSE for the full text.
- Olib AI: package maintainer and StealthOS developer
- ConnectionPool: mesh network transport layer
- Apple CryptoKit: Curve25519, AES-GCM, HKDF primitives
Contributions are welcome. See CONTRIBUTING.md, and please ensure:
- Code compiles under Swift 6 strict concurrency
- All public APIs are documented
- Actor isolation is maintained for thread safety
- No use of
@preconcurrencyescape hatches - Encryption-related changes include a security rationale
If you discover a security vulnerability, please report it privately to security@olib.ai rather than opening a public issue. See SECURITY.md.