enigmapython 1.3.0__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {enigmapython-1.3.0 → enigmapython-1.3.2}/PKG-INFO +57 -6
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Enigma.py +9 -4
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Scrambler.py +2 -1
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython.egg-info/PKG-INFO +57 -6
- {enigmapython-1.3.0 → enigmapython-1.3.2}/setup.py +7 -1
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Alphabets.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Clonable.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaB_A133.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaB_A133Etw.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaB_A133RotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaB_A133RotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaB_A133RotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaD.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaDEtw_JWULCM.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaDEtw_QWERTZ.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaDRotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaDRotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaDRotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorway.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorwayRotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorwayRotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorwayRotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorwayRotorIV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaINorwayRotorV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaIRotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaIRotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaIRotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaIRotorIV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaIRotorV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaISonder.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaISonderRotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaISonderRotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaISonderRotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorIV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorVI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorVII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM3RotorVIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorBeta.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorGamma.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorIV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorV.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorVI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorVII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaM4RotorVIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaZ.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaZEtw.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaZRotorI.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaZRotorII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EnigmaZRotorIII.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Etw.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/EtwPassthrough.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Journaled.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Observable.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Observer.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Plugboard.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/PlugboardPassthrough.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Reflector.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorDUKW.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorNorwayUKW.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorSonderUKW.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKWA.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKWB.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKWBThin.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKWC.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKWCThin.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorUKW_EnigmaB_A133.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/ReflectorZUKW.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/RotatingReflector.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Rotor.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Swappable.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/SwappablePlugboard.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/Utils.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/XRay.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython/__init__.py +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython.egg-info/SOURCES.txt +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython.egg-info/dependency_links.txt +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/enigmapython.egg-info/top_level.txt +0 -0
- {enigmapython-1.3.0 → enigmapython-1.3.2}/setup.cfg +0 -0
|
@@ -1,32 +1,71 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: enigmapython
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A simple yet faithful library to emulate different Enigma machines models using Python
|
|
5
5
|
Home-page: https://github.com/denismaggior8/enigma-python
|
|
6
6
|
Author: Denis Maggiorotto
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
11
|
Description-Content-Type: text/markdown
|
|
8
12
|
Dynamic: author
|
|
13
|
+
Dynamic: classifier
|
|
9
14
|
Dynamic: description
|
|
10
15
|
Dynamic: description-content-type
|
|
11
16
|
Dynamic: home-page
|
|
17
|
+
Dynamic: license
|
|
12
18
|
Dynamic: summary
|
|
13
19
|
|
|
14
20
|
# Enigma Python library
|
|
15
21
|
|
|
16
22
|
<div class="img-container" style="text-align: center;">
|
|
17
|
-
<img src="img/logo.jpg" alt="drawing" width="200" />
|
|
23
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/logo.jpg" alt="drawing" width="200" />
|
|
18
24
|
</div>
|
|
19
25
|
|
|
20
26
|
## About
|
|
21
27
|
|
|
22
28
|
Welcome to **enigmapython**, a Python package designed to emulate the legendary Enigma cryptographic machine used during World War II. **enigmapython** provides a faithful implementation of the Enigma machine, allowing users to explore and understand the workings of this historic device.
|
|
23
29
|
|
|
30
|
+
This project is listed on [Wikipedia](https://en.wikipedia.org/wiki/List_of_Enigma_machine_simulators) as a globally recognized Enigma machine simulator, noted for its historical accuracy.
|
|
31
|
+
|
|
32
|
+
<div class="img-container" style="text-align: center;">
|
|
33
|
+
<a href="https://en.wikipedia.org/wiki/List_of_Enigma_machine_simulators">
|
|
34
|
+
<img src="https://img.shields.io/badge/Wikipedia-List%20of%20Enigma%20machine%20simulators-white?style=for-the-badge&logo=wikipedia&logoColor=black" alt="Wikipedia">
|
|
35
|
+
</a>
|
|
36
|
+
<a href="https://pypi.org/project/enigmapython/">
|
|
37
|
+
<img src="https://img.shields.io/pypi/v/enigmapython?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI version">
|
|
38
|
+
</a>
|
|
39
|
+
<a href="https://pypi.org/project/enigmapython/">
|
|
40
|
+
<img src="https://img.shields.io/pypi/pyversions/enigmapython?style=for-the-badge&logo=python&logoColor=white" alt="Python versions">
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://pepy.tech/project/enigmapython">
|
|
43
|
+
<img src="https://img.shields.io/pepy/dt/enigmapython?style=for-the-badge&logo=pypi&logoColor=white" alt="Total Downloads">
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://github.com/denismaggior8/enigma-python">
|
|
46
|
+
<img src="https://img.shields.io/github/stars/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="GitHub Stars">
|
|
47
|
+
</a>
|
|
48
|
+
<a href="https://github.com/denismaggior8/enigma-python">
|
|
49
|
+
<img src="https://img.shields.io/github/languages/code-size/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="Code Size">
|
|
50
|
+
</a>
|
|
51
|
+
<a href="https://github.com/denismaggior8/enigma-python/blob/master/LICENSE">
|
|
52
|
+
<img src="https://img.shields.io/github/license/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="License">
|
|
53
|
+
</a>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
24
56
|
## Key Features
|
|
25
57
|
|
|
26
58
|
- **Flexible Configuration**: **enigmapython** allows customization of the Enigma machine configuration, enabling users to experiment with different rotor settings, reflectors, and ring positions.
|
|
27
59
|
- **Easy Extension**: **enigmapython** is designed to be easily extensible, allowing developers to add new features or enhance the existing implementation.
|
|
28
60
|
- **Simple yet faithful**: don't be fooled by its simplicity; **enigmapython** implements 100% the algorithms of many Enigma machine models, allowing to decode a message that has been encoded by a real Enigma machine and also the contrary.
|
|
29
61
|
|
|
62
|
+
## Historical Accuracy & Verification
|
|
63
|
+
|
|
64
|
+
**enigmapython** is rigorously tested against authentic historical data to ensure maximum accuracy.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- [Authentic German Army Test Message from 1930](https://cryptocellar.org/enigma/e-message-1930.html): Documented by Frode Weierud's CryptoCellar, this test validates that the **Enigma I** implementation correctly handles the complex interaction of rotors, ring settings, and plugboard connections exactly as the original machines did. See the [corresponding unit test](https://github.com/denismaggior8/enigma-python/blob/master/tests/Enigma1930_tests.py) for details.
|
|
68
|
+
|
|
30
69
|
## Machines implementations
|
|
31
70
|
|
|
32
71
|
The following Enigma machine models (along with their rotors, reflectors and plugboards) have been implemented:
|
|
@@ -148,7 +187,7 @@ The following Enigma machine models (along with their rotors, reflectors and plu
|
|
|
148
187
|
|
|
149
188
|
## Getting started
|
|
150
189
|
|
|
151
|
-
|
|
190
|
+
Get started by installing the package from PyPI (`pip install enigmapython`) and exploring the examples in the [examples](https://github.com/denismaggior8/enigma-python/tree/master/examples) folder.
|
|
152
191
|
|
|
153
192
|
## Documentation
|
|
154
193
|
|
|
@@ -161,16 +200,28 @@ Here's a list containing all the known Enigma simulators that use the **enigmapy
|
|
|
161
200
|
- [Enigma TUI](https://github.com/denismaggior8/enigma-tui). **Enigma TUI** is a **T**erminal **U**ser **I**nterface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal. It employs **enigmapython** as Enigma engine.
|
|
162
201
|
|
|
163
202
|
<div class="img-container" style="text-align: center;">
|
|
164
|
-
<img src="img/enigmatui.png" alt="drawing" width="400" align="center"/>
|
|
203
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/enigmatui.png" alt="drawing" width="400" align="center"/>
|
|
165
204
|
</div>
|
|
205
|
+
<br>
|
|
206
|
+
<br>
|
|
166
207
|
|
|
208
|
+
- [MicroPython Enigma Python](https://github.com/denismaggior8/micropython-enigma-python). **MicroPython Enigma Python** is a side project to bring Enigma Python library also on ambedded devices which runs MicroPython. It has been referenced on https://awesome-micropython.com/#historical, a curated list of the best MicroPython libraries, in the Cryptography/Historical section.
|
|
167
209
|
|
|
168
|
-
-
|
|
210
|
+
<div class="img-container" style="text-align: center;">
|
|
211
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/micropython-enigma-python.png" alt="drawing" width="400" align="center"/>
|
|
212
|
+
</div>
|
|
169
213
|
|
|
214
|
+
<br>
|
|
215
|
+
<br>
|
|
216
|
+
|
|
217
|
+
- [Retrocampus BBS Enigma simulator](https://retrocampus.com/bbs/). When connected to the BBS, type E to access an Enigma M3 cypher machine whose backend is based on **enigmapython**.
|
|
170
218
|
<div class="img-container" style="text-align: center;">
|
|
171
|
-
<img src="img/retrocampus_enigma.png" alt="drawing" width="400" align="center"/>
|
|
219
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/retrocampus_enigma.png" alt="drawing" width="400" align="center"/>
|
|
172
220
|
</div>
|
|
173
221
|
|
|
222
|
+
<br>
|
|
223
|
+
<br>
|
|
224
|
+
|
|
174
225
|
In the case you leveraged **enigmapython** API in a project, either public or not, drop me an email at __denis.maggiorotto[at]gmail.com__ and I'll be happy to list you here.
|
|
175
226
|
|
|
176
227
|
|
|
@@ -16,18 +16,23 @@ class Enigma(Observer,Journaled,Clonable):
|
|
|
16
16
|
|
|
17
17
|
alphabet_list = None
|
|
18
18
|
|
|
19
|
+
def add_rotor(self,idx,rotor):
|
|
20
|
+
if self.auto_increment_rotors == True and rotor is not None:
|
|
21
|
+
rotor.add_observer(self)
|
|
22
|
+
self.rotors[idx] = rotor
|
|
23
|
+
|
|
19
24
|
def __init__(self, plugboard, rotors, reflector,etw,auto_increment_rotors=False, alphabet=Alphabets.lookup.get("latin_i18n_26chars_lowercase")):
|
|
20
25
|
Journaled.__init__(self)
|
|
21
26
|
Clonable.__init__(self)
|
|
22
27
|
self.plugboard = plugboard
|
|
23
|
-
self.rotors = rotors
|
|
24
28
|
self.reflector = reflector
|
|
29
|
+
self.rotors = [None]*len(rotors)
|
|
25
30
|
self.etw = etw
|
|
26
31
|
self.auto_increment_rotors = auto_increment_rotors
|
|
27
32
|
self.alphabet_list = list(alphabet)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
for i, rotor in enumerate(rotors):
|
|
34
|
+
self.add_rotor(i, rotor)
|
|
35
|
+
|
|
31
36
|
|
|
32
37
|
def input_string(self,str):
|
|
33
38
|
output_string = ""
|
|
@@ -51,7 +51,8 @@ class Scrambler(Journaled):
|
|
|
51
51
|
i += 1
|
|
52
52
|
# Rotate the wiring
|
|
53
53
|
self.wiring = self.wiring[-1:] + self.wiring[:-1]
|
|
54
|
-
|
|
54
|
+
# The following line has been commente out becode not Micropython compatible
|
|
55
|
+
# logging.debug("Rotation " + str(i).zfill(2) + "; Wiring: " + self.wiring)
|
|
55
56
|
|
|
56
57
|
@staticmethod
|
|
57
58
|
def __shift(letter, shift, alphabet_list):
|
|
@@ -1,32 +1,71 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: enigmapython
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A simple yet faithful library to emulate different Enigma machines models using Python
|
|
5
5
|
Home-page: https://github.com/denismaggior8/enigma-python
|
|
6
6
|
Author: Denis Maggiorotto
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
11
|
Description-Content-Type: text/markdown
|
|
8
12
|
Dynamic: author
|
|
13
|
+
Dynamic: classifier
|
|
9
14
|
Dynamic: description
|
|
10
15
|
Dynamic: description-content-type
|
|
11
16
|
Dynamic: home-page
|
|
17
|
+
Dynamic: license
|
|
12
18
|
Dynamic: summary
|
|
13
19
|
|
|
14
20
|
# Enigma Python library
|
|
15
21
|
|
|
16
22
|
<div class="img-container" style="text-align: center;">
|
|
17
|
-
<img src="img/logo.jpg" alt="drawing" width="200" />
|
|
23
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/logo.jpg" alt="drawing" width="200" />
|
|
18
24
|
</div>
|
|
19
25
|
|
|
20
26
|
## About
|
|
21
27
|
|
|
22
28
|
Welcome to **enigmapython**, a Python package designed to emulate the legendary Enigma cryptographic machine used during World War II. **enigmapython** provides a faithful implementation of the Enigma machine, allowing users to explore and understand the workings of this historic device.
|
|
23
29
|
|
|
30
|
+
This project is listed on [Wikipedia](https://en.wikipedia.org/wiki/List_of_Enigma_machine_simulators) as a globally recognized Enigma machine simulator, noted for its historical accuracy.
|
|
31
|
+
|
|
32
|
+
<div class="img-container" style="text-align: center;">
|
|
33
|
+
<a href="https://en.wikipedia.org/wiki/List_of_Enigma_machine_simulators">
|
|
34
|
+
<img src="https://img.shields.io/badge/Wikipedia-List%20of%20Enigma%20machine%20simulators-white?style=for-the-badge&logo=wikipedia&logoColor=black" alt="Wikipedia">
|
|
35
|
+
</a>
|
|
36
|
+
<a href="https://pypi.org/project/enigmapython/">
|
|
37
|
+
<img src="https://img.shields.io/pypi/v/enigmapython?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI version">
|
|
38
|
+
</a>
|
|
39
|
+
<a href="https://pypi.org/project/enigmapython/">
|
|
40
|
+
<img src="https://img.shields.io/pypi/pyversions/enigmapython?style=for-the-badge&logo=python&logoColor=white" alt="Python versions">
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://pepy.tech/project/enigmapython">
|
|
43
|
+
<img src="https://img.shields.io/pepy/dt/enigmapython?style=for-the-badge&logo=pypi&logoColor=white" alt="Total Downloads">
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://github.com/denismaggior8/enigma-python">
|
|
46
|
+
<img src="https://img.shields.io/github/stars/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="GitHub Stars">
|
|
47
|
+
</a>
|
|
48
|
+
<a href="https://github.com/denismaggior8/enigma-python">
|
|
49
|
+
<img src="https://img.shields.io/github/languages/code-size/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="Code Size">
|
|
50
|
+
</a>
|
|
51
|
+
<a href="https://github.com/denismaggior8/enigma-python/blob/master/LICENSE">
|
|
52
|
+
<img src="https://img.shields.io/github/license/denismaggior8/enigma-python?style=for-the-badge&logo=github&logoColor=white" alt="License">
|
|
53
|
+
</a>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
24
56
|
## Key Features
|
|
25
57
|
|
|
26
58
|
- **Flexible Configuration**: **enigmapython** allows customization of the Enigma machine configuration, enabling users to experiment with different rotor settings, reflectors, and ring positions.
|
|
27
59
|
- **Easy Extension**: **enigmapython** is designed to be easily extensible, allowing developers to add new features or enhance the existing implementation.
|
|
28
60
|
- **Simple yet faithful**: don't be fooled by its simplicity; **enigmapython** implements 100% the algorithms of many Enigma machine models, allowing to decode a message that has been encoded by a real Enigma machine and also the contrary.
|
|
29
61
|
|
|
62
|
+
## Historical Accuracy & Verification
|
|
63
|
+
|
|
64
|
+
**enigmapython** is rigorously tested against authentic historical data to ensure maximum accuracy.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- [Authentic German Army Test Message from 1930](https://cryptocellar.org/enigma/e-message-1930.html): Documented by Frode Weierud's CryptoCellar, this test validates that the **Enigma I** implementation correctly handles the complex interaction of rotors, ring settings, and plugboard connections exactly as the original machines did. See the [corresponding unit test](https://github.com/denismaggior8/enigma-python/blob/master/tests/Enigma1930_tests.py) for details.
|
|
68
|
+
|
|
30
69
|
## Machines implementations
|
|
31
70
|
|
|
32
71
|
The following Enigma machine models (along with their rotors, reflectors and plugboards) have been implemented:
|
|
@@ -148,7 +187,7 @@ The following Enigma machine models (along with their rotors, reflectors and plu
|
|
|
148
187
|
|
|
149
188
|
## Getting started
|
|
150
189
|
|
|
151
|
-
|
|
190
|
+
Get started by installing the package from PyPI (`pip install enigmapython`) and exploring the examples in the [examples](https://github.com/denismaggior8/enigma-python/tree/master/examples) folder.
|
|
152
191
|
|
|
153
192
|
## Documentation
|
|
154
193
|
|
|
@@ -161,16 +200,28 @@ Here's a list containing all the known Enigma simulators that use the **enigmapy
|
|
|
161
200
|
- [Enigma TUI](https://github.com/denismaggior8/enigma-tui). **Enigma TUI** is a **T**erminal **U**ser **I**nterface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal. It employs **enigmapython** as Enigma engine.
|
|
162
201
|
|
|
163
202
|
<div class="img-container" style="text-align: center;">
|
|
164
|
-
<img src="img/enigmatui.png" alt="drawing" width="400" align="center"/>
|
|
203
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/enigmatui.png" alt="drawing" width="400" align="center"/>
|
|
165
204
|
</div>
|
|
205
|
+
<br>
|
|
206
|
+
<br>
|
|
166
207
|
|
|
208
|
+
- [MicroPython Enigma Python](https://github.com/denismaggior8/micropython-enigma-python). **MicroPython Enigma Python** is a side project to bring Enigma Python library also on ambedded devices which runs MicroPython. It has been referenced on https://awesome-micropython.com/#historical, a curated list of the best MicroPython libraries, in the Cryptography/Historical section.
|
|
167
209
|
|
|
168
|
-
-
|
|
210
|
+
<div class="img-container" style="text-align: center;">
|
|
211
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/micropython-enigma-python.png" alt="drawing" width="400" align="center"/>
|
|
212
|
+
</div>
|
|
169
213
|
|
|
214
|
+
<br>
|
|
215
|
+
<br>
|
|
216
|
+
|
|
217
|
+
- [Retrocampus BBS Enigma simulator](https://retrocampus.com/bbs/). When connected to the BBS, type E to access an Enigma M3 cypher machine whose backend is based on **enigmapython**.
|
|
170
218
|
<div class="img-container" style="text-align: center;">
|
|
171
|
-
<img src="img/retrocampus_enigma.png" alt="drawing" width="400" align="center"/>
|
|
219
|
+
<img src="https://raw.githubusercontent.com/denismaggior8/enigma-python/master/img/retrocampus_enigma.png" alt="drawing" width="400" align="center"/>
|
|
172
220
|
</div>
|
|
173
221
|
|
|
222
|
+
<br>
|
|
223
|
+
<br>
|
|
224
|
+
|
|
174
225
|
In the case you leveraged **enigmapython** API in a project, either public or not, drop me an email at __denis.maggiorotto[at]gmail.com__ and I'll be happy to list you here.
|
|
175
226
|
|
|
176
227
|
|
|
@@ -12,11 +12,17 @@ setup(
|
|
|
12
12
|
long_description_content_type='text/markdown',
|
|
13
13
|
url="https://github.com/denismaggior8/enigma-python",
|
|
14
14
|
name="enigmapython",
|
|
15
|
-
version="1.3.
|
|
15
|
+
version="1.3.2",
|
|
16
16
|
packages=find_packages(
|
|
17
17
|
# All keyword arguments below are optional:
|
|
18
18
|
where='.', # '.' by default
|
|
19
19
|
include=['enigmapython'], # ['*'] by default
|
|
20
20
|
),
|
|
21
|
+
classifiers=[
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
],
|
|
26
|
+
license="MIT",
|
|
21
27
|
description="A simple yet faithful library to emulate different Enigma machines models using Python"
|
|
22
28
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|