
PROJECT
| Unnathi R B | AUTHOR | ACTIVE |
| Varsha Shubhashri.M | COORDINATOR | ACTIVE |

Individuals increasingly store personal documents (identity proofs, certificates, medical records) online. While convenient for job applications and financial processes, this creates risks of unauthorized access, data exposure, and fraud. Users lack secure, privacy-focused document management with strong protection and control.
Students, job seekers, professionals, and families needing secure storage of identity proofs, certificates, and medical records with privacy protection during banking, healthcare, and job verification processes.
DocLok is a cloud-based document vault that detects and masks sensitive data, encrypts documents before upload, verifies file integrity, and implements multi-layer authentication to ensure documents remain private, tamper-proof, and user-controlled.
Unlike platforms focusing on storage and sharing, DocLok prioritizes content protection with encryption-first architecture at every stage.
AES-256 operates on 128-bit data blocks with 256-bit key size and 14 rounds. Each round performs SubBytes (substitution), ShiftRows (row shifting), MixColumns (column mixing), and AddRoundKey operations, ensuring highly randomized and secure output.
Key Generation: Derived from user password + random salt using PBKDF2 KDF. Salt randomly generated per file, stored with metadata. Same password generates different keys per file; prevents brute-force attacks.
Decryption: User enters password → system retrieves salt → regenerates key via KDF → decrypts file
Password Recovery: Recovery key generated at encryption and provided to user. If both password and recovery key lost, documents become permanently inaccessible. Ensures encryption keys never stored, giving users complete control and preventing unauthorized access even after system breach.
SHA-256 generates unique hash stored with metadata. During retrieval: fetch file → recompute hash → compare with stored hash. Mismatch indicates file tampering.
Primary Authentication: Password-based login with OTP (sent to email/mobile) enforced at every login for continuous identity verification. Password also derives encryption key via secure KDF.
Secondary Authorization: PIN required for upload, view, and download operations. Acts as secondary authentication within active session with limited incorrect attempt protection.
Backend: Python with Streamlit. Handles file upload, preprocessing (OpenCV), OCR, sensitive data masking, AES-256 encryption, and SHA-256 hashing. Event-driven execution; extensible to Flask/FastAPI.
Frontend: Streamlit interface with file upload, document preview, and secure download options. Triggers backend processing based on user actions.
AWS S3: Stores encrypted documents with controlled access policies and unique object paths.
MongoDB: Maintains metadata (File ID, User ID, Hash, Salt, S3 path) for efficient management.
Hybrid Approach: Encrypted files in S3, metadata in MongoDB. Upload: process, encrypt, store file in S3 + metadata in MongoDB. Access: retrieve metadata, fetch encrypted file, verify hash, decrypt.
Navigation: Dashboard, Upload Document, My Documents, Security Settings, Profile, Logout
Main Dashboard: Total documents, recent activity, storage usage, security status
Upload Section: File upload, PIN required, processing/success status
My Documents: File list with details, View/Download/Delete actions (PIN required)
Security: PIN management, indicators for Encrypted/Verified/Tampered status
Deploy via Streamlit Cloud from GitHub repository. Frontend and backend run in single environment with encrypted documents in S3. Cost-effective and suitable for small-scale usage and demonstration.
Development/Testing: OCR & Processing (free), Streamlit Cloud (free), AWS S3 (₹2-5/month), Data Transfer (₹0-30/month) = ₹50-60/month
Scaling (100 users, 50MB/user avg): Storage (₹10/month), Requests (₹80-100/month) = ₹80-150/month
Secure, privacy-focused document storage with protection against unauthorized access, tamper-proof verification, and increased trust in digital document handling.
Requires internet connectivity; slight processing delay due to security operations.
Month 1: System setup, document upload/preprocessing, OCR integration
Month 2: Sensitive data detection/masking, AES encryption, hashing implementation
Month 3: Frontend development, AWS S3 integration, authentication, testing, deployment