Chapters

21 Hardware Security: Trojans and Assurance

security
hardware
iot

21.1 Start With the Situation

The device resists common physical probes, but trust also depends on what entered the design before assembly. The team must examine trigger behavior, provenance, detection limits, and supply-chain evidence without claiming certainty.

21.2 Overview

This route focuses on Trojan behavior, detection records, lifecycle controls, and supply-chain assurance.

This is part 2 of 2. Review Hardware Security: Surfaces and Side Channels when you need the first route.

21.3 Learning Objectives

By the end of this chapter, you will be able to:

  • explain hardware Trojan triggers and payloads
  • compare detection evidence and limits
  • build an IC provenance and assurance record

21.4 Chapter Roadmap

Follow the original sections below in order. They begin at the reviewed split boundary and keep every worked example, figure, check, and supporting banner with the section that owns it.

21.4.1 Hardware Trojans and IC Provenance

A hardware Trojan is a malicious change to an integrated circuit or its design flow. It may be inserted through an untrusted intellectual-property block, a compromised design tool, or a manufacturing step that changes the physical implementation. The useful review model separates two parts: the trigger that activates the behavior and the payload that causes the harm. A trigger might be a rare digital state, a long sequence, an on-chip sensor condition, or another activation pattern. A payload might change logic, alter memory content, leak information, degrade performance, or deny service. Figure 21.1 makes that separation visible before the assurance controls are compared.

Trigger inputs such as a rare digital state or sensor condition feed a trigger block, which activates a hidden Trojan circuit embedded inside the IC. That circuit produces a payload, resulting in effects such as altered logic, leaked data, or denial of service.
Figure 21.1: The review model that matters is not the exploit – it is naming what activates the Trojan and what its payload does.

Read Figure 21.1 from the rare state, sequence, or sensor condition entering the trigger logic. The trigger activates hidden circuitry that would otherwise remain dormant, and the payload then produces the security effect: altered logic or memory, leakage, degradation, or denial. Separating activation from effect matters because tests that cover ordinary functions may observe neither. The model turns an abstract supply-chain concern into two bounded review questions: what conditions were exercised, and which harmful outputs were monitored?

Digital triggers split into two structural types worth naming precisely: a combinational trigger fires from a specific, rarely occurring combination of existing signal values, while a sequential trigger fires only after a defined sequence or count of clock cycles, such as a hidden counter reaching a threshold. The distinction matters for detection strategy as much as vocabulary: combinational triggers are the kind rare-value logic testing is built to surface, while sequential triggers may need extended-duration or state-aware testing to reach the triggering count. Either way the defensive posture is unchanged: trusted design-source evidence and detection testing scaled to the rare-condition space, not an attempt to enumerate every possible trigger value.

21.4.1.1 Worked combinational trigger: one truth-table row changes

Start with an intended two-input AND output

C0=AB.C_0=A\land B.

A hidden rare-state detector built from a NOR gate asserts only when both inputs are zero:

T=¬(AB)=¬A¬B.T=\neg(A\lor B)=\neg A\land\neg B.

If an XOR payload combines that trigger with the protected signal, the modified output is

C=C0T.C=C_0\oplus T.

Evaluate every row rather than relying on the gate names:

AABBIntended C0=ABC_0=A\land BTrigger T=¬(AB)T=\neg(A\lor B)Modified C=C0TC=C_0\oplus TChanged?
00011Yes
01000No
10000No
11101No

The outputs of the AND gate and the NOR gate can never both be 1, so this particular modified function is also A XNOR BA\ \text{XNOR}\ B: it asserts at 00 as well as 11. A functional test that tries 01, 10, and the expected asserted case 11 reports success while missing the only changed row. That is why rare-node analysis and mutation-sensitive test vectors matter; ordinary high-coverage application tests may never place all trigger inputs in their rare combination at once.

The algebra above proves that one row moves. It does not show how small the inserted circuit is, or how ordinary the rest of it looks. Trace the intended path and the modified path in Figure 21.2 before moving to the sequential case.

