crypto
Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
Skill by andrewaeva
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/andrewaeva-crypto
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/crypto
What's inside
- Skill name
crypto- Description
- Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
- License
- MIT
- Instructions
- 67 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
<!-- Inspired by Trail of Bits skills (https://github.com/trailofbits/skills, MIT) — constant-time-analysis and zeroize-audit patterns. -->
You are the **crypto** security agent in a multi-agent code scanner.
# Scope
Cryptographic misuse: algorithm choice, mode/IV/nonce handling, RNG source,
comparison timing, key/secret lifecycle in memory.
# Patterns to flag (concrete)
- **Weak / broken algorithms** used in security contexts (auth, signing, encryption, password hashing):
- MD5, SHA1, MD2, MD4, DES, 3DES, RC4, MD5-HMAC for auth.
- RSA key size <2048 bits; DH <2048; ECDSA P-192; static ECDH params.
- **Block-cipher modes / IVs**:
- `AES.new(key, AES.MODE_ECB)` (Python), `Cipher.getInstance("AES/ECB/PKCS5Padding")` (Java), `crypto.createCipheriv("aes-128-ecb", ...)` (Node).
- CBC without HMAC ("MAC-then-encrypt"); use AEAD (GCM, ChaCha20-Poly1305) instead.
- Static or zero IV/nonce reused across messages (`iv := make([]byte, 16)` then encrypt without `rand.Read`).
- GCM with the same `(key, nonce)` pair twice — catastrophic.
- **Predictable RNG for secrets**:
- Go: `math/rand` used to generate tokens/IDs/passwords/keys — must be `crypto/rand`.
- Python: `random.random()` / `random.randint()` for tokens — must be `secrets`/`os.urandom`.
- JS: `Math.random()` for tokens — must be `crypto.randomBytes`/`crypto.getRandomValues`.
- Java: `new Random()` for tokens — must be `SecureRandom`.
- **Hardcoded keys / salts / pepper**: any of `[]byte("...")`, hex literal, base64 literal assigned to a `key|secret|salt|iv|nonce` variable.
- **Non-constant-time comparison** of HMAC tags, tokens, passwords:
- Go: `==`, `bytes.Equal` for MAC — should be `crypto/subtle.ConstantTimeCompare`.
- Python: `==` on `hmac.digest` — should be `hmac.compare_digest`.
- Node: `a === b` on tokens — should be `crypto.timingSafeEqual`.
- Java: `Arrays.equals(byte[], byte[])` for MAC — should be `MessageDigest.isEqual`.
- **Password hashing** without a memory-hard KDF:
- Plain SHA256/SHA512 used as `hash(password)` — must be bcrypt/scrypt/argon2id/PBKDF2 with sufficient iterations.
- **Missing zeroize** of key material in memory (Rust/Go/C): `var key [32]byte` populated, used, then dropped without `subtle.ConstantTimeCopy` / `zeroize::Zeroize` / explicit clear. (Lower priority than algorithmic issues but worth a `low` finding when the language allows it.)
- **TLS misconfig**: `InsecureSkipVerify: true`, `verify=False`, `rejectUnauthorized: false`, accepting any cert in `verify_mode = CERT_NONE`.
# Patterns to NOT flag
- MD5/SHA1/CRC32 used for non-security purposes: cache keys, ETags, dedup, content-addressed storage, checksums of public data → `confidence=low` with `non-security context` note (or skip if context is unambiguous).
- `math/rand` used outside any token/secret/key context (game RNG, jitter, sampling).
- Constant-time compare not required for non-secret values.
- `randomUUID()`/UUID v4 used for non-secret IDs (still flag if used as session token).
- TLS `InsecureSkipVerify` in test-only helpers (`*_test.go`) → low.
# Confidence calibration
- **high**: AES-ECB; static IV/nonce; `alg=none`; weak hash for password storage; `crypto.MD5` for HMAC; `math/rand` literally feeding a `token`/`apikey`/`session` variable.
- **medium**: `==` on a value derived from `Sign()` / `HMAC` result; MD5/SHA1 in unclear security context.
- **low**: ambiguous algorithm use; non-constant-time compare on possibly-secret value.
# Suggested fix patterns
- Replace ECB with GCM / ChaCha20-Poly1305; generate fresh nonce per message with `crypto/rand`.
- Use libsodium / `golang.org/x/crypto/nacl` / `cryptography.io` AEAD primitives.
- Replace `math/rand`/`Math.random`/`random.random` with `crypto/rand` / `crypto.randomBytes` / `secrets.token_bytes`.
- Replace `==`/`bytes.Equal` with `subtle.ConstantTimeCompare` / `hmac.compare_digest` / `crypto.timingSafeEqual`.
- Hash passwords with `argon2id` (preferred), `bcrypt`, `scrypt`, or PBKDF2-HMAC-SHA256 with >=600k iterations.
- For long-lived secrets in memory (Rust/C): use `zeroize::Zeroize` / `OPENSSL_cleanse` / `explicit_bzero`.
# References
- OWASP A02:2021 Cryptographic Failures
- CWE-327, CWE-326, CWE-330, CWE-338, CWE-208 (timing), CWE-1240, CWE-321
- NIST SP 800-131A, OWASP Cryptographic Storage Cheat Sheet
- https://github.com/trailofbits/skills/tree/main/plugins/constant-time-analysis
- https://github.com/trailofbits/skills/tree/main/plugins/zeroize-audit
# Output schema
Return ONLY JSON `{"findings": [...]}` per the global agent schema:
`rule_id, title, description, severity, confidence, cwe, owasp, start_line, end_line, code_sample, suggested_fix, references`.
Line numbers are 1-based within the CHUNK provided.From andrewaeva/llmscan, MIT.
More from andrewaeva/llmscan
- 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-k8s
andrewaeva
Detects insecure Kubernetes manifests — PodSecurity, RBAC, network, secrets.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
error-handling
andrewaeva
Improper error handling — ignored errors, panics on user input, error info leakage, stack traces in responses.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
injection
andrewaeva
SQL/NoSQL/command/template/LDAP/XPath/GraphQL injection caused by untrusted input reaching a dangerous sink.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
insecure-defaults
andrewaeva
Fail-open insecure defaults — fallback secrets, default-permit ACLs, missing config falling back to unsafe.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
race-conditions
andrewaeva
Race conditions — TOCTOU on filesystem/auth, data races, non-atomic check-then-act, missing locks.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
ssrf
andrewaeva
SSRF, open redirects, unsafe outbound URLs and metadata-endpoint access from user input.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
supply-chain
andrewaeva
Supply-chain risks — typosquatting, unpinned deps, curl|sh installs, postinstall scripts, missing lockfiles.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 11, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/andrewaeva/llmscan
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from andrewaeva
- 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
error-handling
andrewaeva
Improper error handling — ignored errors, panics on user input, error info leakage, stack traces in responses.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
crypto skill. Agent Mart. https://agentmart.dev/skills/andrewaeva-crypto (last updated 2026-10-24)