“ProGuard”-A Safe and Unique Platform for Sharing Confidential Files Using AWS
By: Kirtan Pathak
Tags: Python, Security, AWS, Privacy, Cryptography

Privacy is the main concern in today’s world. There are many threats to the integrity of data and can be more harmful if the data is highly confidential. Encrypting the data and adding security layers is a must when dealing with highly confidential information. And for this purpose, using Advanced Encryption Standard (AES) encryption-decryption algorithm becomes most important as the AES algorithm is very difficult to crack.

What is Advanced Encryption Standard (AES)?

The Advanced Encryption Standard (AES) is a symmetric block cipher used to protect classified information.There are three block ciphers in AES: AES-128, AES-192 and AES-256. AES-128 uses a 128-bit key length to encrypt-decrypt a block of messages, while AES-192 uses a 192-bit key length and AES-256 uses a 256-bit key length to encrypt-decrypt messages. Each cipher encrypts and decrypts data in blocks of 128 bits using cryptographic keys of 128, 192 and 256 bits. Symmetric, also known as secret key, ciphers use the same key for encrypting and decrypting, so the sender and the receiver must both know and use the same secret key. There are 10 rounds for 128-bit keys, 12 rounds for 192-bit keys and 14 rounds for 256-bit keys. A round consists of several processing steps that include substitution, transposition and mixing of the input plain-text to transform it into the final output of cipher-text. It uses higher length key sizes such as 128, 192 and 256 bits for encryption. Hence it makes AES algorithm more robust against hacking.

What is ProGuard and how it works?

ProGuard is a safe platform for transferring confidential files by encrypting the files and sending them to receiver using AWS instance which is slightly different approach than the current platforms. Here there are two applications: 1) Stand-alone Application and 2) Web Application. The stand-alone application works on local machine for encryption-decryption and securing the files. The web application runs on cloud for the purpose of sending the encoded file and key to the receiver which he can later download the file and key to decode it through stand-alone application.

Pre-requisites

Necessary dependencies for this project:

Flask

Pycrypto

Reportlib

Secretsharing

PyPDF2

Below is the step-by-step process for implementing the program to share the files securely:

1. Stand-alone Application

Step 1: Download the project folder from my Github page and install all the necessary dependencies for this project. You can also find all the libraries listed above in the site-packages folder within the ProGuard folder.

Step 2: Create one text file and write your data which you intend to encrypt and share with others.

Step 3: Go to ProGuard/source/stand-alone-application and run the main.py file. Here one dialog box will appear in which you have to select the text file which you want to encrypt and share. After browsing the file location, you have to enter the pass-key and secret-key which can also be called as public key of receiver and private key of sender. These keys will be further used for generating keys for AES algorithm.

Step 4: After entering the details, press the Encrypt button to generate the encoded file on the destination folder. Note that the original file gets replaced with the encoded file. So currently you will not have your original data file on the machine but only the encoded file. Now you will see the file name EncodedFile.txt on your destination place in local machine.

Step 5: Now click the Make PDF button on the stand-alone application to generate the PDF of the keys used for encryption. Here you have to enter the pass-key and secret-key which you entered in the application and also the name of the PDF.

Step 6: Now press the Create PDF button. It will create a new PDF of the information that you entered above and will be present in your stand-alone-application folder.

Step 7: Now press the Secure PDF button. Another dialog box will appear after this. Here you have to choose the PDF file location and also the pass-key. Note that this pass-key is not the same as discussed above. This pass-key will be the password for accessing the PDF, so the pass-key should be known to both the party. For example, pass-key can be the last four digits of the contact number of receiver which is pre-decided by both the parties. After securing, you will find one new PDF file created named ENCRYPTED_KEY.pdf in the folder. After entering the correct password, the keys in the PDF are accessible.

Step 8: Now comes the decryption part. Go to the dialog box in Step 3, and select the file location which you want to decrypt. Enter the pass-key and secret-key and lastly press the Decrypt button. You will find the same original data file with name DecodedFile.txt in the destination that you provided in the application.

First part of the process is completed with stand-alone application. Now comes the second portion of the process i.e. file sharing through web application using AWS.