Method and apparatus to scale and unroll an incremental hash function
First Claim
1. A method of speeding up an incremental hash function, the method comprising:
- receiving a data string including a plurality of data samples;
as each data sample is received, maintaining a plurality of hash values, one for each data sample that can be received in parallel;
for each hash value, multiplying the current hash value by a constant to obtain a hash value multiplication result;
for each data sample, multiplying the data sample by a predetermined constant to obtain a sample multiplication result; and
for each hash value, adding a plurality of sample multiplication results and subtracting previously stored sample multiplication results to obtain a new current hash value.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus speeding up an incremental hash function is described. The method may comprise receiving a data string including a plurality of N data samples and, as each data sample is received, multiplying the data samples to obtain data sample multiplication results and multiplying a current hash value by a constant to obtain a hash multiplication result. Thereafter, the data sample multiplication results are added to the hash multiplication result to obtain new current hash values and a hash value of the data string is defined as the new hash value. In an embodiment, a moving window of length wl may be defined and data samples that were received wl to wl+N bytes previously may be multiplied with the constant raised to the power of w to wl+Nl to obtain n subtraction results.
17 Citations
10 Claims
-
1. A method of speeding up an incremental hash function, the method comprising:
-
receiving a data string including a plurality of data samples;
as each data sample is received, maintaining a plurality of hash values, one for each data sample that can be received in parallel;
for each hash value, multiplying the current hash value by a constant to obtain a hash value multiplication result;
for each data sample, multiplying the data sample by a predetermined constant to obtain a sample multiplication result; and
for each hash value, adding a plurality of sample multiplication results and subtracting previously stored sample multiplication results to obtain a new current hash value. - View Dependent Claims (2, 3, 4, 5)
-
-
6. Apparatus to speeding up an incremental hash function, the apparatus comprising a modified hash function module to receive a data string including a plurality of data samples, wherein as each data sample is received the modified hash function module:
-
maintains a plurality of hash values, one for each data sample that can be received in parallel;
for each hash value, multiplies the current hash value by a constant to obtain a hash value multiplication result;
for each data sample, multiplies the data sample by a predetermined constant to obtain a sample multiplication result; and
for each hash value, adds a plurality of sample multiplication results and subtracting previously stored sample multiplication results to obtain a new current hash value. - View Dependent Claims (7, 8, 9)
-
-
10. Apparatus to calculate a hash value of a data string as each data sample is received, the apparatus comprising:
-
means for receiving the data string including a plurality of data samples;
means for multiplying a current hash value by a constant to obtain a hash value multiplication result;
means for multiplying a current hash value by a constant to obtain a sample multiplication result;
means for adding and subtracting the received data sample multiplication result to the previous hash value to obtain a new current hash value; and
means for defining a hash value of the data string as the new hash value.
-
Specification