A basic script to encrypt and decrypt your data. Where the main catch is to deliver the encrypted file to the receiver. It divides the encrypted file multiple parts and then send it to the receiver. Even if a hacker manages to get his/her hands on the file, in order to decrypt it, other files will be required as it will make the file more secured from hackers.
First install the requiement.txt using following command in cmd in that particular folder.
pip install -r requirements.txt (Python2)
pip3 install -r requirements.txt (Python3)
There are 2 files depends on the user desire. encryption.py and decrypt.py which do as per their given names.
In order to encrypt the file. Type the following command in CMD.
python encryption.py
User can select from the 2 options of encryption and other print out the export the key(encryption key)
Encryption
-
You can enter the short messages and it will encrypt it and while giving the output it will ask either to print it or to store it in the file. Along with the file one secret.key will be exported in the output folder which will be you encryption/decryption key
-
User can print the encryption/decryption key to view the secret code and use that key to encypt the file later on.
-
If user have a file to encrypt instead of a small message then this option will be the best one as it will cover the full file and store the encrypted file in the output folder.
Decryption
python decrypt.py
-
In order to decrypt it first you need to locate the secret.key file and then the data.file which you can find in the output folder.
-
It will decrypt and stores the output in result.txt and will delete the data.file and secret.key file from the output.
tkinter module not found
Install the module by launching the cmd and using command:
pip install tkinter (Python2)
pip3 install tkinter (Python3)