Python byte-enabled Enigma-like simulation.
Project description
Enigma Byte Machine === Using the same principles that my ‘classic’ Enigma simulation is built on; I reverse-engineered a newer, stronger, more robust Enigma encryption scheme that is capable of encoding any standard 8-bit character (also known as a byte). By removing the 26 character limitation, we are now able to encrypt entire binary files using the same basic mechanics as the original Enigma machine.
Technical Details
Developed and tested on Python 3.6.1 for Windows.
support for other python versions (>= 3.6.0) and other operating systems is likely, but not guaranteed.
Designed to be invoked as a module, but can be run from the __main__.py script just as well.
Can be imported and used in your own applications, but no documentation is provided yet (though it shouldn’t be too hard to figure out).
Requires requests module and internet connection to correctly build readme (conversion from Markdown to reStructuredText).
Downloading
This package is now available on PyPI, and may be installed using pip install bitnigma or directly from the repo using pip install git+git://github.com/spgill/bitnigma.
Usage
usage: python -m bitnigma [-h] [--plugboard PLUGBOARD [PLUGBOARD ...]]
[--rotors ROTORS [ROTORS ...]] [--reflector REFLECTOR]
[--state STATE] [--state-create] [--state-update]
[--state-print] [--state-seed STATE_SEED]
[--state-seed-file STATE_SEED_FILE] [--input INPUT]
[--input-std] [--input-path INPUT_PATH] [--output-std]
[--output-path OUTPUT_PATH] [--chunk-size CHUNK_SIZE]
[--benchmark] [--progress]
Process some data through a simulated Enigma machine
optional arguments:
-h, --help show this help message and exit
--plugboard PLUGBOARD [PLUGBOARD ...], -pl PLUGBOARD [PLUGBOARD ...]
Specify a list of byte pairings for the plugboard. ex;
10:25 50:77 102:33
--rotors ROTORS [ROTORS ...], -ro ROTORS [ROTORS ...]
Specify a list of rotors in the following format:
SHORTNAME[:SETTING] ex; byte1:52
--reflector REFLECTOR, -rf REFLECTOR
Specify a reflector by its shortname.
--state STATE, -s STATE
Path for the state file (reading or writing). States
can be used in lieu of manually specifying rotors and
reflectors every time.
--state-create, -sc Take the plugboard, rotor, and reflector args and save
them to the state file (and then exit).
--state-update, -su After processing, save the changed rotor state back to
the state file. This allows for a continuous rotor
progression over multiple program invocations. THERE
IS NO ROLLBACK, SO BACK UP THE STATE.
--state-print, -sp Print the state information to stdout and then exit.
--state-seed STATE_SEED, -ss STATE_SEED
String seed for to create a randomly generated state.
--state-seed-file STATE_SEED_FILE, -ssf STATE_SEED_FILE
File to use as seed for a randomly generated state.
--input INPUT, -i INPUT
Input a string via this command line argument.
--input-std, -is Read data from stdin pipe.
--input-path INPUT_PATH, -ip INPUT_PATH
Open and read data from file path.
--output-std, -os Write output to the stdout pipe.
--output-path OUTPUT_PATH, -op OUTPUT_PATH
Write output to the specified file path.
--chunk-size CHUNK_SIZE, -c CHUNK_SIZE
Chunk size for reading and writing data.
--benchmark, -b Benchmark the processing time (prints results to
stderr).
--progress, -p Show the progress meter; written to stderr.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitnigma-1.1.0.tar.gz.
File metadata
- Download URL: bitnigma-1.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e172be58ef89f077b242669bc3b8d4a691c767c14d589a966448518727d5ecd
|
|
| MD5 |
0d000a6b22ee31c4996fc305333fd544
|
|
| BLAKE2b-256 |
05a326001083932974adf76f565161d0d4fb408e2c242f2db76b3a6d35b3913b
|
File details
Details for the file bitnigma-1.1.0-py3-none-any.whl.
File metadata
- Download URL: bitnigma-1.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
571bd985607e99b07bd2a2a2eb637cd94160b1b8def766b57ee0e7f3fafd8e92
|
|
| MD5 |
4c149aa2b4d318d53c79c1dc04b3a9dc
|
|
| BLAKE2b-256 |
912c62b367eff7d95db1abfcbbb27b0208240a30aff6340ac519a7ab6fabb5f8
|