The Quest to Build Trust Earlier in Digital Design

Benjamin Tan

Introduction

Hardware serves as the immutable foundation of any secure system. However, while software developers have benefited from decades of automated security tooling, hardware designers often lack similar resources. Currently, identifying hardware vulnerabilities is a manual, "human-in-the-loop" process requiring deep cybersecurity expertise—expertise that many digital designers may not possess.

This paper, presented by Benjamin Tan from the University of Calgary, outlines a strategic vision for "shifting left" in hardware security. The goal is to move the detection and mitigation of vulnerabilities to the earliest possible stages of the digital design process, specifically during Register Transfer Level (RTL) development.

The "Shift Left" Vision

The core philosophy of this research is that security should not be a post-design "check-box" activity. Identifying a bug at the RTL stage is significantly cheaper and more effective than finding it in a netlist or physical silicon, where the cost of correction can become astronomical.

A conceptual framework for shifting hardware security left, integrating automated checks and designer feedback during the RTL phase.

As illustrated in the proposed workflow, the vision involves tools that help non-expert designers identify security weaknesses while they are still writing code in Hardware Description Languages (HDLs) like Verilog or VHDL. This creates a feedback loop where automated systems provide guidance, allowing designers to enhance and repair their designs before they progress further down the design flow.

Methodologies for Early Detection

The research highlights three primary avenues for improving early-stage hardware trust:

  1. Context-less Static Analysis: The authors developed CWEAT, a tool that scans RTL code for patterns matching known Hardware Common Weakness Enumerations (CWEs). Because it is "context-less," it does not require a full simulation environment, allowing it to flag potential issues like uninitialized registers or improper debug mode overrides even in incomplete code.
  2. Large Language Models (LLMs): The study explores LLMs for automated bug detection, code repair, and generating security assertions. Additionally, LLMs are investigated as a means to translate cryptic Error Design Automation (EDA) tool messages into plain language for novice designers.
  3. Mining Open-Source Processes: By analyzing the development history of open-source hardware projects like OpenTitan, researchers aim to understand how security bugs are introduced and resolved in real-world collaborative environments.

Key Results and Insights

Initial evaluations of these methods have yielded promising results:

  • CWEAT Performance: In early testing, the CWEAT tool identified 180 instances of potential weaknesses in RTL code, effectively narrowing the search space for manual security audits.
  • OpenTitan Analysis: A manual examination of the OpenTitan project revealed that 53% of identified bugs had potential security implications. Notably, 55% of those fixes were contained within a single file, suggesting that many hardware vulnerabilities are prime candidates for automated repair tools.
  • LLM Utility: While LLMs show promise in explaining errors, the research notes they still struggle with "hallucinations" and inconsistent output quality regarding complex security logic.

Challenges and Future Work

Despite the progress, several hurdles remain. Static analysis tools often produce "noise" in the form of false positives—code that looks suspicious but is not exploitable in context. Furthermore, many vulnerabilities depend on the specific "intent" of the design, which is difficult for automated tools to grasp without better metadata.

Future work will focus on reducing this noise, addressing the scarcity of open-source hardware data for training AI models, and finding the optimal balance between fully automated tools and human-driven design intent.

Summary updated

Abstract

The ever-rising complexity of computer systems presents challenges for maintaining security and trust throughout their lifetime. As hardware forms the foundation of a secure system, we need tools and techniques that support computer hardware engineers to improve trust and help them address security concerns. This paper highlights a vision for tools and techniques to enhance the security of digital hardware in earlier stages of the digital design process, especially during design with hardware description languages. We discuss the challenges that design teams face and explore some recent literature on understanding, identifying, and mitigating hardware security weaknesses as early as possible. We highlight the opportunities that emerge with open-source hardware development and sketch some open questions that guide ongoing research in this domain.
BibTeX
@misc{tan2024quest,
  author = {Benjamin Tan},
  title = {{The Quest to Build Trust Earlier in Digital Design}},
  year = {2024},
  eprint = {2409.05832},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.05832},
}
Figure