A Secure Digital Identity Vault & Verification System
Vaulty is a privacy-first identity document management platform that enables citizens to securely store, share, and verify their identity documents using end-to-end encryption and role-based access control.
| Feature | Implementation |
|---|---|
| Single-Factor Auth (SFA) | Password-based login with Argon2 hashing (memory-hard, GPU-resistant) |
| Multi-Factor Auth (MFA) | Email OTP verification required after password authentication |
| Session Management | JWT tokens with HS256 signing and 30-minute expiry |
| Role | Permissions |
|---|---|
| Citizen | Upload documents, approve/reject access requests |
| Verifier | Request access, view documents (only if approved) |
| Admin | View system-wide audit logs |
| Purpose | Algorithm |
|---|---|
| File Encryption | AES-256-GCM (authenticated encryption with 12-byte nonce) |
| Key Exchange | RSA-2048 OAEP (asymmetric encryption for sharing DEKs) |
| Digital Signatures | RSA-PSS with SHA-256 (non-repudiation) |
| Integrity Verification | SHA-256 file hashing |
Document Flow:
- Generate random AES-256 key (DEK)
- Encrypt document with DEK using AES-256-GCM
- Encrypt DEK with owner's RSA public key
- Sign document hash with owner's RSA private key
- On share: re-encrypt DEK with verifier's public key
| Attack | Defense |
|---|---|
| Brute Force | Argon2 slow hashing + login failure logging |
| SQL Injection | SQLAlchemy ORM (parameterized queries) |
| Packet Sniffing | RSA-encrypted key exchange |
| Replay Attack | JWT expiry + AES-GCM nonce |
| Privilege Escalation | Server-side role verification |
| Data Breach | Files encrypted at rest (AES-256) |
| Tampering | Digital signatures + hash verification |
All security events are logged including:
- Login success/failure (with IP address)
- MFA verification attempts
- Document upload, view, share events
- Access request approvals/rejections
- Integrity check failures
Backend: FastAPI, SQLAlchemy, Argon2, PyOTP, Cryptography, Python-Jose
Frontend: React 19, Vite, Tailwind CSS
See SECURITY_REPORT.md for complete security documentation.
cd backend
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/Mac
pip install -r requirements.txt
echo "SECRET_KEY=your-secret-key" > .env
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run devAccess the app:
- Frontend: http://localhost:5173
- API Docs: http://localhost:8000/docs