HTDet: A clustering method using information entropy for hardware Trojan detection

Renjie Lu, Haihua Shen, Zhihua Feng, Huawei Li, Wei Zhao, Xiaowei Li

Abstract

Hardware Trojans (HTs) pose a significant threat to integrated circuit security, often remaining dormant until triggered by rare conditions. This paper presents HTDet, an unsupervised machine learning approach that detects stealthy HTs by analyzing the information entropy of circuit signals. By encoding waveforms based on transitions and applying density-based clustering (DBSCAN), HTDet identifies malicious logic clusters with high precision without requiring a golden reference circuit. Evaluation on TrustHub benchmarks demonstrates a True Negative Rate (TNR) of 99% and effective detection of core malicious logic.

Introduction

As the integrated circuit (IC) supply chain becomes globalized, designers increasingly rely on third-party intellectual property (IP) cores and EDA tools. This opens the door for adversaries to insert Hardware Trojans—malicious modifications that stay dormant until a rare trigger condition is met, at which point they might leak secrets or disable the chip.

The fundamental challenge is stealth. To avoid detection during standard testing, Trojans are typically placed in "cold" regions of the chip—areas with low controllability and observability. Traditional functional testing often fails to trigger them, and side-channel analysis (measuring power or delay) is often drowned out by environmental noise or requires a "golden model" that designers may not have.

Methodology

HTDet treats Trojan detection as an outlier detection problem in the domain of information theory, following a four-step pipeline:

1. Waveform Encoding

Instead of looking at raw signal values (0s and 1s), the authors encode waveforms based on transitions. If a signal stays the same between clock cycles, it is encoded as 0; if it flips, it is encoded as 1. This focuses the analysis on activity rather than state.

Figure 4: Waveform encoding process, converting original signal values into transition-based sequences.

2. Information Entropy Calculation

Using the encoded data, the Shannon entropy is calculated for every wire. Because Trojans are designed to rarely transition to remain stealthy, their logic gates will have significantly lower entropy than normal circuit components.

3. DBSCAN Clustering

The entropy values are processed using the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm. This unsupervised learner groups "normal" logic together and isolates the low-entropy Trojan logic into a separate, suspicious cluster.

4. Heuristic Test Generation

To confirm suspicions, the authors use Mutual Information to identify primary inputs strongly correlated with suspicious wires. They then generate specific test patterns to "poke" these regions, attempting to increase their transition activity and expose the Trojan.

Key Insights: Entropy vs. Probability

A critical insight of HTDet is that information entropy is a much more sensitive metric than simple transition probability. Entropy effectively "amplifies" the gap between normal logic and stealthy Trojan logic, making the malicious parts stand out more clearly during clustering.

Figure 2: Comparison of transition probability and information entropy across different signal wires. Note how entropy provides a clearer separation between low-activity (suspicious) and high-activity (normal) wires.

Furthermore, HTDet is unsupervised, meaning it finds Trojans by looking for internal statistical anomalies. This makes it much more practical for real-world supply chain security where a "golden" reference model is often unavailable.

Results and Evaluation

The method was evaluated using the TrustHub benchmark, testing RS232 series implementations and larger ISCAS-89 benchmarks (s15850, s35932, s38417).

  • High Precision: The method achieved a True Negative Rate (TNR) of 99% across almost all benchmarks, indicating an extremely low false-alarm rate.
  • Effective Detection: The True Positive Rate (TPR) reached up to 100% on some benchmarks (like s38417) and averaged around 79% overall. While not every single Trojan wire was caught, the core malicious logic was consistently identified.
  • Improved Activation: Heuristic test pattern generation successfully increased transition activity in suspicious regions, proving that Mutual Information is an effective way to target hidden logic.

Conclusion

HTDet provides a robust, unsupervised framework for detecting stealthy Hardware Trojans. By leveraging the sensitivity of information entropy and the clustering capabilities of DBSCAN, it can pinpoint malicious logic with high accuracy. Future work will focus on refining heuristic test generation to more aggressively activate complex "cheat-code" style triggers that remain difficult to fully expose with standard functional stimuli.

Summary updated

BibTeX
@misc{lu2019htdet,
  author = {Renjie Lu and Haihua Shen and Zhihua Feng and Huawei Li and Wei Zhao and Xiaowei Li},
  title = {{HTDet: A clustering method using information entropy for hardware Trojan detection}},
  year = {2019},
  eprint = {1906.06996},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.06996},
}
Figure