Electronic – Finding an input sequence given a generating polynomial and CRC

crc

I am working on a circuit that inputs a 31-bit pseudo-random binary string into a CCITT CRC-16 block which generates a 16-bit CRC output.

I know that M(x)/G(x) = Q(x) + R(x) and the transmitted code will be R(x) appended to M(x). [Q(x) is discarded].

When I simulated the circuit, I got a CRC of 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0. From the help file of the software (VisSim/Comm), I know that the generating polynomial is G(x) = 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1.

How do I determine the 31-bit input sequence that generated the CRC result?

Since M(x)/G(x) = Q(x) + R(x), we can say that M(x) = [Q(x) + R(x)]G(x). But we don't know Q(x). Assuming the 16-bit CRC is equal to R(x) and the G(x) is given, how do I go about finding M(x) without knowing Q(x)?

Best Answer

What this is telling you is that there is an infinite number of messages that will produce the same CRC, one for each possible Q(x). All you need to do is pick some particular value of Q(x) and generate the correesponding M(x).