(don’t forget to also read: my attack on the Enigma cipher machine)
It turns out my kids have been sending each other secret messages, enciphered with a substitution cipher of their own invention! They only let me see the secret key when I agreed to help them mix up a very complicated recipe for invisible ink:
This reawakened fond memories of a young me getting a good way through Simon Singh’s The Code Book cipher challenge :) (Also, see the Enigma Spreadsheet my friend made a few years ago!)
So my mind raced considering how fast todays laptops can brute-force, say, Enigma? Even non-brute-force attacks are on a different scale if you have a computer. For example, with Enigma, can you ignore the plugboard and go through every combination of day and message key, using a histogram to spot possible text that you then attack as a substitution cipher?
First I needed an accurate Enigma simulator. To be honest, I found most descriptions a bit light on detail. But I quickly found a paper Enigma, which I made:
From this, I was able to create a Python Enigma machine! Source available here:
Now to crack Simon Singh’s Cipher Challenge :)