
crypto-audit
Audit cryptography implementation — algorithm choice, key sizes, KDF parameters, IV/nonce handling, signature verification, randomness, TLS configuration, and key rotation. Deeper than owasp-audit A02. Use when the user mentions 'crypto review,' 'cryptography audit,' 'encryption review,' 'KDF,' 'PBKDF2,' 'Argon2,' 'bcrypt cost,' 'IV reuse,' 'nonce reuse,' 'AES mode,' 'AES-GCM,' 'AES-ECB,' 'signature verification,' 'TLS configuration,' 'cipher suites,' 'key rotation,' 'libsodium,' 'BoringSSL,' or 'is this crypto right.'
- Installs
- 359
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/briiirussell/cybersecurity-skills --skill crypto-audit- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads crypto-audit automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Crypto Audit — Cryptography Implementation Review
Audit how cryptography is implemented in an application — algorithm choices, parameters, modes, and the implementation patterns that turn good primitives into broken systems. Deeper than owasp-audit A02 (which catches the obvious "MD5 password" and "VERIFY_NONE" cases). This skill is for the subtler implementation review.
Most crypto failures are not "they used MD5." Most failures are: right primitive, wrong mode (ECB instead of GCM), right algorithm, wrong parameter (PBKDF2 with 1,000 iterations in 2026), right library, wrong call order (init the cipher after the data was loaded).
Cross-references: owasp-audit A02 (baseline) + A07 (timing-safe comparison), secrets-audit (key storage), iam-audit (KMS / HSM patterns).
Don't roll your own
The default audit verdict for any custom encryption scheme is "use libsodium / Tink / WebCrypto instead." There are < 50 people on Earth who can design new crypto safely, and they don't work at your company. Unless an explicit threat model says otherwise, custom crypto is a finding.
Audit Checklist
Algorithm and mode
- Symmetric: AES-256-GCM or ChaCha20-Poly1305 (authenticated encryption — confidentiality + integrity in one primitive)
- Reject: AES-ECB (block-pattern leak — identical plaintext → identical ciphertext), AES-CBC without HMAC (unauthenticated; padding oracle attacks), AES-CTR without HMAC (malleable; bit-flip = plaintext-flip), DES / 3DES, RC4, Blowfish (use Twofish or skip altogether)
- Asymmetric: Ed25519 / X25519 for signatures and key exchange; RSA-OAEP / RSA-PSS at 3072+ bits if compatibility forces RSA; never RSA with PKCS#1 v1.5 padding for encryption (Bleichenbacher); never raw RSA
- Hashing (general purpose): SHA-256, SHA-3, BLAKE2 / BLAKE3
- Hashing (passwords) — categorically different problem: Argon2id, scrypt, bcrypt (with cost ≥ 12 for bcrypt; OWASP 2024 floor)
- MAC: HMAC-SHA256 minimum; never CBC-MAC; never homemade
hash(key + message) - Grep for:
MD5,SHA1(outside of HMAC-SHA1 in legacy compat),DES,RC4,Blowfish,AES.*ECB,pkcs1_v1_5(Python),RSA.encryptwithout OAEP
Key derivation
- From a password: Argon2id (memory-hard) or PBKDF2-HMAC-SHA256 with ≥ 600,000 iterations (OWASP 2024) or scrypt with N=2^17, r=8, p=1
- From a high-entropy secret: HKDF-SHA256 — the right primitive when you have key material and need to derive sub-keys
- From a low-entropy secret to encryption key: PBKDF2 / Argon2 (treat it as a password)
- Grep for:
PBKDF2(check iteration count),HKDF,Argon2,scrypt,pbkdf2_hmac(Python; checkiterationsarg)
IV / nonce handling
Wrong IV / nonce handling is one of the top three sources of "the crypto looks right but actually leaks plaintext."
- AES-GCM: unique nonce per encryption under the same key. NEVER reuse. If you reuse a GCM nonce with the same key, you give the attacker the XOR of two plaintexts and the ability to forge messages. Use 96-bit random nonces (RFC 5116). For high-volume systems, switch to AES-GCM-SIV (nonce-misuse-resistant)
- AES-CBC: IV must be unpredictable AND unique. Random 16-byte IV per encryption
- AES-CTR: counter must never repeat for a (key, counter) pair within the lifetime of the key
- ChaCha20-Poly1305: unique nonce per message; XChaCha20-Poly1305 has 192-bit nonce so random nonces are safe at scale
- Grep for: hardcoded IVs (
iv = "0000000000000000",iv = bytes(16)), zero-IV constructors, counter resets - Specifically grep for:
Cipher.getInstance("AES")(Java default is ECB),AES.new(key)(PyCryptodome default is ECB),crypto.createCipher(Node, deprecated, derives IV from key — DON'T)
Authenticated encryption
- Always use authenticated modes — AES-GCM, ChaCha20-Poly1305, or Encrypt-then-MAC (HMAC-SHA256 over ciphertext)
- Never decrypt → check MAC; always check MAC → then decrypt (otherwise: padding oracle)
- If using Encrypt-then-MAC, use separate keys for encryption and authentication (or HKDF-derive both from one master key)
- Verify the MAC with a constant-time compare (
crypto.timingSafeEqualin Node,hmac.compare_digestin Python,subtle.ConstantTimeComparein Go) — seeowasp-auditA07
Signature verification
- The most common signature-verification bug isn't a broken algorithm — it's not checking the signature at all, or checking the algorithm from the message itself
- JWT: verify
algis exactly what your code expects. Never calljwt.decodeand use the claims withoutjwt.verify. Many libraries acceptalg: none(un-signed) by default — verify the library version doesn't have this - Webhook signatures: verify the signature BEFORE doing anything else with the body. Many implementations parse-then-verify, leaving a JSON-parsing attack surface
- Constant-time comparison for the signature byte string
- Timestamp tolerance window — accept signatures from within ± 5 minutes (Stripe, GitHub, Slack all do this), not "forever" (replay attack)
- See
owasp-auditA02 type-coercion in signature paths (parseInt → NaN) - Grep for:
jwt.decode(without subsequentverify),alg: 'none',verify.*sigwithouttimingSafeEqualnearby
Randomness
- Use:
crypto.randomBytes(Node),secrets.token_bytes(Python ≥ 3.6),crypto/rand(Go),SecRandomCopyBytes(iOS),SecureRandom(Java) - Never use:
Math.random()(Node — Mersenne Twister, predictable),random.random()(Python — same),rand()(C — terrible),arc4random_uniformfor crypto (BSD — historical name only, but verify the runtime) - For UUIDs, prefer UUID v4 from a CSPRNG (most language stdlibs do this correctly; verify by reading the implementation if it matters)
- Token / session ID minimum entropy — 128 bits (16 random bytes, base64 → 22 chars) is the floor; 256 bits is the sane default
- Grep for:
Math.random,random.random,rand(,mt_rand(PHP),Random.new(Ruby)
TLS configuration
- Versions: TLS 1.3 preferred, TLS 1.2 minimum, refuse TLS 1.0 / 1.1 / SSLv3 / SSLv2
- Cipher suites (TLS 1.2): ECDHE only, AEAD ciphers only (AES-GCM, ChaCha20-Poly1305). Reject CBC, RC4, NULL, EXPORT, anonymous
- Certificate validation:
VERIFY_PEER, full chain, hostname check enabled (seeowasp-auditA02 for managed-service caveat) - Certificate pinning: for high-trust connections (mobile apps to your backend, sensitive internal services); pair with backup pin (rotation)
- HSTS preload: verified every subdomain serves HTTPS first; preload submission is sticky (months to remove)
- OCSP stapling for performance and privacy
- Test with:
testssl.sh https://targetorsslyze --regular target
Key lifecycle
- Where keys live: HSM / cloud KMS (AWS KMS, GCP Cloud KMS, Azure Key Vault, HashiCorp Vault Transit) — applications request encrypt / decrypt without ever seeing the key material
- Envelope encryption: per-record data key wrapped by a customer master key — limits blast radius if any single data key is exposed
- Rotation: master keys annually (or per provider default); data keys per record (no rotation needed — re-encrypt only if compromise suspected). KMS providers handle this if configured
- Key versioning: every ciphertext records the key ID that encrypted it, so decryption can find the right key after rotation
- Revocation: how do you stop a compromised key from being used to decrypt? Plan exists, documented, tested
Specific framework patterns
- Rails:
MessageVerifier/MessageEncryptoruse modern primitives by default; verify they're configured with a strong key (32 bytes / 256 bits) - Django:
cryptography.fernetis AES-128-CBC + HMAC-SHA256 (acceptable but not GCM);django.core.signingfor short signed values - Node/Express: prefer
iron-session/cookie-signatureover rolling your own - iOS: CryptoKit for modern Swift code;
CommonCryptoworks but has more footguns - Android: Tink (Google) is the recommended high-level library; raw JCA has historical AES-ECB defaults
Verify Fixes at Runtime
- Test encryption / decryption round-trip after every change — silent data corruption is the failure mode of crypto changes
- For algorithm changes (e.g., bcrypt → Argon2id): plan migration on next user login (rehash from plaintext during auth flow); old hashes need to remain readable until migrated
- For TLS changes: verify with
testssl.shandcurl --tlsv1.3 --tls-max 1.3 https://target(lower-bound TLS version enforcement) - For KMS changes: verify the IAM permissions cover both encrypt AND decrypt (common rollout bug: encrypted data, can't decrypt it back)
Output Format
# Cryptography Implementation Audit
## Project: [name]
## Scope: [components covered]
## Date: [date]
### Summary
[2-3 paragraphs]
### Findings
| ID | Severity | Component | Issue | CWE |
|----|----------|-----------|-------|-----|
### Per-finding detail
[Title, severity, file:line, description, vulnerable snippet, remediation, verification]
### TLS posture (if applicable)
[Output of testssl.sh / sslyze]
### Key inventory
| Key | Purpose | Location | Algorithm | Rotation |
|-----|---------|----------|-----------|----------|
### Recommendations
[Prioritized]
Disposition rule (Fixed / Deferred / Accepted Risk) per owasp-audit.
Boundaries
- Audit code and configurations the user provides
- Refuse to help break, weaken, or build backdoors into cryptography
- For TLS testing — only test endpoints the user has authorization for
- If the audit surfaces a fundamentally broken design (custom crypto, ROT13-as-protection), the recommendation is "replace, don't patch" — don't try to incrementally improve broken designs
- Quantum-resistant migration: track NIST PQC standardization but don't recommend specific PQC primitives until they're standardized and library-supported; the field is changing
References
- NIST SP 800-57 (Key Management)
- NIST SP 800-131A (Algorithm Transitions)
- NIST SP 800-175B (Cryptographic Standards Guidelines)
- NIST FIPS 140-3 (Cryptographic Module Standards)
- IETF RFC 7525 (TLS Recommendations)
- OWASP Cryptographic Storage Cheat Sheet
- OWASP Transport Layer Protection Cheat Sheet
- "Cryptography Engineering" — Ferguson, Schneier, Kohno (the book to read)
- "Real-World Cryptography" — David Wong
- libsodium / Tink / BoringSSL documentation
FAQ
What does the crypto-audit skill do?
Audit cryptography implementation — algorithm choice, key sizes, KDF parameters, IV/nonce handling, signature verification, randomness, TLS configuration, and key rotation. Deeper than owasp-audit A02. Use when the user mentions 'crypto review,' 'cryptography audit,' 'encryption review,' 'KDF,' 'PBKDF2,' 'Argon2,' 'bcrypt cost,' 'IV reuse,' 'nonce reuse,' 'AES mode,' 'AES-GCM,' 'AES-ECB,' 'signature verification,' 'TLS configuration,' 'cipher suites,' 'key rotation,' 'libsodium,' 'BoringSSL,' or 'is this crypto right.'
How do I install crypto-audit?
Run npx skills add https://github.com/briiirussell/cybersecurity-skills --skill crypto-audit in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/crypto-audit/ (personal) or .claude/skills/crypto-audit/ (project).
Which AI agents can use crypto-audit?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is crypto-audit safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains crypto-audit?
It is published by briiirussell in briiirussell/cybersecurity-skills. It has 359 recorded installs.
More from briiirussell/cybersecurity-skills
owasp-audit
briiirussell/cybersecurity-skills
Audit application source code against the OWASP Top 10 (2021) vulnerability categories — broken access control, cryptographic failures, injection, insecure design, security misconfiguration, vulnerable components, authentication failures, data integrity, logging failures, SSRF. Use when the user mentions 'OWASP,' 'OWASP Top 10,' 'security audit,' 'security review,' 'secure code review,' 'code security review,' 'vulnerability audit,' 'find vulnerabilities,' 'appsec review,' 'application security audit,' 'check for security issues,' 'broken access control,' 'IDOR,' 'SQL injection,' 'XSS,' 'SSRF,' or wants to check their codebase for common security weaknesses.
web-pentest
briiirussell/cybersecurity-skills
Perform black-box / grey-box web application penetration testing on an authorized target — auth bypass, IDOR, session handling, business-logic flaws, parameter tampering, Burp Suite / OWASP ZAP workflows. Use when the user mentions 'web pentest,' 'web application penetration test,' 'pentesting,' 'bug bounty,' 'Burp Suite,' 'ZAP,' 'OWASP testing,' 'authentication testing,' 'session testing,' 'authorization testing,' 'business logic testing,' 'web vulnerability testing,' or has explicit authorization to test a live web application.
api-audit
briiirussell/cybersecurity-skills
Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API audit,' 'BOLA,' 'broken object level authorization,' 'BFLA,' 'function-level authorization,' 'mass assignment,' 'API rate limiting,' 'GraphQL security,' 'REST security,' 'API authentication,' 'API authorization,' 'excessive data exposure,' or needs to review API endpoints for security weaknesses.
dependency-audit
briiirussell/cybersecurity-skills
Audit project dependencies, frameworks, languages, and dev tools for known vulnerabilities, CVEs, and security anti-patterns. Use when the user mentions 'dependency audit,' 'npm audit,' 'CVE,' 'vulnerable packages,' 'supply chain security,' 'outdated dependencies,' 'known vulnerabilities,' 'security advisory,' 'package security,' 'framework vulnerability,' 'is this package safe,' or needs to check whether their stack has known security issues.
secrets-audit
briiirussell/cybersecurity-skills
Find leaked secrets in source code, Git history, build artifacts, and infrastructure — and audit the secrets-management posture preventing future leaks. Use when the user mentions 'secrets audit,' 'secret scanning,' 'leaked credentials,' 'API key in code,' 'gitleaks,' 'trufflehog,' 'git history scan,' 'secrets management,' 'vault audit,' 'rotation policy,' 'AWS Secrets Manager,' 'HashiCorp Vault,' 'Doppler,' '1Password Secrets Automation,' 'sealed-secrets,' 'External Secrets Operator,' or needs to find or prevent credential exposure.
threat-modeling
briiirussell/cybersecurity-skills
Open the skill to read its SKILL.md instructions.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.