I am trying to used crc64 function in crc_common.hpp to compute crc64. However is is nor clear to me what should be the const poly64_t constants parameter. According to the function description:
const poly64_t constants parameter. According to the function description:
* Computes a CRC64 in big- or little-endian mode using the specified shifts
* and polynomials. This can be used for smaller polynomials by shifting
* them to a degree 64 polynomial.
* @tparam BarretShift the shift used when computing @c ls1_divp.
* @param[in] size number of bytes of the given buffer
* @param[in] input points to the input byte sequence
* @param[out] crc24 the computed CRC on 24 bits
* @param[in] constants the constants specific to each polynomial:
constants = padding
constants = (1<<128) / P - (1<<64)
constants[2:11] = [ (1<<(64*k)) mod P,
for k in [1,1,2,3,4,5,6,7,8,9] ]
What "constants = (1<<128) / P - (1<<64)" stands for? The result doesnt seems to be a 64th bit polynomial. Thanks
Unfortunately our crc64 function is not suitable for evaluating arbitrary 64-bit polynomials. Because we are focused on 5G applications we have only implemented the CRCs listed in the appropriate 5G standard (Technical Specification 38.212) and these have a maximum length of 24 bits. The code is not designed to support longer CRCs.
It would be interesting to know the application domain for the crc-64-jones polynomial, however. Is it used in a different telecommunications specification, for example?