Hushfang

Hushfang / Guide

Public test data for secret redaction

A cryptographic vector supplies an independently known relationship between two values. Hushbench turns that relationship into a log event and specifies the expected output. For example, an imported WIF and a scalar in a diagnostic are the same credential in different representations. A public address in the next diagnostic should remain visible.

Inputs exercised in CI

Pinned source Upstream input Redaction cases
Bitcoin Core key I/O 16 wallet-import keys checked in both directions, plus 54 public addresses 86
BIP-32 test vectors 17 extended-key pairs, four independently derived root scalars and 16 malformed serializations 54
Trezor BIP-39 vectors 24 vectors in each of 12 languages. Each contributes a three-word disclosure, a one-word public control and a private scalar from the registered extended key 864
Project Wycheproof AES-GCM 316 key cases and 310 nonempty IV controls. Authentication success or failure in the upstream vector is independent of log redaction 626

The external suite has 1,630 events. Results by dataset and adapter Results describe the tested renderings. Many vectors exercise the same rule with different inputs. The bundled corpus adds separate failure mechanisms such as truncated keys, escaped recovery words, HTTP client encodings and nested exception messages.

The importer verifies the SHA-256 digest before using a file, including files it finds in the local cache. CI runs these cases on each supported Python version. For a local run:

uv sync --locked --all-packages
uv run --no-sync python -m hushbench.vectors --download --cache hushbench-report/cache --output hushbench-report/fixtures
uv run --no-sync hushbench --corpus hushbench-report/fixtures --output hushbench-report/public-vectors

Omit --download to use the verified cache offline. Source revisions, digests and case-generation rules are in the importer. Bitcoin Core and Trezor ship MIT licenses. BIP-32 uses BSD-2-Clause. Wycheproof ships the Apache License 2.0. The upstream notices accompany the CI reports. Licenses

Other data worth distinguishing

  • Samsung CredData labels suspicious lines from source code. It describes its obfuscation process and includes true and false findings. Its labels can suggest new secret types and hard negatives. A labeled source line still needs a synthetic log event, a registration policy and an expected whole output before it belongs in this comparison. CredData methodology
  • Yelp detect-secrets has detector tests and allowlisted examples. These are useful inputs for testing false positives around example configuration, placeholders and public identifiers. The project tests detection in files. detect-secrets tests
  • OpenTelemetry's redaction processor exercises a different point in the pipeline. Its allowlisted keys and blocked-value rules are candidates for a future exporter comparison. Current Hushbench scores concern Python logging output. Processor and tests
  • SecretBench is a research corpus mined from public repositories. Its published methodology is useful when designing a sample. Hushbench's downloadable data consists of synthetic examples and published known-answer vectors. Authors' paper

Rebuilding the synthetic wallet cases

uv run --script benchmark/tools/generate_wallet_cases.py

The generator uses fixed public inputs and independent Base58, mnemonic and elliptic-curve libraries. The expected public Ed25519 key and extended public key correspond to the same fixture private keys. A redactor gets credit only if those public controls survive intact. The generator has no Hushfang import. Generator · BIP-32 · BIP-39 · Ed25519