A memory-efficient pipelined implementation of the aho-corasick string-matching algorithm
Authors:
Open Access
- 1 September 2010
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 7 (2) , 1-27
Abstract
With rapid advancement in Internet technology and usages, some emerging applications in data communications and network security require matching of huge volume of data against large signature sets with thousands of strings in real time. In this article, we present a memory-efficient hardware implementation of the well-known Aho-Corasick (AC) string-matching algorithm using a pipelining approach called P-AC. An attractive feature of the AC algorithm is that it can solve the string-matching problem in time linearly proportional to the length of the input stream, and the computation time is independent of the number of strings in the signature set. A major disadvantage of the AC algorithm is the high memory cost required to store the transition rules of the underlying deterministic finite automaton. By incorporating pipelined processing, the state graph is reduced to a character trie that only contains forward edges. Together with an intelligent implementation of look-up tables, the memory cost of P-AC is only about 18 bits per character for a signature set containing 6,166 strings extracted from Snort. The control structure of P-AC is simple and elegant. The cost of the control logic is very low. With the availability of dual-port memories in FPGA devices, we can double the system throughput by duplicating the control logic such that the system can process two data streams concurrently. Since our method is memory-based, incremental changes to the signature set can be accommodated by updating the look-up tables without reconfiguring the FPGA circuitry.Keywords
Funding Information
- National Natural Science Foundation of China (60625201608732509732007CB310701)
- Research Grants Council, University Grants Committee, Hong Kong (9041500)
This publication has 21 references indexed in Scilit:
- A Robust Approach for Matching Mixed Casesensitive and Case-insensitive Patterns2007
- Automatic Synthesis of Efficient Intrusion Detection Systems on FPGAsIEEE Transactions on Dependable and Secure Computing, 2006
- High Speed Pattern Matching for Network IDS/IPS2006
- Fast and Scalable Pattern Matching for Network Intrusion Detection SystemsIEEE Journal on Selected Areas in Communications, 2006
- A computationally efficient engine for flexible intrusion detectionIEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2005
- Configurable string matching hardware for speeding up intrusion detectionACM SIGARCH Computer Architecture News, 2005
- A pattern matching coprocessor for network security2005
- Deep packet inspection using parallel bloom filtersIEEE Micro, 2004
- Fast Pattern Matching in StringsSIAM Journal on Computing, 1977
- Efficient string matchingCommunications of the ACM, 1975