RSA-2048
a key pair per device
AES-GCM
a fresh key per message
Local cache
appointments load from sqflite
Pusher
realtime chat and push
Project context
Medical conversations that shouldn’t sit readable in a database
Shifaa is a co-developed university project that connects patients with their doctors: book a visit, then message the doctor directly about symptoms, results, and medication. Those messages are exactly what neither side wants stored in readable form.
HTTPS protects a message on the way to the server. It says nothing about the server itself. The project’s stronger goal is that the server can never read the conversation at all.


My role
Flutter Developer on a co-developed university project with several contributors.
The encryption layer and the appointment cache were co-developed across the team; my contribution list covers only the parts I owned.
My contribution
My work focused on the patient-facing flows and the chat experience:
- Authentication and onboarding.
- Booking flows and doctor profiles.
- Rescheduling and cancellation.
- Chat UI, message handling, and chat-related user flows.
Engineering challenge
Keeping medical messages unreadable to the server
The project uses a per-device 2048-bit RSA key pair. The private key stays in secure on-device storage and never leaves the phone.
Each message is encrypted with a fresh AES-GCM key, and that key is wrapped with the recipient’s public key using RSA-OAEP before sending. The server only relays encrypted payloads over Pusher Channels, and heavy decryption work runs in compute() on a separate isolate so the UI stays responsive.


How it works
What the project does on the device
Keys stay on the device
Each device generates its own RSA key pair; the private key lives in flutter_secure_storage and is never sent to the server.
One key per message
A fresh AES-GCM key encrypts every message and is wrapped with RSA-OAEP for the recipient, so the server only ever sees ciphertext.
Cache, then refresh
Appointments load from a local sqflite cache and refresh in the background, so a slow network doesn’t block the list.
What’s implemented, and what isn’t yet
Encrypted chat and appointment caching are implemented; treatment plans and some notification paths remain UI-first — the screens exist, but they aren’t yet backed by a live service.
Those are the first things the project would need to finish before it could be considered production-ready.
Stack
- Flutter
- Cubit + Provider
- dartz Either
- sqflite
- flutter_secure_storage
- pointycastle
- Pusher Channels
- Pusher Beams
- get_it
