# π Secure Vault Web App
A secure, password-protected data vault web application built using **Streamlit**, enabling users to:
- Register and log in securely
- Store and retrieve sensitive information
- Encrypt/decrypt data with user-defined keys
- Prevent brute-force attacks with login throttling
- Ensure data confidentiality with AES encryption (Fernet)
---
## π Features
- π **User Authentication** with password hashing (PBKDF2 + SHA256)
- π§ **Strong Encryption** using Fernet symmetric cryptography
- π **Encrypted Data Vault** for each user
- π **Session Management** with timeouts and activity tracking
- π **Brute-force Protection** with lockout after 3 failed login attempts
- π‘ **Clean Streamlit UI** with tabs for login/register and sidebar navigation
- π **Dark mode compatible** (via Streamlit theme settings)
---
## π Project Structure
```bash
.
βββ app.py # Main Streamlit app
βββ secure_data/ # Encrypted data and salt storage
β βββ salt.key
β βββ vault.json
βββ README.md
βββ requirements.txt # necessary dependenciesMake sure you have Python 3.8+ installed.
git clone https://github.com/usama7871/Assignment-05.gitpython -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windowspip install -r requirements.txtExample
requirements.txt:
streamlit
cryptography
streamlit run app.pyAccess the app in your browser at http://localhost:8501.
- Encryption: AES (Fernet) using keys derived via PBKDF2-HMAC with 100,000 iterations
- Password Hashing: Secure SHA256 with salt
- Storage: Encrypted JSON vault in
secure_data/vault.json - Lockout Mechanism: After 3 failed attempts, login is disabled for 5 minutes
- Session Timeout: Auto logout after 10 minutes of inactivity
Perfect for:
- Developers learning about cryptography and secure apps
- Medical or research professionals protecting sensitive notes
- Personal journal/vault with strong encryption
Usama
3rd Year MBBS (ex), aspiring AI/ML and software engineer.
Interested in medical technology, AI for healthcare, and secure software systems.
This project is licensed under the MIT License. See LICENSE for details.