|
8 | 8 | // |
9 | 9 | // The HashRecognize analysis recognizes unoptimized polynomial hash functions |
10 | 10 | // with operations over a Galois field of characteristic 2, also called binary |
11 | | -// fields, or GF(2^n): this class of hash functions can be optimized using a |
12 | | -// lookup-table-driven implementation, or with target-specific instructions. |
| 11 | +// fields, or GF(2^n). 2^n is termed the order of the Galois field. This class |
| 12 | +// of hash functions can be optimized using a lookup-table-driven |
| 13 | +// implementation, or with target-specific instructions. |
| 14 | +// |
13 | 15 | // Examples: |
14 | 16 | // |
15 | 17 | // 1. Cyclic redundancy check (CRC), which is a polynomial division in GF(2). |
|
24 | 26 | // |
25 | 27 | // c_m * x^m + c_(m-1) * x^(m-1) + ... + c_0 * x^0 |
26 | 28 | // |
27 | | -// where each coefficient c is can take values in GF(2^n), where 2^n is termed |
28 | | -// the order of the Galois field. For GF(2), each coefficient can take values |
29 | | -// either 0 or 1, and the polynomial is simply represented by m+1 bits, |
30 | | -// corresponding to the coefficients. The different variants of CRC are named by |
31 | | -// degree of generating polynomial used: so CRC-32 would use a polynomial of |
32 | | -// degree 32. |
| 29 | +// where each coefficient c is can take values 0 or 1. The polynomial is simply |
| 30 | +// represented by m+1 bits, corresponding to the coefficients. The different |
| 31 | +// variants of CRC are named by degree of generating polynomial used: so CRC-32 |
| 32 | +// would use a polynomial of degree 32. |
33 | 33 | // |
34 | 34 | // The reason algorithms on GF(2^n) can be optimized with a lookup-table is the |
35 | 35 | // following: in such fields, polynomial addition and subtraction are identical |
|
0 commit comments