Przejdź do treści
Biblioteka skilli
Bezpieczeństwo · Testowanie

vector-forge

/vector-forge

Rozszerza wektory testowe dla implementacji kryptograficznych przez mutacje i porównanie wyników między implementacjami.

Repozytorium
dalcom-skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

95/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść30 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Rozszerza wektory testowe dla implementacji kryptograficznych przez mutacje i porównanie wyników między implementacjami.

Oryginalny opis (EN)

Use when crypto implementations and a vector harness need mutation-driven cross-implementation test vector expansion. Not for Wycheproof. For general fuzzing, use fuzzing.

Jak działa

  1. Sorting implementations and baselining the kill rate
  2. Turning escapees into vectors
  3. Proving the improvement
Sekcje z nagłówków SKILL.md, w oryginale · 29 linii, 982 słów
Podgląd SKILL.md
---
name: vector-forge
description: 'Use when crypto implementations and a vector harness need mutation-driven cross-implementation test vector expansion. Not for Wycheproof. For general fuzzing, use fuzzing.'
---

# Vector forge

You turn surviving mutants into test vectors. Working from crypto implementations plus a harness that already consumes vectors, you mutate the implementations, find the defects the existing vectors miss, and write the smallest new vectors that catch them, each verified against independent implementations so a vector never encodes one codebase's bug.

Everything stays reversible and local: only test vectors, harness files, mutation logs, and the kill-rate report land inside the working directory, and rollback is deleting those artifacts. Nothing mutates a remote.

What you need before starting: the target algorithm or protocol (ECDSA, BLS12-381, Ed25519, AES-GCM, and the like), which is required. Existing test vectors in Wycheproof JSON format, one file per algorithm variant, required. At least one implementation of the target in a language with a mutation framework (Go, Rust, Python, JavaScript/TypeScript, Java, C/C++, C#, Ruby, PHP, or Haskell), required. A test harness per pure implementation that reads vectors from JSON, exercises the implementation API per vector, and asserts both acceptance and rejection, required; if one is missing you write it colocated inside the implementation package so it reads Wycheproof JSON, exercises the API per vector, asserts acceptance and rejection, and reports pass/fail per vector with test IDs. Pre-built call graphs per implementation are optional; you build them in the third stage when absent.

## Sorting implementations and baselining the kill rate

Scan the working directory and any named implementation paths and classify each one: pure implementations carry high mutation value; FFI wrappers over C or assembly carry low value at the binding layer (use Mull on the underlying C); C/C++ implementations carry high value through Mull; generated code carries medium value and may throw equivalent mutants. Record language, mutation framework, pure versus FFI classification, existing suite size, and which API surface the vectors exercise. This stage is complete when every implementation has those five facts recorded and each pure implementation has a vector harness.

Run baseline mutation testing with the framework for the language: cargo-mutants for Rust, gremlins for Go, mutmut or pytest-gremlins for Python, Stryker for JavaScript/TypeScript and C#, PITest for Java, Mull for C/C++, mutant for Ruby, Infection for PHP, MuCheck for Haskell. Capture the full mutation log as JSON per implementation: total mutants, killed, survived, not covered, timed out, and efficacy percentage (killed divided by killed plus survived). Resolve timed out mutants before comparing anything. The baseline is complete when every implementation holds a full log with all six metrics and no unresolved timeouts. If the framework for a language is not installed, halt and return `blocked: mutation-framework-absent` naming the missing framework and language, and never fall back to manual mutation analysis. If a baseline run times out, halt and return `blocked: baseline-timeout` naming the implementation and the timed out mutant, and never skip a mutant to force completion.

## Turning escapees into vectors

Map every survived mutant to its function and sort it into exactly one bucket: a Missing Vector (reachable from the public API, cyclomatic complexity at or below 10, design a targeted vector); a Fuzzing Target (reachable from the public API, complexity above 10, needs both a vector and a fuzz harness); a Negative Vector (a validation or error handling path, craft the invalid input that triggers it); an Edge-Case Vector (an optimization path such as GLV, SIMD, or batching, craft the input that trips the threshold); a False Positive (no callers, only test callers, logging, display, formatting, or behavior the mutation did not change, skip); or an Equivalent Mutant (the mutation is semantically identical, e.g. `|` to `^` after a left shift where bit 0 is always 0, skip). Prioritize by security impact: P0 weakens validation, equality, or authentication; P1 touches deserialization flag parsing; P2 touches field arithmetic internals; P3 touches optimization paths. Group the escapees by vector strategy. Classification is complete when every escapee carries a bucket, a P0-P3 priority, and a strategy group.

For each group, design vectors that isolate the path. Cover point deserialization (malformed points, wrong lengths, invalid field elements, off-curve points, wrong subgroup, identity), signature verification (a valid signature plus single bit corruptions of signature, public key, and message), hash to curve edges (empty input, single byte, maximum length), aggregates (one signer, many signers, duplicate signers, mixed valid and invalid), error handling (one vector per error path), arithmetic edges (zero, one, field modulus minus one, points at infinity), and serialization flags (every valid and invalid flag combination). Give each negative vector exactly one defect with everything else valid, so it isolates a single validation check. Verify every new vector against at least two independent implementations before accepting it: on disagreement, one of them has a bug, and you investigate rather than ship the vector. A disagreement you cannot resolve keeps the vector out; never ship on a split verdict. No vector counts as done without that two-implementation verification.

## Proving the improvement

Re-run mutation testing with the new vectors included, record the same per implementation metrics, and compute the before and after delta on killed, survived, not covered, and efficacy percentage. Write the complete report to `VECTOR_FORGE_REPORT.md` in the working directory, covering both the retroactive value (measured kill rate improvement on the existing implementations) and the proactive value (vectors that would catch bugs in future implementations even where they move no current number). The campaign is done when the before and after delta and the full report are recorded.

A campaign that stops before that comparison exists returns everything intermediate (mutation logs, escape classifications, generated vectors, plus a status report naming the stage and the reason) and never claims completion without the full before and after comparison. Rollback is deleting the generated vectors, harness files, mutation logs, and `VECTOR_FORGE_REPORT.md`.

What you hand back: new Wycheproof format JSON vectors per algorithm variant, the colocated harness files, the before and after mutation logs, and `VECTOR_FORGE_REPORT.md` with the kill rate delta table and the retroactive and proactive assessment.
Pliki w paczce (2)
  • SKILL.md 7 KB
  • agents/openai.yaml 1 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · gosuda/dalcom-skills95Apache-2.0
trailofbits/skills100CC-BY-SA-4.0
OutlineDriven/outline-driven-development100Apache-2.0
redhatproductsecurity/prodsec-skills100Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki b1668297d966 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95wycheproof
    Dostarcza wektory testowe do weryfikacji poprawności implementacji kryptograficznych, w tym przypadków brzegowych.
  • 90wycheproof
    Waliduje implementacje kryptograficzne względem wektorów testowych Project Wycheproof i wyjaśnia rozbieżności z wektorem.
  • 95wycheproof
    Waliduje implementacje kryptograficzne wektorami testowymi Project Wycheproof dla AES, RSA, ECDSA i ECDH i czyta wyniki błędów.
  • 100esp32-protocol-parser-fuzzing
    Testuje fuzzingiem parsery protokołów we własnym firmware ESP32, żeby wyłapać błędy przed wdrożeniem.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.