Skip to content

usama7871/Assignment-05

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

# πŸ” 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 dependencies

πŸ› οΈ Installation

Make sure you have Python 3.8+ installed.

1. Clone this repo

git clone https://github.com/usama7871/Assignment-05.git

2. Create a virtual environment (optional but recommended)

python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

3. Install dependencies

pip install -r requirements.txt

Example requirements.txt:

streamlit
cryptography

πŸ§ͺ Running the App

streamlit run app.py

Access the app in your browser at http://localhost:8501.


πŸ›‘οΈ Security Overview

  • 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

🧠 Use Case

Perfect for:

  • Developers learning about cryptography and secure apps
  • Medical or research professionals protecting sensitive notes
  • Personal journal/vault with strong encryption

πŸ§‘β€πŸ’» Author

Usama
3rd Year MBBS (ex), aspiring AI/ML and software engineer.
Interested in medical technology, AI for healthcare, and secure software systems.


πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.

Releases

No releases published

Packages

No packages published

Languages