A comprehensive cryptographic toolkit demonstrating essential security operations including file hashing, encryption/decryption, and password management.
- File Integrity Verification - Hash files using SHA-256 and compare to detect modifications
- AES Encryption/Decryption - Symmetric encryption for secure data protection
- RSA Encryption/Decryption - Asymmetric encryption for public-key cryptography
- Password Management - Securely hash and verify passwords with industry-standard algorithms
- Interactive CLI - User-friendly command-line interface for all cryptographic operations
- Python 3.x
- cryptography - Industry-standard cryptographic library
- bcrypt - Secure password hashing
- zxcvbn - Password strength estimation
See requirements.txt for complete dependencies:
bcrypt==5.0.0
cffi==2.0.0
cryptography==46.0.3
pycparser==2.23
zxcvbn==4.5.0
- Clone the repository:
git clone https://github.com/juniorssignature21/cryptography-with-python.git
cd cryptography-with-python- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtRun the application:
python main.pyOnce launched, you'll see the following options:
Select an option:
1. Hash a file
2. Verify file integrity
3. AES Encrypt/Decrypt
4. RSA Encrypt/Decrypt
5. Password manager
0. Exit
Hash a File:
Enter file path: sample files/circle.svg
SHA hash file is: [SHA-256 hash]
Verify File Integrity:
Enter file path 1: sample files/circle.svg
Enter file path 2: sample files/circle.svg
File is intact no modification have been made
AES Encryption:
Enter message: Hello, World!
AES Key: [generated key]
AES ciphertext: [encrypted data]
AES plaintext: [decrypted message]
RSA Encryption:
Enter a message: Secret message
[RSA encrypted and decrypted output]
Password Manager: Securely hash and verify passwords with strength analysis.
cryptography-with-python/
├── main.py # Main application entry point
├── modules/
│ ├── hash.py # File hashing and integrity verification
│ ├── encryption.py # AES and RSA encryption/decryption
│ └── password.py # Password management utilities
├── sample files/
│ ├── circle.svg # Test SVG file for integrity verification
│ └── shapes.svg # Test SVG file for integrity verification
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Git ignore rules
For production use, please:
- Conduct proper security audits
- Follow industry security best practices
- Implement additional security measures
- Consider using established, battle-tested libraries
- Implement proper key management strategies
This project demonstrates:
- Hashing: SHA-256 algorithm for file integrity
- Symmetric Encryption: AES (Advanced Encryption Standard)
- Asymmetric Encryption: RSA public-key cryptography
- Password Security: Bcrypt hashing and ZXCVBN strength validation
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is open source and available under the MIT License.
juniorssignature21
Happy Encrypting! 🔒