OpenCROW Crypto Toolbox
Prefer the opencrow-crypto-mcp server for typed crypto workflows. Fall back to the direct scripts only when you need to debug the underlying ctf-environment execution path.
MCP First
- Use
toolbox_info, toolbox_verify, and toolbox_capabilities first.
- Use the typed crypto operations:
crypto_python
crypto_factordb_lookup
crypto_crack_hash
- Treat the existing helper scripts as the implementation fallback, not the primary interface.
Use this skill for Python-first crypto work in the ctf environment plus the cracking and lookup tools that commonly complement it. This covers SMT constraints with z3, lattice work with fpylll, implementation helpers with pycryptodome, offline cracking with hashcat or john, and quick FactorDB checks.
Quick Start
Run inline Python in ctf:
python ~/.codex/skills/opencrow-crypto-toolbox/scripts/run_crypto_python.py --code 'from z3 import *; x = BitVec("x", 32); s = Solver(); s.add(x ^ 0x1337 == 0x1234); print(s.check()); print(s.model())'
Run a solver file:
python ~/.codex/skills/opencrow-crypto-toolbox/scripts/run_crypto_python.py --file /absolute/path/to/solve.py
Verify the mapped stack:
python ~/.codex/skills/opencrow-crypto-toolbox/scripts/verify_toolkit.py
Query FactorDB quickly:
python ~/.codex/skills/opencrow-crypto-toolbox/scripts/factordb_lookup.py 999630013489
Workflow
- Use this toolbox when the job is mostly Python, constraints, lattices, or byte-level crypto helpers.
- Use
run_crypto_python.py --code for short experiments and --file for real solve scripts.
- Reach for
z3 when the challenge is equation- or bit-vector-driven.
- Reach for
fpylll when the attack is lattice-driven and does not require Sage.
- Reach for
pycryptodome when you need standard primitives, block modes, or protocol glue in Python.
- Reach for
hashcat or john when the fastest path is cracking rather than symbolic recovery.
- Read references/tooling.md if you need a quick selection guide.
Tool Selection
- Use
z3 for SAT/SMT solving, bit-vectors, modular constraints, and key-recovery models that can be expressed symbolically.
- Use
fpylll for LLL/BKZ lattice reduction, CVP experiments, and short-vector workflows in plain Python.
- Use
pycryptodome for AES, RSA helpers, hashes, MACs, padding, byte parsing, and challenge protocol implementation.
- Use
hashcat for local cracking workloads and mask, rule, or wordlist-based attacks.
- Use
john when a format is better supported by John or when you want a lighter cracking loop.
- Use
factordb_lookup.py for quick sanity checks against known integer factorizations before committing to local factoring work.
- Use standard Python libraries in the same script for parsing challenge formats, padding oracles, byte wrangling, and protocol glue.
- Switch to
sagemath when the task needs finite fields, elliptic curves, polynomial rings, or Sage-native attack code.
Resources
scripts/run_crypto_python.py: execute inline code or a .py file inside the ctf environment.
scripts/verify_toolkit.py: confirm that the crypto-specific Python modules are available.
scripts/factordb_lookup.py: look up known factors through the public FactorDB API.
references/tooling.md: quick guidance on when to stay in Python crypto tooling versus switching to Sage.
1---2name: opencrow-crypto-toolbox3description: Use the Anaconda `ctf` environment and installed crypto tooling for CTF tasks that fit normal Python or CLI cracking rather than SageMath. Use when Codex needs `z3`, `fpylll`, `pycryptodome`, `hashcat`, `john`, or quick FactorDB lookups.4---5
6# OpenCROW Crypto Toolbox
7
8Prefer the `opencrow-crypto-mcp` server for typed crypto workflows. Fall back to the direct scripts only when you need to debug the underlying `ctf`-environment execution path.
9
10## MCP First
11
12- Use `toolbox_info`, `toolbox_verify`, and `toolbox_capabilities` first.
13- Use the typed crypto operations:
14 - `crypto_python`
15 - `crypto_factordb_lookup`
16 - `crypto_crack_hash`
17- Treat the existing helper scripts as the implementation fallback, not the primary interface.
18
19Use this skill for Python-first crypto work in the `ctf` environment plus the cracking and lookup tools that commonly complement it. This covers SMT constraints with `z3`, lattice work with `fpylll`, implementation helpers with `pycryptodome`, offline cracking with `hashcat` or `john`, and quick FactorDB checks.
20
21## Quick Start
22
23Run inline Python in `ctf`:
24
25```bash
26python ~/.codex/skills/opencrow-crypto-toolbox/scripts/run_crypto_python.py --code 'from z3 import *; x = BitVec("x", 32); s = Solver(); s.add(x ^ 0x1337 == 0x1234); print(s.check()); print(s.model())'
27```
28
29Run a solver file:
30
31```bash
32python ~/.codex/skills/opencrow-crypto-toolbox/scripts/run_crypto_python.py --file /absolute/path/to/solve.py
33```
34
35Verify the mapped stack:
36
37```bash
38python ~/.codex/skills/opencrow-crypto-toolbox/scripts/verify_toolkit.py
39```
40
41Query FactorDB quickly:
42
43```bash
44python ~/.codex/skills/opencrow-crypto-toolbox/scripts/factordb_lookup.py 999630013489
45```
46
47## Workflow
48
491. Use this toolbox when the job is mostly Python, constraints, lattices, or byte-level crypto helpers.
502. Use `run_crypto_python.py --code` for short experiments and `--file` for real solve scripts.
513. Reach for `z3` when the challenge is equation- or bit-vector-driven.
524. Reach for `fpylll` when the attack is lattice-driven and does not require Sage.
535. Reach for `pycryptodome` when you need standard primitives, block modes, or protocol glue in Python.
546. Reach for `hashcat` or `john` when the fastest path is cracking rather than symbolic recovery.
557. Read [references/tooling.md](references/tooling.md) if you need a quick selection guide.
56
57## Tool Selection
58
59- Use `z3` for SAT/SMT solving, bit-vectors, modular constraints, and key-recovery models that can be expressed symbolically.
60- Use `fpylll` for LLL/BKZ lattice reduction, CVP experiments, and short-vector workflows in plain Python.
61- Use `pycryptodome` for AES, RSA helpers, hashes, MACs, padding, byte parsing, and challenge protocol implementation.
62- Use `hashcat` for local cracking workloads and mask, rule, or wordlist-based attacks.
63- Use `john` when a format is better supported by John or when you want a lighter cracking loop.
64- Use `factordb_lookup.py` for quick sanity checks against known integer factorizations before committing to local factoring work.
65- Use standard Python libraries in the same script for parsing challenge formats, padding oracles, byte wrangling, and protocol glue.
66- Switch to `sagemath` when the task needs finite fields, elliptic curves, polynomial rings, or Sage-native attack code.
67
68## Resources
69
70- `scripts/run_crypto_python.py`: execute inline code or a `.py` file inside the `ctf` environment.
71- `scripts/verify_toolkit.py`: confirm that the crypto-specific Python modules are available.
72- `scripts/factordb_lookup.py`: look up known factors through the public FactorDB API.
73- `references/tooling.md`: quick guidance on when to stay in Python crypto tooling versus switching to Sage.