ciphertext-recovery

ciphertext-recovery is a skill for Claude Code from icloudza/algokiller-plugin. It costs 116 tokens per session (24,988 once invoked), scanned A, original, MIT.

A method for recovering an unknown encryption, signing, or encoding algorithm from an ARM64 execution trace, which is a recorded sequence of processor operations. It uses evidence from the trace and checks possible algorithms against the observed results.

In plain words
What is it for?
Use it to inspect trace structure, find cryptographic constants, recover keys and round functions, detect modified algorithms, and verify a reconstructed result.
Why use it?
It helps analyze cryptographic behavior when the original source code or algorithm description is unavailable.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the algokiller-plugin plugin — 4 skills, 3 commands, 4 agents, 5 hooks, 1 MCP server shipped together

Good fit Use it to inspect trace structure, find cryptographic constants, recover keys and round functions, detect modified algorithms, and verify a reconstructed result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/icloudza/algokiller-plugin/ciphertext-recovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add icloudza/algokiller-plugin --skill ciphertext-recovery
Clone the repo
git clone --depth 1 https://github.com/icloudza/algokiller-plugin

Made for: Claude Code.

Or install algokiller-plugin, the plugin that ships this one along with the rest of its 4 skills, 3 commands, 4 agents, 5 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ciphertext-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/icloudza/algokiller-plugin/ciphertext-recovery.svg)](https://agentmods.dev/skills/icloudza/algokiller-plugin/ciphertext-recovery)
Your own site
<a href="https://agentmods.dev/skills/icloudza/algokiller-plugin/ciphertext-recovery"><img src="https://agentmods.dev/badge/skills/icloudza/algokiller-plugin/ciphertext-recovery.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 24,988 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.24988
Opus 5 $0.00058 $0.12494
Sonnet 5 $0.00023 $0.04998
Haiku 4.5 $0.00012 $0.02499

Measured 8d ago against content hash 49eae0b4f990, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ciphertext-recovery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ciphertext-recovery/SKILL.md · 978 lines

How it starts

The opening of the file, as written. The whole thing — 978 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AlgoKiller — Ciphertext Recovery

你是 AlgoKiller 的密文还原 agent,运行在 Claude 客户端中(Claude Code 或 Claude Desktop),通过 ak plugin 提供的 MCP 工具操作 trace 证据。

工作上下文:

  • 当前 trace 文件已通过 ak.bind_trace 绑定到本次会话。后续所有 ak.trace_search / ak.trace_context 都自动作用于该 trace;工具调用中不要再传 trace 文件路径。
  • 若 trace 文件未绑定,必须先调用 ak.bind_trace(path, mode="ciphertext")

你必须基于 trace 证据回答用户任务。不要编造指令、寄存器值、内存字节、函数边界、密钥、常量、字段语义、分支结果或调用关系。

可用工具(均由 ak MCP server 提供,25 个 = 18 trace/artifact + 7 ledger,按使用顺序分组):

🔍 体检与总览(bind_trace 之后第一波必做)

  • ak.trace_lint:单遍扫 trace 得 JSON 体检——行数/模块分布/Top-K mnemonic/call_func 块数/有无寄存器观察/format_ok + warnings。先调一次,确认 trace 格式可用、结构画像清晰。
  • ak.trace_constscan:扫密码学常数指纹(含 scalar 字面量 + NEON SIMD 广播两类),覆盖 MD5 init+T 表/SHA-1/SHA-256 init+K 表/SHA-512/SM3 init+T_j 轮常数/SHA-3/CRC32/FNV1a/AES sbox/AES Te0/SM4/ChaCha20/TEA/DES SP-box/Whirlpool/Poly1305/SipHash/HMAC ipad-opad(scalar + SIMD broadcast) + P-256/secp256k1/Ed25519/Curve25519。除 IV 外还扫主循环常数(MD5 T 表 / SHA-256 K 表 / SM3 T_j)——活跃 hash trace 的真实信号密度由这些主循环常数主导。关键计数规则:每个 fingerprint(如 MD5.T[1]SHA256.K[0]在单个压缩 block 内出现 1 次,整张 T/K 表跨 64 轮分给 T[1..64] / K[0..63] 各 1 次;所以 MD5.T[1].total_hits ≈ MD5 block 数(不是 64×block 数)。对于带 block_count_estimate 字段的 fingerprint,直接读该字段最稳。必看 verdict 字段而不是 total_hitsreal = load_imm 或 mem_r scalar 真信号;real_simd = NEON 广播证据(HMAC ipad/opad 等);alu_only = ALU 运算碰撞假阳,必须忽略;weak = 仅 mem_w/mem_r_addr 间接信号。每个命中带 evidence 分项(load_imm / mem_r / alu / simd_broadcast / ...)和 sample_lines 锚点。category 分类:hash / cipher_sym / ecc / crc / mac;confidence 分级:strong / medium / weak。
  • ak.trace_cryptoinstr:扫 ARM Crypto Extensions 硬件加密指令(AES aese/aesmc/aesd/aesimc、SHA-1 sha1c/m/p/h/su0/su1、SHA-256 sha256h/h2/su0/su1、SHA-512 sha512h/h2/su0/su1、SHA-3 eor3/rax1/xar/bcax、GHASH pmull/pmull2、SM3 sm3*、SM4 sm4e/sm4ekey)。这是 constscan 的盲区补丁:当 binary 走硬件加密(iOS CryptoKit / BoringSSL ARM / libsodium-arm / Android Keystore HW path / iPhone 5s+ 默认),软件 sbox/常数完全消失——只有硬件指令本身能识别。必须 constscan + cryptoinstr 一起跑:如果 constscan 报 AES.Te0 = 0 但 cryptoinstr 报 aese hits > 0,那就是 AES-NI 在跑,不是没加密。
  • ak.trace_callgraph --top N:Top-K 最常被调的 call func: NAME(args) 符号 + 计数。一眼看见热路径(malloc/memcpy/objc_msgSend/CCCrypt/...)。
  • ak.trace_modgraph --top N:跨模块跳转矩阵。看 caller_mod → callee_mod 邻接 + 边权重,定位密码学边界(如 app_main → openssl / target_sign → libc++)。

🔬 精准搜索与上下文

  • ak.trace_search:大小写不敏感精确子串搜索(BMH 引擎)。limit ≤ 100,须二选一 from_line / before_line
  • ak.trace_context:按行号取前后上下文。须显式 before + after(各 ≤ 100)。
  • ak.trace_bytes --query 0xVAL:hex 字面量全量命中(自动 byte-reverse + leading-zero-strip 变体),limit 高达 10000,输出每个变体 + 行号。比 trace_search 更适合"找一个值在全 trace 出现多少次"。

📈 数据流追踪(找寄存器演化 / 值来源 / 指令语义)

  • ak.trace_regflow --reg xN:寄存器 N 在 [from_line, to_line] 区间的所有 -> xN=0xVAL 演化序列,一行一记录。追密钥派生 / hash 累加器 / buffer 指针神器,比反复 trace_search 节约 5-10× token。
  • ak.trace_producer --value 0xVAL --sink-line N:从 sink 行反向最近 max_back 行内找首次写出该值的指令(任意寄存器)。替代"before_line 反向 grep 多轮"循环。
  • ak.trace_semop --line N | --from-line A --to-line B:分类每条指令为 11 类语义(zero xor x,x,x / crypto_candidate eor 不同寄存器 / hash_loop_candidate madd/msub / stack_save|restore stp/ldp x29,x30 / memory_load|store / branch b/bl/cbz/ret / addr_calc adrp/adr / data_move mov / alu add/sub/orr/and/eor/mul / compare cmp/tst/subs / unknown)。用来剪掉非密码学候选行。

🧱 数据块结构化提取

  • ak.trace_hexblock --line N:解析 call func: NAME(args) 块——返回 call、call_kind"arc_bookkeeping""normal")、args、可选 class: 标签、可选 hexdumps[](每段 {address, length, bytes_hex},bytes_hex 已拼接所有 hexdump 行)、ret、可选 arc_warning。替代手动凑 trace_context + 拼字节。memcpy/sprintf/CCCrypt 后取数据流首选。call_kind="arc_bookkeeping" 的 hexdump 是 Frida-stalker 对 receiver 对象的副作用 dump,不是算法输入/输出——必须放弃,沿 trace 上溯找产生该 buffer 的真正 call(例如 NSJSONSerialization dataWithJSONObject: / [NSString dataUsingEncoding:])。

📉 体量管理

  • ak.trace_fold --out_path PATH --block 4 --threshold 100:写一份新 trace,连续 W 行相同 signature 的重复块折叠为 first-block + sentinel + last-block。大型移动应用启动 trace 实测 115MB → 1.1MB(99% 压缩),保留首末块数据流证据。Hash loop(madd / ldrsb / subs / b.ne 4 条交替)用 --block 4,单指令重复用 --block 1

Read the full file on GitHub · 978 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 978 lines · 116 tokens per session scan A 49eae0b4f990

Subscribe to this mod's changes

ciphertext-recovery is a skill published in the GitHub repository icloudza/algokiller-plugin (76 stars, last pushed 3mo ago), licensed MIT. It adds 116 tokens to every session and 24,988 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hexwitness

Investigate authorized binaries and runtime behavior with HexWitness's durable evidence MCP and optional Binary Ninja or IDA live tools. Use for function or class discovery, UUID and field mapping, protocol reconstruction, capture comparison, contradiction analysis, evidence-gap planning, and promotion of live…

siaginw/HexWitness · 64 tokens

x64dbg-mcp-server

You are controlling x64dbg through MCP tools.

duty1g/x64dbg-mcp-server · 0 tokens

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

utility-pm-skill-auditor

Run a repo-wide cross-cutting governance audit via the pm-skill-auditor sub-agent. Aggregates the enforcing validator suite, re-derives aggregate counters, and surfaces cross-cutting issues no single validator catches, graded P0/P1/P2/P3 with a machine-readable status. Use for pre-release readiness checks or a…

product-on-purpose/pm-skills · 82 tokens

deliver-edge-cases

Documents edge cases, error states, boundary conditions, race conditions, and recovery paths for a feature - the systematic catalog of what can go wrong and the failure modes to design for. Use during specification to map the failure surface and ensure comprehensive coverage, or during QA planning to identify boundary…

product-on-purpose/pm-skills · 98 tokens

reverse-engineer-anything

Reverse engineer native, managed, Electron/JavaScript, packaged, and browser applications with REA. Use shipped-artifact or approved runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.

morluto/rea · 61 tokens