What CRC32 implementation does AMPS use?

The AMPS CRC32() function is CRC32C with the following parameters:

  • Polynomial of 0x1EDC6F41

  • Initial value of 0xFFFFFFFF

  • Reflect input bytes

  • Reflect results

  • XOR with 0x00 before returning the result (no-op)

A standard CRC32 function with these parameters will return the same results as the AMPS CRC32() function.

For example, using the Boost C++ library, you can generate the same values as the AMPS CRC32() function with a CRC generator instantiated as follows:

boost::crc_optimal<32, 0x1EDC6F41, (unsigned int)(~0), 0, true, true> crc;

Keywords: CRC32, polynomial, checksum, hash

Last updated