Designing Hardware-Friendly Hash Functions for Network Security Using Cartesian Genetic Programming

Mujtaba Hassan, Jo Vliegen, Stjepan Picek, Nele MentensEvoApplications 2025

Introduction

As network speeds advance toward 800G and terabit Ethernet, the demand for high-performance network security tools has never been greater. Detecting threats like Distributed Denial of Service (DDoS) attacks requires processing packets at "line rate," necessitating ultra-low latency. This paper, presented at EvoApplications 2025, proposes a novel approach to designing the non-cryptographic (NC) hash functions that power these systems. By utilizing Cartesian Genetic Programming (CGP), the researchers evolved "CGP-hash," a function that significantly outperforms previous state-of-the-art designs in both speed and resource efficiency.

Background: Probabilistic Data Structures in Network Security

High-speed network monitoring often relies on Probabilistic Data Structures (PDS), such as Bloom filters. These structures allow for efficient membership testing with a small memory footprint, which is crucial for FPGA-based implementations.

Operation of a Bloom filter, a common PDS requiring efficient hash functions.

As illustrated in the figure above, Bloom filters use multiple hash functions to map elements to a bit array. While cryptographic hashes like SHA-256 offer high security, they are too computationally expensive for line-rate processing. Consequently, researchers seek NC hash functions that balance mathematical randomness with hardware efficiency. Previous bio-inspired attempts using standard Genetic Programming (GP) often resulted in "bloated" designs that consumed excessive hardware resources (Look-Up Tables or LUTs).

Methodology: Cartesian Genetic Programming

The authors transitioned from standard GP to Cartesian Genetic Programming (CGP) to address the efficiency gap. Unlike the tree-based structures of standard GP, CGP represents programs as directed graphs (a grid of nodes).

This graph-based approach offers a significant advantage: node reuse. In a hardware context, the output of a single logic gate can be utilized by multiple subsequent gates, mimicking efficient circuit design. This inherent characteristic leads to more compact logic compared to tree-based GP, where redundant calculations must often be duplicated.

Fitness Function and Avalanche Metrics

To avoid overfitting to specific datasets, the evolution process focused on Avalanche Metrics, ensuring the hash function's robustness across diverse traffic patterns:

  • Avalanche Dependence: Every input bit must potentially influence every output bit.
  • Avalanche Weight: Changing a single input bit should flip approximately 50% of the output bits.
  • Avalanche Entropy: A measure of the randomness and unpredictability of the output.

The target design was a 48-bit hash output derived from a 96-bit input, representing a standard IPv4 flow identifier.

Validation and Results

The study employed Monte Carlo simulations to rigorously test the Strict Avalanche Criterion (SAC). Candidates were first filtered through 9,600 bit-flips, with the best performers undergoing a massive validation phase of 24 million bit-flips to ensure properties held under randomized input variation.

The resulting CGP-hash demonstrated superior performance metrics:

  • Throughput: Achieved 84.23 Gbps at an operating frequency of 877.43 MHz.
  • Area Efficiency: Reached 450.43 Mbps/LUT, representing a 4.5x improvement over the previous state-of-the-art (XOODOO-NC).
  • Latency: Achieved an ultra-low, single-clock-cycle latency of 1.14 ns.

Discussion and Future Work

A key insight from this research is that evolving smaller, high-quality hash blocks (e.g., 48-bit) and concatenating them is more efficient for FPGA timing than attempting to evolve a single large logic block. However, challenges remain. The evolution process occasionally "neglected" parts of the input to satisfy fitness scores, requiring an increase in node count to 3,000 to ensure full 96-bit input utilization.

Future research will focus on adapting this CGP-based approach for IPv6, which requires handling significantly larger 288-bit flow identifiers. Additionally, optimizing the time-intensive validation bottleneck remains a priority for exploring more complex configurations.

Summary updated

BibTeX
@inproceedings{hassan2025designing,
  author = {Mujtaba Hassan and Jo Vliegen and Stjepan Picek and Nele Mentens},
  title = {{Designing Hardware-Friendly Hash Functions for Network Security Using Cartesian Genetic Programming}},
  booktitle = {EvoApplications},
  year = {2025},
  doi = {10.1007/978-3-031-90062-4\_14},
}
Figure