Local-first, end-to-end encrypted messaging with a stateless backend. No server-side storage ever.
ShadowCrypt/
βββ backend/ # Go Blind Relay Server
β βββ cmd/blindrelay/
β β βββ main.go # Entry point
β βββ pkg/
β β βββ server/ # WebSocket & HTTP
β β βββ routing/ # Message router (blind relay)
β β βββ session/ # Session manager (ephemeral RAM)
β β βββ crypto/ # Signature verification
β βββ go.mod
β βββ BUILD_AND_DEPLOY.md
β βββ README.md
β
βββ frontend/ # Flutter Encrypted Vault
β βββ lib/
β β βββ main.dart # Vault unlock UI
β β βββ data/
β β β βββ database/ # Drift + SQLCipher
β β β βββ models/ # Data classes
β β βββ crypto/ # Cryptography
β β β βββ key_management.dart # BIP-39, PBKDF2, AES-256
β β β βββ signal_protocol.dart # Double Ratchet
β β βββ ui/ # Screens
β βββ pubspec.yaml
β βββ BUILD_AND_TEST.md
β βββ README.md
β
βββ ARCHITECTURE.md # Detailed system design
βββ CRYPTOGRAPHIC_ANALYSIS.md # Security & threat model
βββ README.md # This file
βββ .gitignore
cd backend
# Install dependencies
go mod download
# Run locally
go build -o blindrelay ./cmd/blindrelay
./blindrelay -addr=:8080
# Or with Docker
docker build -t shadowcrypt-blindrelay .
docker run -p 8080:8080 shadowcrypt-blindrelayAvailable endpoints:
ws://localhost:8080/ws- WebSocket messaginghttp://localhost:8080/health- Health checkhttp://localhost:8080/metrics- Real-time server metrics
cd frontend
# Install dependencies
flutter pub get
# Generate Drift code
flutter pub run build_runner build
# Run on Windows desktop
flutter run -d windows
# Or build release
flutter build windows --releaseFirst-time setup:
- Run app β "Create New Vault"
- Save 12-word mnemonic
- App initializes SQLCipher database
- Vault ready to use
Existing vault:
- Run app β "Unlock Vault"
- Enter 12-word mnemonic
- AES-256 key derived β database unlocked
- All messages load from encrypted local storage
| Feature | Implementation | Status |
|---|---|---|
| Zero-Knowledge Relay | Blind routing, no message storage | β Complete |
| Forward Secrecy | Signal Protocol Double Ratchet | β Core logic |
| Local Encryption | AES-256-GCM with SQLCipher | β Complete |
| Post-Quantum | X25519 + ML-KEM-768 hybrid | |
| Recovery Phrase | BIP-39 mnemonics (12 words) | β Complete |
| Message Integrity | HMAC-SHA256, Ed25519 signatures | β Core ready |
| Delta-Sync | Load 20 messages at once | β Designed |
| No Persistence | Server restarts = all data vanishes | β Verified |
- ARCHITECTURE.md - Detailed system design & protocol
- CRYPTOGRAPHIC_ANALYSIS.md - Handshake flows, threat model, security analysis
- backend/BUILD_AND_DEPLOY.md - Backend building, testing, deployment on Koyeb
- frontend/BUILD_AND_TEST.md - Flutter building, testing, Windows optimization
To use the SVG logo as a favicon for the Go backend monitoring endpoints, generate a 256x256 favicon.ico from frontend/assets/logo/double_ratchet_logo_no_text.svg and serve it from /favicon.ico.
Example Go route:
mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/x-icon")
http.ServeFile(w, r, "static/favicon.ico")
})Then browsers visiting /health or /ready will show the logo in the tab during monitoring.
cd backend
go test ./... -v -coverCoverage:
- Session manager (registration, expiration, cleanup)
- Message routing (blind delivery, queue management)
- Packet validation (reject malformed messages)
cd frontend
flutter test --verboseCoverage:
- BIP-39 mnemonic generation & validation
- PBKDF2-SHA256 key derivation
- Signal Protocol ratcheting (KDF_CK, KDF_RK)
- SQLCipher encryption/decryption
- Language: Go 1.21+
- Transport: WebSockets (RFC 6455)
- Crypto: Standard library (Ed25519, SHA-256) + PointyCastle (external keys)
- Deployment: Docker on Koyeb (free tier)
- Framework: Flutter 3.10+
- Language: Dart 3.0+
- Database: Drift ORM + SQLCipher (AES-256)
- Crypto:
cryptographypackage (PBKDF2, AES-GCM, HMAC) - Key Recovery:
bip39package (BIP-39 mnemonics) - Storage:
flutter_secure_storage(secure OS keychain)
- Hashing: SHA-256, SHA-512
- Symmetric: AES-256-GCM
- Asymmetric: Ed25519 (identity), X25519 (ECDHE)
- Post-Quantum: ML-KEM-768 (key encapsulation mechanism)
- KDF: PBKDF2-SHA256 (100,000 iterations)
- MAC: HMAC-SHA256
- Protocol: Signal Protocol Double Ratchet
- Go Blind Relay Server (stateless roaming)
- WebSocket message routing
- Ephemeral session storage (RAM only)
- Flutter SQLCipher vault
- BIP-39 mnemonic recovery
- AES-256 key derivation
- Client-side Signal Protocol implementation
- WebSocket client in Flutter
- Message sending/receiving UI
- Contact exchange protocol
- End-to-end cryptographic testing
- Post-quantum ML-KEM integration
- Backup & restore mechanism
- Multi-device support
- Group messaging
- Platform builds (iOS, Android, web)
# Default
./blindrelay
# Custom configuration
./blindrelay \
-addr=0.0.0.0:8080 \
-session-timeout=60m \
-cleanup-interval=5mEdit lib/main.dart:
const dbPath = "/data/local/shadowcrypt.db";
await VaultDatabase.initialize(
mnemonic: userMnemonic,
dbPath: dbPath,
);- Run server with
lsof -p $(pgrep blindrelay)- no.dbfiles - Restart server - all user data erased
- Check process memory - < 50MB with 100 connections
- Monitor disk writes - WebSocket and sockets only, no files
- Inspect database file: unreadable without correct mnemonic
- Change one character in mnemonic β decryption fails
- Messages stored as AES-256-GCM ciphertext
- Remove SQLite CLI, can't read database file
| Issue | Workaround | Priority |
|---|---|---|
| ML-KEM-768 integration pending | Framework supports, needs liboqs binding |
Medium |
| Delta-Sync UI not yet built | Core database queries ready | Medium |
| Signal Protocol testing incomplete | Ratcheting logic present, needs end-to-end test | High |
| iOS/Android support | Desktop-first, Flutter supports all platforms | Low |
This is a reference implementation for learning. To extend:
- Add ML-KEM-768: Integrate
oqs-rsorliboqsbindings - Implement Group Messaging: Extend Signal Protocol for N parties
- Backup System: Implement encrypted backup export/import
- UI Polish: Build production-grade messaging UI
- Security Audit: Third-party cryptographic audit
- Signal Protocol: https://signal.org/docs/
- BIP-39: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
- Double Ratchet RFC: https://doubleratche.io/
- X25519: RFC 7748
- ML-KEM-768: NIST FIPS 203
- SQLCipher: https://www.zetetic.net/sqlcipher/
- Drift ORM: https://drift.simonbinder.eu/
ShadowCrypt is a reference implementation for educational purposes.
- Not audited by security professionals
- Not suitable for production without extensive testing
- Cryptographic primitives are standard (Signal, PBKDF2, AES-256)
- Always use TLS/HTTPS in production (not included)
- Always verify contact public keys out-of-band
Use at own risk.
AGPLv3 - See LICENSE file
Aarav (A Solo Engineer)
Last Updated: April 7, 2026
Version: 0.1.0
Status: Foundation Phase Complete