Differential test harness gen
Skill Yue-Zhou1/zkcrypto-audit/plugins/evidence-and-tooling/skills/differential-test-harness-gen
Generate cross-implementation differential test harnesses for cryptographic code: official test-vector and Wycheproof replay, normalization of error/result semantics, deterministic corpus capture, and evidence handoff to crypto-fp-check. User-triggered only — never auto-invoked by the audit flow.From its SKILL.md
npx -y skills add Yue-Zhou1/zkcrypto-audit --skill differential-test-harness-genAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.2 KB, 643 tokens by cl100k_base, as published. Nobody here has run it
differential-test-harness-gen
Evidence-tooling skill that builds differential test harnesses: run the target implementation and a reference (or a second implementation) over the same inputs, normalize their result/error semantics, and capture every divergence as reproducible evidence. User-triggered only; the router never selects it automatically.
When to Use
- A reviewer explicitly requests a differential/cross-implementation test harness for a crypto primitive
- Replaying official test vectors (NIST CAVP/ACVP, RFC vectors) or Project Wycheproof cases against the target
- Producing deterministic crash/divergence corpora as evidence for
crypto-fp-check
When NOT to Use
- Automatic domain routing (this skill is
user_triggered_onlyand is excluded from all router rules and phase defaults) - Finding the vulnerability in the first place -> the domain auditors
- Property-based crash fuzzing of Rust code ->
fuzz-harness-gen - Bounded formal proofs ->
kani-harness-gen
Core Review Areas
- Implementations compared: the target and a well-chosen reference (or two references), with versions pinned
- Vector/corpus source: official vectors (CAVP/ACVP, RFC), Wycheproof where the primitive is covered, or a generated boundary corpus
- Normalization: mapping each implementation's accept/reject/error representation onto a common verdict so a real divergence is not masked by cosmetic API differences
- Determinism: fixed seeds, pinned versions, and captured inputs so every divergence reproduces
- Evidence handoff: a corpus of diverging inputs plus a reproduction
command per divergence, formatted for
crypto-fp-check
Workflow
Phase 1: Scope the harness
- Read
references/differential-test-checklist.md - Identify the primitive, the target entry point, the reference implementation(s), and the applicable vector sources
Phase 2: Build and replay
- Execute
workflows/wycheproof-replay.md - Generate the harness, replay vectors, and record divergences
Phase 3: Normalize and capture
- Read
references/finding-patterns.md - Apply result/error normalization and capture a deterministic corpus
Phase 4: Handoff
- Package divergences with reproduction commands and route to
crypto-fp-check
Output Contract
Produce a differential-testing evidence handoff that includes:
implementations_comparedvector_or_corpus_sourcenormalization_rulesreproduction_commandevidence_artifactsnext_route
Reference Index
What ships with it: 5 files
8.5 KB alongside SKILL.md
agents/
- openai.yaml639 B
references/
- differential-test-checklist.md2.5 KB
- finding-patterns.md2.0 KB
- spec-sources.md1.3 KB
workflows/
- wycheproof-replay.md2.0 KB