A Genetic Programming approach for hardware-oriented hash functions for network security applications

Mujtaba Hassan, Arish Sateesan, Jo Vliegen, Stjepan Picek, Nele Mentens

Introduction

As network backbone links transition toward Terabit Ethernet (400 Gbps to 1000 Gbps), the hardware infrastructure for monitoring and securing these high-speed pipes faces unprecedented pressure. Network security tools, such as Bloom Filters and Count-Min Sketches, are fundamental to line-rate packet processing. These tools rely heavily on non-cryptographic (NC) hash functions to categorize and count network flows efficiently. However, traditional hash functions like Murmur3 or FNV-1a, designed for general-purpose CPUs, often perform poorly on specialized hardware like Field Programmable Gate Arrays (FPGAs). On FPGAs, these functions frequently encounter bottlenecks due to complex mathematical operations like multiplication, which create long critical paths and limit operating frequencies.

The Role of Hash Functions in Network Security

The primary application for high-speed NC hash functions in this context is the implementation of probabilistic data structures. For instance, Bloom Filters use multiple hash functions to map input elements (such as IPv4 flow IDs) to a bit array to track membership.

Figure 2: Illustration of a Bloom Filter operation, showing how hash functions map inputs to specific bit positions for insertion and lookup.

To maintain line-rate performance without data loss, these hash functions must exhibit high randomness (avalanche properties) while remaining computationally "cheap" in terms of hardware resources and latency. The goal is to ensure that a single bit change in the input results in a significant, random-looking change in the output hash, minimizing collisions in the filter.

Methodology: Tree-Based Genetic Programming

To overcome the limitations of human-designed hash functions, this research employs Evolutionary Computation—specifically, Tree-based Genetic Programming (GP)—to "evolve" optimized 32-bit hash functions (NCGPH-32) from scratch.

Figure 3: Conceptual representation of a tree-based Genetic Programming structure, where nodes represent operations and leaves represent input variables or constants.

The Evolutionary Framework

The GP environment was constrained to a hardware-friendly primitive set, including XOR, AND, OR, NOT, bitwise Rotations, and SWAP operations. By explicitly excluding multipliers, the researchers ensured that the evolved logic paths remained short and efficient for FPGA implementation. The fitness of each individual in the population was evaluated based on three critical avalanche metrics:

  1. Avalanche Dependence ($D_{av}$): Ensures every output bit is potentially affected by every input bit.
  2. Avalanche Weight ($W_{av}$): Targets a 50% bit-flip probability in the output when a single input bit is toggled.
  3. Avalanche Entropy ($E_{av}$): Measures the statistical randomness of the output distribution.

To handle modern 96-bit IPv4 flow IDs, the researchers adopted a concatenation strategy. Instead of evolving a single complex 96-bit function, they concatenated three independently evolved 32-bit functions (NCGPH96-concat). This approach allows for parallel execution in hardware, maximizing throughput without sacrificing the "width" of the hash output.

Experimental Results

The evolved NCGPH96-concat function was benchmarked against 17 state-of-the-art NC hash functions, including Xoodoo-NC and SipHash, on a Xilinx Virtex UltraScale+ FPGA. The results demonstrate significant improvements across all key hardware metrics:

  • Operating Frequency: The evolved function reached 813 MHz, representing a 36% improvement over the previous GP-based leader, GPNCH-V.
  • Latency: Latency was reduced to 1.23 ns, a 27% improvement over existing benchmarks.
  • Throughput: A single instance achieved a throughput of 78.04 Gbps.

Statistical testing (including Chi-Square and Runs tests) confirmed that these performance gains did not come at the cost of quality; the evolved functions maintained high-quality, random-looking distributions suitable for security applications.

Conclusion and Future Work

This study demonstrates that Genetic Programming can effectively automate the design of hardware-optimized hash functions that outperform traditional human-designed algorithms. By prioritizing hardware-friendly primitives and avalanche properties, the researchers have cleared a path for more efficient Terabit Ethernet monitoring. Future research will focus on expanding this family of functions to support the 288-bit flow IDs required for IPv6 and exploring "hardware-in-the-loop" evolution to further refine performance directly on FPGA targets.

Summary updated

BibTeX
@article{hassan2024genetic,
  author = {Mujtaba Hassan and Arish Sateesan and Jo Vliegen and Stjepan Picek and Nele Mentens},
  title = {{A Genetic Programming approach for hardware-oriented hash functions for network security applications}},
  journal = {Applied Soft Computing},
  year = {2024},
  doi = {10.1016/j.asoc.2024.112078},
}
Figure