Hello,
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[0] = padding constants[1] = (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] = (1<<128) / P - (1<<64)" stands for? The result doesnt seems to be a 64th bit polynomial. Thanks
Thanks Nick. Assuming that I would like to evaluate crc64 for the following polynomial : 0xad93d23594c935a9 what should I fill into the constants?
Thanks
Hi there,
Could I clarify, please: is the most-significant bit of your polynomial assumed to be 1, and therefore not stored in that representation? Or is it a degree-63 polynomial with the most-significant bit explictly stored?
Many thanks,
Nick
Hi Nick, this is crc-64-jones polynomial. Definition is from https://pycrc.org/models.html :
Thanks a lot!
dan
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?
Apologies,