Inspiration

Our team was freshly formed with all first-time hackathon participants. The cryptography challenge presented a straightforward challenge we could dive into without having to know too much about a certain API or framework beforehand. However, the algorithms themselves were complicated enough to provide a challenge for us.

What it does

The problems we solved revolved around Caesar, transposition, and vigenere ciphers. We weren't able to solve many of the more difficult challenges, but we had fun developing the tools needed to start a portfolio in cryptography

How we built it

Most of the code was written on the fly to test as many algorithms on a given plaintext as possible. Because of that the code was constantly evolving to fit the next challenge. Everything was done in python, except a quick C++ program used to test XOR shifting. Itertools was used to handle combinations and permutations when we thought it would be applicable.

Challenges we ran into

The harder challenges left us more or less dumbfounded. We were all doing cryptography for the first time, so we weren't quite sure when to count character frequency when to attempt a transposition or analyze the period of a kappa test. Hours were spent trying many different approaches to a single problem. It was definitely a learning experience for all of us.

Accomplishments that we're proud of

We discovered the plaintext of the following problems: 1) salve octavian, hope this finds you and your darling mother attia in good spirits. i'm off for a meeting of the senate. the soothsayer warns me about the ides of march, but what does that crazy gaul know? antony has an idea on how to improve this cipher by changing the step every time. so instead of encoding with a step of iii, we encode with iii ix xv and the repeat iii ix xv until the message is complete. is that marcus a crazy guy, or what?

give agripina a kiss from her uncle, gaius 2)
An inverted alphabet provides the neat property that you can encode and decode with the same key. The normal caeser cipher forms a group and can be solved by repeated iteration with any prime element of the group (e.g. a number relatively prime to twenty-six like one or three, but not two or thirteen). The inverted alphabet caeser also forms a group, but it takes two iterations to go through it. There are vignere-caeser and vignere-inverted-caeser ciphers in the examples, so beware when you try to decrypt them. Kappa will still work, but the next step won’t. Another hint, the more information you need to solve the system, the bigger the cipher message.

4) She was a little startled by seeing the Cheshire cat sitting on a bough of a tree a few yards off. The cat only grinned when it saw Alice. It looked goodnatured, she thought: still it had very long claws and a great many teeth, so she felt that it ought to be treated with respect.

What we learned

We cemented the basics of various cryptographic attacks against common ciphers and developed a base knowledge for further advancement in the subject.

What's next for Decrypted Text (Cryptography challenge)

We're still working on challenge 5 for the fun of it! Can't wait to see if maybe it was an vigenere with an inverted caesar after all.

Built With

Share this project:

Updates