crypto-implementation-static-review

Statically review encryption code for primitive, randomness, KDF, envelope, and plaintext-handling defects.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill crypto-implementation-static-review-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crypto-implementation-static-review
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-privacy-audit/skills/crypto-implementation-static-review
Command: npx skills add https://github.com/bpcakes/jig-skills --skill crypto-implementation-static-review-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Cryptographic code often contains subtle defects—weak modes, predictable nonces, hardcoded keys, or plaintext leaking into logs—that manual review easily misses. This Skill provides a structured static review workflow plus a heuristic scanner to surface candidate issues across a codebase. ## Core Features & Use Cases - Heuristic Triage Scanner: The bundled Python script scans source files for crypto APIs, weak algorithms (ECB, DES, MD5), weak randomness (Math.random, java.util.Random), hardcoded secrets, and plaintext sinks, outputting Markdown or JSON with file and line locations. - Structured Review Workflow: Eight-step methodology covering crypto inventory, call-graph tracing, encryption construction, randomness/nonces, KDF parameters, key handling, envelope binding, and plaintext sinks. - Severity-Rated Findings: Findings follow a CRYPTO-IMPL-### schema with critical/high/medium/low severity, evidence requirements, and retest steps grounded in OWASP and NIST baselines. - Use Case: Before shipping an end-to-end encrypted feature, run the scanner over the repository, then trace each candidate from user input through encrypt/decrypt calls to logs and storage to confirm or dismiss real vulnerabilities. ## Quick Start Set JIG_CRYPTO_SKILL_DIR to this skill's directory and ask the agent to run the crypto static scan against the repository root, then review and confirm each candidate finding with file and line evidence.

Frequently Asked Questions about crypto-implementation-static-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I statically review encryption code for vulnerabilities?

Run the bundled crypto_static_scan.py script against the repository root to get candidate locations, then manually confirm each by tracing call sites, wrappers, tests, and reachable callers. The scan is a triage index, not proof of vulnerabilities by itself.

What cryptographic weaknesses does the scanner detect?

It flags weak primitives and modes like DES, RC4, ECB, MD5, and SHA1, unauthenticated CBC/CTR modes, weak randomness such as Math.random and java.util.Random, hardcoded secrets and keys, static IVs or salts, custom XOR-style crypto, and plaintext sinks like loggers and analytics.

Which languages and crypto libraries does the review cover?

The workflow covers Java/Kotlin (Cipher, GCMParameterSpec), JavaScript/TypeScript (node:crypto, WebCrypto, libsodium), Go (crypto/cipher, crypto/rand), Python (cryptography, PyNaCl, hashlib), and Rust/Swift/.NET AEAD wrappers and platform key stores.

Can static review certify that my cryptography is secure?

No. Static review cannot verify dynamic configuration, build-time substitutions, library defaults, or runtime key stores. The skill explicitly separates confirmed code evidence from unproven reachability and recommends targeted runtime tests for nonce uniqueness, tag verification, and log redaction.

Why does the scanner report findings in test files?

The scanner marks candidates under test or fixture paths with test_path: true so reviewers can triage without hiding shipped-test risks. Test-only plaintext is treated as low risk unless fixtures, debug endpoints, or snapshots ship in production artifacts.

How are crypto findings severity-rated?

Severity follows reachable impact: critical for recoverable plaintext or key material at scale, high for plaintext flowing to logs or static keys in production, medium for unauthenticated modes or weak KDF parameters, and low for demonstrated low-impact contract violations.