|Author:||Brian Neal <firstname.lastname@example.org>|
|Date:||July 23, 2013|
|License:||MIT License (see LICENSE.txt)|
The M-209 is a mechanical cipher machine used by the US military during World War II and up to the Korean War. The M-209 is also known as the CSP-1500 by the US Navy. The M-209 is an example of a Hagelin device, a family of mechanical cipher machines created by Swedish inventor Boris Hagelin, where it is known as the C-38.
m209 is a complete M-209 simulation library and command-line application written in Python 3. m209 is historically accurate, meaning that it can exchange messages with an actual M-209 cipher machine.
It is hoped that this library will be useful to M-209 enthusiasts, historians, and students interested in cryptography.
m209 strives to be Pythonic, easy to use, and comes with both unit tests and documentation. m209 is a library for building applications for encrypting and decrypting M-209 messages. m209 also ships with a simple command-line application that can encrypt & decrypt messages for scripting and experimentation.
m209 is written in Python 3, specifically Python 3.3. At this time it will not run on Python 2.x.
m209 has no other requirements or dependencies.
m209 is available on the Python Package Index (PyPI).
You can install it using pip:
$ pip install m209 # install $ pip install --upgrade m209 # upgrade
$ hg clone https://bitbucket.org/bgneal/m209
If you did not use pip (you downloaded or cloned the code yourself), you can install with:
$ cd where-you-extracted-m209 $ python setup.py install
To run the unit tests:
$ cd where-you-extracted-m209 $ python -m unittest discover -b
All of the resources listed below were useful to me in the creation of the m209 library. In particular, I want to thank Mark J. Blair for his detailed explanations of the M-209’s operation and procedures. The official training film was also highly instructive.