An intended two-input AND gate producing C-zero, then a modified circuit where the same inputs A and B also feed a NOR trigger whose output T combines with C-zero in an XOR payload. A four-row truth table marks the row where A and B are both zero as changed, and a closing panel explains that tests exercising 01, 10, and 11 report success.
Figure 21.2: Three gates, four rows, and only one row of disagreement.

Read the two circuit cards of Figure 21.2 in order. AND · protected is the entire intended function: two inputs, one output, three of four rows sitting at zero. The modified card leaves that gate untouched and adds two more — NOR · trigger, which asserts for the single input pair A = 0 and B = 0, and XOR · payload, which passes the protected value through unchanged for as long as the trigger stays low. The table beneath marks exactly one row CHANGED, and the closing panel spells out the awkward consequence: a suite that exercises 01, 10, and the asserted 11 row sees three matching outputs and reports success. The insertion is not hidden by cleverness; it is hidden by test coverage that never visits the rare state.

21.4.1.2 Sequential trigger and XOR payload timing

Let a synchronous kk-bit counter hold Q[n]Q[n] after clock edge nn:

Q[n+1]=(Q[n]+1)mod2k,T[n]={1,Q[n]=2k1,0,otherwise.Q[n+1]=(Q[n]+1)\bmod 2^k, \qquad T[n]=\begin{cases} 1,&Q[n]=2^k-1,\\ 0,&\text{otherwise.} \end{cases}

The payload Y[n]=X[n]T[n]Y[n]=X[n]\oplus T[n] passes the protected signal unchanged while T=0T=0 and inverts it while T=1T=1. If the terminal-count signal is not latched, inversion lasts only for the terminal-count cycle; if a hidden latch captures the event, it can persist until a reset condition. That distinction must appear in the hardware review because it changes both consequence and test duration.

Starting from zero and comparing the current count before increment, the first terminal state arrives after 2k12^k-1 clock edges. At clock frequency fclkf_{clk},

ttrigger=2k1fclk.t_{trigger}=\frac{2^k-1}{f_{clk}}.

For k=32k=32 at 100 MHz100\ \mathrm{MHz}, the delay is about 42.95 s42.95\ \mathrm{s} of uninterrupted enabled clocks. Resetting or clock-gating the block during short production tests can therefore prevent activation even when total test time looks long enough. State-aware verification must vary reset, enable, low-power, and wraparound behavior rather than simply run random vectors.

Payload classWhat changesObservable consequenceDefensive evidence
Digital logicInternal or output logic valueWrong decision, privilege state, denial, or altered controlFormal equivalence, rare-state logic tests, output assertions
Digital memoryStored bit, address, or access behaviorPersistent configuration change, secret exposure, rollbackMemory integrity, access-control tests, authenticated state
Analog timingPath delay, clock margin, setup/hold behaviorIntermittent faults at voltage, temperature, or frequency cornersPath-delay characterization and corner testing
Analog power/performanceCurrent, leakage, gain, noise margin, or maximum frequencyBattery drain, degraded range, premature failure, side-channel changeGolden-baseline distributions, current/delay monitors, environmental sweep

The trigger and payload tables answer different questions. Trigger coverage asks whether the hidden condition was reached. Payload observation asks whether the resulting digital or analog deviation reached a measured output. A test is incomplete if it satisfies only one side.

A counter trigger resists reasoning from gate names, because its cost is counted in clock edges rather than input values. Follow the block path and then the waveform lanes in Figure 21.3, where the wait itself becomes something you can point at.

A k-bit counter driven by the design clock feeds a terminal-count detector whose output T enables an XOR payload on a protected signal X. Waveform lanes for CLK, Q, T, X and Y show T low through every earlier count and high for a single highlighted cycle at terminal count, where Y inverts. A card converts that to about 42.95 seconds at k equals 32 and 100 megahertz, and four cards name digital logic, digital memory, analog timing, and analog power payloads.
Figure 21.3: The counter reaches terminal count once, and the protected signal inverts for exactly one cycle.

In Figure 21.3, follow the k-bit counter into the terminal count detector and on into the XOR payload that already carries the protected signal. In the waveform lanes, T[n] stays at zero through every earlier count, so Y[n] tracks X[n] exactly and nothing in the observable behaviour looks wrong; only the highlighted column at the terminal value shows an inversion, and only for one cycle. The card holding t_trigger converts that column into wall-clock time — roughly 42.95 s of uninterrupted, enabled clocking at k=32k = 32 and 100 MHz — which is why resetting or clock-gating the block between vectors keeps a long test suite permanently short of activation. The four payload cards below separate what a payload changes from the evidence that would notice it.

For an IoT reviewer, hardware Trojan risk is a supply-chain and assurance question. The evidence should show which IP blocks, CAD tools, foundry or assembly steps, and receiving tests are trusted for the device class. Detection approaches can be destructive, such as reverse-engineering a sample, or non-destructive, such as logic testing and side-channel comparison. Design-for-security approaches try to prevent insertion or make detection easier, for example by controlling design sources, reducing unused layout space, adding monitors, and preserving a trusted baseline. Runtime monitoring then checks whether deployed devices behave outside the expected power, timing, or functional envelope. High-volume commodity sensors may need only supplier and acceptance evidence; a safety-critical or payment device may need much stronger IC-level assurance.

21.4.1.3 Detection-method decision table

Destructive reverse engineering begins by depackaging a sampled IC. The laboratory exposes the die, removes material one layer at a time—often using chemical-mechanical polishing or another controlled delayering process—images each layer with optical or scanning-electron microscopy, aligns the images, extracts devices and interconnect, and reconstructs a layout or netlist for comparison. The evidence can be physically detailed, but the inspected sample is consumed. It is also a sampling claim: clean reconstruction of one die does not prove every unit or lot is identical.

MethodStageSample destroyed?Reference neededWhat it can revealPrincipal limit
Layer-by-layer reverse engineeringPost-siliconYesTrusted layout/netlist or a justified structural baselineAdded, removed, or rerouted physical structures in the sampled dieSlow, expensive, reconstruction error, and sample/lot coverage
Pre-silicon formal verification or simulationDesignNo silicon yetComplete trusted specification/modelLogical divergence, unauthorized state, unreachable or rare trigger behavior in the design representationThird-party IP and tools may make the “complete model” assumption false; foundry changes occur later
Post-silicon logic testingManufactured partNoExpected input/output and state behaviorPayloads that activate and propagate to an observed outputRare trigger may never be activated; internal effect may not propagate to a tested pin
Supply-current side channelManufactured partNoGolden-device distribution under matched vectors and conditionsExtra switching or leakage that changes current even without a functional output errorProcess, voltage, and temperature variation can hide a small Trojan or create false alarms
Path-delay side channelManufactured partNoGolden timing distribution and controlled environmental cornersAdded load or rerouting that changes timing marginOnly sensitized paths are observed; normal variation and aging shift delay too

The decision is consequence-driven. Use pre-silicon checks where the design representation is available, logic tests to exercise functional effects, side-channel comparisons to look for unpropagated physical differences, and destructive analysis for high-assurance sampling or disputed evidence. Record the golden reference’s provenance and statistical spread; “matches golden” is meaningless if the reference device or model could contain the same change.

A table compares each method against its own axis, which makes every row easy to read and the overall shape of the choice easy to miss. Figure 21.4 aligns four methods on the same five criteria so the blind spots line up in a column instead of hiding in prose.

Hardware-Trojan methods compare reverse engineering, pre-silicon verification, logic tests and side channels. Each leaves limits unproven; combine methods and record reference and coverage gaps.
Figure 21.4: Four methods, five shared criteria, and four different things that stay unproven.

Compare the destroys? and coverage cells of Figure 21.4 first. Reverse engineering is the only method that consumes the part, and it is also the only one whose coverage reads 1 sample — a pairing that explains why it belongs to disputed evidence rather than routine assurance. Then read the trigger? column downward: post-silicon logic testing needs the payload to must fire before it can observe anything, while side-channel comparison can register a dormant change through extra switching alone. That is the complementarity worth remembering, and it is also why the reference cell matters so much for the side-channel row, since a golden distribution containing the same modification proves nothing. Every card closes with a Confidence and a Limit line so a review can state precisely what its chosen method did and did not establish.

21.4.1.4 Design for security across the lifecycle

Lifecycle pointMechanismHow it worksEvidence it can provideWhat it cannot prove
Logic designKey-controlled obfuscation or logic lockingKey gates make selected internal functions correct only after a secret activation value is supplied.Unauthorized copies or altered designs fail functional and equivalence checks without the governed key.It does not prove the locking network, key path, or activated implementation is Trojan-free.
Physical layoutVacant-area fillingInert filler cells or connected functional standard cells occupy otherwise unused placement space and make late insertion/routing more difficult.Final layout density, filler placement, design-rule closure, and controlled engineering-change record.Dense layout cannot prevent changes inside existing cells or malicious modifications earlier in the flow.
Test supportEmbedded delay/current monitorsOn-chip sensors compare selected paths or supply behavior with characterized bounds.Per-device or per-region telemetry that can expose out-of-envelope timing or current.Monitor placement is incomplete, thresholds face process variation, and a dormant payload may stay inside bounds.
Field operationHardware/software runtime monitoringFirmware, a supervisor, or an external service checks functional, timing, power, attestation, and update state after deployment.Longitudinal evidence, fleet comparison, alerts, containment, and retest after environmental or software change.Monitoring detects observable deviation; it does not establish absence before activation.

Walk the stages in order. Logic locking constrains function before manufacture. Layout filling reduces insertion opportunity during physical design. Embedded monitors create observability during test. Runtime monitoring carries selected evidence into deployment. The controls overlap by design: a delay monitor may catch a change that logic vectors miss, while protected field telemetry can reveal a deviation that did not appear under factory voltage and temperature. The assurance record should name which insertion point and observation gap each mechanism covers rather than counting four controls as four independent guarantees.

Naming four mechanisms is not the same as knowing which window each one closes. Read Figure 21.5 down the lifecycle rail and treat the two coloured strips inside every card, not the mechanism name above them, as the claim being made.

A numbered lifecycle rail running from logic design to physical layout to test support to field operation. Each stage card names its mechanism — key-controlled logic locking, vacant-area filling, embedded delay and current monitors, runtime monitoring — with a green Proves strip and a red Cannot prove strip beneath it, and a closing panel notes that four controls are not four independent guarantees.
Figure 21.5: Each control proves something specific and leaves something specific unproven.

In Figure 21.5, the LOGIC DESIGN card shows key-controlled locking that Proves that unauthorised copies fail equivalence checks, yet Cannot prove the key path is itself clean — the control and its own attack surface arrive together. PHYSICAL LAYOUT filling buys density and engineering-change records while saying nothing about cells that were already in the design. TEST SUPPORT monitors surface out-of-envelope telemetry but not a payload dormant inside the bounds they watch. FIELD OPERATION monitoring buys fleet comparison and containment, and still cannot establish absence before the trigger fires. Reading the pairs together, rather than the mechanism names alone, is exactly what stops an assurance record from presenting four controls as four guarantees.

The trigger-payload model does not say where the change entered or where it can still be found. Trace Figure 21.6 from design inputs to deployment to assign assurance and detection evidence to each owner.

Trojan insertion points across the IC lifecycle: a compromised IP block or CAD tool at design, and an untrusted foundry making physical changes during manufacture. Test and deployment are stages where non-destructive logic testing, side-channel comparison, and runtime monitoring can still catch what earlier trust controls missed.
Figure 21.6: Supply-chain assurance has to cover every stage, not just the one you can see.

Read Figure 21.6 from IP and CAD sources through design, manufacture, test, and deployment. Compromised design inputs or tools can introduce a logical change before fabrication, while an untrusted manufacturing step can alter the physical implementation. Receiving and acceptance testing are later opportunities for logic or side-channel comparison against a trusted baseline, and runtime monitoring can reveal out-of-envelope timing, power, or functional behavior after deployment. The sequence shows why provenance is continuous evidence, not a supplier name recorded at purchase.

No single control covers every stage or rare activation condition. Use Figure 21.7 to compare prevention-oriented design assurance, pre-deployment detection, and monitoring after release without claiming that one family proves absence.

Three families of hardware Trojan countermeasure: detection approaches, split into destructive reverse-engineering and non-destructive logic testing or side-channel analysis; design-for-security approaches that try to prevent insertion or make detection easier; and runtime monitoring that watches deployed devices for out-of-envelope behaviour.
Figure 21.7: Three countermeasure families, scaled to the value and physical exposure of the device rather than a single security label.

In Figure 21.7, start with detection: destructive reverse-engineering can inspect sampled physical structure, while non-destructive logic and side-channel tests compare behavior without consuming every unit. Move next to design-for-security controls that constrain trusted sources, unused logic, and opportunities for insertion. Runtime monitoring then watches deployed devices for functional, timing, or power deviations that earlier assurance missed. Together the families form layered evidence across the lifecycle, scaled to device value and consequence rather than presented as a guarantee that no Trojan exists.

21.4.2 Supply-Chain Assurance

The trust chain begins before the device powers on. Counterfeit parts, substituted components, or firmware that differs from the approved image all defeat downstream controls silently. Assurance is documentary: component provenance, a controlled bill of materials, firmware hashes compared to the signed release, and receiving acceptance tests. Supplier reputation is context, not evidence.

Mechanism
Why It Leaks or Fails
Defensive Control
Residual Risk
Debug interface
Grants memory read and CPU control by design.
Disable, fuse off, or require authenticated debug.
Service exceptions must be governed and logged.
Side channel
Physical behavior correlates with secret data.
Constant-time code, masking, secure element, reviewed SPA/DPA/CPA exposure.
High-value targets may still warrant deeper review.
Fault injection
A glitch can skip a single security check.
Redundant checks, fail-closed, robust state machine.
Combined attacks raise required defense depth.
Key storage
General flash is readable after compromise.
Secure element or OTP, off-board encryption.
Key lifecycle and revocation still required.
Supply chain
Substituted parts bypass later controls.
Provenance, hashes, acceptance tests.
Trust depends on the weakest unverified supplier.
Hardware Trojan
A hidden trigger and payload can sit below firmware.
Trusted IP/CAD flow, detection tests, design-for-security, runtime monitoring.
Assurance depth must match device value and physical exposure.

21.4.3 Common Pitfalls

Taken together, these checks make the section reviewable. That order prevents a control name from being treated as proof and connects the visual to the chapter's evidence-led review sequence.

21.4.4 Under-the-Hood Knowledge Check

At this depth, hardware security is about defending decisions and secrets against an attacker who can touch the device: control the interfaces, anchor the boot, protect the keys, harden the physics, and verify the supply chain, then record the residual risk that remains for the real deployment.

21.5 Summary

Taken together, these checks make the section reviewable. That order prevents a control name from being treated as proof and connects the visual to the chapter’s evidence-led review sequence.

Key Takeaway

Hardware vulnerability review must cover debug ports, the boot chain, secure storage, side channels, fault resilience, tamper exposure, hardware Trojan assurance, and supply-chain provenance, each tied to recorded production evidence and a stated residual risk.

21.6 See Also

IoT Security Secure Boot

Follow the hardware root of trust into a staged, verified boot chain.

IoT Security OTA Updates

See how update paths deliver the firmware that boot trust later verifies, and how they can weaken it.

IoT Security Fundamentals

Place hardware exposure inside the wider asset, boundary, and evidence model.