Generated banner for Vector Forge
Generated logo for Vector Forge

Vector Forge

Trail of BitsOfficialPublished by Trail of Bits

  • Skill
  • Workflow
  • Software development
  • CC-BY-SA-4.0
  • No issues found

From the author

Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify escaped mutants, then generates new test vectors that deliberately exercise the uncovered code paths. Compares before/after mutation kill rates to prove vector effectiveness. Use when generating cryptographic test vectors, measuring Wycheproof coverage gaps, finding escaped mutants via mutation testing, creating cross-implementation test suites, or improving test vector coverage for crypto primitives.
— the description by Trail of Bits

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Vector Forge provides a systematic methodology to improve cryptographic test suites by using mutation testing to identify coverage gaps. It guides users through discovering implementations, establishing a baseline, performing graph-informed escape analysis, and generating targeted test vectors. By comparing mutation kill rates before and after, it provides concrete evidence of test suite effectiveness, ensuring that both valid and invalid inputs are rigorously handled.

What it does

  • Identifies code paths missed by existing test suites using mutation testing.
  • Uses call-graph analysis to prioritize escaped mutants by security impact.
  • Generates targeted test vectors to close coverage gaps and kill surviving mutants.
  • Validates test vector effectiveness through before-and-after mutation kill rate comparisons.
  • Supports cross-implementation verification to ensure consistency across different codebases.
  • Provides a structured reporting template for documenting test suite improvements.

When to use it

  • When generating or improving test vectors for cryptographic algorithms.
  • When evaluating the concrete coverage of an existing test suite.
  • When identifying implementation code paths that lack test coverage.
  • When creating cross-implementation test suites for cryptographic primitives.

Advantages

  • Systematically uncovers blind spots in cryptographic test suites.
  • Prioritizes security-critical code paths for testing.
  • Provides measurable proof of test suite improvement.
  • Reduces reliance on manual analysis for identifying missing test cases.
  • Ensures both positive and negative test assertions are implemented.

Usage examples

“How can I improve the test coverage for my BLS12-381 implementation?”
The agent will guide you through running a baseline mutation test, using the call graph to identify escaped mutants, and generating specific test vectors to target those uncovered paths.
“My cryptographic library has high line coverage but still misses bugs. What should I do?”
The agent will recommend using Vector Forge to perform mutation testing, which reveals logic gaps that standard line coverage metrics fail to detect.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/trailofbits/vector-forge/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip vector-forge.zip -d .agents/skills

Documentation by Trail of Bits

Vector Forge

Uses mutation testing to systematically identify gaps in test vector coverage, then generates new test vectors that close those gaps. Measures effectiveness by comparing mutation kill rates before and after.

When to Use

  • Generating test vectors for cryptographic algorithms or protocols

  • Evaluating how well existing test vectors cover an implementation

  • Finding implementation code paths that no test vector exercises

  • Creating Wycheproof-style cross-implementation test vectors

  • Measuring the concrete coverage value of a test vector suite

When NOT to Use

  • No implementations exist yet (need code to mutate)

  • Single trivial implementation with no edge cases

  • Testing application logic rather than algorithm implementations

  • The algorithm has no public test vectors to compare against

Prerequisites

  • trailmark installed — if uv run trailmark fails, run:

    uv tool install trailmark

Python snippets: uv run --with trailmark python - (a tool env is not importable)

- At least one implementation of the target algorithm in a
language with mutation testing support
- A test harness that consumes test vectors and exercises
the implementation
- A mutation testing framework for the target language

---

## Rationalizations to Reject

| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "We have enough test vectors" | Mutation testing proves otherwise | Run the baseline first |
| "The implementation's own tests are sufficient" | Own tests often share blind spots with the impl | Cross-impl vectors catch different bugs |
| "FFI crates can be mutation tested at the binding layer" | Mutations to wrappers don't affect the underlying impl | Mutate the actual implementation language |
| "Timeouts mean the mutation was caught" | Timeouts are ambiguous — could be killed or alive | Resolve timeouts before drawing conclusions |
| "All mutants are equivalent" | Most aren't — verify by reading the mutation | Classify each escaped mutant individually |
| "Checking valid vectors is enough" | Permissive mutations survive without negative assertions | Assert rejection for every invalid vector |
| "Manual analysis is fine" | Manual analysis misses what tooling catches | Install and run the tools |

---

## Workflow Overview

