This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CRC64 with ARM RAN Library

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: 

/**
 * 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


Parents Reply Children