Skip to content

Chapter 38: Hardware Security Design Flow and EDA Tools

Note: Designing secure hardware requires more than correct functionality. Security must be designed in from the first RTL line, verified at every step of the EDA flow, and validated against physical attacks before tape-out. This chapter covers the complete design-for-security (DFS) flow from specification to silicon.

The hardware security design flow integrates three disciplines: (1) secure architecture definition, (2) formal and simulation verification of security properties, and (3) physical security validation against side-channel and fault attacks. This chapter provides the methodology and tools to build new secure hardware technologies from scratch.

38.1 Threat Modelling for Hardware

Before any RTL is written, a hardware threat model must be established. The standard methodology is STRIDE-HW (adapted from Microsoft STRIDE for hardware assets):

Threat Hardware Example Countermeasure
Spoofing Cloned device presenting false identity PUF-based device ID, X.509 provisioning
Tampering Glitch attack on secure boot Voltage/clock monitors, ECC on config
Repudiation No audit trail in secure enclave Monotonic counters, TPM event log
Information Disclosure Side-channel key leakage Masking, hiding, constant-time logic
Denial of Service Fault injection disabling security Redundant checks, watchdog timers
Elevation of Privilege Bypassing privilege fence PMP/MPU hardware enforcement

Tip: Use the MITRE ATT&CK for ICS / Hardware framework alongside STRIDE. Map each hardware component (SoC bus, debug port, crypto engine) to relevant attack techniques.

38.1.1 Security Asset Identification

A security asset is anything that must be protected. Examples:

  • Root keys (Device Identity Key, Attestation Key)

  • Secure boot measurement registers

  • Privilege level state machines (e.g., bus master ID)

  • Monotonic counters (anti-replay)

  • Debug enable/disable fuses (OTP)

38.2 Secure RTL Design Principles

38.2.1 Principle of Least Privilege in Hardware

Every bus master (CPU, DMA, debug interface) should be granted the minimum privilege needed. Use a hardware memory protection unit (MPU) or bus firewall to enforce access control:

module bus_firewall (
    input  logic        clk, rst_n,
    input  logic [31:0] addr,
    input  logic        rnw,        // 1=read, 0=write
    input  logic [3:0]  master_id,  // 0=CPU, 1=DMA, 2=Debug
    input  logic        valid,
    output logic        grant,
    output logic        deny_irq
);
    // Key RAM: 0x4000_0000 -- 0x4000_0FFF
    localparam KEY_RAM_LO = 32'h4000_0000;
    localparam KEY_RAM_HI = 32'h4000_0FFF;
    localparam DEBUG_ID   = 4'd2;

    always_comb begin
        grant    = 1'b1;
        deny_irq = 1'b0;
        if (valid &&
            (addr >= KEY_RAM_LO) && (addr <= KEY_RAM_HI) &&
            (master_id == DEBUG_ID)) begin
            grant    = 1'b0;   // Block debug access to key RAM
            deny_irq = 1'b1;   // Raise security interrupt
        end
    end
endmodule

38.2.2 Constant-Time Hardware

Hardware is inherently data-dependent in timing unless explicit measures are taken. Secure hardware design rules:

  1. No secret-dependent branches: Multiplexers, not if-else trees driven by key bits

  2. No secret-dependent memory accesses: Use dual-port RAM with pre-fetching all candidates, or bitsliced implementations

  3. Fixed latency pipelines: All operations complete in the same number of clock cycles regardless of input

// BAD: data-dependent multiplexer select creates power side-channel
// if (key_bit) result = a; else result = b;

// GOOD: constant-time select using Boolean logic
module ct_select #(parameter W = 32) (
    input  logic          sel,      // secret bit
    input  logic [W-1:0]  a, b,
    output logic [W-1:0]  result
);
    // Both paths evaluated; select bit determines output
    // Power consumption identical regardless of sel value
    assign result = ({W{sel}} & a) | ({W{~sel}} & b);