Phase 1: Discovery → Find implementations to test ↓ Phase 2: Harness → Write/adapt test vector harness for each impl ↓ Phase 3: Baseline → Run mutation testing with existing vectors ↓ Phase 4: Escape Analysis → Classify escaped mutants by code path ↓ Phase 5: Vector Gen → Create test vectors targeting escapes ↓ Phase 6: Validation → Re-run mutation testing, compare before/after ↓ Output: Coverage Report + New Test Vectors


---

## Phase 1: Discovery

Find implementations of the target algorithm. Look for:

1. **Pure implementations** in high-level languages (Go, Rust, Python)
   — these are the best mutation testing targets
2. **FFI wrapper crates** — identify these early so you don't waste
   time mutating wrapper glue code
3. **Reference implementations** — useful for cross-verification but
   may not be the best mutation targets

For each implementation, note:
- Language and mutation testing framework
- Whether it's pure code or FFI wrappers
- Existing test suite size and coverage
- Which API surface the test vectors will exercise

### Implementation Type Classification

| Type | Mutation Value | Example |
|------|---------------|---------|
| Pure implementation | High | zkcrypto/bls12_381 (Rust), gnark-crypto (Go) |
| FFI bindings to C/asm | Low at binding layer | blst Rust crate |
| C/C++ implementation | High (use Mull) | blst C library |
| Generated code | Medium (mutations may be equivalent) | gnark-crypto generated field arithmetic |

**Key insight:** If an implementation delegates to another language
via FFI, you must mutate the *underlying* implementation, not the
bindings. For C/C++ underneath Rust/Go/Python, use Mull or similar.

---

## Phase 2: Harness

For each implementation, create a test harness that:

1. Reads test vectors from JSON files (Wycheproof format recommended)
2. Exercises the implementation's API for each vector
3. Asserts **both acceptance and rejection**:
   - Valid vectors: deserialization succeeds, output matches expected
   - Invalid vectors: deserialization fails or verification rejects
4. Adds **roundtrip assertions** for valid deserialization vectors:
   `serialize(deserialize(bytes)) == bytes`
5. Reports pass/fail per vector with test IDs

**Critical:** A harness that only checks valid vectors will miss all
permissive mutations (e.g., `&` → `|` in validation). See
[references/lessons-learned.md](references/lessons-learned.md) §7.

The harness must be runnable by the mutation testing framework.
For most frameworks this means:
- **Go:** A `_test.go` file in the same package as the implementation
- **Rust:** An integration test in `tests/` or inline `#[test]` functions
- **Python:** A pytest test file
- **C/C++:** A test binary linked against the implementation

### Harness Placement

The harness must live *inside the implementation's package* so the
mutation framework can see it. This usually means:

