cryptography

Skill

Cryptanalysis techniques — lattice attacks, padding oracles, weak-RNG exploitation, signature forgery, secret-sharing recovery.

Files26
  • @skills/cryptography/SKILL.md
  • @skills/cryptography/reference/INDEX.md
  • @skills/cryptography/reference/cryptography-principles.md
  • @skills/cryptography/reference/lattice-attacks.md
  • @skills/cryptography/reference/linear-secret-recovery.md
  • @skills/cryptography/reference/scenarios/classical/repeating-key-xor.md
  • @skills/cryptography/reference/scenarios/lattice/agcd-attack.md
  • @skills/cryptography/reference/scenarios/lattice/boneh-durfee-low-d.md
  • @skills/cryptography/reference/scenarios/lattice/coppersmith-known-bits.md
  • @skills/cryptography/reference/scenarios/lattice/lll-basis-reduction.md
  • @skills/cryptography/reference/scenarios/padding-oracle/cbc-padding-oracle.md
  • @skills/cryptography/reference/scenarios/padding-oracle/ecb-prefix-oracle.md
  • @skills/cryptography/reference/scenarios/padding-oracle/pkcs1-v1.5-bleichenbacher.md
  • @skills/cryptography/reference/scenarios/rsa-quirks/common-modulus.md
  • @skills/cryptography/reference/scenarios/rsa-quirks/fermat-close-primes.md
  • @skills/cryptography/reference/scenarios/rsa-quirks/low-public-exponent.md
  • @skills/cryptography/reference/scenarios/rsa-quirks/small-prime-factorization.md
  • @skills/cryptography/reference/scenarios/rsa-quirks/wiener-attack.md
  • @skills/cryptography/reference/scenarios/secret-sharing/shamir-non-prime-modulus.md
  • @skills/cryptography/reference/scenarios/signature-forgery/ecdsa-nonce-reuse.md
  • @skills/cryptography/reference/scenarios/signature-forgery/gcd-transcript-operand-recovery.md
  • @skills/cryptography/reference/scenarios/signature-forgery/jwt-alg-confusion.md
  • @skills/cryptography/reference/scenarios/signature-forgery/rsa-pkcs1-v1.5-bleichenbacher.md
  • @skills/cryptography/reference/scenarios/weak-rng/dual-ec-backdoor.md
  • @skills/cryptography/reference/scenarios/weak-rng/lcg-state-recovery.md
  • @skills/cryptography/reference/scenarios/weak-rng/mt19937-state-recovery.md

Cryptography

Scope

Practical cryptanalysis for CTF and pentest engagements: identifying when a cryptographic primitive's structure (custom hash, partial leaks, related primes, bad RNG, weak modes) admits a faster-than-brute-force solver, then implementing that solver in pure Python where possible. Covers RSA-style algebraic factoring, lattice/AGCD recovery, GF(2) linear collapse of "complicated-looking" custom ciphers, smooth-order DLP, differential fault attacks, and Shamir-style secret-sharing recovery over non-prime moduli. Always read source first to detect linearity/algebraic structure before reaching for SageMath or symbolic solvers.

When to use

  • A challenge or target ships custom crypto (custom hash, custom block cipher, hand-rolled key derivation) and you need to look for affine / GF(2)-linear collapse.
  • RSA-style primitives with structured primes (p = a·r + b, phi(n) perfect square, multi-prime hint files, common factors).
  • A service exposes a chosen-ciphertext / chosen-input oracle and you suspect padding-oracle, smooth-order DLP, or Bleichenbacher-style recovery.
  • AES with fault injection (correct + faulty ciphertext for the same key — Piret-Quisquater DFA).
  • Shamir secret sharing or threshold schemes with non-prime moduli (2-adic recovery via Lagrange interpolation with valuation tracking).

References

  • reference/lattice-attacks.md [blocked] — AGCD lattice, discriminant-square factoring, smooth-order DLP, Piret-Quisquater DFA.
  • reference/linear-secret-recovery.md [blocked] — GF(2) affine collapse of custom hashes/ciphers via column-by-column linear recovery.
cryptography — Kortix Marketplace | Kortix