Lidel Mendoza ([email protected])
Dan Ortiz ([email protected])
Python
- Wrtie a file you'd like to encrypt.
- Make sure you have a private and public key.
- In the terminal, format the program's execution as:
python skeleton.py KEY_FILE_NAME SIGNATURE_FILE_NAME INPUT_FILE_NAME MODE
For KEY_FILE_NAME:
* You will enter the name of the file that contains either your private or public key (depending on the mode).
For SIGNATURE_FILE_NAME:
* You will enter the name of the file you wish to write the signature to.
For INPUT_FILE_NAME:
* You will enter the name of the file you wish to encrypt.
For MODE:
* You will either choose between SIGN (which creates the signature using the private key), or VERIFY (which verifies the signature for a file using the public key).
Example to sign: python skeleton.py privKey.pem signature.txt input_file.txt sign
Example to verify: python skeleton.py pubKey.pem signature.txt input_file.txt verify
Yes!
For the extra credit, we used Crypto's AES encryption function. We ask the user for a 16-bit key (e.g. 1234567890abcdef) in order for the function to work. We hard-coded the initialization vector and the mode (CBC), required to use the function, so the user only has to remember the key. When encrypting and decrypting, the user will be prompted for the key (SO REMEMBER THE KEY). When encrypting the message, we appended any padding needed for the AES function, the digital signature to the message, and then encrypted it. When decrypting the message, it sucessfully removes both the padding and the signature from the original message.