This document describes a File Encryption and Decryption Utility implemented in Python. This utility enables users to securely encrypt and decrypt files using a password-derived key. The utility leverages the cryptography library, which provides a robust framework for implementing AES (Advanced Encryption Standard) encryption.
The utility allows users to:
This utility is useful for securing sensitive data in environments where file access may not be fully controlled.
To run this script, you need:
Python 3.x cryptography library: You can install it using:
pip install cryptography
The Python script is structured as follows:
Function: generate_key
The generate_key function generates a 256-bit encryption key from a user-provided password using PBKDF2, a password-based key derivation function. This function ensures that the password is securely transformed into a key suitable for AES encryption.