I'm a big fan of puzzlehunts, but often puzzles with encoded messages require you to recognize the encryption algorithm, which can be difficult for newcomers (and a hassle for veterans). This project allows one to input the encoded text and it will spit out the decoded text with the most likely decryption method.

What it does

This project receives an input of text and then tries multiple decipher algorithms at once and returns the most likely deciphered text based on maximizing English letter frequency analysis scores.

How I built it

I used Flask to use as a website where people can input text. I used Python to write the algorithms, which are:

  1. Convert uppercase/lowercase letters to Binary to ASCII (and inverted variant)
  2. Convert uppercase/lowercase letters to Binary to Morse (and inverted variant)
  3. Convert vowels/consonants to Binary to ASCII (and inverted variant)
  4. Convert vowels/consonants to Binary to Morse (and inverted variant)
  5. Convert phrases with only two unique letters to Binary (and inverted variant)
  6. Convert phrases with only two unique letters to Morse (and inverted variant)
  7. Caesar Cipher for all letter shifts
  8. Octal to ASCII
  9. Decimal to ASCII
  10. Hexadecimal to ASCII
  11. Base32 Hex to ASCII
  12. Base32 RFC4648 to ASCII
  13. zBase32 to ASCII
  14. Crockford's Base32 to ASCII
  15. Bitcoin Base58 to ASCII
  16. Base64 to ASCII
  17. Base64 with uuEncoding to ASCII
  18. Affine Cipher Decryption for all coefficients
  19. Number to Letter decipher (1=A, 2=B, ...)
  20. Railfence "Zig-Zag" Cipher

Challenges I ran into

This was my first time programming in Python, and also my first time using Flask. A big hurdle was getting comfortable with Flask, and a smaller hurdle was remembering to use Python syntax instead of C syntax.

Another challenge was actually typing up the algorithms. Some of them, particularly the Railfence Cipher, were challenging to code, especially after staying up for 24 hours! Check out a picture I snapped of how I brainstormed how to approach this problem:

alt text

Accomplishments that I'm proud of

I was extremely proud that I actually had a working product at the end of my work. This was my first Hackathon, so I was nervous about how I would do. I was super proud that I ended up with a project that actually worked!

What I learned

Python, Flask, Decipher methods

What's next for decipher

Layout is finished! Now I just need to add more decipher algorithms to my heart's content.

Built With

Share this project:


posted an update

Instead of dynamically loading the pages, I am just loading the top 8 responses, since anyway anything past that is usually gobbledygook!

In other news...the website is finished! It looks very clean and professional and I am proud that I maintained it even after the Hackathon.

Log in or sign up for Devpost to join the conversation.