endmodule

38.2.3 Secure State Machine Design

Security-critical FSMs must be:

  • One-hot encoded to detect glitch-induced invalid states

  • Hamming-distance hardened: secure states differ by \(\geq\)3 bits from all other states

  • Error-detecting: any undefined state immediately triggers a security alert and zeroization

typedef enum logic [4:0] {
    ST_IDLE    = 5'b00001,
    ST_AUTH    = 5'b00010,
    ST_ACTIVE  = 5'b00100,
    ST_LOCK    = 5'b01000,
    ST_ZEROIZE = 5'b10000
} secure_state_t;

secure_state_t state, next;

always_ff @(posedge clk or negedge rst_n)
    if (!rst_n) state <= ST_IDLE;
    else        state <= next;

// Illegal state detector
always_comb begin
    if (state != ST_IDLE   && state != ST_AUTH  &&
        state != ST_ACTIVE && state != ST_LOCK  &&
        state != ST_ZEROIZE) begin
        // Glitch or fault injection detected
        security_alert = 1'b1;
        next = ST_ZEROIZE;
    end
end

38.3 EDA Tools for Hardware Security

38.3.1 Simulation and Functional Verification

Tool Vendor Security Use
VCS Synopsys RTL simulation; SystemVerilog Assertions (SVA) for security
Xcelium Cadence Mixed-signal simulation; fault injection modelling
ModelSim/Questa Siemens EDA UVM testbench; security regression tests
Verilator Open Source Fast cycle-accurate simulation; used in OpenTitan
GHDL + cocotb Open Source VHDL/Verilog co-simulation; Python testbenches

38.3.2 Formal Verification Tools

Tool Vendor Security Use
JasperGold Security Path Verification (SPV) Cadence Proves no information flow from secret assets to observables
VC Formal Synopsys Bounded model checking; unreachable state proofs
OneSpin 360 DV-Verify OneSpin (Siemens) Data integrity, privilege separation proofs
SymbiYosys (sby) YosysHQ Open-source formal; BMC + k-induction
Tabby CAD Suite YosysHQ Commercial SymbiYosys; Yosys synthesis + formal
CBMC TU Delft C model checking for firmware security
Isabelle/HOL Open Source Theorem proving; seL4, CHERI proofs

38.3.3 Security-Specific EDA: Information Flow Tracking

Information Flow Tracking (IFT) is the most important security analysis in hardware EDA. It answers: Can a secret input ever affect an observable output?

Tools:

  • Cadence JasperGold SPV: Formally proves non-interference between tainted (secret) signals and outputs

  • GLIFT (Gate-Level IFT): Computes a shadow logic per gate to track information propagation

  • Maki: Open-source hardware IFT tool (MIT, 2022)

  • SecVerilog: Type-system for Verilog enforcing information-flow security at synthesis time (Cornell 2015, still used in 2024)

// JasperGold-style SVA property
// Mark key_reg as secret (tainted) source
// Assert: encrypted_out has no direct information flow from key_reg
// This uses SPV "taint source" / "taint sink" methodology

// Taint source declaration (in JasperGold SPV script):
//   taint_source key_reg -type secret

// Taint sink check:
//   taint_check plaintext_bus_out -expect no_taint

// Equivalent SVA non-interference property:
property key_noninterference;
    // For all pairs of runs differing only in key_reg,
    // the plaintext_bus_out must be equal
    // (expressed as a 2-safety property in SPV)
    @(posedge clk) disable iff (!rst_n)
    !$changed(key_reg) |-> !$changed(plaintext_bus_out);
endproperty
assert property (key_noninterference);

38.3.4 Physical Design and DRC/LVS Security Checks

Security-aware physical design requires additional checks beyond standard DRC/LVS:

  • Power mesh isolation: Separate power domains for secure and non-secure logic to prevent power side-channel cross-domain leakage

  • Shielded routing: Critical signal nets (key buses, secure boot signals) routed on metal layers shielded above and below with ground planes

  • Active shield mesh: Top-level metal mesh connected to tamper detection logic; any cut triggers zeroization

  • Fill cell security: Unused silicon area filled with active (not just filler) standard cells to prevent FIB circuit edit

