DecryptRE
DecryptRE is a free, open-source Python command-line tool that decrypts text with or without a passphrase and can encrypt it again with the same methods.
It handles encodings (Base64, Base32, hex, URL, ASCII85), classical ciphers
(Caesar/ROT-N, Atbash, Vigenère, Rail Fence, simple substitution), XOR, and
passphrase-based modern crypto (Fernet, AES-256 and legacy 3DES). It also
opens OpenSSL Salted__ blobs and recognises common hashes.
Everything runs offline at runtime. The installed package makes no API
calls, sends no telemetry, and uses no remote wordlists; no internet connection
is needed after installation. A test in the repository enforces this. The
optional local large-tier builder is the only component that downloads
anything, and only when you run it explicitly.
⚠️ Responsible use
DecryptRE is for education, Capture-The-Flag puzzles, and data you own.
- Only decrypt messages you created or have explicit permission to test.
- Do not use it against other people's accounts, files, or systems.
- "No passphrase" mode is a puzzle-solving aid, not a way to break real encrypted services.
The authors accept no responsibility for misuse. See LICENSE.
What it can and cannot do
| Situation | What DecryptRE does |
|---|---|
| Text is encoded (Base64, hex, ...) | Decodes it. Encodings are not encryption. |
| Text uses a classical cipher | Tries the parameters and ranks results by how much they look like English. |
| Text uses XOR with a short key | Recovers single-byte keys and repeating keys (up to 32 bytes). |
| Text uses Fernet / AES / 3DES and you know the passphrase | Decrypts it. |
| Text uses Fernet / AES / 3DES and you do not know the passphrase | Tries every passphrase in an offline wordlist (a dictionary attack). If the passphrase is not in the list, it cannot be recovered. That is the point of modern cryptography. |
Text is an OpenSSL Salted__ blob and you know the passphrase |
Decrypts it. AES-128/192/256-CBC, 3DES, DES, Blowfish, CAST5 and RC4 are tried with OpenSSL's MD5, SHA-256 or PBKDF2 key derivation. |
Text is an OpenSSL Salted__ blob, the passphrase is short, and you opt in |
--incremental exhaustively tries a chosen charset/length space. It is slow and exponential and never runs automatically. |
| Text is a hash (MD5, SHA-1, SHA-256, SHA-512) | Identifies the likely algorithm and clearly states that hashes are one-way and cannot be decrypted. |
Two honest statements that the code and docs repeat:
- "No passphrase" is not magic. For encodings and classical ciphers it is a bounded parameter search. For modern crypto it is a dictionary attack.
- Modern encryption cannot be brute-forced by this tool. A real AES or
Fernet key derived from a strong passphrase is out of reach. The opt-in
OpenSSL
--incrementalmode is not an exception: it only exhausts short, explicitly chosen charsets, and its cost is exponential.
Installation
Requirements: Python 3.9 or newer.
The quickest way is from PyPI:
pip install decryptre
Or install from source:
git clone https://github.com/JasonMarvello/DecryptRE.git
cd DecryptRE
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install .
That installs the decryptre command. To work on the code instead:
pip install -e ".[dev]"
Quick start
# Decode Base64
decryptre decrypt --input "SGVsbG8sIHdvcmxkIQ==" --method base64
# Break a Caesar cipher without knowing the shift
decryptre decrypt --input "Wkh txlfn eurzq ira" --method caesar
# Let DecryptRE try every supported layer
decryptre decrypt --input "V2xqcGNwbyBhZmtrd3BkIGxjcCBxZnk6IG9wbnpvcCB4cCwgZXNweSBkc3RxZSB4cCBtbG52Lg=="
# Decrypt something you encrypted with a passphrase
decryptre encrypt --input "Secret note" --method aes --key "correct horse battery staple"
decryptre decrypt --input "decryptre:v1:..." --method aes --key "correct horse battery staple"
# Identify a hash
decryptre identify --input 5d41402abc4b2a76b9719d911017c592
# See every method, what it needs and a runnable example
decryptre methods
# A known passphrase in auto mode: the cipher verifies it
decryptre decrypt --input "decryptre:v1:..." --key "correct horse battery staple"
# OpenSSL `enc` output (starts with U2FsdGVkX1 = "Salted__")
decryptre decrypt --input "U2FsdGVkX1..." --key "passphrase"
--input accepts a file path, a literal string, or - to read from
standard input.
Interactive mode
Run it with no arguments and you get a menu instead of flags:
decryptre
Arrow keys (or j/k) move, 1-6 jump straight to an option, Enter
selects, q goes back and Ctrl+C quits. Choose Decrypt / decode text,
paste ciphertext or a file path, optionally give a passphrase, then pick from
the ranked results and ask for another layer if the text is still encoded.
Encrypt and identify work the same way.
decryptre --help still prints the full command reference, and when input is
piped (cat cipher.txt | decryptre) the help is printed instead of the menu.
If the input is an OpenSSL Salted__ blob and you leave the passphrase
blank, the UI asks for a wordlist tier: small (10,001), medium (1.37M,
default), large (local RockYou only), or generated 5M/10M/50M/100M. The scan
streams and reports throughput and ETA.
Commands
decryptre decrypt
decryptre decrypt --input <file|text|-> [options]
| Option | Default | Meaning |
|---|---|---|
--method NAME |
auto |
auto peels every layer; or name one method (see decryptre methods). |
--key TEXT |
none | Passphrase or cipher key. In auto mode a passphrase is also tried against AES/Fernet/3DES containers and verified by the cipher. |
--shift N |
try all | Caesar shift. |
--rails N |
try 2-12 | Rail Fence rails. |
--wordlist PATH |
bundled list | Passphrase list for Fernet/AES/3DES. Replaces the bundled tiers. |
--wordlist-tier |
medium (OpenSSL), small (AES/Fernet/3DES) |
small, medium, large, or generated 5m/10m/50m/100m for explicit --method openssl, aes, fernet or des3 scans. large adds local RockYou; generated tiers are not shipped as data. |
--case-variants |
common |
For explicit --method scans, also try the Capitalised and UPPERCASE form of each wordlist entry. off uses every list exactly as written, common expands the small tier and custom --wordlist files, all expands every tier (about three times the work). |
--mutations |
numbers (OpenSSL), off (AES/Fernet/3DES) |
Also try each wordlist entry with digits and symbols appended: off never mutates, numbers adds a trailing digit, symbols adds punctuation and short digit+symbol tails, common adds 00-99, short runs and years, all adds bounded leetspeak and doubled symbols. See Numbers and symbols. |
--no-wordlist |
off | Skip the bundled wordlist. |
--workers N |
available CPUs, capped at 64 | Worker processes for explicit openssl, aes, fernet and des3 wordlist scans, plus OpenSSL incremental scans. --workers 1 disables; auto mode stays single-process. |
--priority MODE |
background |
OS scheduling priority for explicit wordlist scans: background drops the parent and every worker below normal priority (Windows BELOW_NORMAL_PRIORITY_CLASS, nice 10 elsewhere) without reducing the worker count; normal leaves the process at the shell's priority. |
--incremental |
off | Opt-in exhaustive passphrase search for OpenSSL Salted__ blobs. Requires --method openssl; auto mode never starts it. See Incremental search. |
--charset NAME |
lower+upper+digits |
Charset component(s) for --incremental: lower, upper, digits, symbols, all. Repeat to combine. |
--min-length N |
1 |
Shortest passphrase length for --incremental. |
--max-length N |
5 |
Longest length for --incremental; above 6 requires --i-understand-the-risk. |
--resume |
off | Continue an interrupted --incremental run from its checkpoint. |
--state-file PATH |
per-blob file | Checkpoint location for --incremental. |
--i-understand-the-risk |
off | Allow --max-length above 6. |
--yes |
off | Skip the --incremental time-estimate confirmation. |
--no-substitution |
off | Skip the slow substitution solver in auto mode. |
--max-depth N |
3 |
Maximum number of layers to peel in auto mode. |
--max-candidates N |
2000 |
Hard budget for auto mode. |
--top N |
5 |
How many results to print. |
-v, --verbose |
off | Show extra detail. |
decryptre encrypt
decryptre encrypt --input <file|text|-> --method NAME [options]
Uses the same method names. --key is required for Vigenère, XOR, Fernet and
AES. Extra options: --shift (Caesar, default 3), --rails (Rail Fence),
--aes-mode gcm|cbc (default gcm), --kdf pbkdf2|scrypt (default
pbkdf2), --iterations (PBKDF2, default 200000), and --output FILE to
write the ciphertext to a file instead of the terminal.
decryptre methods
decryptre methods
Lists every supported method with its aliases, whether auto tries it,
what --key means for it, and a runnable example. Use it instead of
guessing method names.
decryptre identify
decryptre identify --input <file|text|->
Reports whether a value looks like MD5, SHA-1, SHA-256 or SHA-512, and reminds you that these are one-way functions. It never claims to "decrypt" a hash.
Supported methods
| Method | Aliases | Encrypt | Decrypt without a key | Notes |
|---|---|---|---|---|
| Base64 | b64 |
yes | yes | Padding is added automatically. |
| Base32 | b32 |
yes | yes | Case-insensitive. |
| Base16 / hex | hex, b16 |
yes | yes | Optional 0x prefix. |
| URL encoding | url, percent, urlencode |
yes | yes | Percent escapes and +. |
| ASCII85 | a85 |
yes | yes | Adobe <~ ~> wrappers accepted. |
| Caesar / ROT-N | caesar, rot, rot-n, rot13 |
yes | yes (all 26 shifts) | |
| Atbash | atbash |
yes | yes | Only one possible result. |
| Vigenère | vig |
yes | yes (key length 1-12) | Needs a decent amount of text. |
| Rail Fence | railfence, rail, rail-fence |
yes | yes (2-12 rails) | |
| Simple substitution | sub |
yes | best effort (trigram solver) | May be partially wrong; read the output. |
| XOR | xor |
yes | yes (single byte, repeating key up to 32 bytes) | decryptre:xor: output is understood automatically. |
| Fernet | fernet |
yes | dictionary attack only | PBKDF2 + SHA-256. |
| AES-256-GCM / AES-256-CBC | aes, aes-256, aes-gcm, aes-cbc |
yes | dictionary attack only | 256-bit key; PBKDF2 or scrypt KDF. |
| 3DES-CBC | des3, 3des, des-ede3 |
yes | dictionary attack only | Legacy/compatibility only: do not use for new encryption. |
OpenSSL Salted__ |
openssl, salted, openssl-enc |
no | passphrase, dictionary attack or opt-in incremental | Decrypt-only output of openssl enc ...; AES/3DES/DES/Blowfish/CAST5/RC4. |
How --method auto works
Auto mode peels one layer at a time:
- Try every applicable encoding decode.
- Try the classical cipher breakers.
- Try XOR when the text is binary or just came out of an encoding.
- Try a supplied passphrase against DecryptRE containers and OpenSSL
Salted__blobs. Fernet and AES-GCM are authenticated, so they are reported asverified. OpenSSL and CBC padding hits carry no tag, so they are reported ashigh (unauthenticated). - Otherwise try the passphrase dictionary on those containers and blobs. A
short progress line reports the scan so a long one does not look frozen.
Auto mode never starts
--incremental; that mode requires an explicit--method openssl --incremental. - Score every result with an offline English model (letter frequencies,
trigrams and common words), keep the best few as the next frontier, and
repeat up to
--max-depth.
A visited set prevents cycles such as Base64 that decodes to itself, and
--max-candidates bounds the total work. When several results are plausible,
they are printed best-first so you can choose:
[1] Vigenere · key "lantern" · confidence: high
reads like ordinary English.
The password is hidden under the third stone on the beach.
[2] Vigenere · key "nheqqlmwk" · confidence: low
weak English signal; probably a wrong guess.
Ran soytlerp it eirune ewyot apl tleog lyfor uc hig aidie.
Each result names the method, the recovered key or parameters, the path
that produced it, and a plain-language confidence note. Passphrase results
are always listed first. verified means a real authentication tag proved
the key; high (unauthenticated) means valid padding plus readable text,
which is a strong guess rather than proof. --verbose adds
the raw score and search depth; the score is a ranking aid, not a
probability.
The decryptre:v1: container
AES needs a salt, an IV/nonce and the KDF settings. Instead of asking you to
remember them, encrypt stores them beside the ciphertext in a small,
self-describing envelope:
decryptre:v1:<urlsafe-base64 of a JSON object>
{
"v": 1,
"alg": "aes-gcm",
"kdf": "pbkdf2",
"iterations": 200000,
"salt": "...",
"nonce": "...",
"tag": "...",
"ciphertext": "..."
}
Fernet containers store the Fernet token plus the salt and iteration count.
3DES containers use the same envelope with "alg": "des3-cbc" and an
8-byte IV. AES-GCM authenticates the whole envelope; AES-CBC and 3DES-CBC
are validated by padding.
A wrong passphrase raises a clear error instead of printing garbage.
XOR encryption prints decryptre:xor:<base64> for the same reason: it keeps
the ciphertext safe to copy through a terminal or a text file.
Copying ciphertext safely
Terminals wrap long lines, and PowerShell in particular re-flows output. The ciphertext is not changed, but selecting the wrapped text can insert newlines or leading spaces, which corrupts a pasted token. Treat display wrapping as a correctness hazard, not a cosmetic one.
Write the ciphertext to a file and copy from there:
decryptre encrypt --input "TEXT" --method aes --key "pass" --output ciphertext.txt
decryptre decrypt --input ciphertext.txt --method aes --key "pass"
Without --output, encrypt prints a warning when stdout is a terminal. The
interactive menu offers the same safe save after showing the result.
Scheduling priority and memory
OpenSSL wordlist and incremental scans use every available CPU (capped at 64)
at below-normal OS priority by default: Windows BELOW_NORMAL_PRIORITY_CLASS
and nice 10 elsewhere. The parent process and every worker inherit the
setting, so a full-throughput scan does not starve foreground applications
when the machine is otherwise idle. --priority normal restores the shell's
priority.
The 50M and 100M tiers stream their candidates, so memory does not grow with
the tier size; it scales with the worker count instead, because each worker
holds an interpreter plus one in-flight chunk. Before a 50M/100M scan,
DecryptRE compares a rough estimate against available RAM and prints a warning
when it is tight. It warns rather than blocks; lower --workers if it appears.
Examples
The examples/ folder contains ready-to-run ciphertexts and the
exact commands and output in examples/expected-output.md.
decryptre decrypt --input examples/caesar.txt --method caesar
decryptre decrypt --input examples/vigenere.txt --method vigenere
decryptre decrypt --input examples/layered.txt
decryptre decrypt --input examples/fernet.txt --method fernet --key sunshine
Wordlists
Bundled wordlists are split into tiers. The files are streamed line by line as
raw bytes, so a scan does not load a multi-million-line list into memory or
duplicate it across worker processes. Counts and file order come from
decryptre/wordlists/manifest.json; the
medium tier is globally deduplicated at build time.
| Tier | Candidates | Used by | Shipped on PyPI |
|---|---|---|---|
small |
10,001 | Auto mode and modern-container scans; optional for explicit OpenSSL | yes |
medium |
1,368,353 | Default for explicit --method openssl and the interactive OpenSSL picker |
yes |
large |
medium + local RockYou | Optional local build for explicit --method openssl |
no |
5m |
5,000,000 | Generated English/name/language variants | no data |
10m |
10,000,000 | Generated English/name/language variants | no data |
50m |
50,000,000 | Generated English/name/language variants | no data |
100m |
100,000,000 | Generated English/name/language variants | no data |
Provenance and licenses for the shipped lists are in
decryptre/wordlists/SOURCE.md.
# Fast 10k scan, or the default 1.37M multilingual scan.
decryptre decrypt --input blob.txt --method openssl --wordlist-tier small
decryptre decrypt --input blob.txt --method openssl
# Replace the tiers with your own list.
decryptre decrypt --input blob.txt --method openssl --wordlist my-words.txt
--wordlist replaces the bundled tiers; --wordlist-tier cannot be combined
with it, with --key, --incremental, or --no-wordlist. Auto mode stays on
small and rejects the tier option, so an ordinary decode never turns into a
multi-minute scan.
Case variants
The bundled lists are lowercase. That is why love opens a blob whose
passphrase is love, while Love and LOVE are not in the list at all.
--case-variants (default common) fixes that without shipping a bigger
file: every candidate is tried as written, with its first letter capitalised
and in full uppercase. Non-ASCII entries are left untouched because changing
their case would not reproduce what the user typed.
decryptre decrypt --input blob.txt --method openssl --wordlist-tier small
decryptre decrypt --input blob.txt --method openssl --case-variants off
common expands the small tier and custom --wordlist files; when a larger
tier is used, its first 10,001 entries (the small tier is its prefix) get the
extra forms. all expands every tier and roughly triples the scan, so the
CLI says so before starting. off reproduces the previous behaviour exactly.
Forms are deduplicated per candidate only, so a list that contains both love
and Love scans a duplicate instead of holding a huge seen-set in memory.
The generated 5m–100m tiers now include the bare seed forms
(Patty, PATTY) before their numbered variants, with the tier counts
unchanged.
Numbers and symbols
Real passphrases are rarely a bare dictionary word: love becomes love1,
Love123, love! or l0ve, and none of those is in a bundled list.
--mutations appends a bounded set of endings to each wordlist entry; off
uses the list exactly as written.
| Mode | Endings added | Per word | Small tier with default case variants |
|---|---|---|---|
numbers |
0-9 |
11 | 330,033 |
symbols |
!@#$%&*._-?+, 1!, 12!, 123!, 1., 123. |
18 | 540,054 |
common |
00-99, 123, 1234, 12345, 007, 69, years 1970-2026, and the symbol endings |
189 | 5,670,567 |
all |
common, plus one- and two-position leetspeak on the first six substitutable letters and !!/123!! |
263 | 7,890,789 |
numbers is the default for --method openssl, because a trailing digit is
the most common way a real password extends a word. It multiplies a small-tier
scan by eleven; --mutations off restores the plain list. AES, Fernet and
3DES scans default to off: each guess pays a full key derivation, so a
mutation matrix takes hours there. The CLI prints a one-line hint naming the
flag, and any mode can be chosen explicitly.
# Default: the small tier, case variants and a trailing digit.
decryptre decrypt --input blob.txt --method openssl --wordlist-tier small
# Symbols, which also tries "love!" and "love123!".
decryptre decrypt --input blob.txt --method openssl --mutations symbols
# Plain list, exactly as written.
decryptre decrypt --input blob.txt --method openssl --mutations off
Measured on the development machine with 8 workers against an AES-256-CBC
blob: the default small-tier scan (330,033 candidates) took 35 s,
--mutations off (30,003 candidates) 20 s, and --mutations symbols
(540,054 candidates) 43 s. A scan that finds one passphrase still runs to the
end of the list looking for a second plausible result, so the list length, not
the position of the hit, sets the cost. One AES-256-GCM word with
--mutations common (189 guesses) took about 7 s on a single worker, roughly
39 ms per guess.
Mutations and case variants share the same prefix rule: common expands the
small tier and custom --wordlist files while a larger tier keeps its
remaining entries unchanged, and all expands every tier. The two multiply,
so choose them deliberately on a large list; the CLI prints the resulting
upper bound before scanning. Non-ASCII entries get no endings at all, because
the tail sets are calibrated for ASCII passwords. Leetspeak is limited to six
positions and two substitutions, which keeps its multiplier bounded.
Modern containers
Fernet, AES-256-GCM, AES-256-CBC and 3DES-CBC scans use the same tiers: small
by default, or any --wordlist-tier. Each guess pays for the container's key
derivation, which is thousands of times more expensive than an OpenSSL guess,
so the command times one real decryption of that container and prints an
estimate before scanning, and --workers splits the list across processes.
AES-256-GCM and Fernet are authenticated: a matching passphrase is proof, not
a guess. identify reports the algorithm, and encrypt --aes-mode gcm (the
default) produces such a container.
The 5m, 10m, 50m and 100m options are generated on demand; the counts
include the bundled medium prefix, so they always begin with the common list.
They add English and personal-name variants first, then the other bundled
languages. No generated passphrases are stored in the package.
OpenSSL scans are ordered to find real passphrases quickly. The first million
candidates, which include the bundled common-password list, are tried against
AES-128/192/256 only — the ciphers openssl enc uses by default — and a guess
costs about 24 µs instead of 100 µs. If that finds nothing, the scan repeats the
list with every supported cipher (3DES, DES, Blowfish, CAST5 as well), so no
coverage is lost. Generated candidates beyond the first million are still tried
against every cipher, as before.
Custom lists are newline-separated. Blank lines and lines whose first character
is # are skipped; leading and trailing spaces are preserved, so a passphrase
such as spaced is tried exactly as written. Custom lists are streamed and
not de-duplicated.
Optional local large tier (RockYou)
RockYou is a 2009 breach corpus of about 14.3 million real passwords. It has
no explicit license and contains other people's data, so DecryptRE does
not ship it and pip install decryptre never downloads it. The large
tier is an explicitly opt-in, local-only build for authorized testing.
From a source checkout:
python tools/build_wordlists.py --fetch-rockyou
The script prints a provenance and ethics notice first and requires you to
type I understand before it downloads anything (--yes skips the prompt in
automation). It removes entries already in the medium tier and duplicates
inside RockYou, then writes decryptre/wordlists/rockyou-large.txt.gz plus a
local metadata file with the count and SHA-256. Both are ignored by Git and
excluded from the package; delete them with
python tools/build_wordlists.py --remove-rockyou. Without that local build,
--wordlist-tier large prints the build command instead of failing obscurely.
python tools/build_wordlists.py --verify checks the shipped tiers for
duplicates and confirms every small-tier entry is present in medium; add
--write-manifest to refresh the committed counts.
OpenSSL dictionary scans keep looking after the first plausible plaintext
until they find a second result or exhaust the list. Results are ranked by
text plausibility, and padding-valid gibberish is filtered out. Pass --top 1
to stop at the first plausible result.
The substitution solver uses aggregate English trigram statistics derived
from a public-domain book; see
decryptre/data/SOURCE.md. Only counts are
included, never any text from the source.
Parallel scans (explicit OpenSSL only)
When --method openssl runs a wordlist scan or --incremental, DecryptRE
uses one worker process per CPU available to the process (capped at 64) by
default. --workers 1 restores the single-process path, and any positive
number overrides the default.
Work is split into ordered 500-candidate chunks. Dictionary chunks are read
from the tier stream on demand, with only a few chunks in flight at once, so
the parent process does not build a futures list for all 1.37M (or 15M local)
wordlist entries. Each worker returns every plausible hit in its chunk; the
parent keeps scanning until it has two results or exhausts the tier, then
ranks them by text score. --top 1 restores stop-at-first behavior.
Incremental checkpoints advance only over the contiguous completed prefix, so
a resume never skips work that is still in flight.
Auto mode and the modern AES/Fernet/3DES dictionary do not use this pool;
--workers is rejected outside explicit OpenSSL scans.
Measured wordlist cost
Measured on 2026-11-22 on a 2-core Linux cloud runner against an OpenSSL AES-256-CBC blob whose passphrase is absent from the list, so both KDF phases run to exhaustion. Times include process startup and streaming.
| Tier | Candidates | 1 worker | 2 workers |
|---|---|---|---|
small |
10,001 | 3.45 s | 2.14 s |
medium |
1,368,353 | 7 m 37 s | 4 m 03 s |
large |
15,645,659 (medium + 14,277,306 local) | not full-scanned here | not full-scanned here |
Peak resident memory was 31.5 MB for the serial medium scan and 35.6 MB for the two-worker scan, so the list is streamed rather than copied into every worker. Streaming all 15,645,659 large-tier candidates once, without scanning, took 7.2 s and 14.6 MB RSS. A large scan is a deliberate offline job: at the measured medium rate (5,688 candidates/s with two workers) it is roughly 46 minutes on two cores, or around 92 minutes on one. That full 15M scan was not run on this 2-core runner; a 1M RockYou slice took 2 m 56 s (5,688 candidates/s, 31.8 MB peak RSS), which is the basis for the projection.
Incremental search (opt-in, exhaustive passphrase search)
The dictionary remains the default. --incremental is a separate, opt-in
mode for OpenSSL Salted__ blobs only. It is never started by
--method auto, and it does not change the wordlist path.
It is a mask-style exhaustive search over a global charset: every one-character candidate, then every two-character candidate, and so on. Within those bounds candidates are tried in a fixed order, with no randomness, no mutation and no duplicates. "Exhaustive" means exhaustive inside the selected charset and length range, not that it can find any passphrase.
# Try every 1-4 character lowercase/digit passphrase.
decryptre decrypt --input blob.txt --method openssl --incremental \
--charset lower --charset digits --min-length 1 --max-length 4
# Resume an interrupted run. The charset and lengths come from the state file.
decryptre decrypt --input blob.txt --method openssl --incremental --resume
# Non-interactive use: --yes skips the time-estimate prompt only.
decryptre decrypt --input blob.txt --method openssl --incremental \
--charset digits --max-length 3 --yes
Before starting, the CLI measures the actual rate on this machine with a few
hundred dummy passphrases, then prints the passphrase count, the cipher/KDF
variant count, the total number of decryption trials and an estimated time.
If the estimate is over 10 minutes it asks y/N; when stdin is not a
terminal it refuses unless --yes is given. --max-length defaults to 5;
values above 6 need --i-understand-the-risk.
The search covers OpenSSL's legacy EVP_BytesToKey derivation (MD5 then
SHA-256) across AES-128/192/256-CBC, 3DES-CBC, DES-CBC, Blowfish-CBC and
CAST5-CBC. RC4 is excluded, as in the dictionary path. -pbkdf2 blobs
still require --key, because 10,000 KDF iterations per guess would make
the estimate meaningless.
Because it is exhaustive inside its bounds, --incremental already reaches
digits and symbols the charset contains, and the wordlist mutation modes do
not apply to it. The default charset is lower+upper+digits, which has no
punctuation: add --charset symbols (or --charset all) when the passphrase
may end in ! or ., and raise --max-length when the punctuation is not
the last character.
Cost is exponential
Counts are cumulative passphrases up to that length. Times are illustrative at 2,500 passphrases/sec (roughly the rate measured on the development machine; each passphrase tries up to 14 variants), but the CLI prints the measured rate for your machine.
| Max length | 62-char passphrases | time at 2,500/s | 95-char passphrases | time at 2,500/s |
|---|---|---|---|---|
| 1 | 62 | 0.02 s | 95 | 0.04 s |
| 2 | 3,906 | 1.6 s | 9,120 | 3.6 s |
| 3 | 242,234 | 1.6 min | 866,495 | 5.8 min |
| 4 | 15,018,570 | 1.7 h | 82,317,120 | 9.1 h |
| 5 | 931,151,062 | 4.3 days | 7,820,126,495 | 36 days |
| 6 | 57,731,366,166 | 267 days | 742,912,017,120 | 9.4 years |
Length 5-6 is already impractical on most machines, and a 7+ character passphrase is not something to attack this way. Digits-only spaces are much smaller (1,111,110 candidates through length 6, about 7.4 minutes at 2,500/s), but they only help if the passphrase really uses digits only. Use the dictionary and targeted guesses first; this is the last resort.
Checkpoints and resume
Progress is checkpointed every five seconds or 4,096 passphrases, and at
each length boundary. With multiple workers, only completed chunks in the
contiguous prefix advance the checkpoint. Ctrl+C also saves the current
position. The state
file lives at ~/.decryptre/incremental/<blob>.json by default and can be
changed with --state-file. It stores only positions and settings, never a
passphrase or plaintext. --resume continues at the exact length and
position; the blob and cipher-variant set must match. To change the charset
or lengths, start a fresh run (or delete the state file).
What a hit proves
Salted__ has no authentication tag. A hit means the key produced valid
padding plus readable UTF-8 (and a reasonable English score), not
cryptographic proof. The scan stops at the first readable hit, so a rare
false positive can end it before the real passphrase is reached. It is much
stronger than a random guess, but always read the output before trusting
it. This mode cannot find a passphrase outside the selected charset, longer
than --max-length, or one used with OpenSSL -pbkdf2.
Limitations
- Modern crypto is not brute-forced. Fernet/AES/3DES are only opened when
the passphrase is supplied or present in the wordlist. OpenSSL
Salted__gets the opt-in exhaustive mode described above; auto never uses it. - Incremental search is exponential and opt-in.
--incrementalonly exhausts a chosen OpenSSL charset/length space. It cannot reach a strong or long passphrase, and it never runs in auto mode. - 3DES is legacy. Its 64-bit block and 112-bit effective key are obsolete. It is included only to read old data; use AES-256 for anything new.
- OpenSSL support is limited to
Salted__blobs. Output fromopenssl enc ... -saltis understood;-nosalt, raw-K/-ivkeys and ciphers outside AES/3DES/DES/Blowfish/CAST5/RC4 are not. - Short text is hard. Vigenère and substitution need a reasonable amount of text; a five-word message may not be enough.
- Substitution solving is best effort. It usually solves a paragraph, but always read the result before trusting it.
- Hashes cannot be reversed.
identifyonly names the algorithm. - One layer at a time. Auto mode follows a beam of promising results, not
every possible path. Increase
--max-depth,--max-candidatesor--topif a deep puzzle is missed. - This is not a password cracker for online services. It never connects to anything.
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python -m pytest
The test suite covers every module, includes known cipher vectors, checks layered detection, and asserts that the package imports no networking code.
Project layout:
decryptre/
encodings.py Base64/Base32/Base16/URL/ASCII85
classical.py Caesar, Atbash, Vigenere, Rail Fence, substitution
xor.py XOR encryption and key recovery
modern_crypto.py Fernet, AES, dictionary attack, hash identification
containers.py the decryptre:v1 envelope
ngrams.py offline English trigram model
scorer.py English-likelihood scoring
present.py method names, parameters and confidence wording
openssl_compat.py OpenSSL `Salted__` decryption
incremental.py opt-in exhaustive passphrase search
auto_detect.py layered search
cli.py the command line
data/ trigram counts (+ source notes)
wordlists/ bundled passphrase list (+ source notes)
tests/ pytest suite
examples/ sample ciphertexts and expected output
Contributing
Contributions are welcome, especially beginner-friendly ones.
- Open an issue describing the bug or the method you want to add.
- Fork the repository and create a branch.
- Add tests for your change and run
python -m pytest. - Keep the code readable: this project is maintained by someone learning.
- Open a pull request with a short explanation.
Please keep DecryptRE offline and keep the "does not break modern encryption" statements accurate.
Credits
- SecLists for the common password list (MIT).
- Project Gutenberg for the public-domain text used to derive trigram counts.
- The Python
cryptographyandpycryptodomeprojects for the crypto primitives.
License
MIT © 2026 Jason Marvello
Metadata
Release files for decryptre 1.3.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 |
|---|---|---|---|---|
| decryptre-1.3.0.tar.gz | 5.4 MB | With provenance | Details for decryptre-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| decryptre-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for decryptre-1.3.0-py3-none-any.whl |
Total release size: 10.9 MB
Release files / decryptre-1.3.0.tar.gz
| Download URL | decryptre-1.3.0.tar.gz |
|---|---|
| Size | 5.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9fe680e3a6cd5c033b6201ffd2438b6bb48bc3a35cbd18f230a903d00e27051
|
|
BLAKE2b-256 checksum How to use checksums |
4514bd3eaf5beec887cc6336a2c69f10c4f823c0adb99b95b9afe07bca3aa490
|
| 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 26, 2026.
Transparency logRelease files / decryptre-1.3.0-py3-none-any.whl
| Download URL | decryptre-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0834c3d70c4ab5c826ad70e176e22b868584ae797ad73765b81351cd416a7cf0
|
|
BLAKE2b-256 checksum How to use checksums |
36f937990f58c5b16ee0e0f0fdb7a9b92087e641dc8485247e56f894b4d99048
|
| 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 26, 2026.
Transparency logSecurity for decryptre 1.3.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 decryptre-1.3.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 26, 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.