Introduction To Cryptanalysis
What is it? Cryptanalysis refers to figuring out how to break an encrypted message. Essentially, you start off knowing absolutely nothing about the ciphertext, and you try to figure out EVERYTHING. Before we start, let's get some terminology in place. Ciphertext refers to what you were given (what you are trying to decode) and plaintext refers to the actual message.
How do I do it? Cryptanalysis is almost like a guess and check process. You have no idea how the message was encoded, but by trying various things, you can get an idea and eventually crack the code. The first step is analyzing the frequencies of letters in the ciphertext. That basically means what percentage of the time each letter appears in the message. Analyzing the frequencies is known as frequency analysis, and to do this you can use an online tool (something like dcode.fr/en) or write/use a program: see the links and Python programs provided in Tools. You can use this to figure out if the message is just English with letters replaced, or something else.
Step two is running a statistical analysis on the message. The most helpful statistic is the index of coincidence, which tells you the probability of finding repeating letters in a message. Why is this helpful? Because it can help you determine what cipher was used to encrypt the message. The following is a general guideline; you can read more over here:
Note: IOC = index of coincidence
IOC of English plaintext: 0.0667
Substitution Cipher: IOC around 0.0667
Polyalphabetic Cipher: IOC around 0.045
There are many other statistical analyses that can be run on a message (see cipherStats.py under cryptanalysis provided in Tools). On the other hand, perhaps these statistics are not always necessary. With a quick Google search, you can usually find many decryption tools on the Internet. We have provided links to some of these online tools here. Of course, for the more ambitious of you, you can try programming your own tools or using our prebuilt tools (found in the Tools section). These tools are written in Python, but don't fret if you have no programming knowledge; this contest is a great way to learn and improve your skills. If you do not have Python on your computer and would like to install it, just download and install the latest version of Python and download an IDE like Pycharm CE. Then, copy and paste the provided code into a new Python file and run it. For a full step-by-step installation tutorial, view the last 6-7 minutes of the first Screencast Tutorial. You will see that Python is incredibly useful when it comes to cracking codes.
Takeaway: When you first look at an unknown ciphertext, run a frequency analysis and determine the index of coincidence. Once you learn how to interpret these elements, you will be able to recognize ciphers just by looking at them.