Unraveling Latch Locking Using Machine Learning, Boolean Analysis, and ILP

Dake Chen, Xuan Zhou, Yinghua Hu, Yuke Zhang, Kaixin Yang, Andrew Rittenbach, Pierluigi Nuzzo, Peter A. Beerel

Abstract

Logic locking is a critical defense mechanism in the global semiconductor supply chain, designed to protect intellectual property from untrusted foundries. Among various techniques, Latch-Based Logic Locking (LBLL) has emerged as a robust solution by modifying sequential timing elements to create complex decoy paths. This paper presents the first "oracle-less" attack on LBLL, demonstrating that the structural signatures of these locks can be exploited. By combining machine learning (ML) classifiers with Integer Linear Programming (ILP) to enforce hardware constraints, the proposed attack achieves a 96.9% average accuracy in recovering secret keys using only a circuit's reverse-engineered netlist.

Introduction

In the modern semiconductor industry, the manufacturing process is often outsourced to third-party foundries, introducing risks such as IP theft or the insertion of hardware trojans. Logic locking mitigates these risks by integrating a secret key into the circuit; without the correct key, the hardware remains non-functional.

Traditional attacks on logic locking are typically "oracle-based," requiring a functional, unlocked chip to observe correct input/output behavior. LBLL was specifically designed to resist such attacks by moving beyond simple gate-level locking. It modifies latches and flip-flops, creating a web of decoy paths that confuse automated tools. This research challenges the perceived security of LBLL by introducing a methodology that requires no functional oracle, relying solely on the structural information contained within the circuit's netlist.

Methodology

The researchers developed a two-phase attack framework that synergizes data-driven machine learning with the rigid requirements of mathematical optimization.

Phase 1: Logic Decoy Identification

The first stage focuses on identifying "logic decoys"—latches designed to output a constant '0' when the correct key is applied. The authors utilized a Random Forest classifier trained on 14 specific structural features extracted from the circuit's sequential graph, such as "triangle" or "loop" patterns. Once these decoys are identified with high precision, they are removed, and the circuit is simplified using Boolean constant propagation.

Phase 2: Delay Decoy and Latch Classification

For the remaining latches, the attack employs a Multi-layer Perceptron (MLP) to distinguish between "delay decoys" (which should be transparent in a functional state) and primary or secondary functional latches.

Phase 3: ILP Constraint Enforcement

A critical innovation of this work is the use of Integer Linear Programming (ILP) to refine ML predictions. Because ML models can produce probabilistic guesses that violate physical hardware rules, the authors implemented "Fundamental Constraints" within an ILP solver. For instance, a primary latch must logically be followed by a secondary latch. The ILP solver processes the MLP's probability outputs and forces a final key prediction that is both statistically likely and structurally valid according to hardware architecture rules.

Experimental Evaluation

The attack was evaluated using standard industry benchmarks, including the ISCAS’89 and ITC’99 sequential circuit suites. To ensure a robust dataset, the authors generated 11 different locked variants for 19 distinct circuits, resulting in a training and testing set of over 75,000 latch samples.

Key Results

  • High Accuracy: The hybrid attack achieved an average key recovery accuracy of 96.9%.
  • Functional Recovery: The attack successfully recovered the exact correct functionality for 8 out of the 19 tested circuits.
  • Phase 1 Performance: The Random Forest classifier proved exceptionally effective, identifying logic decoys with 98.1% accuracy.
  • Computational Efficiency: Despite the complexity of the hybrid approach, the attack is remarkably fast. ML inference for the largest circuits took less than 5 minutes, while the ILP solver typically concluded in under 15 minutes.

Discussion and Insights

The success of this attack reveals several critical vulnerabilities in current LBLL implementations:

  1. Structural Leaks: Despite randomization in the locking process, the physical implementation leaves "structural signatures." Specific fan-out patterns and sub-graph configurations provide enough signal for ML models to differentiate decoys from functional logic.
  2. Hybrid Intelligence: The synergy between ML and ILP is the attack's greatest strength. While ML provides the probabilistic "intuition," the ILP provides the "domain knowledge" necessary to correct errors that would otherwise result in an invalid circuit configuration.
  3. Functional Redundancy: The researchers noted that even when the key recovery was not 100% accurate, the circuit often functioned correctly. This suggests that some locking scripts introduce redundant decoys that do not strictly impact the final output logic, inadvertently lowering the security bar.

Conclusion and Future Work

This research demonstrates that LBLL is vulnerable to structure-aware, oracle-less attacks. While the current methodology assumes some knowledge of the general locking algorithm, it sets a new baseline for hardware security analysis.

To counter such attacks, the authors suggest that designers must develop more sophisticated decoys that mimic the structural signatures of functional latches more closely—for example, by creating decoys that output a '1' instead of a '0'. Future research will focus on scaling this "ML + ILP" template to massive, multi-million gate modern Systems on a Chip (SoCs) and exploring defenses that are resilient against structural analysis.

Summary updated

BibTeX
@inproceedings{chen2023unraveling,
  author = {Dake Chen and Xuan Zhou and Yinghua Hu and Yuke Zhang and Kaixin Yang and Andrew Rittenbach and Pierluigi Nuzzo and Peter A. Beerel},
  title = {{Unraveling Latch Locking Using Machine Learning, Boolean Analysis, and ILP}},
  booktitle = {ISQED},
  year = {2023},
  doi = {10.1109/isqed57927.2023.10129346},
}
Figure