An Enigma cipher machine implemented in an Excel spreadsheet by a non-programmer
williamedwardscoder.tumblr.com
williamedwardscoder.tumblr.com
VBA is an awesome tool. It has saved me hundreds of hours of tedious calculations and copy/pasting sessions.
Reminds me of http://news.ycombinator.com/item?id=3374431
The VBA just loops through the input text, feeding it into the worksheet character by character and incrementing the step counts, which are referred to by the worksheet formulae. It also looks up the initial rotor positions from the "Settings" table from the "keys" on the main interface worksheet.
That's for encryption - there are another 30 lines of code for decryption which I haven't looked at. It looks hand-coded rather than recorded, but most of the VBA is either incrementing counters or calling worksheet functions, so the VBA isn't doing the heavy lifting.
Your friend may not call himself a programmer but I do Excel/VBA work as part of my job, along with more hacker-approved languages, and I'm very impressed. One of us indeed!
"Alan Turing: The Enigma" http://www.amazon.com/Alan-Turing-Enigma-Andrew-Hodges/dp/08... , supposedly the best biography of Turing, I enjoyed it. There's quite a bit on his work on the Enigma but not technical.
if you haven't read The Code Book by Simon Singh (as I recommended), you'll be surprisingly pleased by its depth. Everyone loves it. It was the book that inspired that spreadsheet; it clearly contains enough info to go and try and implement an Engima machine :) It also covers Lorenz (http://en.wikipedia.org/wiki/Lorenz_cipher) and such. It covers lots of both older and newer systems too, and even has a puzzles section.
If you want more of the human side, "Code Breakers: The Inside Story of Bletchley Park" is a dry non-technical memoirs by a those who were actually there.
I would like to know more about Dilly's attacks on Spanish Enigma - http://www.schneier.com/blog/archives/2012/03/rare_spanish_e... - anyone know a book with any detail? Anything on his earlier work too, even?
The autobiography of Leo Marks: _Between Silk & Cyanide_[2] was a good (although I suspect quite heavily dramatised & exaggerated) read about the more human elements and flaws of pen & paper crypto used by the allied resistance groups.
[1] http://www.amazon.co.uk/Colossus-secrets-Bletchley-code-brea...
[2] http://www.amazon.com/Between-Silk-Cyanide-Codemakers-1941-1...
The museum has a four-rotor Enigma machine, which is about the size of a typewriter. It is packed into a wooden case and deployable into the field.
The museum also has a "Bombe", the Enigma codebreaking machine devised originally by Polish mathematicians, and improved by Alan Turing and others, and fabricated in quantity by the British and the Americans during the war. This an electromechanical device the size of several refrigerators.
So nice to see them both together. Of course, I have today's simple and compact encryption technology in my phone, and right across the parking lot from the museum, there is an acreage of computers (Ft. Meade) which is probably able to decrypt what I send, if desired. Same as it ever was.