crypto-misuselisted
Install: claude install-skill ShieldNet-360/secure-vibe
<!-- Native skill bundle for Claude Code. Generated by `secure-vibe dev regenerate`. -->
<!-- Do not edit by hand; the source of truth is skills/crypto-misuse/SKILL.md. -->
# Cryptographic Misuse
Block weak ciphers, predictable RNG, undersized keys, slow-hash misuse, and non-constant-time comparisons
## ALWAYS
- Use the language / platform's cryptographic library. Python: `cryptography`, `secrets`. JavaScript: Web Crypto, `crypto.webcrypto`, Node `crypto`. Go: `crypto/*`, `golang.org/x/crypto`. Java: JCE/Bouncy Castle. .NET: `System.Security.Cryptography`.
- Use a cryptographically secure RNG: Python `secrets.token_bytes` / `secrets.token_urlsafe`, JS `crypto.getRandomValues` / `crypto.randomBytes`, Go `crypto/rand.Read`, Java `SecureRandom`.
- Hash passwords with a slow KDF tuned for ~100 ms on production hardware: **argon2id** (preferred, RFC 9106 parameters: m=64 MiB, t=3, p=1), **scrypt** (N=2^17, r=8, p=1), or **bcrypt** (cost ≥ 12). Always with a per-user random salt.
- Encrypt with AEAD (authenticated encryption): AES-256-GCM, ChaCha20-Poly1305, or AES-256-GCM-SIV. Generate a fresh random nonce per encryption.
- Use TLS 1.2+ (TLS 1.3 strongly preferred). Disable TLS 1.0/1.1, SSLv3, RC4, 3DES, and export ciphers.
- Compare MACs / signatures / tokens with constant-time helpers: `hmac.compare_digest`, `crypto.subtle.timingSafeEqual`, `subtle.ConstantTimeCompare`, `MessageDigest.isEqual`, `CryptographicOperations.FixedTimeEquals`.
- For asymmetric keys: RSA ≥ 3072 bits