Py-Enigma
Status: Completed, and published in the MagPi.
Summary: A Python program to emulate a Pocket Enigma Cipher Machine. This is a superbly designed toy, from Bletchley Park, that tries to demonstrate some of the principles of the real Enigma Cipher Machines used during WW2 by the German armed forces.
Details:
Analysis of the algorithm.
Analysis of the wheels.
How to encrypt a single character.
Building on this to encrypt a message.
Reversing the situation to decrypt a message.
Now to wrap it all up with a useful menu.
Here is the complete Python program. Have fun!
Warning: Remember that the Pocket Enigma Cipher Machine is not even close to an unbreakable cipher. It really is a trivial cipher to crack, but it is a lot of fun too.
I would encourage you to look here for a full review of the Pocket Enigma Cipher Machine, including a detailed description, a cryptanalysis and further reading:
http://www.savory.de/pocket_enigma.htm
Py-CiscoT7
Status: Completed.
Summary: A Python program to encrypt and decrypt Cisco Type 7 passwords. It re-uses a lot of supporting code from the Py-Enigma Python program.
Details:
Description of the Cisco Type 7 password algorithm.
Now for the completed Python program. Enjoy!
------------------------------
P y - E N I G M A
M A I N - M E N U
------------------------------
1. Set Wheel = 1
2. Set Pointer = D
3. Set Code Start = J
4. Set Increment = 1
5. Set Block Size = 5
6. Encrypt a Message
7. Decrypt a Message
0. Exit program
------------------------------
Enter choice [1–-7 or 0]: