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

TL;DR

This paper introduces a potent, "oracle-less" attack on Latch-Based Logic Locking (LBLL), a hardware security technique previously thought to be resilient against standard attacks. By combining machine learning (ML) to identify structural anomalies with Integer Linear Programming (ILP) to enforce architectural constraints, the researchers achieved 96.9% average key accuracy, fully unlocking nearly half of their test circuits without needing a functional "golden" chip.

What Problem Does This Paper Address?

As integrated circuit (IC) manufacturing moves to a global supply chain, designers fear that untrusted foundries might steal intellectual property (IP) or insert malicious hardware Trojans. Logic locking is a defense where secret keys are required to make a circuit function correctly.

While locking combinational logic is well-studied, Latch-Based Logic Locking (LBLL) targets sequential elements. It works by duplicating flip-flops, retiming them into primary-secondary latch pairs, and then peppering the design with "decoy" latches (delay decoys and logic decoys) to confuse reverse-engineers. Because LBLL introduces cyclic connections and complex initial states, it is notoriously difficult for traditional Boolean Satisfiability (SAT) attacks to crack. The authors aim to prove that even these "SAT-resilient" designs have structural vulnerabilities that can be exploited.

Methods

The authors propose a two-phase attack that doesn't require an "oracle" (a working, unlocked chip to test inputs/outputs). Instead, it relies entirely on the reverse-engineered netlist.

  1. Sequential Graph Abstraction: The circuit is first converted into a sequential graph where nodes are latches/flip-flops and edges represent combinational paths.
  2. Phase 1: Logic Decoy Identification: Using a Random Forest classifier, the attack identifies "logic decoys"—latches that, when keyed correctly, output a constant zero. These decoys often create "false paths" in the netlist. Once identified, these are removed, and the circuit is simplified via constant propagation.
  3. Phase 2: Delay Decoy & Latch Classification: The simplified circuit is fed into a Multi-layer Perceptron (MLP). This classifier assigns probabilities to the remaining latches (is it a primary latch, secondary latch, or a delay decoy?).
  4. ILP Optimization: The probabilities from the MLP are used as coefficients in an Integer Linear Programming (ILP) model. The ILP acts as a structural "sanity check," enforcing the rules of the LBLL algorithm—such as the requirement that primary and secondary latches must alternate (two-colorability).
Fig. 2: Overview of the proposed two-phase attack on LBLL.

Datasets

The attack was trained and evaluated on standard hardware security benchmarks:

  • ISCAS’89: A classic set of sequential benchmark circuits.
  • ITC’99: A more modern suite of benchmarks, to which the authors added reset functionality for compatibility.
  • Locked Variants: The authors generated 11 locked versions of each circuit using different random seeds to ensure their ML models learned general structural signatures rather than specific instances.

Key Insights and Ideas

  • Structure is the Achilles' Heel: Even if the logic is mathematically hard to solve (SAT-resilient), the process of locking leaves structural breadcrumbs. For example, the "Triangle feature" (shown in Figure 5) helps detect decoys because they often break the expected two-colorable flow of a primary-secondary design.
  • Hybrid Intelligence: ML is great at spotting patterns but bad at following strict rules. ILP is the opposite. By using ML to provide the "best guess" and ILP to ensure the guess is "architecturally legal," the attack becomes much more accurate than either method alone.
  • Oracle-less Danger: Most previous attacks assume the attacker has a working chip bought from the market. This attack proves that a rogue foundry with only the GDSII blueprints can potentially recover the IP.
Structural features like triangles and loops used by the ML classifiers

Key Results

  • High Accuracy: The attack achieved an average key accuracy of 96.9%.
  • Full Disclosure: In 8 out of 19 tested circuits, the attack recovered the correct functionality perfectly (100% accuracy).
  • Low Corruptibility: In 3 additional circuits, the functional corruptibility (the rate of incorrect outputs) was less than 4%, meaning the "unlocked" circuit was nearly identical to the original.
  • Efficiency: Despite the complexity of ILP, the entire attack process took less than 15 minutes for every circuit tested, demonstrating excellent scalability.

Limitations and Future Work

The authors note that while their attack is highly effective, it relies on the specific way LBLL currently inserts decoys (e.g., logic decoys always emitting a constant '0').

Future directions include: * Improved Obfuscation: Developing new types of decoys, such as those that emit a logic '1' or vary their behavior, to fool the ML classifiers. * Path-based Analysis: Moving beyond node-based classification to analyze entire paths of latches. * Hybrid SAT Attacks: Integrating these structural ILP constraints into traditional SAT-based attacks to handle even more complex sequential locking schemes.

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