Krypton is another wargame from OverTheWire, that is based on cryptography and cryptoanalysis. As I really love this topic I decided to give it a try, unfortunately level 6 was way harder than I thought and I couldn't complete this, but I'm still happy with the results.

# Krypton 0

When we first access the Krypton game, we are greeted with this message.

As we know it's encoded using Base64, we can easily solve that in many ways - you can decode this string online, using built in Linux base64 module, or by writing tool in any programming language you want.

# Krypton 1

Firstly, let's find the files to work on.

From this one, we know that the string is encrypted using simple Rot13 encryption, meaning that each letter in the plaintext has been moved 13 times in the alphabet to produce the ciphertext. There are also many ways to decrypt this, but I'll show you this simple script that works really well.

Got it! Let's move to the next one.

# Krypton 2

As in the previous one, let's firstly move to the krypton directory.

This time instructions are a little bit more complicated, but whole task seems to be quite easy. Since I've previously made Python script to brute force the ciphertext, let's test it out in this situation. You can take a look at my script, but I strongly encourage you to try it by yourself!

Caesar-cipher.py

And it worked, we've got the password to the next one: ************ !

# Krypton 3

Wow, this seems harder than the previous ones, but that's the whole point of the challenge, right?

I'm going to use tools from this website as they really make process of analyzing the ciphertext faster. As all messages were encrypted with the same key, I have copied them into the tools to have bigger material, and to get better and more accurate samples. What will come really helpful, is the frequency of letters in English.

Now let's slowly work out our way to the solution. Since I know that the most frequent letter that occurs is 's', I can assume that in plaintext it will be the letter 'e'. In addition 3 letter sequence - 'jds' can be matched as 'the'.

After hardly an hour of work I finally managed to find out all of the letter. Here's the encryption key:

Now the last step is to change the letters from the ciphertext: KSVVW BGSJD SVSIS VXBMN YQUUK BNWCU ANMJS.

Got it! Let's move to the next one ;)

# Krypton 4

This time we will work on Viegenere Cipher.