38.4 Side-Channel Analysis in Design Flow

38.4.1 Pre-Silicon Power Analysis

TVLA at RTL
Run Test Vector Leakage Assessment on gate-level simulations using annotated switching activity (VCD/SAIF files). Tool: Cadence Conformal Equality Checker with power annotation.
ELMO (Estimated Leakage for Microcontrollers)
Power leakage model for Cortex-M0/M3 cores; available on GitHub. Predicts DPA success rate before silicon.
Gate-Level Power Simulation
Synopsys PrimeTime PX: annotate switching activity from simulation, compute per-cell power, detect high-leakage cells in crypto datapaths.

38.4.2 Automated Masking Insertion

Manual masking of AES S-boxes is error-prone. Automated tools:

  • SILVER (Ruhr University Bochum): Formal verification of masked implementations; checks d-probing security

  • maskVerif: Verifies that a masked circuit is \(t\)-probing secure

  • AGEMA (2022): Automated Generation of Masked Implementations; synthesises a masked AES from unmasked RTL

38.5 Fault Injection Analysis in Design Flow

38.5.1 Fault Models

Fault Model Physical Attack Design Countermeasure
Bit-flip Laser fault injection, EM glitch ECC on registers; dual-rail logic
Stuck-at-0/1 Power glitch Temporal redundancy (double compute)
Transient clock Clock glitch Clock monitor + anomaly detector
Instruction skip Laser on pipeline Redundant PC check; hash of instruction stream

38.5.2 FIPAC: Fault-Injection Protected Architecture

FIPAC (TU Graz 2022) instruments an RISC-V binary at compile time to detect instruction-skip attacks. It inserts a signature (XOR of instruction addresses) updated at every basic block and verified at branches.

/* Signature variable in dedicated register (e.g., t6 on RISC-V) */
extern volatile uint32_t __signature;

/* Macro inserted by FIPAC pass at each basic block entry */
#define FIPAC_UPDATE(expected_sig) \
    if (__signature != (expected_sig)) { security_fault(); }

void secure_check(uint32_t val) {
    FIPAC_UPDATE(0xDEAD1234UL);
    if (val == SECRET_MAGIC) {
        FIPAC_UPDATE(0xBEEF5678UL);
        grant_access();
    }
    FIPAC_UPDATE(0xCAFE9ABCUL);
}

38.6 FPGA Prototyping for Security Validation

FPGA prototyping is essential for pre-silicon security validation:

  1. Implement the design on a ChipWhisperer-compatible target (CW305 Artix-7)

  2. Run TVLA test campaigns: 100K–1M traces for t-test leakage detection

  3. Perform laser fault injection using a focused ion beam station or ChipSHOUTER platform

  4. Iterate on masking/hiding countermeasures before tape-out

Warning: FPGA power side-channels differ from ASIC due to the routing fabric. An FPGA implementation that passes TVLA may still leak on ASIC due to different parasitic capacitances. Always validate on the final ASIC process node.

38.7 Chip Tapeout Security Checklist

Security Check Stage Responsible Tool/Method
Threat model complete, all assets identified Pre-RTL Architecture review
Formal non-interference (IFT) proof RTL JasperGold SPV / GLIFT
Constant-time datapath verified RTL SILVER / maskVerif
FSM illegal-state detection RTL Formal reachability check
Bus firewall policy complete Gate-level Simulation + formal
TVLA \(t < 4.5\) (no leakage) Gate-level PrimeTime PX + TVLA
Fault injection coverage \(> 95\%\) Gate-level FIPAC / FiSim
Active shield mesh routed Physical Custom DRC deck
Shielded routing on key buses Physical Custom DRC
Fill cells: no FIB-exposed polysilicon Physical DRC layer check
OTP fuse programming verified Functional ATE test vector
Debug interface disabled in production Functional ATE fuse readback

