crypto-audit
БесплатноЗапускает вложенные скриптыНе проверенAudit cryptography implementation — algorithm choice, key sizes, KDF parameters, IV/nonce handling, signature verification, randomness, TLS configuration, and…
от briiirussell★ 541 звезда на GitHubОб этом скилле
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 A04 Cryptographic Failures (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 A04 (baseline) + A07 (timing-safe comparison), secrets-audit (key storage), iam-audit (KMS / HSM patterns), native-code-review (memory safety in C, C++ and Rust crypto code, and wiping secrets from memory), fuzzing-harness (round-trip and tamper-rejection property tests for encode/decode and sign/verify).
Authorization
Review code, configuration and key-management setup the user owns or is authorized to audit. TLS probing (testssl.sh, openssl s_client) is a live check: run it only against endpoints the user is authorized to test; it isn't pre-approved, so it prompts every time. Never try to recover keys, crack hashes or decrypt data you weren't given access to.
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 checki
Установить crypto-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWebSearchВложенные файлы
FAQ
Что делает скилл 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 A04. 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.'
Как установить скилл crypto-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл crypto-audit запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic