Help us improve
Share bugs, ideas, or general feedback.
From godmode
Guides secure cryptography: hashing (Argon2id, bcrypt), encryption (AES-256-GCM), key management, JWT signing, TLS hardening, digital signatures for sensitive data.
npx claudepluginhub arbazkhan971/godmodeHow this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:cryptoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- User invokes `/godmode:crypto`
Audits cryptography implementation — algorithm choice, key sizes, KDF parameters, IV/nonce handling, signature verification, randomness, TLS configuration, and key rotation. Deeper than OWASP A02.
Provides cryptography guidance on encryption (AES-256-GCM, ChaCha20), password hashing (Argon2id, bcrypt), signatures (Ed25519), TLS config, key management. Use for implementing or reviewing crypto.
Select appropriate cryptographic algorithms and parameters for encryption, hashing, key derivation, and digital signatures.
Share bugs, ideas, or general feedback.
/godmode:cryptoClassify data: at rest (passwords, PII, financial, API keys), in transit (TLS, mTLS, DB connections), integrity (signatures, HMAC, checksums), compliance (PCI-DSS, HIPAA, GDPR, FIPS).
Password hashing: Argon2id (m=65536, t=3, p=4) primary. bcrypt (cost 12+) fallback. NEVER MD5, SHA1, SHA256, PBKDF2 (<100K iter).
Symmetric encryption: AES-256-GCM (AEAD, general). ChaCha20-Poly1305 (software-fast). NEVER ECB, DES, 3DES, RC4, AES-CBC without HMAC.
Asymmetric: X25519 (key exchange). RSA-OAEP 2048+ (encryption). NEVER PKCS1v1.5 or RSA <2048.
Signatures: Ed25519 (primary). RS256/ES256 (JWT). NEVER RSA PKCS1v1.5 sigs, DSA.
Hashing (non-password): SHA-256 (general). BLAKE3 (modern). HMAC-SHA-256 (keyed). NEVER MD5, SHA-1.
Key derivation: Argon2id (from password). HKDF-SHA-256 (from shared secret).
Random: CSPRNG only (crypto.randomBytes, secrets, crypto/rand). NEVER Math.random().
Use envelope encryption: unique DEK per record (AES-256-GCM) encrypted by KEK from KMS. Store encrypted data + encrypted DEK + IV + auth tag. Unique 96-bit IV per operation. Master key in KMS. Track key version.
Database: TDE (physical theft) + column encryption (SQLi) + connection TLS (network).
Argon2id with auto-generated salt, constant-time comparison. Hash never encrypt. No length limits (allow 128+). Check breach lists. No composition rules (NIST 800-63B). Min 8 chars. Upgrade old hashes on login. Rate limit auth. Never log passwords.
Generation: CSPRNG, 256-bit+ symmetric, RSA 2048+. Generate in KMS. Storage: KMS/Vault (production). Env vars (dev). NEVER hardcoded. Rotation: Encryption 365d, signing/JWT 90d, TLS 90d. Compromise: immediately. Process: New -> deploy -> grace -> retire old. Track version with data.
CRYPTO RESULT:
Use case: <encryption at rest | transit | passwords | JWT | sigs>
Algorithm: <AES-256-GCM | Argon2id | RS256 | etc.>
Key management: <KMS | Vault | env var | none>
Key rotation: <defined | not defined>
Weak crypto found: <N>
Verdict: <SECURE | NEEDS IMPROVEMENT | INSECURE>
| Flag | Description |
|---|---|
| (none) | Full cryptographic assessment |
--passwords | Password hashing setup |
--encrypt | Encryption at rest |
--tls | TLS hardening |
--jwt | JWT signing/verification |
--keys | Key management and rotation |
--audit | Audit existing crypto |
Never ask to continue. Loop autonomously until zero weak algorithms remain and all secrets are in env vars or secret managers.
# Audit crypto usage in codebase
grep -rn "md5\|sha1\|DES\|ECB\|Math.random" src/ --include="*.ts" --include="*.py"
openssl s_client -connect localhost:443 -tls1_2 < /dev/null 2>&1 | grep Protocol
npx audit-ci --moderate
IF weak algorithm found (MD5, SHA1, DES): replace immediately. WHEN TLS version < 1.2 detected: upgrade to TLS 1.2+ minimum. IF bcrypt cost factor < 12: increase to >= 12.
1. grep for crypto, encrypt, decrypt, hash, bcrypt, argon2, jwt
2. Check nginx.conf for ssl_protocols, ssl_ciphers
3. grep for md5, sha1, des, ecb, Math.random — flag immediately
Run crypto tasks inline. All conventions apply identically.
Print: Crypto: {N} issues found, {M} fixed. Weak algorithms: {removed|none}. Key management: {env_vars|hardcoded}. Status: {DONE|PARTIAL}.
| Failure | Action |
|---|---|
| Deprecated algorithm in production | Replace immediately (MD5/SHA1 -> SHA-256+, DES/3DES -> AES-256-GCM). Migrate existing hashes on next user login. |
| Key rotation breaks decryption | Store key version with ciphertext. Support decryption with old key, encryption with new key during rotation window. |
| CSPRNG not available | Use crypto.randomBytes (Node), secrets (Python), crypto/rand (Go). Never fall back to Math.random or random. |
| TLS certificate expired | Automate renewal with Let's Encrypt/certbot. Set monitoring alert 30 days before expiry. |
Math.random for security).Append to .godmode/crypto-results.tsv:
timestamp finding_type severity location algorithm_before algorithm_after status
One row per finding. Status: fixed, open, accepted_risk.
After EACH crypto change:
KEEP if: no weak algorithms AND all tests pass AND existing encrypted data still decryptable
DISCARD if: introduces weak algorithm OR breaks existing decryption OR hardcodes secrets
On discard: revert immediately. Crypto regressions are security incidents.
STOP when ALL of:
- No weak algorithms in codebase
- All secrets in env vars or secret managers
- Password hashing uses bcrypt/argon2/scrypt
- TLS 1.2+ enforced