Dataset Viewer
Auto-converted to Parquet Duplicate
certificate
stringclasses
2 values
distribution_invariant
bool
2 classes
gadget
stringclasses
5 values
gadget_expected
stringclasses
2 values
gadget_verdict
stringclasses
2 values
license
stringclasses
1 value
mean_invariant
bool
2 classes
model
stringclasses
1 value
probe
stringlengths
1
10
refreshed_by
stringclasses
1 value
secret_classes
int64
2
4
secure
bool
2 classes
touches_shares
stringclasses
9 values
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
a0b0
null
4
true
{"a": ["a0"], "b": ["b0"]}
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
a0b1
null
4
true
{"a": ["a0"], "b": ["b1"]}
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
a1b0
null
4
true
{"a": ["a1"], "b": ["b0"]}
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
a1b1
null
4
true
{"a": ["a1"], "b": ["b1"]}
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
cross0
null
4
true
{"a": ["a0"], "b": ["b1"]}
dependence
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
cross1
null
4
true
{"a": ["a1"], "b": ["b0"]}
uniformity
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
c0
z
4
true
{"a": ["a0"], "b": ["b0", "b1"]}
uniformity
false
dom_and
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
c1
z
4
true
{"a": ["a1"], "b": ["b0", "b1"]}
dependence
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
a0b0
null
4
true
{"a": ["a0"], "b": ["b0"]}
dependence
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
a0b1
null
4
true
{"a": ["a0"], "b": ["b1"]}
dependence
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
a1b0
null
4
true
{"a": ["a1"], "b": ["b0"]}
dependence
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
a1b1
null
4
true
{"a": ["a1"], "b": ["b1"]}
null
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
c0
null
4
false
{"a": ["a0"], "b": ["b0", "b1"]}
null
false
naive_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
c1
null
4
false
{"a": ["a1"], "b": ["b0", "b1"]}
null
false
recombining_xor
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
recombined
null
2
false
{"a": ["a0", "a1"]}
dependence
true
refreshed_share
SECURE
SECURE
Apache-2.0
true
glitch-free gate-value probing, first order (d=1), 2-share
t
null
2
true
{"a": ["a0"]}
null
false
unmasked_and
LEAKY
LEAKY
Apache-2.0
false
glitch-free gate-value probing, first order (d=1), 2-share
ab
null
4
false
{"a": ["a"], "b": ["b"]}

hw-verify β€” a hardware-security verification dataset with controls

Every positive example ships beside a deliberately broken counterpart, so a model or tool is graded against controls instead of against itself.

License Records Splits Reproducible

Try the checker that generated this data: πŸ”’ hw-verify Space β€” paste Verilog, get a verdict, in your browser, no install.

Install

pip install datasets

30-second quickstart

from datasets import load_dataset

rtl = load_dataset("nickh007/hw-verify", "rtl_constant_time", split="test")
print(rtl.num_rows, "records,", len(rtl.column_names), "fields")

scored = rtl.filter(lambda r: r["scored"])
print(scored[0]["module"], scored[0]["label"])
27 records, 12 fields
barrett_ct CONSTANT_TIME

The result that motivates the whole corpus β€” probes a dependence-only tool would flag:

masking = load_dataset("nickh007/hw-verify", "masking_probes", split="test")
uniformity_only = masking.filter(lambda r: r["certificate"] == "uniformity")
print(len(uniformity_only), "probes certified ONLY by uniformity")
2 probes certified ONLY by uniformity

Why this exists

Security datasets in this area are almost always one-sided: a pile of vulnerable examples. A classifier that answers "vulnerable" for everything scores 100% on such a corpus, and nobody notices.

Every split here is matched. The RTL split pairs each constant-time design with a leaky twin of identical module interface. The masking split includes three gadgets that genuinely recombine a secret. The patch split includes a fix that blocks only one witness and a fix that rejects everything. If your method cannot separate the halves of a pair, its accuracy number means nothing.

Provenance

Every record is computed, not transcribed. build.py reads the actual fixture sources, runs the actual masking prover over every probe, and runs the actual solver to produce the patch certificates. Re-running it reproduces the committed files byte for byte, and a test asserts that β€” so the data cannot silently drift from the code that produced it.

python build.py --check    # fails if the committed data is stale

The tools that generated it are open: ctbench, ct-mask, patchproof.

Splits

rtl_constant_time β€” 27 records

Verilog-2001 fixtures. 18 scored across 8 matched pairs, plus 9 unscored files kept for context (fault-detection and secret-residue designs whose observable is a data output, so grading them under a timing task would be a category error).

Field Type Meaning
file string fixture file name
module string top-level module name
source string complete Verilog-2001 source
scored bool part of the graded task
label string | null CONSTANT_TIME, LEAKY, or null when unscored
observation string | null completion signal the label is about
secrets list[string] inputs declared secret β€” never inferred
pair string | null matched-pair group
role string | null positive, negative, repaired, out_of_remit
note string what the fixture demonstrates
reason string | null why an unscored fixture is unscored
license string CC-BY-4.0, or ISC for the picorv32 derivatives

The out-of-remit control. barrett_buggy.v is genuinely constant-time and functionally wrong β€” a miscalibrated Barrett shift makes 62,206 of 65,536 coefficients disagree with the reference. A timing tool that flags it is crying wolf. It is labelled role: out_of_remit and it exists to separate serious methods from pattern-matchers.

masking_probes β€” 17 records

One record per probe wire of every bundled masked gadget, with the certificate that discharged it. Probe-level rather than gadget-level because the interesting datum is which certificate covered which wire.

Field Type Meaning
gadget string gadget name
gadget_expected / gadget_verdict string SECURE or LEAKY
probe string the internal wire an adversary probes
secure bool whether this probe is certified
certificate string | null dependence, uniformity, or null if neither applies
refreshed_by string | null the fresh mask, for a uniformity certificate
touches_shares string (JSON) secret β†’ shares the probe depends on
secret_classes int classes in the modelled-leakage enumeration
mean_invariant / distribution_invariant bool two separate determinations
model string the leakage model the verdict is stated under

The result that motivates the tool: two dom_and probes certify only by uniformity. They touch both shares of an operand β€” so a dependence-only analysis flags them β€” and are perfectly secure because a fresh mask always flips them.

Note that mean_invariant and distribution_invariant are recorded separately. For dom_and the mean is invariant and the distribution is not. A first-order verdict is a statement about the first moment, and the data says so rather than letting you assume more.

patch_certificates β€” 5 records

Modelled bounds-check defect classes, with exploit witnesses and replayable elimination certificates.

Field Type Meaning
defect_class string A, B, C, or a *-badfix / *-vacuous demo
title string one-line description of the defect shape
is_demo bool true for the deliberately-wrong demonstrations
verdict string COMPLETE, INCOMPLETE, or VACUOUS
widths / total_width string (JSON) / int declared machine widths
exploit_witness string (JSON) | null an input the original guard admits that violates safety
incompleteness_witness string (JSON) | null an input the corrected guard still admits
violating_region_measure int | null exact count, when the space is small enough to enumerate
bit_precise_leg bool discharged at the declared machine widths
elimination_certificate string (JSON) | null Farkas multipliers
certificate_replays_without_solver bool | null re-checked by integer arithmetic alone
legs_agree bool | null bit-precise and elimination legs concur
strictly_stronger_than_unsound_guard bool | null the fix implies the original guard and rejects more, so the elimination is non-vacuous
out_of_model string (JSON) defect shapes a COMPLETE verdict does not cover

Baseline

data/baseline.json holds a reference result for the RTL split from the bundled cone-of-influence checker: 18/18 correct, 8/8 pairs separated, sound, out-of-remit control passed. It is a baseline, not a strong tool β€” it reasons about syntax rather than semantics and will over-report on designs where a secret reaches a completion signal by a path never taken.

Usage

from datasets import load_dataset

rtl = load_dataset("nickh007/hw-verify", "rtl_constant_time", split="test")
scored = rtl.filter(lambda r: r["scored"])
print(scored[0]["module"], scored[0]["label"])

masking = load_dataset("nickh007/hw-verify", "masking_probes", split="test")
uniformity_only = masking.filter(lambda r: r["certificate"] == "uniformity")
print(len(uniformity_only), "probes a dependence-only tool would flag")

Scoring β€” do not use plain accuracy

The two error directions are not equally bad, and the reference implementation ranks accordingly:

Outcome Meaning Weight
unsound said safe, is leaky ships a vulnerability β€” dominates the ranking
imprecise said leaky, is safe costs engineering time
abstained returned UNKNOWN neither correct nor unsound

pip install ctbench gives you ctbench score, ctbench validate, and ctbench leaderboard, which implement exactly this rule.

Scope and limits

  • RTL labels concern completion timing against declared secrets β€” not power, EM, cache, or microarchitectural channels.
  • Masking records are glitch-free gate-value probing, first order (d=1), 2-share.
  • Patch records are reachability in modelled bit semantics β€” not an RCE claim. The out_of_model field lists the defect shapes deliberately excluded.
  • Secrets are a specification choice, recorded per fixture and never inferred from source.

Part of the hw-verify toolkit

Five open tools, a dataset, and a browser demo for proving security properties of hardware and bounds checks. They share one boundary: everything open analyses a design you disclose in full.

Project What it does
β–Ά Live demo Try the constant-time checker in your browser β€” runs the real analyzer via Pyodide
ctbench Matched-pair constant-time RTL benchmark + leaderboard
patchproof Prove a bounds-check fix eliminates every violating input
ct-mask First-order masking verification by two certificates
hw-verify-mcp MCP server β€” all three checkers, callable by AI agents
ct-audit-action GitHub Action β€” fail a PR on a leaky completion signal
hw-verify dataset (you are here) 49 records, 3 splits, byte-reproducible from these tools
hw-verify-static Β· hw-verify-space Source for the live demo (Pyodide) and a fuller Gradio build

The commercial boundary. Proving a property to a third party who never receives the design β€” a verdict bound to a commitment of a design that stays hidden β€” is a different problem and a commercial one. It is not in any of these packages.

Licence

Per record, in the license field, because flattening it would misstate it. Full texts and the upstream copyright notice are in LICENSE-DATA:

  • CC-BY-4.0 β€” RTL fixtures, so they can be copied into papers and slides.
  • ISC β€” pcpi_div.v, pcpi_mul.v, pcpi_div_wiped.v, pcpi_div_halfwipe.v, which derive from the picorv32 project by Claire Wolf and remain under the upstream licence.
  • Apache-2.0 β€” the masking and patch records, which are outputs of the tools.

Citation

@misc{hwverify2026,
  title  = {hw-verify: a hardware-security verification dataset with matched controls},
  year   = {2026},
  note   = {Matched-pair RTL, masking probe certificates, and patch-completeness certificates}
}

The commercial boundary

Everything here concerns designs disclosed in full. Proving a property to a third party who never receives the design is a different problem β€” it requires the verdict bound to a commitment of a design that stays hidden β€” and that capability is commercial.

Downloads last month
-

Space using nickh007/hw-verify 1