TrojanWhisper: Evaluating Pre-trained LLMs to Detect and Localize Hardware Trojans

Existing Hardware Trojan (HT) detection methods face critical limitations: logic testing struggles with scalability, side-channel analysis requires golden reference chips, and formal verification suffers from state-space explosion. This paper presents TrojanWhisper, a novel framework that leverages general-purpose Large Language Models (LLMs) to detect and localize HTs in Register Transfer Level (RTL) designs without prior fine-tuning. TrojanWhisper introduces an LLM-based signature generation engine that extracts generalized HT patterns, a perturbation generation engine that validates detection robustness through variable name obfuscation, synthesizable redundant logic addition and design restructuring, and a multi-stage HT detection engine evaluated on SRAM, AES, and UART modules. Our evaluation of GPT-4o, Gemini 1.5 Pro, and Llama 3.1 shows that GPT-4o and Gemini 1.5 Pro achieve perfect detection (100% precision/recall) in baseline scenarios (i.e., unobfuscated, unperturbed designs), with trigger localization (TLC: 0.72–0.98) outperforming payload localization (PLC: 0.32–0.46). Under code perturbation, Gemini 1.5 Pro maintains perfect detection while other models show some degradation in detection rates, and all models experience decreased accuracy in localizing both trigger and payload lines. This paper validates the potential of LLM approaches for hardware security applications, highlighting areas for future improvement.

Paper

References (35)

Scroll for more · 23 remaining

Similar papers

© 2026 NYSGPT2525 LLC