Repository: file-encryption-repo
Purpose: A simple Python script to encrypt and decrypt files securely using cryptography.fernet.
Perfect for cybersecurity learning and demos 🚀
- Generate a secure Fernet encryption key (only once).
- Encrypt and decrypt any file (text, images, docs).
- Key stored in
encryption_key.key. - CLI prompts for user-friendly interaction.
encryptingfile.py→ main scriptREADME.md→ this documentationrequirements.txt→ dependenciesLICENSE→ MIT license.gitignore→ ignore unnecessary filesSECURITY.md→ security warnings & recommendationsINSTALL.md→ setup and usage guideCONTRIBUTING.md→ guidelines for contributing
- Install Python 3.8+
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python encryptingfile.py
Do you want to encrypt or decrypt? (e/d): e
Enter the filename (with extension): secret.txt
File 'secret.txt' encrypted successfully.
Do you want to encrypt or decrypt? (e/d): d
Enter the filename (with extension): secret.txt
File 'secret.txt' decrypted successfully.
- This repo is for educational purposes only.
- Key management is critical. If
encryption_key.keyis stolen, files can be decrypted. - Use advanced key storage (HSM, vaults) in production.
- Add file integrity checks (MAC) for stronger protection.
See SECURITY.md for details.
- Add password-based key derivation (PBKDF2 / Argon2).
- Add GUI (Tkinter / PyQt).
- Add drag-and-drop support.
- Integrate with cloud storage encryption.
MIT License — see LICENSE.
Made with ❤️ for Cybersecurity Education