{ "info": { "author": "Roy Levien", "author_email": "royl@aldaron.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "Intended Audience :: Information Technology", "Intended Audience :: Other Audience", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "crypto-enigma\r\n-------------\r\n\r\n|Python Programming Language| |PyPi| |Development Status| |BSD3 License| |PyPi Build Status|\r\n\r\nAn Enigma machine simulator with state and encoding display for Python 2.7.\r\n\r\nCurrently support is only provided for those `machine models`_ in most\r\nwidespread general use during the war years: the `I`_, `M3`_, and `M4`_.\r\n\r\n.. _functionality_api:\r\n\r\nFunctionality: package API\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nThe package provides functionality for generating a machine configuration\r\nfrom a conventional specification, examining the state of a configuration, simulating\r\nthe operation of a machine by stepping between states, and\r\nencoding messages:\r\n\r\nCreate a machine configuration (see the `documentation `__ for :code:`config_enigma_from_string`):\r\n\r\n.. parsed-literal::\r\n\r\n >>> from crypto_enigma import *\r\n >>> cfg = EnigmaConfig.config_enigma_from_string(u'B-I-III-I EMO UX.MO.AY 13.04.11')\r\n\r\nEncode messages (see the `documentation `__ for :code:`enigma_encoding`):\r\n\r\n\r\n.. parsed-literal::\r\n\r\n >>> cfg.enigma_encoding(u'TESTINGXTESTINGUD')\r\n u'OZQKPFLPYZRPYTFVU'\r\n\r\n >>> cfg.enigma_encoding(u'OZQKPFLPYZRPYTFVU')\r\n u'TESTINGXTESTINGUD'\r\n\r\nShow configuration details (see the `documentation `__ for :code:`config_string`):\r\n\r\n.. parsed-literal::\r\n\r\n >>> print(cfg.config_string(letter=u'X', format='internal', mark_func=lambda c: '(' + c + ')'))\r\n X > ABCDEFGHIJKLMNOPQRSTUVW(X)YZ\r\n P YBCDEFGHIJKLONMPQRSTXVW(U)AZ UX.MO.AY\r\n 1 HCZMRVJPKSUDTQOLWEXN(Y)FAGIB O 05 I\r\n 2 KOMQEPVZNXRBDLJHFSUWYACT(G)I M 10 III\r\n 3 AXIQJZ(K)RMSUNTOLYDHVBWEGPFC E 19 I\r\n R YRUHQSLDPX(N)GOKMIEBFZCWVJAT B\r\n 3 ATZQVYWRCEGOI(L)NXDHJMKSUBPF I\r\n 2 VLWMEQYPZOA(N)CIBFDKRXSGTJUH III\r\n 1 WZBLRVXAYGIPD(T)OHNEJMKFQSUC I\r\n P YBCDEFGHIJKLONMPQRS(T)XVWUAZ UX.MO.AY\r\n T < CNAUJVQSLEMIKBZRGPHXDFY(T)WO\r\n\r\nSimulate machine operation (see the `documentation `__ for :code:`print_operation`):\r\n\r\n.. parsed-literal::\r\n\r\n >>> cfg.print_operation(message=u'TESTING', show_step=True, mark_func=lambda c: '(' + c + ')')\r\n 0000 CNAUJVQSLEMIKBZRGPHXDFYTWO EMO 19 10 05\r\n 0001 T > UNXKGVERLYDIQBTWMHZ(O)AFPCJS EMP 19 10 06\r\n 0002 E > QTYJ(Z)XUPKDIMLSWHAVNBGROFCE EMQ 19 10 07\r\n 0003 S > DMXAPTRWKYINBLUESG(Q)FOZHCJV ENR 19 11 08\r\n 0004 T > IUSMHRPEAQTVDYWGJFC(K)BLOZNX ENS 19 11 09\r\n 0005 I > WMVXQRLS(P)YOGBTKIEFHNZCADJU ENT 19 11 10\r\n 0006 N > WKIQXNRSCVBOY(F)LUDGHZPJAEMT ENU 19 11 11\r\n 0007 G > RVPTWS(L)KYXHGNMQCOAFDZBEJIU ENV 19 11 12\r\n\r\nWatch the machine as it runs for 500 steps:\r\n\r\n.. parsed-literal::\r\n\r\n >>> cfg.print_operation(steps=500, show_step=True, format='internal', overwrite=True)\r\n\r\n.. _functionality_commandline:\r\n\r\nFunctionality: command line\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nA command line script, |script_code|, provides almost all the functionality of the API.\r\n\r\nEncode messages:\r\n\r\n.. parsed-literal::\r\n\r\n $ |script| encode \"B-I-III-I EMO UX.MO.AY 13.04.11\" \"TESTINGXTESTINGUD\"\r\n OZQKPFLPYZRPYTFVU\r\n\r\n $ |script| encode \"B-I-III-I EMO UX.MO.AY 13.04.11\" \"OZQKPFLPYZRPYTFVU\"\r\n TESTINGXTESTINGUD\r\n\r\nShow configuration details (explained in more detail in the command line help):\r\n\r\n.. parsed-literal::\r\n\r\n $ |script| show \"B-I-III-I EMO UX.MO.AY 13.04.11\" -l 'X' -H'()' -f internal\r\n X > ABCDEFGHIJKLMNOPQRSTUVW(X)YZ\r\n P YBCDEFGHIJKLONMPQRSTXVW(U)AZ UX.MO.AY\r\n 1 HCZMRVJPKSUDTQOLWEXN(Y)FAGIB O 05 I\r\n 2 KOMQEPVZNXRBDLJHFSUWYACT(G)I M 10 III\r\n 3 AXIQJZ(K)RMSUNTOLYDHVBWEGPFC E 19 I\r\n R YRUHQSLDPX(N)GOKMIEBFZCWVJAT B\r\n 3 ATZQVYWRCEGOI(L)NXDHJMKSUBPF I\r\n 2 VLWMEQYPZOA(N)CIBFDKRXSGTJUH III\r\n 1 WZBLRVXAYGIPD(T)OHNEJMKFQSUC I\r\n P YBCDEFGHIJKLONMPQRS(T)XVWUAZ UX.MO.AY\r\n T < CNAUJVQSLEMIKBZRGPHXDFY(T)WO\r\n\r\nSimulate machine operation (explained in more detail command line help):\r\n\r\n.. parsed-literal::\r\n\r\n $ |script| run \"B-I-III-I EMO UX.MO.AY 13.04.11\" -m \"TESTING\" -t -H'()'\r\n 0000 CNAUJVQSLEMIKBZRGPHXDFYTWO EMO 19 10 05\r\n 0001 T > UNXKGVERLYDIQBTWMHZ(O)AFPCJS EMP 19 10 06\r\n 0002 E > QTYJ(Z)XUPKDIMLSWHAVNBGROFCE EMQ 19 10 07\r\n 0003 S > DMXAPTRWKYINBLUESG(Q)FOZHCJV ENR 19 11 08\r\n 0004 T > IUSMHRPEAQTVDYWGJFC(K)BLOZNX ENS 19 11 09\r\n 0005 I > WMVXQRLS(P)YOGBTKIEFHNZCADJU ENT 19 11 10\r\n 0006 N > WKIQXNRSCVBOY(F)LUDGHZPJAEMT ENU 19 11 11\r\n 0007 G > RVPTWS(L)KYXHGNMQCOAFDZBEJIU ENV 19 11 12\r\n\r\nWatch the machine as it runs for 500 steps:\r\n\r\n.. parsed-literal::\r\n\r\n $ |script| run \"c-\u03b2-VIII-VII-VI QMLI 'UX.MO.AY 01.13.04.11\" -s 500 -t -f internal -o\r\n\r\n.. _documentation:\r\n\r\nDocumentation\r\n~~~~~~~~~~~~~\r\n\r\n|Stable Docs|\r\n\r\nFull documentation is available at `Read the Docs`_.\r\n\r\nCommand line documentation is available as help from the command line script:\r\n\r\n.. parsed-literal::\r\n\r\n $ |script| --help\r\n\r\nLimitations\r\n~~~~~~~~~~~\r\n\r\nNote that the correct display of some characters used to represent\r\ncomponents (thin Naval rotors) assumes support for Unicode, while some\r\naspects of the display of machine state depend on support for combining\r\nUnicode. This is a `known\r\nlimitation `__ that\r\nwill be addressed in a future release.\r\n\r\nNote also that at the start of any scripts that use this package, you should\r\n\r\n.. parsed-literal::\r\n\r\n from __future__ import unicode_literals\r\n\r\nbefore any code that uses the API, or confiure IPython (in :code:`ipython_config.py`) with\r\n\r\n.. parsed-literal::\r\n\r\n c.InteractiveShellApp.exec_lines += [\"from __future__ import unicode_literals\"]\r\n\r\nor explicitly suppply Unicode strings (e.g., as in the examples above with :code:`u'TESTING'`).\r\n\r\nAlternatives\r\n~~~~~~~~~~~~\r\n\r\nFor other Python Enigma machines see:\r\n\r\n- `py-enigma `__ (Python 3)\r\n\r\nThis package is based on a `Haskell version`_, with essentially the same API.\r\n\r\nDevelopment status\r\n~~~~~~~~~~~~~~~~~~\r\n\r\n|Development Build Status| |Development Docs|\r\n\r\nThis package is in the early stages of development, and I and can't promise the current\r\n`development version`_ will work. More detail about planned releases and activities\r\ncan be found the list of scheduled `milestones`_ and in the list of `open issues`_.\r\nVarious `test versions`_ may be available for installation or issues review, but these also\r\nmay not work as expected.\r\n\r\n\r\n\r\n.. |script| replace:: enigma.py\r\n.. |script_code| replace:: :code:`enigma.py`\r\n\r\n.. _machine models: http://www.cryptomuseum.com/crypto/enigma/tree.htm\r\n.. _I: http://www.cryptomuseum.com/crypto/enigma/i/index.htm\r\n.. _M3: http://www.cryptomuseum.com/crypto/enigma/m3/index.htm\r\n.. _M4: http://www.cryptomuseum.com/crypto/enigma/m4/index.htm\r\n\r\n.. _development version: https://github.com/orome/crypto-enigma-py/tree/develop\r\n.. _test versions: https://testpypi.python.org/pypi/crypto-enigma\r\n.. _milestones: https://github.com/orome/crypto-enigma-py/milestones\r\n.. _open issues: https://github.com/orome/crypto-enigma-py/issues\r\n.. _Read the Docs: http://crypto-enigma.readthedocs.org/en/pypi/\r\n\r\n.. _Enigma machines: http://en.wikipedia.org/wiki/Enigma_machine\r\n.. _Haskell version: https://hackage.haskell.org/package/crypto-enigma\r\n.. _Hackage documentation: https://hackage.haskell.org/package/crypto-enigma/docs/Crypto-Enigma.html\r\n\r\n.. |Python Programming Language| image:: https://img.shields.io/badge/language-Python-blue.svg\r\n :target: https://www.python.org\r\n.. |PyPi| image:: https://img.shields.io/pypi/v/crypto-enigma.svg\r\n :target: https://pypi.python.org/pypi/crypto-enigma\r\n.. |Development Docs| image:: https://readthedocs.org/projects/crypto-enigma/badge/?version=latest\r\n :target: http://crypto-enigma.readthedocs.org/en/latest/?badge=latest\r\n :alt: Documentation Status\r\n.. |Stable Docs| image:: https://readthedocs.org/projects/crypto-enigma/badge/?version=pypi\r\n :target: http://crypto-enigma.readthedocs.org/en/pypi/?badge=pypi\r\n :alt: Documentation Status\r\n.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/crypto-enigma.svg\r\n :target: https://pypi.python.org/pypi/crypto-enigma/\r\n.. |Development Status| image:: https://img.shields.io/pypi/status/crypto-enigma.svg\r\n :target: https://pypi.python.org/pypi/crypto-enigma/\r\n.. |BSD3 License| image:: http://img.shields.io/badge/license-BSD3-brightgreen.svg\r\n :target: https://github.com/orome/crypto-enigma-py/blob/pypi/LICENSE.txt\r\n.. |PyPi Build Status| image:: https://travis-ci.org/orome/crypto-enigma-py.svg?branch=pypi\r\n :target: https://travis-ci.org/orome/crypto-enigma-py/branches\r\n.. |Development Build Status| image:: https://travis-ci.org/orome/crypto-enigma-py.svg?branch=develop\r\n :target: https://travis-ci.org/orome/crypto-enigma-py/branches", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/orome/crypto-enigma-py", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "crypto-enigma", "package_url": "https://pypi.org/project/crypto-enigma/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/crypto-enigma/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/orome/crypto-enigma-py" }, "release_url": "https://pypi.org/project/crypto-enigma/0.2.1b2/", "requires_dist": null, "requires_python": null, "summary": "An Enigma machine simulation package.", "version": "0.2.1b2" }, "last_serial": 1875305, "releases": { "0.2.1b2": [ { "comment_text": "", "digests": { "md5": "1d82ecbde7825bafa8883031d14d8a53", "sha256": "8ca58f1ea8f75bf5eecd712cf2d9b54432abe3d225edcfe3abf76a8695e824e0" }, "downloads": -1, "filename": "crypto-enigma-0.2.1b2.tar.gz", "has_sig": false, "md5_digest": "1d82ecbde7825bafa8883031d14d8a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34033, "upload_time": "2015-12-22T17:39:53", "url": "https://files.pythonhosted.org/packages/f3/7c/d4f80a89e3f969cb7ee601f9d9ae9d5ed67c531f2a9f0fafea5ed3124849/crypto-enigma-0.2.1b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1d82ecbde7825bafa8883031d14d8a53", "sha256": "8ca58f1ea8f75bf5eecd712cf2d9b54432abe3d225edcfe3abf76a8695e824e0" }, "downloads": -1, "filename": "crypto-enigma-0.2.1b2.tar.gz", "has_sig": false, "md5_digest": "1d82ecbde7825bafa8883031d14d8a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34033, "upload_time": "2015-12-22T17:39:53", "url": "https://files.pythonhosted.org/packages/f3/7c/d4f80a89e3f969cb7ee601f9d9ae9d5ed67c531f2a9f0fafea5ed3124849/crypto-enigma-0.2.1b2.tar.gz" } ] }