Quantum CTF field notes
Everything needed for the Quantum Village CTF at DEF CON 34 (Aug 7–9 2026), compressed to what actually gets used under time pressure. The Qiskit page is a crash course standing in for the 35-hour IBM curriculum; the rest is reference you read during a challenge, not before it.
Read in this order
1. Math
Kets, inner products, unitaries, tensor products, Bloch sphere. ~45 min. Skip only if this is already comfortable.
2. Qiskit crash course
The ~20% of the IBM course that covers ~95% of CTF challenges. ~3 h with the exercises.
3. Category playbooks
Per-category recognition + attack pattern: QASM golf, BB84, CHSH, Q# katas, Grover/Shor, PQC, misc.
4. Cheat sheet
Gate matrices, identities, Qiskit API, QASM syntax. The page kept open in a tab on con day.
5. Toolkit API
The pre-built solvers in this repo — signatures and copy-paste call patterns.
6. Day-of playbook
Registration, triage order, timeboxing, what to bring. Read once the week before.
What the CTF tests
Drawn from DEF CON 29 (2021), 31, and 32 (QOLOSSUS), plus adjacent quantum CTFs. Each category opens with an easy intro challenge that unlocks the harder ones in that category — clear the intros first.
| Category | What it looks like | Playbook |
|---|---|---|
| OpenQASM circuits | "Write a circuit ≤7 lines that outputs X" (e.g. XOR-bit-al, 200 pts) | Circuit golf |
| Q# katas | Distinguish unitaries U₁ vs U₋₁; oracle problems | Katas |
| QKD / BB84 | Rebuild a shared key from a bases/measurements transcript, decrypt the flag | BB84 |
| CHSH / Bell | Beat the classical 75% bound with an entangled strategy | CHSH |
| Post-quantum crypto | Misuse of Kyber / Dilithium (SandboxAQ RWPQC style) | PQC |
| Algorithms | Shor (factoring), Grover (search) framed as puzzles | Grover / Shor |
| Misc / stego / quiz | Image → transcription, QC trivia | Misc |
Reassurance that is actually load-bearing: many past winners had no prior quantum background. The linear algebra and protocol reasoning here is learnable in two weeks; the CTF rewards recognising which of seven patterns you are looking at far more than it rewards depth.
Environment
python3.12 -m venv .venv && source .venv/bin/activate
pip install -U pip && pip install -r env/requirements.txt
./run_selftests.sh # all seven toolkit modules green == ready
Python 3.12 specifically — 3.14 lacks wheels for parts of this stack. Post-quantum needs
native liboqs first (brew install liboqs).
External references
- Quantum Village · GitHub org · awesome-quantum-security
- CharonV — DEF CON 32 walkthrough
- CUJO AI — DEF CON 2021 CHSH + BB84 + AES
- SandboxAQ RWPQC 2024 PQC CTF · Quarkslab writeup
- IBM Quantum Learning — the full course these notes compress