Security at AI-Doktor.ch
Statically compiled Go binary with a dedicated non-root system service, hardened systemd sandbox & XChaCha20-Poly1305 envelope encryption.
1. Mandatory 2-Step Email Login
Every sign-in requires a password (Argon2id) plus a session-bound 6-digit one-time code via DKIM-signed email (valid 10 min., 5-attempt limit) and optional TOTP authenticator 2FA.
2. 256-Bit Profile Encryption
Each health profile receives its own random 256-bit DEK (XChaCha20-Poly1305 AEAD). All sensitive text fields are encrypted with profile- and column-bound AAD.
3. Zero-Plaintext Document Vault
Doctor letters, lab reports, and images are stored via XChaCha20-Poly1305 secretstream (64-KiB chunks) as .enc files and securely overwritten upon download cleanup or crypto-shredding.
4. Isolated Non-Root AI Gateway, Emergency Filter & PII Protection
Local Tesseract OCR & local image analysis (MedGemma 2) on our dedicated EU server; fast text answers via an isolated non-root service (aidoktor-ai, kernel SO_PEERCRED, zero tool or filesystem access) with automatically pre-anonymized text excerpts via Google Gemini. A deterministic pre-filter blocks acute emergencies; shared PII redaction masks standard personal identifiers (known names, salutations, name fields, doctor/clinic titles, and street/postal addresses) in messages, reports, and profile fields and strips image metadata before every request (without a 100% guarantee for unmarked free-text names — please avoid unnecessary real names).