Calculation of CRC feedback message

You have this message (ab,cd,ef), and you have the ROHC (Robust header compression) CRC8 polynomial e0.

C(x) = x^0 + x^1 + x^2 + x^8

Is there a way that I can calculate the CRC in the message back starting from the last byte and get the same results as if I was counting it on the original message?

+3
source share
1 answer

No, this is not possible for your polynomial (100000111).

EG: 110100111/100000111 = 011010011
but: 111001011/xxxxxxxxx != 011010011 (in general)

However, you can still validate your message if you know the CRC in advance.

EG: 110100111/100000111 = 01101001
    => message transmitted = 11010011 01101001
    => message received (reversed) = 10010110 11001011

then: 10010110 11001011/111000001 == 0
(where: 111000001 = reversed(100000111))

=> crc(reversed(11001011)) = crc(11010011) == reversed(10010110) = 01101001

Please note that this is true only if the message is canceled by BITEWISE.

IE: reversed(ABC) = reversed(101010111100) = 001111010101
= 3D5 = reversed(ABC) != CBA = 110010111010 != reversed(101010111100)

Therefore, be careful when implementing your algorithm; -)

-1
source

All Articles