Authors: Quincy Conduff, Scott Payne, Colin Conduff
- Python version 3 (~3.5 should be fine)
- Tkinter version 8.5 (should be included with python)
python3 aes_gui.py
- Select desired key length by clicking a radio button next to 128, 192, or 256.
- Click
Gen. Key
button - Select AES mode
a. For ECB AES mode, selectECB
radio button
b. For CBC AES mode, selectCBC
radio button and clickGen. IV
button - In
File Path
textbox: enter in full file path to file that you would like to encrypt
Example:/Users/username/Desktop/test.png
Note: IfOut Directory
input is empty, the program will create an encrypted file with.enc
appended to the end (e.g. test.png.enc). - Click
Encrypt
button - After encryption has finished, change File Path input to the file path to the encrypted file.
Example:/Users/username/Desktop/test.png.enc
Note: IfOut Directory
input is empty, will overwrite original input file (e.g. test.png). - Click the
Decrypt
button
python3 aes_gui.py
- In
File Path
textbox: enter in full file path to file that you would like to encrypt
Example:/Users/username/Desktop/test.png
Note: IfOut Directory
input is empty, the program will create an encrypted file with.enc
appended to the end (e.g. test.png.enc). - Select checkbox next to
Config
textbox.
Note: This disables entry intoKey
andInitialization Vector
fields. - In
Config
textbox: enter in full file path to file that hasJSON
configuration settings.
Example:/Users/username/Desktop/test.png.conf
Note: IfConfig
input is empty, the program will create a configuration file with given settings uponEncrypt
ion. The file path for theConfig
will be the inputFile Path
with '.conf' appended (e.g. test.png.conf). - Click
Encrypt
button
Note: If theKey
orInitialization Vector
fields are empty, then they will be generated automatically when necessary.
Note: Decrypt
will fail when Config
is enabled, but no Config
file is found or the file is ill formatted.
{
"mode": "ecb",
"key-size": 16, // key size in bytes
"key": xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, // key in hex string format (leading 0x can be omitted)
// "iv": xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, not necessary for ecb mode
}
python3 aes_test.py
Functions implementing core AES encryption and decryption functionality.
Sample I/O handling.
Opens files and encrypts them in byte sized chunks, appending results to output file.
Unit tests for the encryption and decryption AES functions on files and string messages.
Encryption/Decryption GUI implementation.
Takes file path, key, and output directory as input.
Clicking buttons will result in actions, with information logged in text window and bottom of window about errors or successes.
Encrypt:
Takes the file path and key and encrypt the file with that key, placing it within the desired output directory.
Decrypt:
Takes the file path and key and decrypts the file with that key, placing it within the desired output direcory.
Gen. Key:
Generates a key for the user, in the event they don't want to provide their own during ecryption.
Gen. IV:
Generates an initialization vector for use during CBC AES mode.
File Path:
Text field for user to provide file path of the file they want to encrypt or decrypt.
Key:
Text field for user to provide the key needed for decryption or the key phrase they'd like to use for encryption.
This will need to use an appropriate hasing function to convert human-friendly phrases into correct byte length keys.
Out Directory:
Text field for user to provide the desired directory for the resulting encrypted/decrypted file to be placed in.
Will default to same directory as the file given to be encrypted/decrypted.
Provide options for key sizes and AES modes.
Icon image file for thumbnail of GUI.
Temporary image file used in aes_io.py to test file I/O.
Provides functions for generating keys and initialization vectors, as well as performing number conversions.