optimization of regular expression pattern matching circuits on fpga

15
Optimization of Regular Expression Pattern Matching Circuits on FPGA Authors: Cheng-Hung Lin, Chih-Tsun Huang, Chang-Ping Jiang, and Shih-Chieh Chang Publisher: IEEE VLSI, 2007 Present: Pei-Hua Huang Date: 2014/02/19

Upload: addo

Post on 06-Jan-2016

29 views

Category:

Documents


2 download

DESCRIPTION

Optimization of Regular Expression Pattern Matching Circuits on FPGA. Authors: Cheng-Hung Lin, Chih-Tsun Huang, Chang-Ping Jiang, and Shih- Chieh Chang Publisher: IEEE VLSI, 2007 Present: Pei-Hua Huang Date: 2014/02/19. Introduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Optimization of Regular Expression Pattern Matching Circuits on FPGAAuthors: Cheng-Hung Lin, Chih-Tsun Huang, Chang-Ping Jiang, and Shih-Chieh ChangPublisher: IEEE VLSI, 2007 Present: Pei-Hua HuangDate: 2014/02/19

Page 2: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Introduction• Regular expressions are widely used in the network intrusion

detection system (NIDS) to represent attack patterns• Due to the rapid increase of network attacks and data traffic,

traditional software-only NIDS may be too slow for networking needs

• many studies [1][2][3][4][5] proposed hardware architectures for accelerating attack detection

• the main challenges of hardware implementation is to accommodate the large number regular expressions to FPGAs

2

Page 3: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Introduction

3

Page 4: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Introduction

4

Page 5: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Regular expressions for attacks’ description• In Snort, two types of regular expression are used to describe

attack patterns• The first type defines exact string patterns such as "Ahhhh My

Mouth Is Open.”• The second type consists of meta-characters (^ , $, |, *, ?) ex.

“^GET[^s]{432}”

5

Page 6: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Minimization of regular expression circuits• Given m regular expressions, R1,R2,…, Rm, and assuming that all

of them have the infix common sub-pattern, Rc, the m regular expressions can be represented as R1preRcR1post , R2preRcR2post,…, and RmpreRcRmpost

• two additional circuit blocks are inserted• The switch module is used to memorize where the trigger signal

comes from• DeMux (De-Multiplexer) to guide the output of Rc to the correct

postfix circuit

6

Page 7: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Minimization of regular expression circuits

7

Page 8: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Minimization of regular expression circuits• The new architecture has two constraints• Constraint 1: For the m regular expressions in Figure 4,

{R1preRcR1post, R2preRcR2post, …, RmpreRcRmpost}, the prefix Rjpre cannot be null for j 1...m∈

8

Pattern1: abcdefgh

Pattern2: defpq

Page 9: Optimization of Regular Expression Pattern Matching Circuits on FPGA

• Constraint 2: For the m regular expressions in Figure 4, {R1preRcR1post, R2preRcR2post, …, RmpreRcRmpost}, the Rc cannot be shared if Rjpre⊂RkpreRc, ∀k ≠ j , k, j 1…∈ m

9

Pattern1: abcdefgh

Pattern2: dedefpq

Page 10: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Regular expression module generator• The sharing gain of a common sub-pattern is defined to be the

number of characters in the sub-pattern multiplies by the number of regular expressions having the sub-pattern

• For example, three regular expressions, “1Common1”, “2Common2”, and “3Common3” have the common sub-pattern “Common.” The sharing gain of the common sub-pattern is 18=6*3

10

Page 11: Optimization of Regular Expression Pattern Matching Circuits on FPGA

11

Page 12: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Basic components of NFA approach

12

Page 13: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Basic components of NFA approach

13

Page 14: Optimization of Regular Expression Pattern Matching Circuits on FPGA

Experimental results• the regular expression patterns from Snort and Trend Micro• all circuits being synthesized by Xilinx ISE7.1i, where the target

FPGA is Xilinx Virtex XCV2000E consisting of 19,200 slices

14

Page 15: Optimization of Regular Expression Pattern Matching Circuits on FPGA

15