Week 8 - Reverse Engineering and Logic Locking

2026-04-01  |  Lecture , Reverse Engineering , Logic Locking

Download the lecture slides for this week here: COMP6420_2026T1_Week8_RE_LL.pdf

COMP6420 Week 8 – Reverse Engineering and Logic Locking


1. Motivation: why protect hardware IP?

Modern IC supply chains are global, fragmented, and cost-driven, which introduces both economic and security risk (time-to-market pressure, high design complexity, many third parties).

Hardware IP exists in multiple forms, all valuable:

Impacts include significant revenue loss (order-of-billions annually), loss of trust, and unreliable/unsafe consumer electronics.


2. Threats across the IC lifecycle

A convenient way to reason about piracy is to track a design as it moves through: Design → Synthesis → Netlist → Physical design → Layout/GDSII → Fabrication → Silicon → Testing.

Different attackers sit at different points:

Design-for-test (DfT) is also relevant: many circuits effectively reduce to a scan chain + combinational netlist, and scan access can be enough to recover truth tables and duplicate functionality.


3. “Logic encryption” / logic locking: make the design useless without a key

Logic encryption (logic locking) inserts key gates so the circuit behaves correctly only when the correct key is applied; wrong keys intentionally corrupt outputs.

A basic pipeline:

A practical key distribution/control question follows naturally:

EPIC-style activation framing

An activation approach includes multiple key types:

This supports scenarios such as:


4. What “good” locking should achieve (metrics)

Two key security/quality objectives show up:

  1. Outputs under wrong keys should look maximally corrupted
    A common metric is ~50% Hamming distance between correct-key and wrong-key outputs across inputs (roughly maximum uncertainty/entropy).

  2. The key shouldn’t be learnable efficiently
    Key recovery should not be possible using only polynomially-many input/output pairs (i.e., it shouldn’t be easy to treat the chip as a black-box oracle and solve for the key).


5. Gate insertion strategies (and why placement matters)

Two representative insertion styles:

Fault-impact based insertion aims for:

A key subtlety: wrong-key effects can be blocked or self-cancel through logic structure, similar to fault masking in test. A single bad key bit may not flip outputs for many inputs if its effect is blocked downstream.


6. Attacker models against logic locking

Two broad attacker angles matter:

6.1 Oracle-based attacks (functional IC available)

An attacker can:

6.2 Locked-netlist analysis (design extraction / removal)

If an attacker can reverse engineer the netlist (from GDSII or silicon), they can:


7. Three canonical attacks on logic encryption (and the matching defenses)

A “threat model map” ties each attack to what the attacker has, how the attack works, and which defense targets it.

7.1 Sensitization attack → Strong Logic Encryption (SLE)

Idea: Find input patterns that “sensitize” (propagate) the effect of a specific key bit to a primary output, then query the oracle to learn that bit.

Defense concept (SLE): Make individual key-bit sensitization infeasible by creating pairwise dependencies among key gates, pushing the attack toward exponential brute force.

7.2 SAT attack

SAT attack overview: Use Boolean satisfiability to iteratively eliminate incorrect keys using distinguishing input patterns (DIPs).

Core components:

Why it works: each DIP prunes the key space; practical success depends on how efficiently DIPs distinguish incorrect keys.

Example:

See the following videos where we walk though a SAT attack on a small locked circuit using the logictools.org website.

Part 1: Introducing the tool.

Part 2: Running a SAT attack.

7.3 Defending against SAT attack with SARLock (+ combinations)

SAT-resistance key idea: Make each DIP eliminate as little key space as possible; ideally, require an exponential number of DIPs.

SARLock: A SAT-resistant structure that flips output only under very specific key/input conditions (“diagonal” behavior), causing the number of DIPs to blow up (approximately 2^|K| - 1).

But SARLock alone isn’t enough: it can be vulnerable to “removal” style attacks, so it’s combined with stronger locking.

Two-layer locking (SARLock + SLE):

Cost/benefit framing:

7.3 Test-data mining attack → Post-test activation

Background: Every IC is tested in manufacturing using ATE and ATPG-generated test patterns; test quality is measured by fault coverage.

Two activation models:

Why pre-test activation leaks: If ATPG is run with the correct key as a constraint, test data can embed information that helps infer the key.

Test-data mining attack: Given an encrypted netlist and the test stimuli/responses, an attacker solves for the key that satisfies the test constraints and maximizes fault coverage (framed using ATPG/SAT/ILP approaches).

Empirical results shown:

Defense: post-test activation
Applying the key after test prevents ATPG patterns from embedding key information, making test-data mining inapplicable in this model.