meltedinhex/analyst-ai-pack / skills/identifying-cryptographic-routines-in-binaries
identifying-cryptographic-routines-in-binaries
VerifiedIdentifies cryptographic algorithms embedded in a binary by scanning for well-known constants and tables (AES S-box, SHA-256/MD5 init constants, ChaCha sigma, CRC32 table, base64 alphabet). Activates for requests to identify crypto in a binary, find AES/SHA constants, or detect which encryption algorithm a sample uses.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.8 KB |
| references/api-reference.md | markdown | 1.3 KB |
| scripts/analyst.py | script | 3.0 KB |
references/api-reference.md
View on GitHub# API Reference: Identifying Cryptographic Routines in Binaries
## Overview
`scripts/analyst.py` scans a binary for well-known cryptographic constants — the AES S-box, SHA-256
init values (LE/BE), MD5 init constants, ChaCha/Salsa sigma strings, a CRC32 table prefix, and the
base64 alphabet — and reports their offsets. It reads bytes statically and executes nothing.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | struct, JSON, file IO |
## Core functions
### `scan(path)`
Returns the set of detected algorithms and per-constant offset hits.
### `_crc32_table_prefix()`
Computes the first entries of the standard `0xEDB88320` CRC32 table to anchor detection.
## Constants anchored
- AES S-box first 16 bytes (`0x63 0x7c 0x77 0x7b ...`).
- SHA-256 H0..H7; MD5 A/B/C/D init words.
- `expand 32-byte k` (ChaCha) / `expand 16-byte k` (Salsa20).
- Base64 standard alphabet.
## Usage
```bash
python scripts/analyst.py scan sample.bin
```
## Sources
- FIPS 197 (AES, S-box) — https://csrc.nist.gov/publications/detail/fips/197/final
- FIPS 180-4 (SHA-2 init/round constants) — https://csrc.nist.gov/publications/detail/fips/180/4/final
- RFC 8439 (ChaCha20 `expand 32-byte k` constant); CRC-32 polynomial 0xEDB88320 (ITU-T V.42)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |