HARDWARE & DEVICE SECURITY

RTL Anti-Tampering14/16

RTL Anti-Tampering Design Lesson 14: RTL and Netlist Fault Campaigns

A fault campaign is a reproducible experiment specification, not a few random bit flips followed by a percentage. It records design version, targets, timing, effects, budget, oracle, and what the model cannot simulate.

8 min read

A fault campaign is a reproducible experiment specification, not a few random bit flips followed by a percentage. It records design version, targets, timing, effects, budget, oracle, and what the model cannot simulate.

Learning objectives and classroom plan

By the end of this lesson, you should be able to:

  • Separate attempts, events, and unique covered bins.
  • Derive single/two-event spaces and zero-observation probability bounds.
  • Replay the first unauthorized commit and explain RTL/netlist target-mapping gaps.

Suggested 50-minute teaching plan: Event definitions 10 minutes; fixture counts 10; space and statistics 15; timing and netlist mapping discussion 15. This includes student calculations, lab work, and discussion. It is a teaching plan, not measured student completion time.

Go to the interactive lab

Lesson 14: RTL and Netlist Fault Campaigns

Define what one attempt means

If each fire drill changes exits, smoke location, and assembly time, pass rates are not comparable. A hardware campaign must fix design version, seed, events per attempt, and whether failures/retries count as new attempts. The analogy does not show that an injection tool reaches a silicon node.

For an RTL model, enumerate targets and time windows, define effects (flip, stuck-at, skip, delay), and set a per-attempt budget. Separate fault-free controls, authorized operation, unauthorized operation, and denial of service. Preserve each counterexample’s full input sequence, first bad commit, random seed, and model hash. SYNFI demonstrates pre-silicon fault analysis on synthesized netlists; a netlist result is still not a physical injection. SYNFI.

RTL and netlist targets differ: synthesis may merge redundant logic, recode an FSM, or duplicate/remove registers. A two-stage campaign must preserve RTL-signal-to-cell mappings and unmapped targets. Classify outcomes at least as safety violation, availability failure, detected-and-blocked-in-time, detected-too-late, not activated, or tool-unobservable. “Detected” alone is not a security pass.

After fixing the design hash and fault budget, run fault-free controls, single faults, and explicitly bounded combinations. The property sketch below has not been compiled; assertions check the oracle at every acceptance, not just the alert. Coverage lists untouched target/time bins rather than hiding them behind total fault count.

The companion lab uses four target classes (ROM check_done, debug permission, first fetch, and key release) across three synthetic time bins, for twelve target/time pairs. Edge location describes where an injection is placed; it does not identify the target class. This fixed denominator is a teaching fixture, not hardware coverage.

Preserve replay evidence

Each result needs attempt ID, DUT/netlist hash, tool version, configuration, seed, target, effect, edge/window, budget, input trace, output, assertions, classification, and replay command. If a tool prunes cases whose outputs do not change, document its pruning rule and equivalence assumption.

Worked case: how much do four attempts cover?

Open this lesson’s interactive lab

Lesson 12 introduced first fetch and key release; Lesson 11 also supplied ROM check_done and debug permission. Pair each of these four target classes with three synthetic time windows, giving 4 × 3 = 12 target/time pairs. Edges A–D describe injection locations, not four additional target classes. Define the denominator before asking whether four attempts reach four new bins or repeat one bin.

This lesson uses twelve fixed teaching fixtures. Select Campaign fixture, set the attempts slider to 4 and budget to 2, then follow the table below. The original page defaults to 6 attempts; change it to 4 to reproduce this case. An attempt is one complete trial; events count faults applied within that trial. Attempt two requires two events. A two-event budget does not mean only two attempts may run. These results execute neither an RTL simulator nor physical injection.

Attempttarget/timeRequired eventsUnder budget 2Classification
try-001ROM/t11Activated and observableUnauthorized commit and late alert
try-002ROM/t12Activated and observableBlocked in time
try-003debug/t31Activated and observableAvailability failure
try-004ROM/t11Trigger falseNot activated

The four attempts select two unique bins: ROM/t1 and debug/t3. The observable, activated bins also total two. Under this teaching denominator, the reached scope is 2/12, leaving 10 untouched; it is not 4/12. Applied events total 1 + 2 + 1 + 0 = 4. Although try-004 appears in the attempt list, no event was applied, so it cannot count as a passing fault test.

Classifications overlap; preserve event order

try-001 has its first unauthorized commit at teaching edge 4, followed by an alert. One attempt therefore contributes both a security violation and a late alert. Those counts do not represent separate attempts. Summing classification counts can exceed the number of activated attempts. Preserve multiple outcome fields per attempt instead of removing timing information to force percentages to total 100%.

try-002 has applied faults and is blocked in time. It illustrates protection under that model stimulus, but it is not a fault-free positive control. The actual fault-free control is in a separate mode, ctl-001: an independent oracle authorizes a legitimate operation, teaching commitEdge is 3, the assertion field is PASS, and coverage is hit. Count this control separately from the twelve injection fixtures. PASS here is a model field, not a formal proof produced by a tool.

try-003 delays service without an incorrect commit. That is an availability problem. The absence of unauthorized commits alone cannot establish deployability; safety and service to legitimate requests need separate assessment. try-004 is not activated, so it demonstrates neither protection nor attack effectiveness. Their follow-up work differs: investigate recovery and timeout for try-003, and stimulus delivery and target timing for try-004.

Why does changing only the budget change the result?

Reduce the per-attempt budget from 2 to 1 while retaining the same four attempts. try-002 requires two events and no longer activates. try-001 and try-003 each apply one event, while try-004 remains untriggered. Total events become 2, inactive attempts become 2, and the blocked-in-time count becomes 0. The design did not suddenly deteriorate; this experiment no longer executes the two-event protected case.

Selected bins remain two, as do observable, activated bins: try-001 still reaches ROM/t1 and try-003 reaches debug/t3. Thus one coverage number can stay unchanged while the stimulus set changes. Compare campaign revision, fixtures, event budget, and per-attempt outcomes together, rather than comparing only the top-line percentage.

Selecting the synthetic campaign with zero attempts selects a fixture but does not run a campaign. Another gap is tool observability: fixture try-005 has an applied event without a tool-observable outcome. Missing observation cannot count as successful protection. Preserve each state and its reason so a replaying engineer can distinguish missing stimulus, missing observation, and an observed result.

Deeper exercises: write a reproducible, bounded summary

Exercise A: recalculate the denominator. Select Campaign fixture, set attempts to 4 and budget to 2, then list attempts, applied events, selected bins, observable activated bins, and untouched bins. Explain why four records do not mean four bins.

Answer and reasoning: The counts are 4, 4, 2, 2, and 10. try-001, try-002, and try-004 all occupy ROM/t1; try-003 occupies debug/t3. Repetition can study stability or different effects, but it does not add a target/time bin. This twelve-cell denominator also excludes the full set of lifecycle, reset, and effect combinations. It is not complete product coverage.

Exercise B: correct the conclusion. A summary says, “try-001 raised an alert, so protection succeeded; try-004 produced no error, so it passed.” Correct each statement.

Answer and reasoning: try-001 committed an unauthorized operation at edge 4 before the alert, so it was not blocked in time. try-004 had a false trigger and did not execute an effective fault attempt; its result is not PASS. Preserve the original trace in both cases. The final alert or data state cannot replace the first incorrect event.

Exercise C: hand the case to another engineer. A colleague receives the try-002 table without the fixture revision or budget. Why could replay differ even with the same target/time pair?

Answer and reasoning: One bin can contain different event sequences, and try-002 specifically requires two events. With budget 1, it does not activate. Supply the fixed fixture, revision or hash, mode, attempt range, event budget, and classification rules. An actual RTL/netlist campaign also needs DUT and tool versions, seed, and input trace. Teaching-interface calculations cannot replace those tool artifacts.

Classroom derivation: fault space, sampling, and the first incorrect event

Define commit as an acceptance event causing an irreversible side effect, such as unauthorized instruction fetch or first key use. A mapped target is the correspondence between an RTL signal and a synthesized netlist node. Without these definitions, readers can confuse observing an alert with preventing asset use, or assume two campaign stages evaluate the same target.

Suppose a new teaching space has 1000 single-bit injection locations and 500 candidate clock edges, with one bit flip per event. Single-event location/time combinations total N = 1000×500 = 500,000. Allow two distinct such events without counting order: C(N,2)=N(N−1)/2=124,999,750,000, approximately 1.25×10¹¹. This counts bit locations, rather than calling them 1000 registers while omitting register widths.

Effects, duration, lifecycle, reset, and repeated injection at the same point are not included. Counting event order or permitting repetition changes the denominator again. Define it before considering influence-cone reduction, stratified sampling, or formal analysis. Pruning based on target equivalence needs evidence. Removed items remain traceable and do not become covered automatically.

What statistical bound follows from zero observed violations?

Introduce a separate sampling model: each trial independently draws from the same fixed case distribution, and a trusted oracle determines violations. Let p be violation probability under that distribution. Observing none in n trials has probability (1−p)ⁿ. For a one-sided 95% upper bound, solve (1−p_upper)^n = 0.05, giving p_upper = 1−0.05^(1/n). At n = 3000 this is approximately 0.000998, or 0.0998%; the familiar 3/n approximation gives 0.1%.

Here p belongs to a defined sampling distribution and outcome criterion. It is not a probability that every fault point is safe. Replaying one fixed fixture, dependent samples, an oracle unable to see side effects, or stimuli missing their specified node do not satisfy this derivation. A targeted rare point can also have negligible weight in the original sampling distribution. Uniform sampling is one possible defined distribution, not a mandatory assumption for every product evaluation.

Keep the timeline faithful to its record

Existing try-001 specifies firstBadCommitEdge = 4 and lateAlert = true. It supplies no numeric injection or alert edge; A-edge is a location name. The record supports “commit at edge 4, alert afterward.” It does not support inventing injection at edge 3 or alert at edge 5 as an original trace.

For window reasoning, construct a separate three-event teaching trace: skip applied at edge 2, unauthorized commit at edge 4, alert at edge 5. This is a new calculation example. If timely-blocking requires blockEdge < firstBadCommitEdge, an edge-5 alert fails. Same-edge blocking depends on actual sampling and side-effect order too. A real report retains waveforms or event logs sufficient to determine that order.

RTL-to-netlist location definitions also need revision. For example, synthesis could recode a two-bit teaching FSM into four one-hot state registers. Flipping state[1] then does not automatically correspond to flipping one netlist flop. Record encoding, mapping, and illegal-state behavior, and rerun specified stimuli at the new level. This is a possible recoding example, not a claim about a tool run performed here.

Calculation exercise: Under the independent-sampling assumptions, what is the one-sided 95% upper bound after 30 zero-violation trials? Can it label the ten untouched bins in the existing twelve-bin fixture safe?

Worked answer: 1−0.05^(1/30) ≈ 0.095034, or 9.5034%. The 3/30 approximation is 10%. Untouched bins still lack per-bin evidence. The statistical parameter belongs to a specified distribution, and this fixed fixture does not even supply thirty independent draws. The download separates counting from statistical assumptions.

Replay and compare

Download the program and result JSON into one folder. Run with Python 3.8 or newer:

python rtl-university-workbook-v1.py --output replay.json

Compare replay.json with the supplied result, starting with this lesson’s lesson14 field. sourceSha256 identifies the program’s bytes, separately from mathematical correctness. Editing content or resaving LF as CRLF changes that value. Keep the downloaded original and save student changes separately to distinguish method changes from file changes.

Download the classroom replay program · Inspect fixed JSON results

Offline interactive lab

RTL / SVA review direction

These are property sketches: define the harness transaction, reset and oracle, then confirm sampling boundaries before binding to the design. They have not been compiled or proven. reference_authorized must come from an independent reference model outside the fault-injection targets and their influence cone. A permission bit inside the DUT cannot serve as its own oracle when that bit may also be faulted.

assert property (@(posedge clk) disable iff (!rst_n)
accepted_commit |-> reference_authorized);

If accepted_commit never occurs, the property can pass vacuously. Add a separate cover for a fault-free authorized acceptance. Classify reset-disabled cycles, non-activated attempts, and late alerts separately. This snippet does not prove CDC, timing, side-channel, or physical injection behavior; each requires its own tool evidence or measurement.

Check your reasoning

  1. Recognition — What separates a fault attempt from a fault outcome? Reasoning: An attempt records stimulus and target. The outcome records the observed effect, accepted state, detector response, and whether acceptance preceded the alert.
  2. Contrast — Why is total attempts not a coverage denominator? Reasoning: Repeated attempts can hit the same target/time bin. State the full bin set, unique bins reached, and untouched bins.
  3. Scenario — An alert arrives after an unauthorized commit. How should the campaign classify it? Reasoning: Record both the unauthorized commit and the late alert. Do not count the alert as a timely block; outcome categories may overlap.
  4. Failure diagnosis — A simulator prunes cases whose outputs do not change. What must be documented? Reasoning: Record the pruning rule and its equivalence assumption, then retain a way to replay representative pruned and retained cases.
  5. Design risk / transfer — Another engineer must reproduce one counterexample next month. Which fields matter? Reasoning: Preserve source/netlist and tool hashes, configuration, seed, target/window, budget, input trace, output, assertion, classification, and replay command.

References

SYNFI pre-silicon fault analysis

MY ACADEMY · LESSON FILM

Lesson video

The film explains this lesson’s data path. After a section, return to the interactive exercise and change the input or fault conditions. The animation presents a teaching model; it does not replace RTL simulation.

Diagram scope
Teaching model · Not RTL simulation or silicon testing
Highlights show reading order, not an executed fault campaign or a hit rate

Download MP4 · Captions VTT

Narration uses a synthetic voice. Both the interaction and animation have model boundaries; interpret results using this lesson’s sources and validation scope.

Wrap-up: take this lesson into a design review

Threat model and assumptions

Fix RTL/netlist hash and fault target/effect/time/budget; the asset is preventing unauthorized acceptance.

Why the design fails

Ambiguous attempts, target mapping, or treating detection as a pass make campaigns incomparable or hide violations.

Defenses

Use fault-free controls and classified replayable attempts; separate safety, availability, timely blocking, and tool gaps.

Validation and checks to perform

Preserve seed, tool config, hashes, traces, first bad commit; report RTL/netlist denominators and unmapped targets separately.

Limits and unverified claims

Digital RTL/netlist models do not establish physical reachability, frequency, location precision, or fault correlation.

Try a changed assumption

Choose one unmapped RTL target. Propose how to confirm its netlist cell and how to report an unresolved mapping.

This wrap-up summarizes the lesson’s teaching cases, references and experiment scope. Checks not reported as completed remain future work.

Thanks for reading.

Take the concept with you, not just the terminology.

#RTL#Fault Injection