SHAES is a lightweight Python script for encrypting and decrypting files using AES encryption in CBC mode.
- Encryption: Securely encrypt files with a password.
- Decryption: Decrypt previously encrypted files.
- Error Handling: Alerts for incorrect passwords, non-encrypted files, or missing files.
- Lightweight: Minimal dependencies and easy to use.
Ensure you have Python 3 installed along with the required library:
pip install pycryptodome
-
Clone the repository:
git clone https://github.com/stigsec/SHAES.git
-
Navigate to the project directory:
cd SHAES
python shaes.py {enc/dec} {input_file} {password}
python shaes.py enc myfile.txt mypassword
This will create an encrypted file named myfile.txt.shase
.
python shaes.py dec myfile.txt.shase mypassword
This will create a decrypted file named myfile.txt
.
- Key Derivation: Uses SHA-256 to derive a secure key from the provided password.
- AES Encryption: Encrypts data using AES in CBC mode with a randomly generated initialization vector (IV).
- Padding: Ensures data alignment with AES block size using PKCS7 padding.
- Error Handling: Detects invalid files or decryption attempts with incorrect passwords.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Developed by stigsec.