Galois-Based Incremental Hash Module for Pattern Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing hash functions require an undesirably large number of computations when searching for patterns in long input streams, especially when the pattern is short, leading to resource and area consumption concerns in hardware implementations, particularly in applications like virus detection where hashes need to be computed at increasing speeds.

Innovation Solution

A Galois-based incremental hash module that performs Galois mathematical operations to efficiently generate hashes of substrings within an input stream by reusing computations, using Galois multipliers and adders to calculate incremental hashes at different offsets, reducing the need for conventional multipliers and adders and optimizing resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional hash functions are used to search for patterns in long input streams, then pattern detection capability is achieved, but computational time and resource consumption increase significantly

Engineering Contradiction:
Improvehash computation speedVSAvoidcomputational time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent precomputes powers of the multiplier constant k (k, k², k³, ..., kⁿ) and stores them in lookup tables before hash computation begins. During incremental hash calculation, these precomputed values are retrieved and used directly, eliminating the need for repeated multiplication operations. This preliminary preparation significantly reduces the computational time for each hash calculation while maintaining pattern detection capability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses Galois Field arithmetic operations (GF(2ⁿ)) that replicate and reuse computational patterns. The incremental hash function h(i) = (h(i-1) + k^(L-i) * d[i]) mod p reuses the same multiplier powers and addition operations across different hash calculations, allowing efficient copying of computational steps rather than performing full hash computations from scratch at each position.

Inventive Principle:
Principle #26Copying

2Speed

If hardware implementation is used to increase hash computation speed, then processing speed improves, but area and resource consumption increase

Engineering Contradiction:
Improvehash computation speedVSAvoidhardware area
Core Design Contradiction:
SpeedVSArea of stationary object

Solution Approach 1:

The patent precomputes and stores powers of the multiplier constant k in lookup tables during hardware initialization or system setup. This preliminary action moves the computationally intensive multiplication operations from the critical hash calculation path to a one-time setup phase, allowing the hardware to perform only additions and table lookups during actual pattern detection, thereby reducing the area required for multipliers while maintaining high computation speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces complex multiplication operations with simpler addition and lookup table access operations in the hardware implementation. By using Galois Field arithmetic where multiplication by precomputed powers can be substituted with addition and memory access, the hardware design eliminates the need for large-area multiplier circuits, reducing overall hardware footprint while preserving computation speed.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If hashes are computed at each offset in the input stream, then pattern detection accuracy is maintained, but resource consumption increases

Engineering Contradiction:
Improvepattern detection accuracyVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements an incremental hash function that continuously updates the hash value as it progresses through the input stream. The recurrence relation h(i) = (h(i-1) + k^(L-i) * d[i]) mod p allows each hash to be computed from the previous hash plus a small correction term, maintaining continuous pattern detection capability while using only addition and lookup operations instead of full hash computations at each step, thereby reducing resource consumption.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The patent changes the computational parameters by working in Galois Field GF(2ⁿ) with a fixed multiplier constant k and its precomputed powers. This parameter transformation converts the problem from requiring full hash recomputation at each offset to requiring only incremental updates using additions and prestored values, maintaining detection accuracy while significantly reducing the quantity of computational resources needed.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS7827384B2Galois-based incremental hash module
Publication Date: 2010.11.02 CISCO TECHNOLOGY INC
  • US7827384B2 patent drawing
  • US7827384B2 patent drawing
  • US7827384B2 patent drawing

AI summary

Various systems and methods for implementing a Galois-based incremental hash module are disclosed. For example, a method involves computing a first hash of a first string of an input stream. The first hash is computed by performing one or more Galois mathematical operations upon portions of the first string. A second hash of a second string, which overlaps the first string, can then be computed by processing the first hash.