RISALA
رسالة — encrypted internal team messaging that runs on the local network only. Every message arrives, and none of them leaves.
OVERVIEW
رسالة / RISALA is an internal team messaging application that runs on the local network only. Direct and group conversations, images and file sharing, an account per employee — with every message and attachment encrypted at rest.
The premise is one line: every message arrives, and none of them leaves. Team messages stay encrypted inside the organisation's own network and never travel outside it.
THE SEARCH PROBLEM WORTH SOLVING
Encrypting messages at rest is straightforward. Searching them afterwards is where the design gets interesting: decrypting every message on every query does not scale, and storing the words in clear text undoes the encryption entirely.
Instead, each message stores truncated HMAC-SHA256 fingerprints of its words, keyed from the master key — not the words themselves. Someone who holds the database without the key can see which messages share a word, but not what that word is. The index is built for old messages in batches at startup, and rebuilt when the key is rotated.
SECURITY DESIGN
WHAT IT DOES AS A CHAT APP
- Search that understands Arabic: ignores diacritics, tatweel, hamza forms, letter variants, and the definite article — across every conversation, grouped by chat, jumping to the exact message.
- Conversation tools: replies, @mentions that pierce a muted chat, reactions, pinned messages, forwarding to up to ten chats with each file re-encrypted under its own id, and voice messages with a waveform measured once by the sender.
- Read state: double-check marks in direct chats, “read by N” with names in groups.
- Notifications: in-app cards that persist until acted on and support replying without opening the chat, plus desktop notifications with an option to hide message text on a shared screen.
- Admin side: announcements to everyone or a selected group, an announcement mode that makes a group read-only, retention policy, open-registration toggle, and a one-time join code stored only as a fingerprint.
OPERATIONS
WHERE THE MODEL STOPS
Whoever controls the server and its key can read the messages. End-to-end encryption is not enabled in this version, and the README says so rather than letting the word “encrypted” imply more than it delivers. The threat model this design actually covers is a stolen database file or a stolen disk — not a compromised server.