About cryptography
cryptography is a security skill for practical cryptanalysis in CTF and penetration-testing engagements. It focuses on finding algebraic or linear structure that enables faster-than-brute-force recovery, and implementing solvers in Python where possible.
Key features
- 01Custom cipher and hash analysis
- 02RSA factoring and lattice recovery
- 03Smooth-order discrete-log attacks
- 04Differential fault analysis
- 05Secret recovery over non-prime moduli
Use cases
- 01Analyzing custom cryptographic challenges
- 02Recovering RSA secrets from structured primes
- 03Using chosen-input oracles to test attack paths
- 04Recovering keys from faulty AES ciphertexts
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ transilienceai/ communitytools --skill cryptographyAfter installing, type/cryptographyin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
reference/cryptography-principles.mdINDEX.mdlattice-attacks.mdlinear-secret-recovery.mdreference/scenarios/classical/repeating-key-xor.mdreference/scenarios/lattice/agcd-attack.mdboneh-durfee-low-d.mdcoppersmith-known-bits.mdlll-basis-reduction.mdreference/scenarios/padding-oracle/cbc-padding-oracle.mdecb-prefix-oracle.mdpkcs1-v1.5-bleichenbacher.mdreference/scenarios/rsa-quirks/common-modulus.mdfermat-close-primes.mdlow-public-exponent.mdsmall-prime-factorization.mdwiener-attack.mdreference/scenarios/secret-sharing/shamir-non-prime-modulus.mdreference/scenarios/signature-forgery/ecdsa-nonce-reuse.mdgcd-transcript-operand-recovery.mdjwt-alg-confusion.mdrsa-pkcs1-v1.5-bleichenbacher.mdreference/scenarios/weak-rng/dual-ec-backdoor.mdlcg-state-recovery.mdmt19937-state-recovery.mdDetails
From the project READMECryptography
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 — AGCD lattice, discriminant-square factoring, smooth-order DLP, Piret-Quisquater DFA.
- reference/linear-secret-recovery.md — GF(2) affine collapse of custom hashes/ciphers via column-by-column linear recovery.