NetworkLuki Cipher
An educational monoalphabetic substitution cipher, available as a Python library and command-line application. This project also contains cryptography and network research notes.
Security warning: This is a classical substitution cipher with a fixed default alphabet. It is trivial to break with frequency analysis and must not be used for passwords, private messages, authentication, file encryption, or any sensitive information. For real encryption, use a vetted cryptographic library and standard authenticated encryption.
Installation
After the first PyPI release:
python -m pip install networkluki-cipher
From a checked-out repository, for development:
python -m pip install -e .
Requires Python 3.10 or newer. The runtime has no third-party dependencies.
CLI
networkluki-cipher show
networkluki-cipher show-map
networkluki-cipher enc "Hello, World!"
networkluki-cipher dec "Oryyz, Mztyc!"
printf '%s\n' 'Hello' | networkluki-cipher enc
python -m networkluki_cipher show
show prints the plaintext alphabet and substitution alphabet on two lines. show-map prints all 26 mappings. enc and dec accept a single text argument or read standard input. A single unrecognized positional argument is treated as text to decrypt, for compatibility with the original script.
The CLI enforces a 1 MiB UTF-8 input limit; input exceeding it fails with exit code 2. Non-ASCII characters and nonletters are preserved.
The old local command remains available from the repository root:
python3 src/crypto.py show
Python library
from networkluki_cipher import build_maps, encrypt_text, decrypt_text
enc, dec = build_maps()
ciphertext = encrypt_text("Hello, World!", enc)
assert decrypt_text(ciphertext, dec) == "Hello, World!"
build_maps(cipher=...) can accept a custom permutation of the 26 ASCII letters for demonstrations. Changing the substitution alphabet does not make the cipher secure.
Development and testing
python -m pip install -e .
python -m unittest discover -s tests -v
python -m pip install build twine
python -m build
python -m twine check --strict dist/*
Release steps and PyPI Trusted Publishing setup: docs/PUBLISHING.md.
Research repository
Other material in this repository covers cryptography-focused research, network-layer concepts, visualizations, and reproducible experiments. Research and production-grade cryptography are separate from the educational cipher package.
For each study, document the problem statement, related work, method, results, limitations, and conclusions. Explicitly record cryptographic assumptions and threat models. Cite relevant RFC, NIST, ISO, or peer-reviewed references. Include the commit hash when citing this repository as a research artifact.
License
MIT. See LICENSE.
Metadata
Release files for networkluki-cipher 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| networkluki_cipher-0.1.0.tar.gz | 6.8 kB | With provenance | Details for networkluki_cipher-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| networkluki_cipher-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for networkluki_cipher-0.1.0-py3-none-any.whl |
Total release size: 13.7 kB
Release files / networkluki_cipher-0.1.0.tar.gz
| Download URL | networkluki_cipher-0.1.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60a1a9113bb6d625ca73eb9181f20be79564329ed0f148cc8d91bd9712a8baf4
|
|
BLAKE2b-256 checksum How to use checksums |
1dc17e0f82d0e147041f91062d66ee9f6b020728753673896064ed5963f60251
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / networkluki_cipher-0.1.0-py3-none-any.whl
| Download URL | networkluki_cipher-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
687c9d3d7a3aff11a0909c875d6c4c652fbff1137738279748af7e0ba841ef79
|
|
BLAKE2b-256 checksum How to use checksums |
545fc34e069ca35da367087b28212457e74d3f451259a6b188aeef386421bddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for networkluki-cipher 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for networkluki_cipher-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.