## Intro

I’ve decided to Go through (this will make sense in a bit) the Cryptopals Challenges in order to get more familiar with crypto related concepts and Golang (^_^), which I’m using to solve the problems. The code I’ve written for solving the challenges is published in this git repo and I’ll be documenting any helpful resources on this blog.

## Problems one and two

The first two problems are pretty much a hello world version of string/hex/byte manipulation, no fancy reading needed.

## Problems three and four

Problem three requires the use of frequency analysis, something I’ve implemented in the past as part of CTFs, but this time I had to pair it with a simple scoring function to break single byte repeating XOR. Cool!

Problem four is just a bigger version of problem three.

## Problem five

In this one we get to implement repeating key XOR encryption.

## Problem six

Oh boy, this is where the real fun starts and a lot of new concepts pop up.

First, the Hamming distance is introduced as a concept and then is used to find the length of the XOR key. My first implementation of the key-length finding algorithm didn’t work as expected and I felt I didn’t get why it should or shouldn’t work, so more reading was required. Dave Hull has a really informative post about this topic on his blog, that helped me clear things up.

After finding the correct key length, the rest is pretty straightforward.

## Problems seven and eight

In problems seven and eight, block ciphers are introduced, so a good reading upon them and their common modes of operations was needed for me.

For problem eight in particular, I enjoyed reading FiloSottile’s blog post on the ECB penguin, a picture I’ve seen in the past but never really thought about why this happens.