A lightweight, secure file encryption and decryption utility built with Python and the cryptography library. This project allows users to vault sensitive files using AES-256 (Fernet) symmetric encryption.
- Strong Encryption: Uses AES-256 bit encryption via the Fernet implementation.
- Automated Key Management: Generates and manages a
secret.keyfor secure access. - Easy Interface: Designed for quick file uploads and processing.
- File Integrity: Ensures files remain encrypted and unreadable without the specific generated key.
Ensure you have Python installed, then install the necessary dependency:
pip install cryptography- Generate a Key: Run the initialization script to create your
secret.keyfile. Important: Backup this file; if lost, your data cannot be decrypted. - Encrypt a File: Provide the file path to the encryption function. It will produce a
.encryptedversion of your file. - Decrypt a File: Use the decryption function with your
secret.keyto restore the original file content.
This project utilizes the Fernet module which guarantees that a message encrypted using it cannot be manipulated or read without the key. It uses:
- AES in CBC mode with a 128-bit key for encryption.
- HMAC with SHA256 for authentication.
Never share your secret.key. Do not commit your secret.key to public version control systems like GitHub.