38.8 Creating New Hardware Security Technologies: Research-to-Silicon

This section provides the complete flow for developing a novel hardware security primitive from concept to tape-out:

38.8.1 Step 1 – Security Architecture Definition

  1. Define the security goal (e.g., “prevent software from reading attestation keys even with kernel-level compromise”)

  2. Enumerate assets and adversary capabilities (hardware attacker, software attacker, insider threat)

  3. Choose a hardware primitive (PUF, crypto engine, TEE, RoT)

  4. Design the trust boundary: what is inside vs. outside the HW security perimeter

38.8.2 Step 2 – RTL Implementation

Tools and languages:

  • SystemVerilog or VHDL for register-transfer level

  • Chisel (Scala-based HDL): used in RISC-V ecosystem, OpenTitan

  • Amaranth (Python HDL): increasingly popular for security research

  • CIRCT: MLIR-based hardware compiler; enables formal IR for security

38.8.3 Step 3 – Security Verification

  1. Write security assertions (SVA properties) for every security invariant

  2. Run formal proof (SymbiYosys or JasperGold)

  3. Perform IFT analysis (GLIFT or JasperGold SPV)

  4. Verify masking correctness (SILVER/maskVerif)

  5. FPGA prototype + TVLA

38.8.4 Step 4 – Physical Design for Security

  1. Synthesis (Synopsys DC / Cadence Genus / Yosys)

  2. Power domain planning: isolate sensitive logic

  3. Place and Route (Cadence Innovus / Synopsys ICC2)

  4. Apply shielding and active mesh

  5. Run security DRC checks

38.8.5 Step 5 – Silicon Validation

  1. ATE (Automatic Test Equipment): Teradyne UltraFlex or Advantest T2000

  2. Side-channel lab: ChipWhisperer, Langer probe, oscilloscope

  3. Physical penetration testing: FIB, X-ray tomography, laser fault injection

  4. Common Criteria evaluation (CC EAL4+ or EAL6+)

Note: The full research-to-silicon timeline for a novel security primitive: architecture (2–4 months), RTL + verification (4–8 months), physical design (3–6 months), tape-out, manufacturing, and validation (6–12 months). Total: 15–30 months and $1M–$50M depending on process node.

38.9 Open-Source Hardware Security Platforms

Platform Language Security Features
OpenTitan SystemVerilog + Chisel Full RoT: AES, SHA-3, KMAC, OTBN, PUF, key manager, alert handler, life cycle controller
IBEX SystemVerilog RISC-V RV32IMC; PMP, M-mode; TrustZone-M inspired
CVA6 (Ariane) SystemVerilog 64-bit RV64GC; physical memory protection
Titan M2 RTL N/A (proprietary) Reference for Google Pixel embedded security
HACL* F* + C Formally verified crypto library; EverCrypt
Sail RISC-V Sail ISA Formal specification; generate RTL and simulators

38.10 Recent Developments (2024–2026)

The hardware security design flow has seen significant advances in AI-assisted verification, open-source EDA tooling, and new security-specific HDLs since 2023.

38.10.1 AI-Assisted Security Property Generation

Manual writing of security assertions is the primary bottleneck in formal verification. New AI tools are changing this:

  • Cadence JasperGold PropGen (2024): LLM-assisted SVA property suggestion. Given an RTL module and natural-language security description (“key register must not flow to unencrypted output”), PropGen suggests candidate SVA properties. Engineers report 40–60% reduction in property authoring time for crypto datapaths.

  • Synopsys VC Formal AI (2024): Automated counterexample-guided abstraction refinement (CEGAR) with ML-driven witness generation; reduces state explosion in large bus fabric formal proofs.

  • AutoSVA (2023, Stanford): Open-source LLM-to-SVA pipeline; generates assume/assert pairs from Verilog comments using GPT-4.

