
Both seem to be giving same output for same polynomial (0x1310 instead of 0x1070 in the linked code).

I tried running the code you posted and another crc8 code found here. I have found online a crc8 code in C, how I can verify the correctness of the code ? From Wikipedia ( ), CRC has this property: CRC(x^y^z) = crc(x) ^ crc(y) ^ crc(z) So same thing applies to CRC-8 as to MD5 etc. If crc(A)=a and crc(B)=b, can I use a and b to find crc(AB) ?ĭoes crc have any algebraical properties ?ĭid you mean associative, commutative etc? It is a hash function. Is crc reversible ? this mean if crc(x)=y can I find x if I have y ? CRC-8, I am not sure about it's efficiency as it can only generate up to 256 unique values. CRC-16 and CRC-32 are the more commonly used. Is crc standard ? I mean if I tell somebody that I am using crc8 in my frame, should I give him my crc8 code for it or he can find it online because it is a standard ?ĬRC is standard? Yes.

It is like a hash function but it is not a secure hash and must be used for limited purposes, like error checking.įollowing are simple answers to some of your questions. It computes a n-bit value corresponding to a given set of bytes (data), where n is the number in CRC-n (so 8 bits for CRC-8). CRC is usually used to validate a piece of data (which really means an array of bytes).
