# CTF Cryptography — Recognize the Weakness, Reach the Attack > 112 techniques for CTF crypto: given a signal, reach the right attack — with field-tested operational detail and a clear map of what does NOT work. Distilled from real CTF campaign notes, every claim cross-checked against the sources (2,442 checked, 50 refuted and corrected). - Publisher and verifier: Sinapsi (https://sinapsi.wiki/) - Language: en - License: CC BY 4.0 - MCP: https://sinapsi.wiki/mcp/w/ctf-crypto/ ## Pages - [Block Cipher Modes of Operation — the mode carries the CTF vulnerability, not the primitive](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/block-cipher-modes.md): updated 2026-07-10, 2 sources - [CBC Bit-Flipping — controlled tampering with no oracle needed](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/cbc-bit-flipping.md): updated 2026-07-10, 1 sources - [CBC Padding Oracle — leak the intermediate decryption value one byte at a time](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/cbc-padding-oracle.md): updated 2026-07-10, 2 sources - [CTR Nonce Reuse — when the counter mode keystream repeats](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/ctr-nonce-reuse.md): updated 2026-07-10, 4 sources - [DES Weaknesses — recognizing and exploiting a 56-bit Feistel cipher](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/des-weaknesses.md): updated 2026-07-10, 4 sources - [Differential Cryptanalysis — chosen-plaintext XOR-difference propagation through S-boxes](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/differential-cryptanalysis.md): updated 2026-07-10, 1 sources - [Double Encryption & MITM — composing two keys buys about one extra bit](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/double-encryption-mitm.md): updated 2026-07-10, 1 sources - [ECB Detection & Cut-and-Paste — the identical-block signal and how to weaponize it](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/ecb-detection.md): updated 2026-07-10, 1 sources - [Feistel Structure — the split-and-XOR shape that tells you which attack family applies](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/feistel-structure.md): updated 2026-07-10, 1 sources - [Hill Cipher — a linear block cipher that known-plaintext breaks in one matrix inversion](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/hill-cipher.md): updated 2026-07-10, 1 sources - [Linear Cryptanalysis — known-plaintext linear approximation with a biased key parity bit](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/linear-cryptanalysis.md): updated 2026-07-10, 2 sources - [Meet-in-the-Middle Attack — the time-memory tradeoff that breaks composed encryption](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/meet-in-the-middle-attack.md): updated 2026-07-10, 1 sources - [Permutation Cipher — frequencies survive intact, only position is scrambled](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/permutation-cipher.md): updated 2026-07-10, 1 sources - [Related-Key Attack — exploiting encryptions under keys with a known relationship](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/related-key-attack.md): updated 2026-07-10, 2 sources - [S-box Analysis — profiling a cipher's S-box to pick the right statistical attack](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/sbox-analysis.md): updated 2026-07-10, 1 sources - [Slide Attack — breaking a cipher's key schedule, not its rounds](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/slide-attack.md): updated 2026-07-10, 1 sources - [Weak Key Classes — when a cipher's own key schedule betrays it](https://sinapsi.wiki/w/ctf-crypto/p/block-cipher/weak-key-classes.md): updated 2026-07-10, 1 sources - [Affine Cipher — a tiny 312-key space that known-plaintext or brute force both break instantly](https://sinapsi.wiki/w/ctf-crypto/p/classical/affine-cipher.md): updated 2026-07-10, 1 sources - [Substitution & Shift Cipher — recovered by letter-frequency, not by algebra](https://sinapsi.wiki/w/ctf-crypto/p/classical/substitution-shift-cipher.md): updated 2026-07-10, 3 sources - [Vigenere Cipher — Kasiski / Index-of-Coincidence Key-Length Recovery](https://sinapsi.wiki/w/ctf-crypto/p/classical/vigenere-cipher.md): updated 2026-07-10, 3 sources - [DH Composite Modulus — splitting the discrete log by CRT when the modulus isn't prime](https://sinapsi.wiki/w/ctf-crypto/p/dh/dh-composite-modulus.md): updated 2026-07-10, 4 sources - [DH Man-in-the-Middle — unauthenticated exchange lets an active attacker relay two separate keys](https://sinapsi.wiki/w/ctf-crypto/p/dh/dh-mitm.md): updated 2026-07-10, 2 sources - [DH Parameter Injection — tamper with (p, g) themselves to make the exchange breakable](https://sinapsi.wiki/w/ctf-crypto/p/dh/dh-parameter-injection.md): updated 2026-07-10, 2 sources - [DH Small-Subgroup Attack — confining the secret to a tiny subgroup to leak it mod that order](https://sinapsi.wiki/w/ctf-crypto/p/dh/dh-small-subgroup-attack.md): updated 2026-07-10, 3 sources - [DH Static-Key Reuse — turning a persistent secret exponent into a leaking oracle](https://sinapsi.wiki/w/ctf-crypto/p/dh/dh-static-key-reuse.md): updated 2026-07-10, 3 sources - [Diffie-Hellman Fundamentals — what to audit first in any DH challenge](https://sinapsi.wiki/w/ctf-crypto/p/dh/diffie-hellman-fundamentals.md): updated 2026-07-10, 1 sources - [ElGamal Encryption — when the key is a discrete log, not a factored modulus](https://sinapsi.wiki/w/ctf-crypto/p/dh/elgamal-encryption.md): updated 2026-07-10, 1 sources - [ElGamal Malleability — scaling plaintext by a known factor without the private key](https://sinapsi.wiki/w/ctf-crypto/p/dh/elgamal-malleability.md): updated 2026-07-10, 2 sources - [Key-Exchange Methodology — triage any DH/ECDH challenge before reaching for heavy DLP machinery](https://sinapsi.wiki/w/ctf-crypto/p/dh/key-exchange-methodology.md): updated 2026-07-10, 3 sources - [X25519 Basics — recognizing Curve25519 ECDH and where it actually breaks](https://sinapsi.wiki/w/ctf-crypto/p/dh/x25519-basics.md): updated 2026-07-10, 3 sources - [Baby-Step Giant-Step — the generic meet-in-the-middle solver for a mid-sized discrete log](https://sinapsi.wiki/w/ctf-crypto/p/discrete-log/baby-step-giant-step.md): updated 2026-07-10, 1 sources - [Discrete Logarithm — the factorization of the group order picks your algorithm](https://sinapsi.wiki/w/ctf-crypto/p/discrete-log/discrete-logarithm.md): updated 2026-07-10, 2 sources - [Index Calculus — sub-exponential DLP attack for large prime fields with no smooth structure](https://sinapsi.wiki/w/ctf-crypto/p/discrete-log/index-calculus.md): updated 2026-07-10, 3 sources - [Pohlig-Hellman — solving the discrete log when the group order is smooth](https://sinapsi.wiki/w/ctf-crypto/p/discrete-log/pohlig-hellman.md): updated 2026-07-10, 1 sources - [Elliptic Curve Discrete Logarithm Problem — the curve order's factorization picks your attack](https://sinapsi.wiki/w/ctf-crypto/p/ecc/ecdlp.md): updated 2026-07-10, 4 sources - [Elliptic Curve Fundamentals — the audit that routes to the right ECC attack](https://sinapsi.wiki/w/ctf-crypto/p/ecc/elliptic-curve-fundamentals.md): updated 2026-07-10, 2 sources - [Invalid Curve Attack — leaking an ECDH secret through a point nobody checked was on the curve](https://sinapsi.wiki/w/ctf-crypto/p/ecc/invalid-curve-attack.md): updated 2026-07-10, 3 sources - [Singular Curve Attack — the zero-discriminant signal that collapses ECDLP to a field problem](https://sinapsi.wiki/w/ctf-crypto/p/ecc/singular-curve-attack.md): updated 2026-07-10, 3 sources - [Smart Attack — the anomalous-curve signal that turns ECDLP into polynomial time](https://sinapsi.wiki/w/ctf-crypto/p/ecc/smart-attack.md): updated 2026-07-10, 3 sources - [Birthday Attack — the square-root speedup that governs any collision search](https://sinapsi.wiki/w/ctf-crypto/p/hash/birthday-attack.md): updated 2026-07-10, 1 sources - [CBC-MAC Forgery — splice a new message onto a known tag without the key](https://sinapsi.wiki/w/ctf-crypto/p/hash/cbc-mac-forgery.md): updated 2026-07-10, 2 sources - [Chosen-Prefix Collision — forcing two attacker-chosen, meaningfully different prefixes to hash equal](https://sinapsi.wiki/w/ctf-crypto/p/hash/chosen-prefix-collision.md): updated 2026-07-10, 3 sources - [CRC and Polynomial Recovery — forging or reversing a checksum built from GF(2) division](https://sinapsi.wiki/w/ctf-crypto/p/hash/crc-recovery.md): updated 2026-07-10, 3 sources - [Fixed-Point Hash — Davies-Meyer no-op blocks that let you insert or expand a message for free](https://sinapsi.wiki/w/ctf-crypto/p/hash/fixed-point-hash.md): updated 2026-07-10, 2 sources - [Hash Collisions and Weak Preimages — truncated tags and broken functions that fall to brute force or known tooling](https://sinapsi.wiki/w/ctf-crypto/p/hash/hash-collision.md): updated 2026-07-10, 3 sources - [Hash Length Extension — forge H(secret‖msg‖extra) from a digest alone](https://sinapsi.wiki/w/ctf-crypto/p/hash/hash-length-extension.md): updated 2026-07-10, 4 sources - [HMAC Fundamentals — the nested MAC that tells you when to STOP trying length-extension](https://sinapsi.wiki/w/ctf-crypto/p/hash/hmac-fundamentals.md): updated 2026-07-10, 3 sources - [MAC Forgery — the construction, not the primitive, decides the attack](https://sinapsi.wiki/w/ctf-crypto/p/hash/mac-forgery.md): updated 2026-07-10, 5 sources - [Merkle–Damgård Construction — the digest IS the internal state](https://sinapsi.wiki/w/ctf-crypto/p/hash/merkle-damgard-construction.md): updated 2026-07-10, 2 sources - [Multicollision Attack — Joux's trick: 2^t colliding messages for the price of t single-block collisions](https://sinapsi.wiki/w/ctf-crypto/p/hash/multicollision-attack.md): updated 2026-07-10, 2 sources - [Poly1305 Nonce Issues — nonce reuse turns a one-time MAC into a solvable polynomial](https://sinapsi.wiki/w/ctf-crypto/p/hash/poly1305-nonce-issues.md): updated 2026-07-10, 4 sources - [Sponge Construction — why length-extension does NOT work on SHA-3/Keccak](https://sinapsi.wiki/w/ctf-crypto/p/hash/sponge-construction.md): updated 2026-07-10, 4 sources - [Hidden Number Problem — recovering a secret from many small-bounded-error samples](https://sinapsi.wiki/w/ctf-crypto/p/lattice/hidden-number-problem.md): updated 2026-07-10, 3 sources - [Knapsack Cryptosystem — subset-sum ciphertexts broken by low-density lattice reduction](https://sinapsi.wiki/w/ctf-crypto/p/lattice/knapsack-cryptosystem.md): updated 2026-07-10, 2 sources - [Lattice Fundamentals — encoding a bounded unknown as a short vector](https://sinapsi.wiki/w/ctf-crypto/p/lattice/lattice-fundamentals.md): updated 2026-07-10, 2 sources - [LLL Reduction — the polynomial-time workhorse behind almost every lattice attack](https://sinapsi.wiki/w/ctf-crypto/p/lattice/lll-reduction.md): updated 2026-07-10, 2 sources - [LWE Fundamentals — recognizing and breaking noisy linear equations mod q](https://sinapsi.wiki/w/ctf-crypto/p/lattice/lwe-fundamentals.md): updated 2026-07-10, 3 sources - [NTRU Fundamentals — recovering the short (f,g) key pair via lattice reduction](https://sinapsi.wiki/w/ctf-crypto/p/lattice/ntru-fundamentals.md): updated 2026-07-10, 4 sources - [Regev Encryption — the LWE public-key scheme, and why recovering the secret is game over](https://sinapsi.wiki/w/ctf-crypto/p/lattice/regev-encryption.md): updated 2026-07-10, 2 sources - [Ring-LWE — recognizing polynomial-ring LWE and reducing it to plain LWE](https://sinapsi.wiki/w/ctf-crypto/p/lattice/ring-lwe.md): updated 2026-07-10, 3 sources - [Cryptanalysis Methodology — classify the family before you reach for an attack](https://sinapsi.wiki/w/ctf-crypto/p/methodology/cryptanalysis-methodology.md): updated 2026-07-10, 2 sources - [Custom Cipher Reverse — read the source, invert every primitive, run the pipeline backwards](https://sinapsi.wiki/w/ctf-crypto/p/methodology/custom-cipher-reverse.md): updated 2026-07-10, 2 sources - [Encoding and Decoding Layers — peel base64/hex/URL/compression first or you attack the wrong plaintext](https://sinapsi.wiki/w/ctf-crypto/p/methodology/encoding-decoding.md): updated 2026-07-10, 3 sources - [Multi-Step Crypto Chain — recognizing and decomposing a pipeline challenge](https://sinapsi.wiki/w/ctf-crypto/p/methodology/multi-step-crypto-chain.md): updated 2026-07-10, 2 sources - [Carmichael Numbers & λ(n) — the true group exponent, and why a lone Fermat test lies](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/carmichael-numbers.md): updated 2026-07-10, 3 sources - [Chinese Remainder Theorem — recombining residues across coprime moduli](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/chinese-remainder-theorem.md): updated 2026-07-10, 1 sources - [Euler's Totient — the RSA key-math backbone, and why it's not the exponent you want to leak](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/euler-totient.md): updated 2026-07-10, 2 sources - [Finite Field Arithmetic — the GF(p^k) substrate under AES, LFSRs, and extension-field curves/DLP](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/finite-field-arithmetic.md): updated 2026-07-10, 2 sources - [Gaussian Integers — factoring sums of two squares in Z[i]](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/gaussian-integers.md): updated 2026-07-10, 2 sources - [Jacobi Symbol — the factoring-free residuosity bit, and why +1 lies on a composite modulus](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/jacobi-symbol.md): updated 2026-07-10, 2 sources - [Legendre Symbol — the O(log p) yes/no on square-root existence, before you touch Tonelli-Shanks](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/legendre-symbol.md): updated 2026-07-10, 1 sources - [Linear Algebra over GF(2) — solving bit-level unknowns as a linear system mod 2](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/linear-algebra-gf2.md): updated 2026-07-10, 4 sources - [Polynomial GCD — the Euclidean algorithm on polynomials, and the trick that recovers a shared root](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/polynomial-gcd.md): updated 2026-07-10, 3 sources - [Primality Testing — confirming a number is prime without factoring it](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/primality-testing.md): updated 2026-07-10, 1 sources - [Quadratic Residues — deciding if x² ≡ a (mod n) has a solution before you go looking for one](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/quadratic-residues.md): updated 2026-07-10, 2 sources - [Smooth Numbers — the concept behind why Pollard p-1, Pohlig-Hellman, and index calculus work (and when they don't)](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/smooth-numbers.md): updated 2026-07-10, 3 sources - [Tonelli-Shanks — computing an actual modular square root, not just whether one exists](https://sinapsi.wiki/w/ctf-crypto/p/number-theory/tonelli-shanks.md): updated 2026-07-10, 1 sources - [RSA Blinding Attack — bypass a signing/decryption oracle's blocklist with the multiplicative homomorphism](https://sinapsi.wiki/w/ctf-crypto/p/rsa/blinding-signature-attack.md): updated 2026-07-10, 2 sources - [Boneh-Durfee Attack — the lattice extension of Wiener that reaches d < N^0.292](https://sinapsi.wiki/w/ctf-crypto/p/rsa/boneh-durfee-attack.md): updated 2026-07-10, 4 sources - [Common Modulus Attack — same n, two coprime exponents on the same message](https://sinapsi.wiki/w/ctf-crypto/p/rsa/common-modulus-attack.md): updated 2026-07-10, 2 sources - [Coppersmith's Method — recovering a small unknown from a modular polynomial via lattice reduction](https://sinapsi.wiki/w/ctf-crypto/p/rsa/coppersmith-method.md): updated 2026-07-10, 2 sources - [Fermat Factorization — recovering p, q when the RSA primes were chosen too close](https://sinapsi.wiki/w/ctf-crypto/p/rsa/fermat-factorization.md): updated 2026-07-10, 1 sources - [Franklin–Reiter Related-Message Attack — recovering RSA plaintexts from a known relation via polynomial GCD](https://sinapsi.wiki/w/ctf-crypto/p/rsa/franklin-reiter-attack.md): updated 2026-07-10, 2 sources - [Håstad's Broadcast Attack — recovering one plaintext from many small-e ciphertexts, no factoring](https://sinapsi.wiki/w/ctf-crypto/p/rsa/hastad-broadcast.md): updated 2026-07-10, 2 sources - [Integer Factorization Methodology — which factoring attack to try, in what order](https://sinapsi.wiki/w/ctf-crypto/p/rsa/integer-factorization-methodology.md): updated 2026-07-10, 3 sources - [Partial Key Exposure — recovering RSA when part of p or d has leaked](https://sinapsi.wiki/w/ctf-crypto/p/rsa/partial-key-exposure.md): updated 2026-07-10, 4 sources - [Perfect-Power Modulus (n = p^k) — trivial factoring via integer k-th root](https://sinapsi.wiki/w/ctf-crypto/p/rsa/perfect-power-modulus.md): updated 2026-07-10, 2 sources - [Pollard's p-1 Factorization — when a prime's predecessor is smooth](https://sinapsi.wiki/w/ctf-crypto/p/rsa/pollard-p-minus-1.md): updated 2026-07-10, 1 sources - [Pollard's Rho Factorization — finding a small-to-medium factor when trial division and Fermat fail](https://sinapsi.wiki/w/ctf-crypto/p/rsa/pollard-rho-factorization.md): updated 2026-07-10, 2 sources - [RSA Fundamentals — the routing hub: which artifact points to which attack](https://sinapsi.wiki/w/ctf-crypto/p/rsa/rsa-fundamentals.md): updated 2026-07-10, 2 sources - [RSA LSB / Parity Oracle Attack — recover the plaintext one bit at a time from a decryption oracle](https://sinapsi.wiki/w/ctf-crypto/p/rsa/rsa-lsb-parity-oracle.md): updated 2026-07-10, 3 sources - [RSA Signature Forgery — homomorphic combination and lax padding checks forge signatures without the private key](https://sinapsi.wiki/w/ctf-crypto/p/rsa/rsa-signature-forgery.md): updated 2026-07-10, 3 sources - [Small Public Exponent Attack — recovering m by an exact integer e-th root when m^e never wraps mod n](https://sinapsi.wiki/w/ctf-crypto/p/rsa/small-exponent-attack.md): updated 2026-07-10, 2 sources - [Wiener Attack — recovering RSA's private exponent when d is small, via continued fractions](https://sinapsi.wiki/w/ctf-crypto/p/rsa/wiener-attack.md): updated 2026-07-10, 2 sources - [Cache-Timing Attack — recovering key bytes from which cache line a table lookup touched](https://sinapsi.wiki/w/ctf-crypto/p/side-channel/cache-timing-attack.md): updated 2026-07-10, 2 sources - [Error / Boolean Oracle Attack — turn any distinguishable valid/invalid response into a key or plaintext](https://sinapsi.wiki/w/ctf-crypto/p/side-channel/error-oracle-attack.md): updated 2026-07-10, 3 sources - [Fault Injection Attacks — one faulty RSA-CRT signature factors the modulus outright](https://sinapsi.wiki/w/ctf-crypto/p/side-channel/fault-injection-attacks.md): updated 2026-07-10, 2 sources - [Power Analysis (SPA/DPA/CPA) — reading a key off a device's power draw](https://sinapsi.wiki/w/ctf-crypto/p/side-channel/power-analysis.md): updated 2026-07-10, 2 sources - [Timing Attack — recovering a secret from how long a secret-dependent operation takes](https://sinapsi.wiki/w/ctf-crypto/p/side-channel/timing-attack.md): updated 2026-07-10, 2 sources - [Deterministic Nonce (RFC 6979) Failures — when 'no more RNG risk' still leaks the key](https://sinapsi.wiki/w/ctf-crypto/p/signatures/deterministic-nonce-failure.md): updated 2026-07-10, 1 sources - [DSA Fundamentals — the linear signing equation every DSA attack exploits](https://sinapsi.wiki/w/ctf-crypto/p/signatures/dsa-fundamentals.md): updated 2026-07-10, 2 sources - [DSA/ECDSA Biased-Nonce Lattice Attack — turning partial nonce leaks into a private-key recovery](https://sinapsi.wiki/w/ctf-crypto/p/signatures/dsa-nonce-bias-lattice.md): updated 2026-07-10, 3 sources - [ECDSA Fundamentals — the s*k = h + d*r identity that routes every nonce attack](https://sinapsi.wiki/w/ctf-crypto/p/signatures/ecdsa-fundamentals.md): updated 2026-07-10, 2 sources - [ECDSA/DSA Nonce Reuse — identical r collapses the private key to closed-form algebra](https://sinapsi.wiki/w/ctf-crypto/p/signatures/ecdsa-nonce-reuse.md): updated 2026-07-10, 4 sources - [Repeated / Linearly-Related Nonce Recovery — when nonces aren't reused, but ARE related by a known formula](https://sinapsi.wiki/w/ctf-crypto/p/signatures/repeated-nonce-recovery.md): updated 2026-07-10, 3 sources - [Signature Malleability — a valid (r,s) becomes another valid (r,s) without the key](https://sinapsi.wiki/w/ctf-crypto/p/signatures/signature-malleability.md): updated 2026-07-10, 3 sources - [Berlekamp-Massey Algorithm — recover the minimal LFSR from raw keystream](https://sinapsi.wiki/w/ctf-crypto/p/stream/berlekamp-massey.md): updated 2026-07-10, 1 sources - [LFSR State Recovery — when the keystream itself hands you the seed](https://sinapsi.wiki/w/ctf-crypto/p/stream/lfsr-recovery.md): updated 2026-07-10, 3 sources - [One-Time-Pad / Many-Time-Pad Reuse — the crib-drag break when a pad is used twice](https://sinapsi.wiki/w/ctf-crypto/p/stream/one-time-pad-reuse.md): updated 2026-07-10, 2 sources - [PRNG State Prediction — recovering the internal state of a non-cryptographic generator](https://sinapsi.wiki/w/ctf-crypto/p/stream/prng-prediction.md): updated 2026-07-10, 3 sources - [Stream-Cipher Keystream Reuse — the umbrella break behind every reused-keystream challenge](https://sinapsi.wiki/w/ctf-crypto/p/stream/stream-cipher-keystream-reuse.md): updated 2026-07-10, 2 sources - [Repeating-Key XOR — recovering key length and key from a Vigenère-style stream](https://sinapsi.wiki/w/ctf-crypto/p/stream/xor-repeating-key.md): updated 2026-07-10, 1 sources