Monday, October 21, 2019

The decryption game

The decryption game

Can an Apple-1 computer decipher a message encrypted with an Enigma cyphering machine in a reasonable time?
Recently I (re)watched the movie “The imitation game”: the English mathematical genius Alan Turing cracks the German Enigma code with help from fellow mathematicians, using an electro-mechanical device called Bombe.
At the end of the movie, I found myself wondering: “Would an Apple-1 be able to decrypt a text ciphered by an Enigma machine? If so, how fast would it be?”
The Enigma Machine is well documented in all its versions and variants, and the Internet is full of code and emulators.
I am not going to explain the operation principles of the Enigma Machine, on the Internet there is a plenty of valuable sources of knowledge. In the Bibliography section, you will find some link.
SEARCHING FOR… THE RIGHT CODE
What I was looking for was a short source code that could run in a few kiB of memory.
In this article, I will not go deep into the mathematical theories behind the “Enigma”, and I will not dwell on the different decryption techniques that could be used.
I found many programs, but unfortunately, many of them needed RAM that the Apple-1 simply does not have.
Finally, I found the source code candidate to be adapted for the CC65 cross compiler: http://www.cs.miami.edu/home/harald/enigma/
The small program can encrypt/decrypt messages with an user-defined machine setting or brute-force an encrypted message.
https://sys64738.org/2019/09/the-decryption-game/
Our thanks to Stephen, G7VFY for the above information