This project is a Streamlit web application that allows users to register, log in, and securely store/retrieve data using Fernet encryption. It was developed as a class project for GIAIC on April 08, 2025.
- User registration and login with username/password authentication (password strength enforced).
- Securely stores data using Fernet encryption with a user-provided passkey.
- Retrieves data by decrypting with the correct passkey.
- Limits users to 3 failed decryption attempts before requiring re-login.
- Persists data and user credentials in JSON files (
data.json
andusers.json
). - Includes logout functionality and logging for debugging.
- User-friendly interface with loading spinners, input validation, and custom styling.
- Open the app at [insert Streamlit Cloud URL here].
- Register: Create a username and password (at least 8 characters, 1 uppercase, 1 number).
- Login: Log in with your credentials to access the system.
- Navigate using the sidebar:
- Store Data: Enter text and a passkey to encrypt and save your data.
- Retrieve Data: Enter the encrypted data and passkey to decrypt and view your data.
- Logout: Log out to end your session.
- After 3 failed decryption attempts, you’ll be logged out and must log in again.
- Uses Fernet (symmetric encryption) from the
cryptography
library. - Hashes passkeys and passwords using SHA-256.
- Enforces password strength during registration.
- Limits failed attempts (both login and decryption) to 3 before requiring re-login.
- Stores data in-memory and persists it to JSON files (excluded from Git).
- Logs user actions and errors to
app.log
.
- Single-user system; all data is stored in a shared dictionary (multi-user support could be added).
- Fernet key is stored in session state; in production, it should be stored securely (e.g., in an environment variable).
- No time-based lockout for failed attempts (could be added for production).
- Clone the repository:
git clone https://github.com/your-username/your-repo.git cd Secure-data-encryption-system
- Install dependencies:
pip install -r requirements.txt
- Run the app:
streamlit run app.py