Thursday, December 20, 2018

Quick and easy solution to decrypting simple ciphers



My name is Lenny and I wanted to solve the problem of writing a program that would decrypt a variety of ciphers.
During my problem-solving unit on codes and ciphers, my classmates and I often spent much time trying to identify the codes we were trying to break. Once we identified a decipher, its decryption process proved to be quite simple. I often struggled to identify codes, so I decided to write a program to help me identify and decrypt some of the ciphers we learned about in class. The program can translate atbash, number letters, Caesar shifts, and Vigenére ciphers.


Explanation of each cipher that my program translates


Screenshot of my program displaying the decrypted message
I started programming in 8th grade and have loved it ever since. I'm always looking for new ways to exercise my programming skills, which is why I wanted to do this project. I created the deciphering algorithms and the user interface from scratch.Once I finished programming everything, I created up my own server to host my application, purchased a domain name (lennyparisi.tech), and then linked the domain name to my server. All this does is connect people who type "lennyparisi.tech" as their URL to my server where my program resides. An image of the file that configures all of this is attached below. In total, it took me about 6 hours to complete the project from start to finish.
Snapshot of what my server configuration file looks like
Code snippet from my program

The program first stores the user's entered encrypted message. Then, it tries to decrypt it using atbash, number letter, and Caesar shift deciphering protocols; the output for each deciphering method is stored. After storing the output for each method, the program uses a Node.js API called check-word to determine if the output is comprised of English words. If the output is mainly made up of English words, the program decides it is the intended output and displays it on the screen, along with the deciphering method that was used. This process is also repeated n=1~25 within the Caesar shift deciphering method in order to decrypt a Caesar shift and identify its n value. The Vigenére decipher stands on its own because it requires a key to decrypt it and would be very difficult to decipher without it. 


Example of a decrypted Vigenére cipher

Here is a video demonstrating how to use my decipherer with all 4 ciphers


No comments:

Post a Comment