为什么对 CRC-8 使用 x^8 +x^2 +x+1 这样的生成多项式?

Why using Generator polynomial like this x^8 +x^2 +x+1 for CRC-8?

为什么对 CRC-8 使用这样的生成多项式 G(x) =x^8 +x^2 +x+1。如果这是最优的,我们如何证明它。 或者 使用此多项式 G(x) = x^5 + x^4 + x^2 + 1 用于 CRC-5-ITU。

所选的多项式决定了 CRC 的错误检测能力。此功能以汉明距离衡量,这是在保持 CRC 不变的情况下可以在消息中引入的比特错误的最小数量。这将是一个误报,CRC 表示消息是正确的,但事实并非如此。同样重要的是在每个比特错误数处存在多少这样的比特模式,称为汉明权重。这决定了 n 位错误导致误报的概率。

Exhaustive searches over all possible polynomials have been done by Koopman, et al, to find the those with the largest Hamming Distances and smallest Hamming Weights for various message lengths. As an example, the degree-8 polynomial you quote, used in the ITU-T Recommendation I.432.1 CRC, is good, but not the best you could pick. The polynomial x8+x6+x3+x2+1 provides a Hamming Distance of 3 for longer messages. These two pages 提供 Koopman 的最新结果。

这里的另一个答案表明 "the optimal polynomial depends on the input data set used." CRC 多项式的错误检测能力所依赖的数据的唯一方面是应用 CRC 的块的长度。由于 CRC 的线性 属性,错误检测能力实际上 完全独立于 消息中的数据。如果您异或两条相同长度的消息,则该新消息的 CRC 将是原始两条消息的 CRC 的异或。因此,一旦找到使 CRC 保持不变的最小错误集,则可以将该错误集应用于相同长度的 any 消息以获得误报。