#1
|
|||
|
|||
CRC Polynomial
I understand that the CRC is calculated by dividing the message by the CRC polynomial, and the checksum is the remainder of this division.
My question is, if the polynomial is, for example: x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1 Then why would my checksum ever have the top 5 bits set, because surely the remainder must be strictly less than the modulus? |
#2
|
|||
|
|||
CRC polynominals have always the highest degree (bit) set.
The full CRC32 polynominal you've posted is x^32 + x^26 + x^23 + x^22 + ... The x^32 part sometimes gets ommited, since you would need 33 bits to represent that number. Since you don't do an integer division but rather a polynominal division this is no problem. |
#3
|
|||
|
|||
Thanks for explaining that, it makes sense now.
I'm puzzled by another property of CRC. According to Wikipedia, the function is supposed to be linear: u = crc32(a ^ b); v = crc32(a) ^ crc32(b); Meaning that u==v for bytes a and b. But I'm finding that letting a=0x55 and b=0xAA gives me the checksums: u=0xFF000000 and v=0x2D02EF8D So in what sense is CRC linear? |
#4
|
|||
|
|||
For anyone who is interested, it turns out that CRC satisfies this identity:
crc32(a) ^ crc32(b) ^ crc32(c) = crc32(a ^ b ^ c) |
The Following User Says Thank You to dila For This Useful Post: | ||
Hypnz (03-28-2016) |
#5
|
|||
|
|||
that i did kinda know...
safedisc used it lots... in the end all you had to do was find the master key and skip a lot of their functions |
Tags |
checksum, crc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to compute the inverse of a polynomial under GF(2^8) ? | BlackWhite | General Discussion | 0 | 10-10-2015 21:24 |