Note: AI-generated assertions must be reviewed by a security engineer. LLMs can generate syntactically correct but semantically wrong properties — asserting the negation of a security invariant compiles and runs fine but provides zero protection.

38.10.2 Open-Source EDA Security Flow Maturity (2024)

Tool Version 2024 Security Advances
Yosys 0.40 (2024) Formal IFT plugin (GLIFT); improved synthesis for security-hardened netlists
SymbiYosys 0.12 (2024) BMC + k-induction + PDR in single run; cover statements for security reachability
Verilator 5.x (2024) Timing-accurate simulation; SVA assertion support; security lint rules
OpenROAD 2024.x Open-source P&R; shielding-aware routing plugin (UMich, 2024)
OpenTitan Earl Grey (2024) First open-source silicon security chip; full RTL + formal + DV suite public
CIRCT 1.x (2024) MLIR hardware IR; enables formal security analysis on hardware IR nodes

38.10.3 Amaranth HDL and Security-Oriented HDLs

Amaranth (formerly nMigen, Python-based HDL) has gained adoption in security research due to its expressive type system and Python ecosystem integration:

  • Signal typing: Amaranth’s Shape system makes bit-width mismatches a compile-time error — eliminating a class of security bugs from implicit truncation

  • SoC integration: Amaranth SoC library builds bus fabrics with explicit memory-map access control, making bus firewall policy part of the HDL source rather than a separate document

  • Used in production: VexRiscv security extensions, LUNA USB security core

38.10.4 NIST PQC Hardware Implementation Guidance (2024)

Following FIPS 203/204/205/206 finalization (August 2024), NIST published SP 800-235 (draft, late 2024): Guidelines for Migrating to Post-Quantum Cryptographic Standards, which includes hardware-specific guidance:

  • Side-channel requirements for NTT butterfly units in ML-KEM hardware

  • Masking requirements: minimum 2-share masking for key generation path

  • ATE test vector requirements for PQC co-processors

  • Formal verification coverage requirements for PQC state machines

38.10.5 EU Cyber Resilience Act: Hardware Design Obligations (2024)

The EU CRA (effective October 2024, compliance deadline October 2027) imposes design-process requirements directly relevant to this chapter:

CRA Requirement Design Flow Implication
Security by design (Art. 13) Threat model documented before RTL; security properties must be traceable to implementation
No known exploitable vulnerabilities Formal verification of critical security properties required for Class II products
Secure development process IEC 62443-4-1 or ISO/IEC 27034 SDL compliance; design review artifacts retained for 10 years
Vulnerability disclosure CVE assignment process must be established before product ships; hardware CVEs now tracked in NVD

Exercises

  1. A designer uses if (key_bit) result = A; else result = B; in Verilog. Explain why this creates a power side-channel and rewrite it using constant-time techniques.

  2. Write an SVA property that asserts a 32-bit register secret_key never appears on a 32-bit AHB data bus ahb_hrdata in an unencrypted form. (Hint: use an information-flow tracking approach.)

  3. A one-hot FSM has 5 states (5 bits). An attacker glitches the device, flipping 2 bits simultaneously. Which resulting states are illegal? How would you detect them?

  4. Explain why a masked AES implementation must be formally verified with SILVER or maskVerif in addition to passing simulation tests.

  5. Design a bus firewall table for a SoC with: CPU (master 0), DMA (master 1), Debug (master 2); secure ROM (0x0000–0x7FFF), key RAM (0x8000–0x8FFF), peripheral AHB (0xA000–0xFFFF). Which accesses should be blocked?

  6. What is the difference between TVLA at RTL level and post-silicon TVLA? Why might a design pass RTL TVLA but fail post-silicon?

  7. Describe the complete EDA tool chain to take a new PUF circuit design from SystemVerilog RTL to a TSMC 7nm GDSII ready for tape-out, noting which security-specific checks are required at each step.