crcerror-checking

Guideline of choosing a polynomial in CRC for a given message


I'm trying to code on performing cyclic redundancy checksum for a given input message with a polynomial.

For specific examples, I realize that for some polynomials, even if the message sent to the receiver side is wrong, the CRC will output as if there is no error.

What are general guidelines on choosing a polynomial that will detect errors and what factors determine it (e.g. is it dependent on the message size, does it have to do anything with parity, does longer polynomials help catch more errors)?

For example, I am given the message on the receiver side 1101 with the polynomial 10 where the CRC is generated according to the even parity.

First, I perform binary long division and get the remainder as 0. Then, I append it to the message and send it as 11010 The problem is on the receiver side, where even if the received message is wrong, the CRC will not detect the error since the last digit 0 is always divisible by 2 regardless of the message. For example, 11110, 10000, ... etc will be undetected.


Solution

  • If by "polynomial 10" you mean the polynomial x, then that is not a valid CRC polynomial. A CRC polynomial must always end with a 1. The one-bit CRC polynomial is x+1, or 11 in your notation. x gives you a zero-bit CRC!

    As for guidelines on choosing a polynomial, look at Koopman's research and resulting good performance CRCs for various message lengths.