Choosing a polynomial for CRC

1k Views Asked by At

CRC checksum is a homomorphism from polynomials over $\mathbb F_2$ to itself. As I understand, the map $f\mapsto g$ it is simply remainder from division $f$ by $p$, where $p$ is a fixed polynomial for the checksum.

I see that in general use $p$ is not arbitrary for a fixed degree. But how such $p$ are choosen?

1

There are 1 best solutions below

3
On BEST ANSWER

Typically irreducible. There's always $n$ with $X^n\equiv 1\pmod p$, and one wants to maximize $n$. If $p$ is irreducible of degree $d$, then $\mathbb F_2[X]/(p)$ is a finite field with $2^d$ elements, hence its multiplicative group is cyclic of order $n=2^d-1$ (and this $n$ is the smallest $n$ with $X^n\equiv 1$).

EDIT: I had overlooked the fact that the above conditins do not yet guarantee that the cyclic group is in fact generated by $X$ itself. See the comments for a more detailed explanation and better criteria. (I would delete this answer if it hadn't been accepted ;) )