Evolving Non-cryptographic Hash Functions Using Genetic Programming for High-speed Lookups in Network Security Applications

Mujtaba Hassan, Arish Sateesan, Jo Vliegen, Stjepan Picek, Nele MentensEvoApplications@EvoStar 2023

Introduction

In the era of Terabit Ethernet, network security applications such as traffic flow monitoring and deep packet inspection face the challenge of processing data at "line rate." These systems rely heavily on probabilistic data structures like Bloom filters for high-speed lookups. The performance of these structures is fundamentally tied to the efficiency of non-cryptographic (NC) hash functions. Unlike their cryptographic counterparts, NC hashes prioritize throughput and low latency while maintaining sufficient randomness, specifically the "avalanche effect," where a single bit change in the input results in significant changes across the output bits.

Designing NC hash functions that are both hardware-efficient and statistically robust is a complex task. Manual design often fails to fully leverage the parallel processing capabilities of Field Programmable Gate Array (FPGA) hardware. This research explores the use of Genetic Programming (GP) to automate the discovery of a new family of functions, termed GPNCH, optimized specifically for high-speed hardware implementation.

Methodology: Evolutionary Design

The researchers employed Evolutionary Computation, specifically Genetic Programming, to "evolve" hash functions. In this framework, potential solutions are represented as syntax trees of logical operations, which can be directly translated into digital circuits.

An example of an individual represented as a GP syntax tree (left) and its equivalent digital circuit (right).

Hardware-Aware Operator Selection

To ensure the evolved functions remained "lean" for FPGA deployment, the authors carefully restricted the available function set. The GP algorithm was limited to bitwise operators such as XOR, AND, OR, NOT, and bit-level rotations or swaps. By excluding resource-intensive operations like multiplication and division—which are common in software-oriented hashes but costly on FPGAs—the resulting GPNCH functions are inherently optimized for hardware efficiency.

A comparison of elementary operators used in various state-of-the-art NC hash functions, highlighting the lean operator set used in GPNCH.

Fitness and Evaluation

The "survival of the fittest" was determined by a fitness function based on avalanche metrics, including avalanche dependence (the number of output bits that flip) and entropy (the overall randomness of the distribution). The algorithm evaluated candidates against millions of bit-flip combinations to ensure statistical robustness across a 96-bit input block size, typical for network flow identifiers.

Key Results and Performance

The evolutionary process yielded the GPNCH-V function, which demonstrated superior performance when implemented on a Virtex Ultrascale+ FPGA. Operating in a single clock cycle, GPNCH-V achieved an operating frequency of 595.23 MHz and a throughput of 59.95 Gbps. This represents a 19% improvement over the state-of-the-art Xoodoo-NC and a 62% improvement over GIFT-NC.

Furthermore, GPNCH-V boasts a latency of just 1.68 ns. While the evolved functions consume slightly more Lookup Tables (LUTs) than some manually-tuned ciphers, the trade-off is justified by the massive gains in throughput and the ability to generate a family of independent functions required for parallelized Bloom filters.

Conclusion

This study demonstrates that Genetic Programming can effectively automate the design of high-performance hardware primitives. By incorporating hardware constraints directly into the evolutionary process, the researchers produced a family of hash functions that outperform human-designed alternatives in critical networking metrics. Future work will focus on integrating GPNCH into full-scale Bloom filter implementations and extending the method to larger block sizes, such as those required for IPv6 traffic.

Summary updated

BibTeX
@inproceedings{hassan2023evolving,
  author = {Mujtaba Hassan and Arish Sateesan and Jo Vliegen and Stjepan Picek and Nele Mentens},
  title = {{Evolving Non-cryptographic Hash Functions Using Genetic Programming for High-speed Lookups in Network Security Applications}},
  booktitle = {EvoApplications@EvoStar},
  year = {2023},
  doi = {10.1007/978-3-031-30229-9\_20},
}
Figure