Search code examples
crccrc32crc16

32 bit CRC with some inputs set to zero. Is this less accurate than dummy data?


Sorry if I should be able to answer this simple question myself!

I am working on an embedded system with a 32bit CRC done in hardware for speed. A utility exists that I cannot modify that initially takes 3 inputs (words) and returns a CRC.

If a standard 32 bit was implemented, would generating a CRC from a 32 bit word of actual data and 2 32 bit words comprising only of zeros produce a less reliable CRC than if I just made up/set some random values for the last 2 32?

Depending on the CRC/polynomial, my limited understanding of CRC would say the more data you put in the less accurate it is. But don't zero'd data reduce accuracy when performing the shifts?


Solution

  • Using zeros will be no different than some other value you might pick. The input word will be just as well spread among the CRC bits either way.