3

Consider 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 any way that I can calculate the CRC on the message backward starting from the last byte and get the same results as if I am calculating it on the original message?

praseodym
  • 2,134
  • 15
  • 29
  • 1
    To check my understanding, if a message appended by its CRC8 is denoted by , and the CRC8 of this message CRC8() = 0 meaning the message is valid, you want a function RCRC8 that when applied to the reversed message RCRC8() = 0 if the message is valid? Is that right? Are the bits in the message also reversed or you are only considering reversed bytes? – guga Apr 27 '12 at 19:01

1 Answers1

-1

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

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

However, you can still check for the validity of your message if you know the CRC beforehand.

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

Note that this is only true if the message is reversed BITEWISE.

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

So be careful when implementing your algorithm ;-)

nicolas.leblanc
  • 588
  • 7
  • 27