```bash
# Go: add test file to the package being mutated
cp wycheproof_test.go /path/to/impl/package/

# Rust: add integration test
cp wycheproof.rs /path/to/crate/tests/

# Python: add test to the test directory
cp test_wycheproof.py /path/to/package/tests/
Handling Existing Vectors

If the implementation already has test vectors:

  1. Run mutation testing with ONLY the existing vectors (baseline)

  2. Run mutation testing with ONLY your new vectors

  3. Run mutation testing with BOTH combined

  4. The delta between (1) and (3) shows the new vectors' value


Phase 3: Baseline

Run mutation testing with existing test vectors only.

Framework Selection

See references/mutation-frameworks.md for language-specific setup.

LanguageFrameworkCommand
Gogremlinsgremlins unleash ./path/to/package
Rustcargo-mutantscargo mutants -j N --timeout T
Pythonmutmutmutmut run --paths-to-mutate src/
C/C++Mullmull-runner -test-framework=GoogleTest binary
Parallelism

Always use parallel execution for large codebases:

  • cargo mutants -j 8 (Rust, 8 parallel workers)

  • gremlins unleash --timeout-coefficient 3 (Go, increase timeouts)

  • mutmut run --runner "pytest -x -q" (Python, fail-fast)

Recording Baseline Results

Capture these metrics per implementation:

MetricDescription
Total mutantsNumber of mutations generated
KilledMutants caught by tests
Survived/LivedMutants NOT caught (these are the targets)
Not coveredCode paths no test reaches at all
Timed outAmbiguous — resolve before comparing
Efficacy %Killed / (Killed + Survived)
Coverage %(Total - Not covered) / Total

Save the full mutation log for Phase 4 analysis.


Phase 4: Escape Analysis (Graph-Informed Triage)

Classify each escaped (survived + not covered) mutant using the Trailmark call graph for reachability and blast radius analysis.

This phase MUST use the genotoxic skill's triage methodology. The call graph transforms mutation results from a flat list of survived mutants into an actionable, prioritized set of vector targets.

Step 1: Build the Call Graph

Build a Trailmark code graph for each implementation before triaging mutations:

# Go
uv run trailmark analyze --language go --summary {targetDir}

# Rust
uv run trailmark analyze --language rust --summary {targetDir}

The graph provides:

  • Caller chains — trace from public API entry points to mutated functions to determine reachability

  • Cyclomatic complexity — prioritize high-CC functions

  • Blast radius — functions with many callers have wider impact if their mutations survive

Step 2: Filter to Relevant Code

Mutation frameworks test the entire package. Filter results to only the files/functions that test vectors should exercise:

# Go (gremlins)
grep -E "(LIVED|NOT COVERED)" baseline.log \
  | grep -E " at (relevant|files)" \
  | sort

# Rust (cargo-mutants)
cat mutants.out/missed.txt | grep "src/relevant"
Step 3: Graph-Informed Classification

For each escaped mutant, map it to its containing function in the call graph and apply the genotoxic triage criteria:

Graph SignalClassificationAction
No callers in graphFalse PositiveDead code, skip
Only test callersFalse PositiveTest infrastructure
Logging/display/formattingFalse PositiveCosmetic
Cross-package callers but NOT COVEREDCross-Package GapSee below
Reachable from public API, low CCMissing VectorDesign targeted vector
Reachable from public API, high CC (>10)Fuzzing TargetBoth vector + fuzz harness
Validation/error-handling pathNegative VectorCraft invalid input that triggers path
Optimization path (GLV, SIMD, batch)Edge-Case VectorInput that triggers optimization threshold
|→^ after left shift (e.g. (t<<1) | carry)Equivalent MutantSkip — bit 0 always 0, OR=XOR
ct_eq &→| on Montgomery limbsAPI-UnreachableNeeds library-internal tests, not vectors
Equivalent mutation (behavior unchanged)False PositiveSkip
Step 4: Identify Cross-Package Test Gaps

Critical pitfall: Mutation frameworks often only run tests within the same package as the mutation. For Go (gremlins) and Rust (cargo-mutants), this means:

  • A mutation in hash_to_curve/g2.go only runs tests in the hash_to_curve package, NOT tests in the parent bls12381 package that imports it

  • Functions that are fully exercised by cross-package tests will appear as NOT COVERED — these are false positives

  • To confirm: check if the mutated function is called from a test in a different package that wouldn't be run

To resolve cross-package gaps:

  1. Add a thin test in the sub-package that calls through the same code path as the cross-package test

  2. Or run gremlins with --test-pkg ./... (if supported)

  3. Or document as a framework limitation in the report

Step 5: Prioritize by Security Impact

Using the call graph, rank surviving mutants by impact:

PriorityCriteriaExample
P0 — CriticalMutant weakens validation/equality/authenticationct_eq: & → | makes equality permissive
P1 — HighMutant in deserialization flag parsingfrom_compressed: & → | accepts invalid flags
P2 — MediumMutant in field arithmetic internalsFp::square: | → ^ corrupts computation
P3 — LowMutant in optimization pathphi endomorphism: only affects performance path
SkipFormatting, display, equivalent mutationDebug::fmt return value replacement
Step 6: Group by Vector Strategy

Group escaped mutants by the code path they represent and the type of test vector needed:

Deserialization flag validation (P1):
  - g1.rs:339,363-365,384 — from_compressed_unchecked flags
  → Need: valid-point-wrong-flag vectors

Field arithmetic (P2):
  - fp.rs:371-376,406,635-643 — subtract_p, neg, square
  → Need: field arithmetic KATs with edge-case values

Optimization thresholds (P3):
  - g1.go:68, g2.go:75 — GLV vs windowed multiplication
  → Need: scalar multiplication with large scalars

Cross-package (framework limitation):
  - hash_to_curve/g2.go:242-278 — isogeny, sgn0
  → Document as false positive or add sub-package test

Each group becomes a target for new test vectors in Phase 5.


Phase 5: Vector Generation

For each escaped code path group, design test vectors that force execution through that path.

Vector Design Patterns
Code Path TypeVector Strategy
Point deserializationMalformed points: wrong length, invalid field elements, off-curve, wrong subgroup, identity point
Signature verificationValid sig + all single-bit corruptions of sig, pk, msg
Hash-to-curveKnown answer tests (KATs) with edge-case inputs: empty, single byte, max length
Aggregate operations1 signer, many signers, duplicate signers, mixed valid/invalid
Error handlingEvery error path should have a vector that triggers it
Arithmetic edge casesZero, one, field modulus - 1, points at infinity
Serialization flagsEvery valid flag combination + every invalid flag combination
Roundtrip integrityFor every valid deser vector, assert serialize(deserialize(b)) == b
Carry/reduction faultsReimplement at reduced limb widths, inject faults, extract distinguishing inputs
Single-Fault Negative Vectors

Each negative vector should have exactly one defect with everything else valid — this isolates which validation check is being tested. See references/vector-patterns.md for per-flag construction examples.

Fault Simulation (Limb-Width Reimplementation)

When mutation testing only applies local operator swaps, deeper architectural bugs (carry propagation, reduction overflow) go untested. To close this gap, reimplement the target algorithm at reduced limb widths (8, 16, 25, 32 bits) and deliberately inject faults — then generate vectors that catch them.

See references/fault-simulation.md for the full methodology: limb-width selection, fault injection catalog, vector extraction, and validation workflow.

Cross-Implementation Verification

Every new test vector MUST be verified against at least two independent implementations before being added to the suite:

  1. Generate the vector using implementation A

  2. Verify with implementation B (different codebase, ideally different language)

  3. If B disagrees, investigate — one implementation has a bug

Vector Format

Use Wycheproof JSON format (algorithm, testGroups[].tests[] with tcId, comment, result, flags). See references/vector-patterns.md for the full schema.

Wycheproof contributions: Use Wycheproof's vectorgen tool rather than formatting vector files directly. Supply the generated changes as an envelope. The vectorgen tool can add, update, or replace vectors while handling tcId assignment, test counts, canonical formatting, and schema validation. Go-based generators can avoid the vectorgen CLI tool and instead call the programmatic github.com/c2sp/wycheproof/vectorgen API.

See references/lessons-learned.md §14 and the upstream vectorgen guide for the current workflow and commands.


Phase 6: Validation

Re-run mutation testing with the new test vectors included.

Tip: Use per-file mutation testing for fast iteration during vector development (see references/lessons-learned.md §12). Only run full-crate tests for the final comparison.

Before/After Comparison
MetricBaselineWith New VectorsDelta
KilledXYY - X
SurvivedABA - B (should decrease)
Not CoveredCDC - D (should decrease)
Efficacy %E%F%F - E
Success Criteria

Vectors have both retroactive value (killing mutants in existing code) and proactive value (catching bugs in future implementations). Generate both kinds — boundary-condition vectors may not improve kill rates in mature libraries but will catch bugs in new implementations. See references/lessons-learned.md §13.

Retroactive (measurable): previously survived/uncovered mutants become killed, no regressions.

If kill rates don't change: the implementation's own tests likely already cover those paths. The vectors still add cross-implementation verification value. Document which case applies.


Output Format

Write VECTOR_FORGE_REPORT.md covering: target algorithm, implementations tested, baseline results, escape analysis, new vectors generated, after results, before/after delta, and conclusions. See references/report-template.md for the full template.


Quality Checklist

Before delivering:

  • [ ] At least one pure implementation mutation-tested (not just FFI wrappers)

  • [ ] Baseline run completed with existing vectors

  • [ ] Trailmark call graph built for each implementation

  • [ ] All escaped mutants triaged using graph-informed classification

  • [ ] Cross-package false positives identified and documented

  • [ ] Security-critical mutations (ct_eq, validation, auth) prioritized as P0/P1

  • [ ] Fault simulation and mutation-derived vectors cross-verified against 2+ implementations

  • [ ] After run completed with new vectors included

  • [ ] Before/after delta computed and explained

  • [ ] Report written to VECTOR_FORGE_REPORT.md

  • [ ] New test vectors saved in standard format (Wycheproof JSON)


Integration

SkillRelationship
genotoxic (required for Phase 4)Provides graph-informed triage — call graph cuts actionable mutants by 30-50%
mutation-testing (mewt/muton)Use for Solidity; Vector Forge is language-agnostic
property-based-testingBetter than hand-crafted vectors for bitwise mutations in field arithmetic
testing-handbook-skills (fuzzing)Functions with CC > 10 and surviving mutants need both vectors and fuzz harnesses

Supporting Documentation

Files

references/vector-patterns.md

Test Vector Patterns for Cryptographic Primitives

Patterns for designing test vectors that target specific code paths identified through mutation testing escape analysis.

Contents

  • General principles

  • Serialization / deserialization vectors

  • Signature scheme vectors

  • Hash-to-curve vectors

  • Pairing-based cryptography vectors

  • Aggregate / threshold scheme vectors

  • Key encapsulation vectors

  • Symmetric cipher vectors

  • Mapping escaped mutants to vector patterns


General Principles

Every Vector Needs a Purpose

Each test vector should target a specific code path or validation check. Document the purpose in the vector's comment field:

{
  "tcId": 5,
  "comment": "signature with flipped sign bit in G2 y-coordinate",
  "result": "invalid",
  "flags": ["ModifiedSignature"]
}
Cross-Implementation Verification is Mandatory

A test vector is only trustworthy if two independent implementations agree on its result. If they disagree, one has a bug — and that disagreement is itself a valuable finding.

Negative Vectors are More Valuable Than Positive Ones

Valid-case vectors verify basic correctness. Invalid-case vectors exercise error handling, validation, and rejection logic — the code paths where security bugs hide.

Edge Cases Over Random Cases

Random test vectors exercise the "happy path." Edge cases exercise boundary conditions where off-by-one errors, overflow, and validation gaps lurk.


Serialization / Deserialization Vectors

Target: SetBytes, FromCompressed, Decode, Unmarshal, from_bytes, deserialize and similar functions.

Point Encoding Vectors (Elliptic Curves)
Vector TypePurposeExpected Result
Valid compressed pointBaseline correctnessvalid
Valid uncompressed pointBaseline for uncompressed pathvalid
Identity / point at infinitySpecial case handlingvalid or invalid (spec-dependent)
Wrong length (truncated)Length validationinvalid
Wrong length (extra bytes)Length validationinvalid
All-zero bytesZero-check handlinginvalid
Field element >= modulusField validationinvalid
Point not on curveCurve checkinvalid
Point on curve but wrong subgroupSubgroup checkinvalid
Flipped compression flag bitFlag parsinginvalid
Flipped sign bitSign selectioninvalid or different point
Maximum valid field elementBoundary conditionvalid
Modulus - 1 as field elementBoundary conditionvalid
Mixed compressed/uncompressed flagsFlag consistencyinvalid
Roundtrip Assertions

For every valid deserialization vector, add a roundtrip check: serialize(deserialize(bytes)) == bytes. This catches field arithmetic corruption (carry propagation, modular reduction, square root, negation bugs) that produces a valid-looking but incorrect point — the wrong y-coordinate changes the sort bit in the re-compressed encoding.

This technique killed 15 previously-missed Fp mutations in the BLS12-381 campaign without requiring knowledge of the internal field representation.

Single-Fault Negative Vectors

Each negative vector should isolate ONE validation check by having exactly one defect. For flag parsing mutations:

DefectConstructionValidates
Compression flag clearedbytes[0] &= 0x7f on valid pointFlag bit 7 check
Infinity flag setbytes[0] |= 0x40 on non-identityFlag bit 6 check
Sort flag on identitybytes = [0xe0, 0, ...]Identity + flag consistency
Compression cleared on identitybytes = [0x40, 0, ...]Identity encoding check
Both infinity + sortbytes[0] |= 0x60 on valid pointMulti-flag validation
Wrong length192 bytes with compression flagLength vs flag consistency

Keep the underlying field element valid so the ONLY reason for rejection is the flag. This is what kills & → | mutations in from_compressed_unchecked.

Scalar Encoding Vectors
Vector TypePurposeExpected Result
Zero scalarZero handlingvalid (context-dependent)
One scalarIdentity elementvalid
Group order - 1Maximum validvalid
Group orderReduction checkinvalid or reduced to zero
Group order + 1Overflow handlinginvalid or reduced to one
All-ones bytesLarge value handlinginvalid (usually > order)
Non-canonical encodingReduction behaviordepends on spec

Signature Scheme Vectors

Target: Verify, Sign, verify, core_verify and similar.

Single Signature Vectors
Vector TypePurposeExpected Result
Valid signature on empty messageEmpty input handlingvalid
Valid signature on single byteMinimal inputvalid
Valid signature on large messageNo length limitsvalid
Wrong message (1 bit flip)Verification correctnessinvalid
Wrong public keyKey bindinginvalid
Truncated signatureLength checkinvalid
Signature with extra bytesStrict parsinginvalid
Identity point as signatureIdentity rejectioninvalid
Identity point as public keyIdentity rejectioninvalid
Negated signatureSign checkinvalid
Signature from wrong scheme/DSTCross-scheme isolationinvalid
All-zero signature bytesDegenerate inputinvalid
Signature with field overflowField validationinvalid
Multi-Signature / Aggregate Vectors
Vector TypePurposeExpected Result
1 signer, validMinimal aggregatevalid
N signers, all validStandard casevalid
N signers, one wrong messageDetects per-message bindinginvalid
Mismatched pubkey/message countInput validationinvalid
Empty signer listEmpty input handlinginvalid
Duplicate messages (rogue key attack)See spec requirementsinvalid
Identity key in aggregateIdentity rejectioninvalid
Identity signature in aggregateIdentity rejectioninvalid

Hash-to-Curve Vectors

Target: HashToG1, HashToG2, hash_to_curve, encode_to_curve.

Known Answer Tests (KATs)
Vector TypePurposeExpected Result
Empty messageEmpty input handlingknown point
Single byte 0x00Minimal non-emptyknown point
ASCII string "abc"Standard testknown point
Long message (128+ bytes)No length restrictionsknown point
Very long message (256+ bytes)Large input handlingknown point
RFC test vectorsSpec complianceknown point

Hash-to-curve vectors must use a specific DST (domain separation tag) and the expected output must be computed by a reference implementation.


Pairing-Based Cryptography Vectors

Target: PairingCheck, MillerLoop, FinalExponentiation, multi_miller_loop, pairing.

Pairing Check Vectors
Vector TypePurposeExpected Result
e(P, Q) == e(P, Q)Reflexivitypass
e(aP, Q) == e(P, aQ)Bilinearitypass
e(P, O) == 1Identity handling (O = point at infinity)pass
e(O, Q) == 1Identity handlingpass
e(P, Q) with P not in G1Subgroup checkfail or undefined
e(P, Q) with Q not in G2Subgroup checkfail or undefined
Multi-pairing with n=1Minimal multi-pairingmatches single pairing
Multi-pairing with n=0Empty inputimplementation-defined

Key Encapsulation Vectors (KEM)

Target: Encapsulate, Decapsulate, encaps, decaps.

Vector TypePurposeExpected Result
Valid encaps/decaps roundtripCorrectnessshared secrets match
Modified ciphertext (1 bit flip)Ciphertext integritydecaps fails or different secret
Wrong secret keyKey bindingdecaps fails or different secret
Truncated ciphertextLength validationerror
All-zero ciphertextDegenerate inputerror
Known-answer test (deterministic encaps)Spec complianceknown ciphertext + secret

Mapping Escaped Mutants to Vector Patterns

When escape analysis (Phase 4) identifies survived mutants, use this mapping to select appropriate vector patterns:

Mutant LocationMutant TypeVector Pattern
Length check (len != N)CONDITIONALS_BOUNDARYTruncated / extended inputs
Field validation (>= modulus)CONDITIONALS_NEGATIONField overflow values
Subgroup checkCONDITIONALS_NEGATIONWrong-subgroup points
Identity check (IsInfinity)CONDITIONALS_NEGATIONIdentity point inputs
Sign bit handlingARITHMETIC_BASENegated / flipped-sign inputs
Error return pathCONDITIONALS_NEGATIONInput triggering that error
Serialization flag parsingARITHMETIC_BASEAll flag combinations
Loop bound (i < n)INCREMENT_DECREMENTBoundary-length inputs
Arithmetic operationINVERT_NEGATIVESKATs verifying exact output
Example: Mapping gnark-crypto BLS12-381 Escapes
marshal.go:117-352 (streaming encoder, NOT COVERED)
→ Not reachable via SetBytes/Bytes API
→ Need vectors exercising io.Writer-based Encode/Decode
→ Pattern: Serialization vectors via streaming API

pairing.go:352-394 (Miller loop internals, NOT COVERED)
→ Reachable via PairingCheck but specific arithmetic lines
  don't have distinguishing inputs
→ Pattern: Pairing bilinearity KATs with edge-case points

g1.go:184, g2.go:191 (endomorphism, NOT COVERED)
→ Only used in multi-scalar multiplication optimization
→ Pattern: Large-scalar multiplication with known answers

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Trail of Bits
Publisher
Trail of Bits (Official)
Source
trailofbits/skills · plugins/trailmark/skills/vector-forge · commit e4dd0bb
Licence
Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Trail of Bits.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download vector-forge.zip