#Subtitution Cipher
This is the implementation of the famous , very old subtituion cipher using java .
-
Download the .zip file from the git hub and extract all the files into a Directory .
-
Make sure you have JDK ( Java Development Kit ) installled and configured right in your computer
-
Now create a file , "input.text" and write the content you want to encrypt inside that . Please use ony lower cases , spaces and period(.) symbol . This feature is yet to be optimised .
-
You will be provided with a subtition key in "key.text" .You can use this by default . If you want to change the key incase the key was stolen , change the key as per the following ,
- Take a paper and write from a - z vertically
- Now to the right of each alphabet write diffferent alphabets in a random order and make sure letters doesn't repeat
- open key.text , you will find something like this "jnfmgehyzxbuaopiqwcdvkrs.t l"
- Type the new sequence of yours .
- Make sure you place "."(dot) and " " (space) in exactly same places .
- Save the file under same name "keys.text"
-
Now compile the SubstitutionCipher.java using
javac SubstitutionCipher.java
-
Execute the class file created by
java SubstitutionCipher
-
Choose 1 do encrypt the content entered in input.text .
-
You can find a file encrypted.text created
-
Send the encrypted.text to a friend and share the key physically before hand .
-
You can decrypt the file using 2 option if you execute the program again . (Make sure key is present in the same directory )
-
Thanks
Ping me if you have suggestions where I could improve the code.
E-mail : [email protected]