I am trying to compound 2 CRC polynomials. I have a message for which I produce a CRC using one polynomial. I then CRC the result of the first CRC in order to obtain a second result. Is there any possible way to do this in one go?
Example: Given the message 0xC and the polynomial 0x17 I compute the CRC which is 0xA. I then take this result and another polynomial 0x13 and compute the CRC again which produces the result 0xD. I am trying to derive a new polynomial which given the message 0xC will produce the result 0xD.
I have only tried to work this on paper so I do not have any code but some code should look like this:
def CRC(message, poly):
#CRC implementation
a = CRC(0xC, 0x17)
#The value of a right now would be 0xA
b = CRC(a, 0x13)
#The value of b is 0xD right now
I am trying to obtain the same result using my initial message and one single function call
b = CRC(0xC, ???)
#I would want the value of b after this call to be 0xD
It seems like a dumb request but I find it helpful. I have tried applying simple math specifically The quotient remainder theorem but I find multiplying in finite fields to be overly complex.