Steps to run the application (With Screen shots):
1 Extract the GAET.zip file and run the GAET.jar file to run the application
2 You will see the following screen as the graphical UI of the Java application.
Main Screen of GAET
3 Here, you have 5 buttons. The first button is to generate and store Public key/Private key pair in the disk. When clicked, you’ll see the following screen:
Generate Keys
Default Path of Generated Keys
4 Select one directory where you want to save your public/private keys and click on ‘Save’ button. You need to enter the name of the person for whom you are generating key pair as shown below.
naming
5 The application will save the keys with names ‘GAET.gpub’ and ‘GAET.gpri’.
keys
6 A password prompt comes up for the private key as shown above.


7 You may get the confirmation as shown below:

8 Once keys are generated, no need to click on this button again. We can use the same keys to encrypt/decrypt multiple files.

9 After generating keys, you need to load a public key to encrypt a file. Click on ‘LOAD PUBLIC KEY’ button. You would get an empty key ring for the first time. Click on “ADD KEY” button:
Add Public Key to key ring



10 Select your public key from the file chooser and click ‘Open’ button as below:



11 The selected public key comes up in the key ring list.

Adding public keys to Empty key ring

12 Similarly add public keys of other persons. You will see the following screen.

13 One can also remove public keys from the key ring.
Removing public key from Key ring




14 Once all the public keys are loaded, you can choose which one to use for encrypting the file and then hit the “LOAD KEY” button.
Loading public key

15 After successfully loading the public key file, you will receive the following confirmation.

16 Now, its time to encrypt a file. Click the ‘ENCRYPT FILE’ button, select the file which needs to be encrypted, and click ‘Open’ button as shown below.
Encrypting a file

17 If one needs to compress the file before encrypting it, then the checkbox named “COMPRESS BEFORE ENCRYPTION” can be selected.

18 The encrypted file will be named as ‘<filename.ext>.enc’ if you have not selected the compression checkbox and ‘<filename.ext>_zip.enc’ for compression enabled encryption. For example, if you encrypt the file ‘sitaramphoto.jpg’, the encrypted filename would be ‘sitaramphoto.jpg.enc’.

19 As usual, after successfully encrypting the file using the previously loaded public key, you will get the following confirmation.

20 You will observe that the encrypted file size is more than that of the original file. Because, RSA returns 128 bytes as output for 100 bytes of input.
21 Now, we need to load the private key in order to use it for decrypting the file. Click the ‘Load Private Key’ button, select your private key, and click on the ‘Open’ button as shown below.
Loading Private Key



22 Finally, we need to decrypt the previously encrypted file. Click the ‘Decrypt File’ button, select the encrypted file, and click on the ‘Open’ button.
Decrypting the file



23 Remember that each private key is stored with a password, so one needs to enter the password to access the private key.

24 Now the file will be decrypted and stored as ‘dec<filename.ext>’. For example, if the encrypted filename is ‘sitaramphoto.jpg.enc’, then the decrypted filename would be ‘decsitaramphoto.jpg’. You will get confirmation as shown below.

25 You can see the below screenshots which shows the original image before encryption and the decrypted image with same size, resolution, etc.


26 As with generation of keys, you need not load the public/private key each time when some file is encrypted.
27 The application also gives you reasonable error messages if something goes wrong, like selecting invalid public/private key file, trying to encrypt a file without loading public key, etc. The following are examples of such error messages.

Last edited Apr 19, 2010 at 9:27 PM by TarunDhawan, version 33

Comments

No comments yet.