A Simple Python Password Manager with Encryption
Authors: Omar Khouja & Juan Carlos Lazo
Course: ReDI School Python Foundations - Hamburg
Date: November 2025
Submission Deadline: December 8, 2025
| Name | Role | Contributions |
|---|---|---|
| Omar Khouja | Lead Developer | Password generator, encryption logic, file handling |
| Juan Carlos Lazo | Co-Developer | Strength checker, menu design, testing & documentation |
SecurePass is a command-line password manager that helps users:
- Generate strong, random passwords
- Check password strength (scoring 0-100)
- Store passwords securely with encryption
- Manage passwords (add, view, search)
All in ONE simple file - perfect for Python Foundations!
- People use weak passwords like "123456" or "password"
- Hard to remember unique passwords for each account
- No secure place to store them
- Risk of account breaches
SecurePass helps users:
- β Generate strong passwords automatically
- β Check if their passwords are secure
- β Store passwords encrypted with a master password
- β Easily find passwords when needed
# No installation needed! Just run:
python simple_password_manager.pyRequirements:
- Python 3.8 or higher
- No external libraries needed (uses only Python standard library)
Generate strong random passwords with:
- Customizable length (8-128 characters)
- Mix of uppercase, lowercase, digits, and special characters
- Guaranteed to include at least one of each character type
Example:
Generated: kT8@mP3!xR5z [Strong]
Evaluates password security based on:
- Length (longer is better)
- Character variety (uppercase, lowercase, digits, special)
- Common patterns (detects weak passwords)
Scoring System:
- 0-39: Weak
- 40-59: Medium
- 60-79: Strong
- 80-100: Very Strong
- All passwords encrypted before saving
- Uses master password for encryption
- XOR encryption with SHA-256 key derivation
- Base64 encoding for safe file storage
- Add new passwords with website/username
- View all stored passwords
- Search by website or username
- Change master password securely
- Simple, intuitive menu interface
1. Master Password β SHA-256 Hash β Encryption Key
2. Password Data β XOR Encryption β Encrypted Data
3. Encrypted Data β Base64 Encoding β Save to File
1. Read File β Base64 Decode β Encrypted Data
2. Master Password β SHA-256 Hash β Decryption Key
3. Encrypted Data + Key β XOR Decryption β Original Data
Security Note: This is educational-level encryption. For production use, consider professional tools like Bitwarden or 1Password.
SecurePass/
βββ simple_password_manager.py β Main program (about 300 lines)
βββ passwords.txt β Encrypted storage (auto-created)
That's it! Just ONE file - simple and effective.
MENU:
1. Generate new password β Create strong random passwords
2. Check password strength β Test any password's security
3. Add password to vault β Store a new password
4. View all passwords β Display all saved passwords
5. Search password β Find specific entry
6. Change master password β Update your master password securely
7. Exit β Close program securely
Choose (1-6): 1
Password length (default 16): 12
Generated passwords:
1. aB3!xY9@kL2m [Strong - 85/100]
2. pQ7&mN4$wE5z [Strong - 80/100]
3. hR6%cV8!tU3x [Very Strong - 90/100]
4. kF5@tM2!pX9r [Strong - 80/100]
5. wN8#qL4$vC6z [Very Strong - 95/100]
Choose (1-6): 2
Enter password to check: MyPass123
Strength: Strong (Score: 75/100)
Feedback:
- Good length (9 characters)
- Contains uppercase β
- Contains lowercase β
- Contains digits β
- Missing: special characters
Choose (1-6): 3
Website/App: gmail.com
Username: juan.carlos@gmail.com
1. Generate new password
2. Enter my own password
Choose (1/2): 1
Generated: kT8@mP3!xR5z
Strength: Very Strong (95/100)
β Password saved successfully!
Choose (1-6): 4
--- ALL PASSWORDS ---
1. gmail.com
Username: juan.carlos@gmail.com
Password: kT8@mP3!xR5z
2. github.com
Username: okhouja
Password: Xp9#kR5@mT2z
Total: 2 passwords stored
Omar's Focus:
- β Functions & Modular Design
- β File I/O (reading/writing)
- β Encryption Basics (hashing, XOR)
- β Random Module
- β String Manipulation
Juan Carlos's Focus:
- β Conditional Logic
- β Loops (while, for)
- β Data Structures (lists, dictionaries)
- β User Input/Output
- β Testing & Validation
Together We Learned:
- π Working as a team
- π Code organization
- π Problem-solving
- π Security best practices
- π User experience design
def generate_password(length=16):
"""Generate strong random password"""
# Mix character types
# Ensure at least one of each
# Shuffle for randomnessdef check_password_strength(password):
"""Calculate password strength score"""
# Check length, variety, patterns
# Return score and ratingdef simple_encrypt(text, master_password):
"""Encrypt data with master password"""
# SHA-256 key derivation
# XOR encryption
# Base64 encodingdef save_passwords(passwords, master_password):
def load_passwords(master_password):
"""Handle encrypted file storage"""def change_master_password(passwords, old_master_password):
"""Change master password and re-encrypt data"""
def main():
"""Interactive menu system"""
# Load passwords
# Display menu (7 options)
# Handle user choicesTotal: ~235 lines of clean, well-commented code
β Master Password Protection
- All data encrypted with user's master password
- Password never stored (only hash used for verification)
β Encrypted Storage
- XOR encryption with SHA-256 key derivation
- Base64 encoding for safe file storage
- Cannot read passwords.txt without master password
β Password Input Masking
- Uses
getpassmodule to hide password input - Prevents shoulder surfing
β No Plain Text Storage
- All passwords encrypted before saving
- Decrypted only in memory when accessed
- Choose a strong master password (at least 12 characters)
- Never forget it! Cannot be recovered if lost
- All your passwords depend on it
- Regularly backup
passwords.txtfile - Keep backup secure (it's encrypted)
- Without master password, backup is useless
This is an educational project demonstrating:
- Python programming concepts
- Basic encryption principles
- File handling and data structures
For real-world use, we recommend professional password managers like:
- Bitwarden (open source)
- 1Password
- LastPass
- KeePass
Ideas for improvement (post-course):
- Delete/Update password functionality
- Password categories/tags
- Export to CSV
- Password expiry reminders
- Strength requirements customization
- GUI interface (Tkinter)
- Cloud sync (Supabase)
- Browser extension
- Mobile app
We tested the program with:
- β Various password lengths (8-64 characters)
- β Different character combinations
- β Empty/invalid inputs
- β Wrong master passwords
- β Multiple save/load cycles
- β Large password databases (50+ entries)
All tests passed successfully!
| Metric | Value |
|---|---|
| Lines of Code | ~235 |
| Functions | 6 main functions |
| Development Time | 2 weeks |
| Team Size | 2 people |
| Python Version | 3.8+ |
| Dependencies | 0 (standard library only) |
We presented this project at ReDI School Hamburg untill December 8, 2025.
Presentation Structure:
- Introduction (Omar) - Problem statement
- Demo (Both) - Live demonstration
- Code Explanation (Juan Carlos) - Key functions
- Learning Outcomes (Omar) - What we learned
- Q&A (Both) - Answer questions
Duration: 5 minutes
Tools Used: Gamma.ai for slides
- Location: Hamburg, Germany
- Background: Full Stack Development
- GitHub: github.com/okhouja
- LinkedIn: omar-khouja
- Focus: Backend development, security, DevOps
- Location: Hamburg, Germany
- Background: Data Analytics
- Focus: Python programming, testing, documentation
- ReDI School Hamburg - For the Python Foundations course
- Our Instructors - For guidance and support
- Our Classmates - For feedback and collaboration
- Open Source Community - For inspiration and learning resources
This project is created for educational purposes as part of the ReDI School Python Foundations final project.
Feel free to use, modify, and learn from this code!
For questions or feedback:
- Email: omar0940@gmail.com
- GitHub Issues: Report here
Built with β€οΈ in Hamburg
ReDI School Python Foundations - November 2025
- Download
simple_password_manager.py - Run:
python simple_password_manager.py - Enter a master password (remember it!)
- Start managing your passwords securely!
That's it! Simple, secure, and effective.
Last Updated: November 17, 2025
Version: 1.1
Status: β
Ready for submission