Enigma has a built in text editor and supports AES, TripleDES and Blowfish encryption algorithms.
This was my only and biggest Java project, we had OOP in our Sem 3 syllabus and this project was a good way to learn the concepts.It had started out as a basic gui app to encrypt text put in a text-box according to simple cyphers.
Until now, I was making command line applications exclusively and I was frustrated by how ugly they looked. I used ASCII art to spruce them up, but there is only so much I could do.
Then came Java, and with it came , Swing API. Yay.
I took a book from my library and read all I could in a few days and got down to work with it.
As I understood how layouts and panels and elements etc worked and I outgrew making them from scatch. So I scrapped all the old code and started afresh using Netbeans IDE which has a GUI editor built-in.I had to write my logic and the even-listener behaviours and things got easy from there..
First I made a basic GUI app to encode and decode basic stream cyphers. This part of the project was just for getting familiar with
swing and OOP concepts.
The app has 3 basic components:
1. A beautifully designed Intro Page
This took alot of time coz I was very picky about how it looks. There are actually 3 differnt
JPanels overlapped to accomodate:
An obligatory licence page , with popups to confim if you dont agree. The Licence page is scrollable and looks legal.
3. A Mode selector popup
This is used to select which mode to use.
There are also sub options for the former.
4. Exit Panel
This is called when the app is exited from any window. It greets you and closes after 10 seconds . Also has a link to my project pages.
There are 3 cyphers coded by me:
You can choose the cypher from a dropdown from the top of the cypher intro window. It is tabbed to change quickly.
For each, there is an input text input pane, an output pane and a place to chose and enter the key, except in Atbash.
There came a point when I realised how silly the cyphers looked, so I started to work on using AES , TripleDES and Blowfish algorithms.
I wanted a convenient way to encrypt text files, so I decided to make a Notepad like editor with options in the menu itself.
The encryption algorithms were provided by the
java.crypto class. Since Block cyphers work on blocks of bytes, so the key was generated in the same datatype,
But the problem was to show this key to the user, so I decided to
Base64 encoded the key to get a readable string which can then be stored as a text file. Helper methods to take care of the same were used.
The Algorithms used were:
The key sizes were chosen to be convenient, yet secure for medium size text files.
On executing the Jar file, you are greeted with an awesome introduction screen as shown above. The cool blur fire thingie actually moves, looks real cool :P.
There are two modes to run this application:
In this mode one can quickly encode string of data with the relevent cyphers.
Enigma supports the followingC cyyphers:
Additionally there is a One Time Pad to encrypt data quickly with a bit more secure keys.
Some Important Concepts:
In this mode, we utilize the EnigmaEditor which has built in features to encrypt/decrypt any text files. It doesnt necessarily have to be a
.txt file, any UTF-* encoded file will work.
It has 3 Encryption Algorithms:
Once the text is encrypted/decrypted, normal document operations like edit, save etc can be carried on.
For more details check the page for Enigma Editor.
This was the biggest project I had worked on till now, and due to this I could perfect OOP concepts and got good at using JAVA. Also I learned the theory for cryptography and its implementation.