Skip to main content

cipherid

A small, dependency-free teaching package that guesses a few common text encodings and classical ciphers. It can recognize Base64, hexadecimal, URL percent-encoding, ROT13, some Caesar shifts, and plain English text.

Modern encryption such as AES is designed to look random. The package cannot reliably tell which modern cipher was used or recover its plaintext without the right key. Its language guesses are also uncertain for short samples.

Use it from Python

From the project directory:

from cipherid import identify

for guess in identify("SGVsbG8gd29ybGQ="):
    print(guess.name, guess.decoded)

To inspect a text file from Python:

from cipherid import identify_file

for guess in identify_file("sample.txt"):
    print(guess.name, guess.decoded)

Command line

python -m cipherid "SGVsbG8gd29ybGQ="
python -m cipherid --file sample.txt
python -m cipherid --inspect "C:\\path\\to\\archive.7z"

Use inspect_file in Python for basic file metadata and format clues:

from cipherid import inspect_file

report = inspect_file(r"C:\path\to\archive.7z")
print(report.kind)         # for example: 7-Zip archive
print(report.text_status)  # for example: binary or non-UTF-8 sample
print(report.preview_hex)
print(report.note)

Inspection recognizes a few common file signatures. A signature can identify an archive or document format, but it cannot prove that the contents are encrypted or name the cipher. Compression and encryption can both produce binary-looking data. Use the tool that created the archive to check whether it is password-protected; recovering protected contents requires the password or key.

TRAINING_EXAMPLES in __init__.py provides 5,000 reproducible labeled examples: 1,000 generated English phrases, each represented as plain text, Base64, hexadecimal, URL percent-encoding, and ROT13. You can inspect them from Python:

from cipherid import TRAINING_EXAMPLES

print(len(TRAINING_EXAMPLES))  # 5000
print(TRAINING_EXAMPLES[:5])

These examples demonstrate known transformations; they are not examples of modern encryption like AES. The detector uses structural checks for the formats it supports, rather than training a statistical model on this synthetic dataset. Modern encryption is designed to hide patterns, and identifying it generally requires metadata or the key.

Metadata

Release files for cipherid-vwlau 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cipherid-vwlau 0.1.1
File Size Uploaded Provenance Actions
cipherid_vwlau-0.1.1.tar.gz 5.9 kB Without provenance Details for cipherid_vwlau-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cipherid-vwlau 0.1.1
File Interpreter ABI Platform Actions
cipherid_vwlau-0.1.1-py3-none-any.whl Python 3 none any Details for cipherid_vwlau-0.1.1-py3-none-any.whl

Total release size: 13.8 kB

Release files / cipherid_vwlau-0.1.1.tar.gz

Download URL cipherid_vwlau-0.1.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
62df1a359ee68eed02da51817fc971052f58f5f20943b869f2d08c7cee8fbb9a
BLAKE2b-256 checksum
How to use checksums
fb71881123b631beb41e35b7b7930d3003240de2bc9e8441823006811a191026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / cipherid_vwlau-0.1.1-py3-none-any.whl

Download URL cipherid_vwlau-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a957d9087ecabd641dc74b52a8bfb5b1e9a4b3bfb8c5faecf1618c2b8f8d213
BLAKE2b-256 checksum
How to use checksums
825ce0a53ce4a4296608edb010e2cc94988bb06645c557d4272546945e691b75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for cipherid-vwlau 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page